Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagDataID_common.h File Reference
#include "legato.h"
#include "taf_types_common.h"

Go to the source code of this file.

Macros

#define IFGEN_TAF_DIAGDATAID_PROTOCOL_ID   "847204a3058eeb7f8f65a46a2fffc09e"
 
#define IFGEN_TAF_DIAGDATAID_MSG_SIZE   4114
 
#define TAF_DIAGDATAID_MAX_READ_DID_PAYLOAD_SIZE   4094
 
#define TAF_DIAGDATAID_MAX_READ_DID_SIZE   2046
 
#define TAF_DIAGDATAID_MAX_DID_DATA_RECORD_SIZE   4092
 

Typedefs

typedef struct taf_diagDataID_Service * taf_diagDataID_ServiceRef_t
 
typedef struct taf_diagDataID_RxReadDIDMsg * taf_diagDataID_RxReadDIDMsgRef_t
 
typedef struct taf_diagDataID_RxWriteDIDMsg * taf_diagDataID_RxWriteDIDMsgRef_t
 
typedef struct taf_diagDataID_RxReadDIDMsgHandler * taf_diagDataID_RxReadDIDMsgHandlerRef_t
 
typedef struct taf_diagDataID_RxWriteDIDMsgHandler * taf_diagDataID_RxWriteDIDMsgHandlerRef_t
 
typedef void(* taf_diagDataID_RxReadDIDMsgHandlerFunc_t) (taf_diagDataID_RxReadDIDMsgRef_t rxMsgRef, const uint16_t *dataIdPtr, size_t dataIdSize, void *contextPtr)
 
typedef void(* taf_diagDataID_RxWriteDIDMsgHandlerFunc_t) (taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, uint16_t dataId, void *contextPtr)
 

Enumerations

enum  taf_diagDataID_ReadDIDErrorCode_t { TAF_DIAGDATAID_READ_DID_NO_ERROR = 0, TAF_DIAGDATAID_READ_DID_RESPONSE_TOO_LONG = 20, TAF_DIAGDATAID_READ_DID_CONDITIONS_NOT_CORRECT = 34, TAF_DIAGDATAID_READ_DID_REQUEST_OUT_OF_RANGE = 49 }
 
enum  taf_diagDataID_WriteDIDErrorCode_t { TAF_DIAGDATAID_WRITE_DID_NO_ERROR = 0, TAF_DIAGDATAID_WRITE_DID_CONDITIONS_NOT_CORRECT = 34, TAF_DIAGDATAID_WRITE_DID_REQUEST_OUT_OF_RANGE = 49, TAF_DIAGDATAID_WRITE_DID_GENERAL_PROGRAMMING_FAILURE = 114 }
 

Functions

LE_SHARED bool ifgen_taf_diagDataID_HasLocalBinding (void)
 
LE_SHARED void ifgen_taf_diagDataID_InitCommonData (void)
 
LE_SHARED void ifgen_taf_diagDataID_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_taf_diagDataID_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED taf_diagDataID_ServiceRef_t ifgen_taf_diagDataID_GetService (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED taf_diagDataID_RxReadDIDMsgHandlerRef_t ifgen_taf_diagDataID_AddRxReadDIDMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_ServiceRef_t svcRef, taf_diagDataID_RxReadDIDMsgHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_diagDataID_RemoveRxReadDIDMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_RxReadDIDMsgHandlerRef_t handlerRef)
 
LE_SHARED le_result_t ifgen_taf_diagDataID_SendReadDIDResp (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_RxReadDIDMsgRef_t rxMsgRef, taf_diagDataID_ReadDIDErrorCode_t errCode, const uint8_t *dataPtr, size_t dataSize)
 
LE_SHARED taf_diagDataID_RxWriteDIDMsgHandlerRef_t ifgen_taf_diagDataID_AddRxWriteDIDMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_ServiceRef_t svcRef, taf_diagDataID_RxWriteDIDMsgHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_diagDataID_RemoveRxWriteDIDMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_RxWriteDIDMsgHandlerRef_t handlerRef)
 
LE_SHARED le_result_t ifgen_taf_diagDataID_GetWriteDataRecord (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, uint8_t *dataRecordPtr, size_t *dataRecordSizePtr)
 
LE_SHARED le_result_t ifgen_taf_diagDataID_SendWriteDIDResp (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, taf_diagDataID_WriteDIDErrorCode_t errCode, uint16_t dataId)
 
LE_SHARED le_result_t ifgen_taf_diagDataID_RemoveSvc (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDataID_ServiceRef_t svcRef)
 

Macro Definition Documentation

