Snapdragon® Telematics Application Framework (TelAF) Interface Specification
|
The diag DataID service APIs are part of the diagnostic service. The DataID service provides ReadDataByIdentifier(0x22) and WriteDataByIdentifier(0x2E) service. The ReadDataByIdentifier(0x22) service allows the client to request data record values from the server identified by one or more data identifiers, and the WriteDataByIdentifier(0x2E) service allows the client to write information into the server at an internal location specified by the provided data identifier.
The functions of this API are provided by the tafDiagSvc platform service.
The following example illustrates how to bind to the diag DataID service.
bindings: { clientExe.clientComponent.taf_diagDataID -> tafDiagSvc.taf_diagDataID }
A diag DataID service reference should be got using taf_diagDataID_GetService(). Use the returned reference for subsequent operations.
The following example illustrates how to set up a diag DataID server-service-instance.
After getting the service reference, an application can call taf_diagDataID_AddRxReadDIDMsgHandler() to register a message handler for ReadDataByIdentifier(0x22) service. Once a ReadDataByIdentifier service request message is received, the handler will be called with the message reference and data identifier passed as input parameters. The application will read the data record for requested DID and uses the message reference to send a response message using taf_diagDataID_SendReadDIDResp().
After getting the service reference, an application can call taf_diagDataID_AddRxWriteDIDMsgHandler() to register a message handler for WriteDataByIdentifier(0x2E) service. Once a WriteDataByIdentifier service request message is received, the handler will be called with the message reference and data identifier passed as input parameters. The application will get the request data record using taf_diagDataID_GetWriteDataRecord() and uses the message reference to send a response message using taf_diagDataID_SendReadDIDResp().
An application can remove the Data ID server service by calling taf_diagDataID_RemoveSvc().