1#ifndef CANSIGNALENCODERMODEL_H
2#define CANSIGNALENCODERMODEL_H
6#include <QtCore/QObject>
9#include <readerwriterqueue.h>
11using QtNodes::NodeData;
12using QtNodes::NodeDataType;
13using QtNodes::PortIndex;
14using QtNodes::PortType;
25 unsigned int nPorts(PortType portType)
const override;
26 NodeDataType
dataType(PortType portType, PortIndex portIndex)
const override;
27 std::shared_ptr<NodeData>
outData(PortIndex port)
override;
28 void setInData(std::shared_ptr<NodeData> nodeData, PortIndex port)
override;
32 void rcvFrame(
const QCanBusFrame& frame);
39 std::unique_ptr<CanDbPainter> _painter;
41 moodycamel::ReaderWriterQueue<std::shared_ptr<NodeData>> _rxQueue{ 127 };
Definition cansignalencodermodel.h:19
void setInData(std::shared_ptr< NodeData > nodeData, PortIndex port) override
Definition cansignalencodermodel.cpp:72
unsigned int nPorts(PortType portType) const override
Definition cansignalencodermodel.cpp:44
void sndSignal(const QString &name, const QVariant &val)
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Definition cansignalencodermodel.cpp:49
QtNodes::NodePainterDelegate * painterDelegate() const override
Definition cansignalencodermodel.cpp:39
CanSignalEncoderModel()
Definition cansignalencodermodel.cpp:26
void rcvFrame(const QCanBusFrame &frame)
Definition cansignalencodermodel.cpp:83
std::shared_ptr< NodeData > outData(PortIndex port) override
Definition cansignalencodermodel.cpp:59
Definition componentmodel.h:37
virtual QString name() const override
Used to identify model by data model name.
Definition componentmodel.h:115
Direction
The enum class describing frame direction.
Definition datadirection.h:7