◆ IFGEN_TAF_DIAGDATAID_PROTOCOL_ID

#define IFGEN_TAF_DIAGDATAID_PROTOCOL_ID   "847204a3058eeb7f8f65a46a2fffc09e"

◆ IFGEN_TAF_DIAGDATAID_MSG_SIZE

#define IFGEN_TAF_DIAGDATAID_MSG_SIZE   4114

◆ TAF_DIAGDATAID_MAX_READ_DID_PAYLOAD_SIZE

#define TAF_DIAGDATAID_MAX_READ_DID_PAYLOAD_SIZE   4094

The maximum size of the ReadDID payload in bytes.

◆ TAF_DIAGDATAID_MAX_READ_DID_SIZE

#define TAF_DIAGDATAID_MAX_READ_DID_SIZE   2046

The maximum size of the ReadDID request data identifier in bytes.

◆ TAF_DIAGDATAID_MAX_DID_DATA_RECORD_SIZE

#define TAF_DIAGDATAID_MAX_DID_DATA_RECORD_SIZE   4092

The maximum size of the WriteDID request data record in bytes.

Typedef Documentation

◆ taf_diagDataID_ServiceRef_t

typedef struct taf_diagDataID_Service* taf_diagDataID_ServiceRef_t

Reference to the DataID service.

◆ taf_diagDataID_RxReadDIDMsgRef_t

typedef struct taf_diagDataID_RxReadDIDMsg* taf_diagDataID_RxReadDIDMsgRef_t

Reference to the ReadDID received request message.

◆ taf_diagDataID_RxWriteDIDMsgRef_t

typedef struct taf_diagDataID_RxWriteDIDMsg* taf_diagDataID_RxWriteDIDMsgRef_t

Reference to the WriteDID received request message.

◆ taf_diagDataID_RxReadDIDMsgHandlerRef_t

typedef struct taf_diagDataID_RxReadDIDMsgHandler* taf_diagDataID_RxReadDIDMsgHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'taf_diagDataID_RxReadDIDMsg'

◆ taf_diagDataID_RxWriteDIDMsgHandlerRef_t

typedef struct taf_diagDataID_RxWriteDIDMsgHandler* taf_diagDataID_RxWriteDIDMsgHandlerRef_t

Reference type used by Add/Remove functions for EVENT 'taf_diagDataID_RxWriteDIDMsg'

◆ taf_diagDataID_RxReadDIDMsgHandlerFunc_t

typedef void(* taf_diagDataID_RxReadDIDMsgHandlerFunc_t) (taf_diagDataID_RxReadDIDMsgRef_t rxMsgRef, const uint16_t *dataIdPtr, size_t dataIdSize, void *contextPtr)

Handler for a received ReadDID message.

◆ taf_diagDataID_RxWriteDIDMsgHandlerFunc_t

typedef void(* taf_diagDataID_RxWriteDIDMsgHandlerFunc_t) (taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, uint16_t dataId, void *contextPtr)

Handler for a received WriteDID message.

Enumeration Type Documentation

◆ taf_diagDataID_ReadDIDErrorCode_t

Error code for ReadDID.

Enumerator
TAF_DIAGDATAID_READ_DID_NO_ERROR 
TAF_DIAGDATAID_READ_DID_RESPONSE_TOO_LONG 
TAF_DIAGDATAID_READ_DID_CONDITIONS_NOT_CORRECT 
TAF_DIAGDATAID_READ_DID_REQUEST_OUT_OF_RANGE 

◆ taf_diagDataID_WriteDIDErrorCode_t

Error code for WriteDID.

Enumerator
TAF_DIAGDATAID_WRITE_DID_NO_ERROR 
TAF_DIAGDATAID_WRITE_DID_CONDITIONS_NOT_CORRECT 
TAF_DIAGDATAID_WRITE_DID_REQUEST_OUT_OF_RANGE 
TAF_DIAGDATAID_WRITE_DID_GENERAL_PROGRAMMING_FAILURE 

Function Documentation

◆ ifgen_taf_diagDataID_HasLocalBinding()

LE_SHARED bool ifgen_taf_diagDataID_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_taf_diagDataID_InitCommonData()

LE_SHARED void ifgen_taf_diagDataID_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_taf_diagDataID_CleanupCommonData()

LE_SHARED void ifgen_taf_diagDataID_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_taf_diagDataID_OpenSession()

LE_SHARED le_result_t ifgen_taf_diagDataID_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_taf_diagDataID_GetService()

LE_SHARED taf_diagDataID_ServiceRef_t ifgen_taf_diagDataID_GetService ( le_msg_SessionRef_t  _ifgen_sessionRef)

