CANdevStudio
Development tool for CAN bus simulation
Loading...
Searching...
No Matches
canrawsender.h
Go to the documentation of this file.
1#ifndef CANRAWSENDER_H
2#define CANRAWSENDER_H
3
4#include <QWidget>
5#include <QtCore/QScopedPointer>
7#include <context.h>
8
9class QCanBusFrame;
11class QWidget;
12
13class CanRawSender : public QObject, public ComponentInterface {
14 Q_OBJECT
15 Q_DECLARE_PRIVATE(CanRawSender)
16
17public:
19 explicit CanRawSender(CanRawSenderCtx&& ctx);
21
22 // TODO this should go as config parameter!
23 int getLineCount() const;
24
28 QWidget* mainWidget() override;
29
33 void setConfig(const QJsonObject& json) override;
34
38 void setConfig(const QWidget& qobject) override;
39
43 QJsonObject getConfig() const override;
44
48 std::shared_ptr<QWidget> getQConfig() const override;
49
53 virtual void configChanged() override;
54
58 bool mainWidgetDocked() const override;
59
64
65signals:
66 void sendFrame(const QCanBusFrame& frame);
67
71 void mainWidgetDockToggled(QWidget* widget) override;
72
73 void simBcastSnd(const QJsonObject &msg, const QVariant &param = QVariant()) override;
74
75public slots:
79 void stopSimulation() override;
83 void startSimulation() override;
84
85 void simBcastRcv(const QJsonObject &msg, const QVariant &param) override;
86
87private:
88 QScopedPointer<CanRawSenderPrivate> d_ptr;
89};
90
91#endif // CANRAWSENDER_H
Definition canrawsender.h:13
void sendFrame(const QCanBusFrame &frame)
virtual void configChanged() override
Definition canrawsender.cpp:34
void simBcastSnd(const QJsonObject &msg, const QVariant &param=QVariant()) override
void setConfig(const QJsonObject &json) override
Definition canrawsender.cpp:62
CanRawSender()
Definition canrawsender.cpp:6
QJsonObject getConfig() const override
Definition canrawsender.cpp:68
void mainWidgetDockToggled(QWidget *widget) override
int getLineCount() const
Definition canrawsender.cpp:56
void simBcastRcv(const QJsonObject &msg, const QVariant &param) override
Definition canrawsender.cpp:87
ComponentInterface::ComponentProperties getSupportedProperties() const override
Definition canrawsender.cpp:82
bool mainWidgetDocked() const override
Definition canrawsender.cpp:77
std::shared_ptr< QWidget > getQConfig() const override
Definition canrawsender.cpp:27
void stopSimulation() override
Definition canrawsender.cpp:44
void startSimulation() override
Definition canrawsender.cpp:38
QWidget * mainWidget() override
Definition canrawsender.cpp:50
~CanRawSender()
Definition canrawsender.cpp:16
This class is responsible for manage can raw sender window.
Definition canrawsender_p.h:19
Interface to be implemented by every component.
Definition componentinterface.h:15
std::vector< ComponentProperty > ComponentProperties
Definition componentinterface.h:66