CANdevStudio
Development tool for CAN bus simulation
|
The class provides abstraction layer for CAN BUS hardware. More...
#include <candevice.h>
Public Slots | |
void | sendFrame (const QCanBusFrame &frame) |
void | startSimulation () override |
void | stopSimulation () override |
void | simBcastRcv (const QJsonObject &msg, const QVariant ¶m) override |
Signals | |
void | frameReceived (const QCanBusFrame &frame) |
void | frameSent (bool status, const QCanBusFrame &frame) |
void | mainWidgetDockToggled (QWidget *widget) override |
void | simBcastSnd (const QJsonObject &msg, const QVariant ¶m=QVariant()) override |
Public Member Functions | |
CanDevice () | |
CanDevice (CanDeviceCtx &&ctx) | |
~CanDevice () | |
bool | init () |
Configures CAN BUS backend and interface. | |
QWidget * | mainWidget () override |
void | setConfig (const QJsonObject &json) override |
void | setConfig (const QWidget &qobject) override |
QJsonObject | getConfig () const override |
std::shared_ptr< QWidget > | getQConfig () const override |
virtual void | configChanged () override |
bool | mainWidgetDocked () const override |
ComponentProperties | getSupportedProperties () const override |
Public Member Functions inherited from ComponentInterface | |
virtual | ~ComponentInterface () |
virtual void | mainWidgetDockToggled (QWidget *widget)=0 |
Signal to be implemented by Component. Indicates when dock/undock action was invoked. | |
virtual void | stopSimulation ()=0 |
Slot to be implemented by Component to execute simulation stop action. | |
virtual void | startSimulation ()=0 |
Slot to be implemented by Component to execute simulation start action. | |
virtual void | simBcastSnd (const QJsonObject &msg, const QVariant ¶m=QVariant())=0 |
virtual void | simBcastRcv (const QJsonObject &msg, const QVariant ¶m)=0 |
Additional Inherited Members | |
Public Types inherited from ComponentInterface | |
using | PropertyEditable = bool |
using | CustomEditFieldCbk = std::function< QWidget *(void)> |
using | ComponentProperty = std::tuple< QString, QVariant::Type, PropertyEditable, CustomEditFieldCbk > |
using | ComponentProperties = std::vector< ComponentProperty > |
using | PropertyContainer = std::map< QString, QVariant > |
Static Public Member Functions inherited from ComponentInterface | |
static constexpr const QString & | propertyName (const ComponentProperty &p) |
static constexpr const QVariant::Type & | propertyType (const ComponentProperty &p) |
static constexpr const PropertyEditable & | propertyEditability (const ComponentProperty &p) |
static constexpr const CustomEditFieldCbk & | propertyField (const ComponentProperty &p) |
The class provides abstraction layer for CAN BUS hardware.
|
explicit |
|
explicit |
CanDevice::~CanDevice | ( | ) |
|
overridevirtual |
Implements ComponentInterface.
|
signal |
|
signal |
|
overridevirtual |
Implements ComponentInterface.
|
overridevirtual |
Implements ComponentInterface.
|
overridevirtual |
Implements ComponentInterface.
bool CanDevice::init | ( | ) |
Configures CAN BUS backend and interface.
This function configures QtCanBus class with backend and interface values stored in properties.
|
overridevirtual |
Implements ComponentInterface.
|
overridevirtual |
Implements ComponentInterface.
|
overridesignal |
|
slot |
|
overridevirtual |
Implements ComponentInterface.
|
overridevirtual |
Implements ComponentInterface.
|
overrideslot |
|
overridesignal |
|
overrideslot |
|
overrideslot |