Gets the reference of a DataID service. If there is no service, a new one will be created.

Returns
  • Reference to the service instance.
  • NULL if not allowed to create the service.
Note
The process exits if an invalid reference is passed.

◆ ifgen_taf_diagDataID_AddRxReadDIDMsgHandler()

LE_SHARED taf_diagDataID_RxReadDIDMsgHandlerRef_t ifgen_taf_diagDataID_AddRxReadDIDMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_ServiceRef_t  svcRef,
taf_diagDataID_RxReadDIDMsgHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagDataID_RxReadDIDMsg'

This event provides information about the received ReadDID message.

Parameters
[in]svcRefService reference.
[in]handlerPtrReceived message handler.
[in]contextPtr

◆ ifgen_taf_diagDataID_RemoveRxReadDIDMsgHandler()

LE_SHARED void ifgen_taf_diagDataID_RemoveRxReadDIDMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_RxReadDIDMsgHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_diagDataID_RxReadDIDMsg'

Parameters
[in]handlerRef

◆ ifgen_taf_diagDataID_SendReadDIDResp()

LE_SHARED le_result_t ifgen_taf_diagDataID_SendReadDIDResp ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_RxReadDIDMsgRef_t  rxMsgRef,
taf_diagDataID_ReadDIDErrorCode_t  errCode,
const uint8_t *  dataPtr,
size_t  dataSize 
)

Sends a response message for the received ReadDID message.

Note
This function must be called to send a response if receiving a message.
Returns
  • LE_OK – Succeeded.
  • LE_BAD_PARAMETER – Invalid rxMsgRef.
  • LE_NOT_FOUND – Reference not found.
  • LE_FAULT – Failed.
Note
The process exits if an invalid reference is passed.
Parameters
[in]rxMsgRefReceived message reference.
[in]errCodeError code type.
[in]dataPtrData payload.
[in]dataSize

◆ ifgen_taf_diagDataID_AddRxWriteDIDMsgHandler()

LE_SHARED taf_diagDataID_RxWriteDIDMsgHandlerRef_t ifgen_taf_diagDataID_AddRxWriteDIDMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_ServiceRef_t  svcRef,
taf_diagDataID_RxWriteDIDMsgHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagDataID_RxWriteDIDMsg'

This event provides information about the received ReadDID message.

Parameters
[in]svcRefService reference.
[in]handlerPtrReceived message handler.
[in]contextPtr

◆ ifgen_taf_diagDataID_RemoveRxWriteDIDMsgHandler()

LE_SHARED void ifgen_taf_diagDataID_RemoveRxWriteDIDMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_RxWriteDIDMsgHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_diagDataID_RxWriteDIDMsg'

Parameters
[in]handlerRef

◆ ifgen_taf_diagDataID_GetWriteDataRecord()

LE_SHARED le_result_t ifgen_taf_diagDataID_GetWriteDataRecord ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_RxWriteDIDMsgRef_t  rxMsgRef,
uint8_t *  dataRecordPtr,
size_t *  dataRecordSizePtr 
)

Gets the data record of the received WriteDID message.

Returns
  • LE_OK – Succeeded.
  • LE_BAD_PARAMETER – Invalid rxMsgRef.
  • LE_NOT_FOUND – Reference not found.
Note
The process exits if an invalid reference is passed.
Parameters
[in]rxMsgRefReceived message reference.
[out]dataRecordPtrData record.
[in,out]dataRecordSizePtr

◆ ifgen_taf_diagDataID_SendWriteDIDResp()

LE_SHARED le_result_t ifgen_taf_diagDataID_SendWriteDIDResp ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_RxWriteDIDMsgRef_t  rxMsgRef,
taf_diagDataID_WriteDIDErrorCode_t  errCode,
uint16_t  dataId 
)

Sends a response message for the received WriteDID message.

Note
This function must be called to send a response if receiving a message.
Returns
  • LE_OK – Succeeded.
  • LE_BAD_PARAMETER – Invalid rxMsgRef.
  • LE_NOT_FOUND – Reference not found.
  • LE_FAULT – Failed.
Note
The process exits if an invalid reference is passed.
Parameters
[in]rxMsgRefReceived message reference.
[in]errCodeError code type.
[in]dataIddata identifier.

◆ ifgen_taf_diagDataID_RemoveSvc()

LE_SHARED le_result_t ifgen_taf_diagDataID_RemoveSvc ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDataID_ServiceRef_t  svcRef 
)

Removes the DID service.

Returns
  • LE_OK – Succeeded.
  • LE_BAD_PARAMETER – Invalid svcRef.
Parameters
[in]svcRefService reference.