CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawloggermodel.h
Go to the documentation of this file.
1#ifndef CANRAWLOGGERMODEL_H
2#define CANRAWLOGGERMODEL_H
3
4#include "canrawlogger.h"
5#include "componentmodel.h"
6#include "nodepainter.h"
7#include <QtCore/QObject>
8
9using QtNodes::NodeData;
10using QtNodes::NodeDataType;
11using QtNodes::PortIndex;
12using QtNodes::PortType;
13
14class QCanBusFrame;
15enum class Direction;
16
17class CanRawLoggerModel : public ComponentModel<CanRawLogger, CanRawLoggerModel> {
18 Q_OBJECT
19
20public:
22
23 unsigned int nPorts(PortType portType) const override;
24 NodeDataType dataType(PortType portType, PortIndex portIndex) const override;
25 std::shared_ptr<NodeData> outData(PortIndex port) override;
26 void setInData(std::shared_ptr<NodeData> nodeData, PortIndex port) override;
27 QtNodes::NodePainterDelegate* painterDelegate() const override;
28
29public slots:
30
31signals:
32 void frameReceived(const QCanBusFrame& frame);
33 void frameSent(bool status, const QCanBusFrame& frame);
35
36private:
37 std::unique_ptr<NodePainter> _painter;
38};
39
40#endif // CANRAWLOGGERMODEL_H
Definition canrawloggermodel.h:17
CanRawLoggerModel()
Definition canrawloggermodel.cpp:22
NodeDataType dataType(PortType portType, PortIndex portIndex) const override
Definition canrawloggermodel.cpp:44
unsigned int nPorts(PortType portType) const override
Definition canrawloggermodel.cpp:39
void frameSent(bool status, const QCanBusFrame &frame)
QtNodes::NodePainterDelegate * painterDelegate() const override
Definition canrawloggermodel.cpp:34
void setInData(std::shared_ptr< NodeData > nodeData, PortIndex port) override
Definition canrawloggermodel.cpp:59
std::shared_ptr< NodeData > outData(PortIndex port) override
Definition canrawloggermodel.cpp:54
void frameReceived(const QCanBusFrame &frame)
Definition componentmodel.h:37
Direction
The enum class describing frame direction.
Definition datadirection.h:7