CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canbusmodel.hpp
Go to the documentation of this file.
1#ifndef CANBUSMODEL_HPP
2#define CANBUSMODEL_HPP
3
4#include <QObject>
5#include <QCanBusFrame>
6
10class CANBusModel : public QObject
11{
12 Q_OBJECT
13
14public:
15 CANBusModel() : QObject(nullptr) {}
16
17signals:
23 void sendFrame(const quint32& frameId, const QByteArray& frameData);
24
30 void sendSignal(const QString& name, const QVariant& value);
31
37 void frameReceived(const quint32& frameId, const QByteArray& frameData);
38
44 void signalReceived(const QString& name, const QVariant& value);
45
50
55};
56
57#endif // CANBUSMODEL_HPP
The CANBusModel class is used to interface CAN operations with QML stack.
Definition canbusmodel.hpp:11
void sendSignal(const QString &name, const QVariant &value)
Send a CAN named signal.
void signalReceived(const QString &name, const QVariant &value)
A CAN signal was received.
void frameReceived(const quint32 &frameId, const QByteArray &frameData)
A CAN frame was received.
CANBusModel()
Definition canbusmodel.hpp:15
void sendFrame(const quint32 &frameId, const QByteArray &frameData)
Sends a CAN frame.
void simulationStopped()
The simulation was stopped.
void simulationStarted()
The simulation was started.