mirror of
https://github.com/Sani7/remote-ui.git
synced 2026-10-27 14:11:12 +01:00
23 lines
500 B
C++
23 lines
500 B
C++
#pragma once
|
|
#include <QCanBus>
|
|
#include <QCanBusDevice>
|
|
#include <QCanBusFrame>
|
|
#include <QObject>
|
|
|
|
class CAN_Interface : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
CAN_Interface(QString dev, QObject *parent = nullptr);
|
|
~CAN_Interface();
|
|
|
|
void send_frame(const QCanBusFrame frame);
|
|
signals:
|
|
void frame_received(QCanBusFrame frame);
|
|
void frame_send(QCanBusFrame frame);
|
|
|
|
private:
|
|
void processErrors(QCanBusDevice::CanBusError error) const;
|
|
QCanBusDevice *m_canDevice;
|
|
};
|