Class CCANSilKit#

Nested Relationships#

Nested Types#

Inheritance Relationships#

Base Types#

Class Documentation#

class CCANSilKit : public sdv::CSdvObject, public sdv::can::IRegisterReceiver, public sdv::can::ISend, private sdv::can::IInformation#

Component to establish Socket CAN communication between VAPI and external application.

Public Functions

virtual bool OnInitialize() override#

Initialization event, called after object configuration was loaded. Overload of sdv::CSdvObject::OnInitialize.

The CAN_Com_SilKit uses the following configuration:

DebugInfo = true
SyncMode = true
SilKitParticipantName = "can_writer"
CanSilKitNetwork = "PrivateCAN"
RegistryURI = "silkit://localhost:8500"
SilKitConfig = """{
                    "Logging": {
                        "Sinks": [ { "Type": "Stdout", "Level": "Info" } ]
                },
    }"""

Returns:

Returns ‘true’ when the initialization was successful, ‘false’ when not.

virtual void OnShutdown() override#

Shutdown the object. Overload of sdv::CSdvObject::OnShutdown.

virtual void RegisterReceiver(sdv::can::IReceive *pReceiver) override#

Register a CAN message receiver. Overload of sdv::can::IRegisterReceiver::RegisterReceiver.

Parameters:

pReceiver[in] Pointer to the receiver interface.

virtual void UnregisterReceiver(sdv::can::IReceive *pReceiver) override#

Unregister a previously registered CAN message receiver. Overload of sdv::can::IRegisterReceiver::UnregisterReceiver.

Parameters:

pReceiver[in] Pointer to the receiver interface.

virtual void Send(const sdv::can::SMessage &sSDVCanMessage, uint32_t uiIfcIndex) override#

Send a CAN message. Overload of sdv::can::ISend::Send.

Parameters:
  • sSDVCanMessage[in] Message that is to be sent. The source node information is ignored. The target node determines over what interface the message will be sent.

  • uiIfcIndex[in] Interface index to use for sending.

virtual sdv::sequence<sdv::u8string> GetInterfaces() const override#

Get a list of interface names. Overload of sdv::can::IInformation::GetInterfaces.

Returns:

Sequence containing the names of the interfaces.