1#ifndef CANRAWVIEWMODEL_H
2#define CANRAWVIEWMODEL_H
7#include <QtSerialBus/QCanBusFrame>
9using QtNodes::NodeData;
10using QtNodes::NodeDataType;
11using QtNodes::PortIndex;
12using QtNodes::PortType;
29 unsigned int nPorts(PortType portType)
const override;
37 NodeDataType
dataType(PortType portType, PortIndex portIndex)
const override;
44 std::shared_ptr<NodeData>
outData(PortIndex port)
override;
51 void setInData(std::shared_ptr<NodeData> nodeData, PortIndex port)
override;
71 void frameSent(
bool status,
const QCanBusFrame& frame);
76 std::unique_ptr<NodePainter> _painter;
The class provides node graphical representation of CanRawView.
Definition canrawviewmodel.h:17
void frameSent(bool status, const QCanBusFrame &frame)
Emits signal on CAN fram transmission.
CanRawViewModel()
Definition canrawviewmodel.cpp:6
QtNodes::NodePainterDelegate * painterDelegate() const override
Used to provide custom painter to nodeeditor.
Definition canrawviewmodel.cpp:20
std::shared_ptr< NodeData > outData(PortIndex port) override
Sets output data for propagation, not used in this class.
Definition canrawviewmodel.cpp:35
unsigned int nPorts(PortType portType) const override
Used to get number of ports of each type used by model.
Definition canrawviewmodel.cpp:25
virtual ~CanRawViewModel()=default
void setInData(std::shared_ptr< NodeData > nodeData, PortIndex port) override
Handles data on input port, send frames to CanRawView.
Definition canrawviewmodel.cpp:40
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Used to get data type of each port.
Definition canrawviewmodel.cpp:30
void frameReceived(const QCanBusFrame &frame)
Emits singal on CAN frame receival.
Definition componentmodel.h:37