ADTF_DEVICE_TOOLBOX  3.12.1 (ADTF 3.18.3)
IBusDatabaseLoaderabstract

Interface for implementing bus database readers. More...

Inheritance diagram for IBusDatabaseLoader:
[legend]

Public Member Functions

 ADTF_IID (IBusDatabaseLoader, "bus_database_loader.axle.sdk.devicetb.adtf.iid")
 
virtual bool Accept (const char *strFileNameList, const char *strBusType) const =0
 Checks if the parser supports the requested bus database file(s). More...
 
virtual tResult Load (const char *strFilenameList, const char *strBusType, adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &pDatabase)=0
 Reads bus database files into an instance of a database object. More...
 
virtual const char * GetName () const =0
 Returns the name of the implementing parser instance. More...
 

Detailed Description

Interface for implementing bus database readers.

Inherit this interface in your class in order to implement your own parser for bus communication specifications. Such a parser can be registered in the CAN/LIN/FlexRay Support Services as providers for bus communication descriptions if you have special needs or different file formats other than DBC or FIBEX.

Definition at line 59 of file bus_database_intf.h.

Member Function Documentation

◆ Accept()

virtual bool Accept ( const char *  strFileNameList,
const char *  strBusType 
) const
pure virtual

Checks if the parser supports the requested bus database file(s).

Implement this to check if the files passed as parameter can or should be handled by this implementation of IBusDatabaseLoader.

Parameters
[in]strFileNameListcomma separated list of file paths that are about to be checked.
[in]strBusTypeindicates the specific Bus type with the Class ID macro: CID_DEVTB_<BusType>_DB_PARSER For example: CID_DEVTB_CANDB_PARSER defines the CAN-BusType.
Return values
trueif files are supported and should be handled by this instance.
falseif files are not supported or should not be read using this instance.

◆ GetName()

virtual const char* GetName ( ) const
pure virtual

Returns the name of the implementing parser instance.

Implement this method in order to be able to identify which implementation for reading a bus database has been used (will be mentioned in console log window).

Returns
name of the implementing instance

◆ Load()

virtual tResult Load ( const char *  strFilenameList,
const char *  strBusType,
adtf::ucom::ant::iobject_ptr< adtf::ucom::ant::IObject > &  pDatabase 
)
pure virtual

Reads bus database files into an instance of a database object.

Implement this method to create an instance of a CAN/FlexRay database and load the contents of the file passed as parameter into that instance.

Parameters
[in]strFilenameListcomma separated list of files to read the signal database specifications from
[in]strBusTypeindicates the specific Bus type with the Class ID macro: CID_DEVTB_<BusType>_DB_PARSER For example: CID_DEVTB_CANDB_PARSER defines the CAN-BusType.
[out]pDatabasepointer to the new database object instance that contains the deserialized values from the database file(s) strFilenameList
Returns
standard error code