ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
CAN FD DBC Support Service
Note
Using this service will automatic load the adtffileplugin for deserialization and extend the support for recordings containg data from ADTF Device Toolbox 2.x, there is no need to add the devtb2 support service as well. See ADTF Device Toolbox 2.x Support.

Plugin Information
Plugin Filenamecanfd.adtfplugin
Plugin Descriptioncanfd.plugindescription
Plugin NameCAN FD DBC Support Service Plugin
LicenseADTF
Support Mailsupport@digitalwerk.net
Homepage URLwww.digitalwerk.net
Plugin Versions
Plugin Version3.12.1
Plugin File Version1.0
adtf::devicetb3.12.1
adtf3.18.3
adtf::ucom3.1.0
Component Information
NameCAN FD DBC Support Service
CIDcanfd.service.devicetb.cid
DescriptionUse this service to extend the ADTF System with CAN FD support using dbc database.
TypeService
Default Runlevelsession
Properties
NameValueTypeDescriptionSubproperties
canfd_channel_0cFilenameListDatabase for mapped CAN FD channel 0
canfd_channel_0_cluster_namecStringCluster name for mapped CAN FD channel 0
canfd_channel_1cFilenameListDatabase for mapped CAN FD channel 1
canfd_channel_10cFilenameListDatabase for mapped CAN FD channel 10
canfd_channel_10_cluster_namecStringCluster name for mapped CAN FD channel 10
canfd_channel_11cFilenameListDatabase for mapped CAN FD channel 11
canfd_channel_11_cluster_namecStringCluster name for mapped CAN FD channel 11
canfd_channel_12cFilenameListDatabase for mapped CAN FD channel 12
canfd_channel_12_cluster_namecStringCluster name for mapped CAN FD channel 12
canfd_channel_13cFilenameListDatabase for mapped CAN FD channel 13
canfd_channel_13_cluster_namecStringCluster name for mapped CAN FD channel 13
canfd_channel_14cFilenameListDatabase for mapped CAN FD channel 14
canfd_channel_14_cluster_namecStringCluster name for mapped CAN FD channel 14
canfd_channel_15cFilenameListDatabase for mapped CAN FD channel 15
canfd_channel_15_cluster_namecStringCluster name for mapped CAN FD channel 15
canfd_channel_16cFilenameListDatabase for mapped CAN FD channel 16
canfd_channel_16_cluster_namecStringCluster name for mapped CAN FD channel 16
canfd_channel_1_cluster_namecStringCluster name for mapped CAN FD channel 1
canfd_channel_2cFilenameListDatabase for mapped CAN FD channel 2
canfd_channel_2_cluster_namecStringCluster name for mapped CAN FD channel 2
canfd_channel_3cFilenameListDatabase for mapped CAN FD channel 3
canfd_channel_3_cluster_namecStringCluster name for mapped CAN FD channel 3
canfd_channel_4cFilenameListDatabase for mapped CAN FD channel 4
canfd_channel_4_cluster_namecStringCluster name for mapped CAN FD channel 4
canfd_channel_5cFilenameListDatabase for mapped CAN FD channel 5
canfd_channel_5_cluster_namecStringCluster name for mapped CAN FD channel 5
canfd_channel_6cFilenameListDatabase for mapped CAN FD channel 6
canfd_channel_6_cluster_namecStringCluster name for mapped CAN FD channel 6
canfd_channel_7cFilenameListDatabase for mapped CAN FD channel 7
canfd_channel_7_cluster_namecStringCluster name for mapped CAN FD channel 7
canfd_channel_8cFilenameListDatabase for mapped CAN FD channel 8
canfd_channel_8_cluster_namecStringCluster name for mapped CAN FD channel 8
canfd_channel_9cFilenameListDatabase for mapped CAN FD channel 9
canfd_channel_9_cluster_namecStringCluster name for mapped CAN FD channel 9
Required Interfaces
IID
canfd_dbc.parser.canfd.sdk.devicetb.adtf.iid
macroresolver.ant.base.adtf.iid
adtf_file_objects.devil.services.adtf.iid
Provided Interfaces
IID
bus_database_registry.axle.sdk.devicetb.adtf.iid
canfd.axle.canfd.sdk.devicetb.adtf.iid
canfd_database.axle.canfd.sdk.devicetb.adtf.iid
canfd_database_list.axle.canfd.sdk.devicetb.adtf.iid
canfd_coder.axle.canfd.sdk.devicetb.adtf.iid
canfd_coder.ignition.canfd.sdk.devicetb.adtf.iid
canfd_database.ignition.canfd.sdk.devicetb.adtf.iid
canfd.ignition.canfd.sdk.devicetb.adtf.iid
canfd.jack.canfd.sdk.devicetb.adtf.iid

Working with the CAN FD Sample

The internal structure of the CAN FD Stream Type is from type adtf::devicetb::sdk::canfd::stream_meta_type_canfd and defined in the canfd_types.h header file. The following code shows how to create a new CAN FD Sample:

streaming::output_sample_data<devicetb::sdk::can::tCANFDData> pSample(m_pClock->GetTime());
std::memset(pSample.GetDataPtr(), 0, sizeof(devicetb::sdk::can::tCANFDData));
axle::tCANFDData tCANFDData
The CAN FD data structure is used by CAN FD MediaSamples.
Definition: canfd_types.h:726

That's it! Once the CAN FD Stream Type is set (see below), all following media samples are assumed to be from the same stream type. So no specific sample type information must be set during a sample allocation.

Working with the CAN FD Stream Type

The Pins for receiving or sending new CAN FD Samples must be from a CAN FD Stream Type. The following code shows how to create an Output Pin with this type:

adtf::streaming::ISampleWriter* m_pWriter = CreateOutputPin("canfd_output", adtf::devicetb::sdk::can::stream_meta_type_canfd());
adtf::streaming::ISampleReader* m_pReader = CreateInputPin("canfd_input", adtf::devicetb::sdk::can::stream_meta_type_canfd());
axle::stream_meta_type_canfd stream_meta_type_canfd
Definition of Stream Meta Type CANFD Messages.

All samples which are transmitted on these pins are assumed to be from a CAN FD Stream Type.

Working with the CAN FD Service

The CAN FD Service implements the CANFD Coder (adtf::devicetb::sdk::canfd::ICANFDCoder) and keeps a list of all registered database parsers. It also offers different interfaces for querying CAN FD databases (DBC files) or create new CAN FD Coder objects. It has to be used whenever CAN FD data must be processed.

The following code shows how to query the registered instance of the CAN FD Service:

object_ptr<ICANFDSupport> pService;
_runtime->GetObject(pService));

In contrast to the can service, the CAN FD Service does not offer an extended service. The whole interface is combined within ICANFDSupport.