1#ifndef QMLEXECUTORMODEL_H
2#define QMLEXECUTORMODEL_H
6#include <QtCore/QObject>
7#include <QtSerialBus/QCanBusFrame>
19using QtNodes::NodeData;
20using QtNodes::NodeDataType;
21using QtNodes::PortIndex;
22using QtNodes::PortType;
42 unsigned int nPorts(PortType portType)
const override;
45 NodeDataType
dataType(PortType portType, PortIndex portIndex)
const override;
48 std::shared_ptr<NodeData>
outData(PortIndex port)
override;
51 void setInData(std::shared_ptr<NodeData> nodeData, PortIndex port)
override;
67 void sendFrame(
const quint32& frameId,
const QByteArray& frameData);
78 void frameReceived(
const quint32& frameId,
const QByteArray& frameData);
107 std::shared_ptr<NodeData> getNextQueuedFrame();
113 std::shared_ptr<NodeData> getNextQueuedSignal();
117 std::unique_ptr<NodePainter> _painter;
120 std::deque<CanRawData> _rawSendQueue;
123 std::deque<CanSignalModel> _signalSendQueue;
126 std::unique_ptr<CANBusModel> _CANBusModel;
The CANBusModel class is used to interface CAN operations with QML stack.
Definition canbusmodel.hpp:11
Definition componentmodel.h:37
virtual QString name() const override
Used to identify model by data model name.
Definition componentmodel.h:115
The QMLExecutorModel A model for QML executor component.
Definition qmlexecutormodel.h:31
void sendFrame(const quint32 &frameId, const QByteArray &frameData)
Definition qmlexecutormodel.cpp:162
void sendSignal(const QString &name, const QVariant &value)
Definition qmlexecutormodel.cpp:174
QMLExecutorModel()
only constructor to satisfy ql
Definition qmlexecutormodel.cpp:35
void simulationStopped()
not used currently
void requestRedraw()
not used currently
std::shared_ptr< NodeData > outData(PortIndex port) override
Definition qmlexecutormodel.cpp:76
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Definition qmlexecutormodel.cpp:65
void signalReceived(const QString &name, const QVariant &value)
A CAN signal was received.
QtNodes::NodePainterDelegate * painterDelegate() const override
Definition qmlexecutormodel.cpp:55
void simulationStarted()
not used currently
void setInData(std::shared_ptr< NodeData > nodeData, PortIndex port) override
Definition qmlexecutormodel.cpp:123
CANBusModel * getCANBusModel()
testing facility
Definition qmlexecutormodel.cpp:183
unsigned int nPorts(PortType portType) const override
Definition qmlexecutormodel.cpp:60
void frameReceived(const quint32 &frameId, const QByteArray &frameData)
Direction
The enum class describing frame direction.
Definition datadirection.h:7