CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawlogger.h
Go to the documentation of this file.
1#ifndef CANRAWLOGGER_H
2#define CANRAWLOGGER_H
3
4#include <QWidget>
5#include <QtCore/QScopedPointer>
7#include <context.h>
8#include <memory>
9
10class QCanBusFrame;
12class QWidget;
14
15class CanRawLogger : public QObject, public ComponentInterface {
16 Q_OBJECT
17 Q_DECLARE_PRIVATE(CanRawLogger)
18
19public:
21 explicit CanRawLogger(CanRawLoggerCtx&& ctx);
23
24 QWidget* mainWidget() override;
25 void setConfig(const QJsonObject& json) override;
26 void setConfig(const QWidget& qobject) override;
27 QJsonObject getConfig() const override;
28 std::shared_ptr<QWidget> getQConfig() const override;
29 void configChanged() override;
30 bool mainWidgetDocked() const override;
32
33signals:
34 void mainWidgetDockToggled(QWidget* widget) override;
35 void simBcastSnd(const QJsonObject &msg, const QVariant &param = QVariant()) override;
36
37public slots:
38 void stopSimulation() override;
39 void startSimulation() override;
40 void frameReceived(const QCanBusFrame& frame);
41 void frameSent(bool status, const QCanBusFrame& frame);
42 void simBcastRcv(const QJsonObject &msg, const QVariant &param) override;
43
44private:
45 QScopedPointer<CanRawLoggerPrivate> d_ptr;
46};
47
48#endif //CANRAWLOGGER_H
Context CanRawLoggerCtx
Definition canrawlogger.h:13
Definition canrawlogger.h:15
void frameSent(bool status, const QCanBusFrame &frame)
Definition canrawlogger.cpp:129
QWidget * mainWidget() override
Gets components's main widget.
Definition canrawlogger.cpp:20
ComponentInterface::ComponentProperties getSupportedProperties() const override
Definition canrawlogger.cpp:60
std::shared_ptr< QWidget > getQConfig() const override
Gets current component configuation.
Definition canrawlogger.cpp:45
void mainWidgetDockToggled(QWidget *widget) override
void setConfig(const QJsonObject &json) override
Sets configuration for component.
Definition canrawlogger.cpp:26
void simBcastSnd(const QJsonObject &msg, const QVariant &param=QVariant()) override
void stopSimulation() override
Definition canrawlogger.cpp:65
CanRawLogger()
Definition canrawlogger.cpp:8
void frameReceived(const QCanBusFrame &frame)
Definition canrawlogger.cpp:122
QJsonObject getConfig() const override
Gets current component configuation.
Definition canrawlogger.cpp:40
void configChanged() override
Reconfigure component if necessary.
Definition canrawlogger.cpp:52
~CanRawLogger()
Definition canrawlogger.cpp:18
void startSimulation() override
Definition canrawlogger.cpp:75
void simBcastRcv(const QJsonObject &msg, const QVariant &param) override
Definition canrawlogger.cpp:136
bool mainWidgetDocked() const override
Main widget docking status.
Definition canrawlogger.cpp:54
Definition canrawlogger_p.h:13
Interface to be implemented by every component.
Definition componentinterface.h:15
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66
Definition context.h:13