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

Go to the source code of this file.

Macros

#define IFGEN_TAF_DIAGDIDBACKEND_PROTOCOL_ID   "310a0b1eff928c72c83f7e535eefefdc"
 
#define IFGEN_TAF_DIAGDIDBACKEND_MSG_SIZE   4114
 
#define TAF_DIAGDIDBACKEND_READ_DID_PAYLOAD_SIZE   4094
 
#define TAF_DIAGDIDBACKEND_READ_DID_SIZE   2046
 
#define TAF_DIAGDIDBACKEND_WRITE_DID_DATA_RECORD_SIZE   4092
 

Typedefs

typedef struct taf_diagDIDBackend_ReadDID * taf_diagDIDBackend_ReadDIDRef_t
 
typedef struct taf_diagDIDBackend_WriteDID * taf_diagDIDBackend_WriteDIDRef_t
 
typedef struct taf_diagDIDBackend_ReadDIDHandler * taf_diagDIDBackend_ReadDIDHandlerRef_t
 
typedef struct taf_diagDIDBackend_WriteDIDHandler * taf_diagDIDBackend_WriteDIDHandlerRef_t
 
typedef void(* taf_diagDIDBackend_ReadDIDHandlerFunc_t) (taf_diagDIDBackend_ReadDIDRef_t readDIDRef, uint16_t dataId, void *contextPtr)
 
typedef void(* taf_diagDIDBackend_WriteDIDHandlerFunc_t) (taf_diagDIDBackend_WriteDIDRef_t rxMsgRef, uint16_t dataId, const uint8_t *dataRecordPtr, size_t dataRecordSize, void *contextPtr)
 

Enumerations

enum  taf_diagDIDBackend_ReadDIDErrorCode_t { TAF_DIAGDIDBACKEND_READ_DID_NO_ERROR = 0, TAF_DIAGDIDBACKEND_READ_DID_RESPONSE_TOO_LONG = 20, TAF_DIAGDIDBACKEND_READ_DID_CONDITIONS_NOT_CORRECT = 34, TAF_DIAGDIDBACKEND_READ_DID_REQUEST_OUT_OF_RANGE = 49 }
 
enum  taf_diagDIDBackend_WriteDIDErrorCode_t { TAF_DIAGDIDBACKEND_WRITE_DID_NO_ERROR = 0, TAF_DIAGDIDBACKEND_WRITE_DID_CONDITIONS_NOT_CORRECT = 34, TAF_DIAGDIDBACKEND_WRITE_DID_REQUEST_OUT_OF_RANGE = 49, TAF_DIAGDIDBACKEND_WRITE_DID_GENERAL_PROGRAMMING_FAILURE = 114 }
 

Functions

LE_SHARED bool ifgen_taf_diagDIDBackend_HasLocalBinding (void)
 
LE_SHARED void ifgen_taf_diagDIDBackend_InitCommonData (void)
 
LE_SHARED void ifgen_taf_diagDIDBackend_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_taf_diagDIDBackend_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED taf_diagDIDBackend_ReadDIDHandlerRef_t ifgen_taf_diagDIDBackend_AddReadDIDHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_ReadDIDHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_diagDIDBackend_RemoveReadDIDHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_ReadDIDHandlerRef_t handlerRef)
 
LE_SHARED le_result_t ifgen_taf_diagDIDBackend_SendReadDIDResp (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_ReadDIDRef_t readDIDRef, taf_diagDIDBackend_ReadDIDErrorCode_t errCode, const uint8_t *dataPtr, size_t dataSize)
 
LE_SHARED taf_diagDIDBackend_WriteDIDHandlerRef_t ifgen_taf_diagDIDBackend_AddWriteDIDHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_WriteDIDHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_diagDIDBackend_RemoveWriteDIDHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_WriteDIDHandlerRef_t handlerRef)
 
LE_SHARED le_result_t ifgen_taf_diagDIDBackend_SendWriteDIDResp (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagDIDBackend_WriteDIDRef_t rxMsgRef, taf_diagDIDBackend_WriteDIDErrorCode_t errCode, uint16_t dataId)
 

Macro Definition Documentation

◆ IFGEN_TAF_DIAGDIDBACKEND_PROTOCOL_ID

#define IFGEN_TAF_DIAGDIDBACKEND_PROTOCOL_ID   "310a0b1eff928c72c83f7e535eefefdc"

◆ IFGEN_TAF_DIAGDIDBACKEND_MSG_SIZE

#define IFGEN_TAF_DIAGDIDBACKEND_MSG_SIZE   4114

◆ TAF_DIAGDIDBACKEND_READ_DID_PAYLOAD_SIZE

#define TAF_DIAGDIDBACKEND_READ_DID_PAYLOAD_SIZE   4094

The maximum size of the ReadDID payload in bytes.

◆ TAF_DIAGDIDBACKEND_READ_DID_SIZE

#define TAF_DIAGDIDBACKEND_READ_DID_SIZE   2046

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

◆ TAF_DIAGDIDBACKEND_WRITE_DID_DATA_RECORD_SIZE

#define TAF_DIAGDIDBACKEND_WRITE_DID_DATA_RECORD_SIZE   4092

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

Typedef Documentation

◆ taf_diagDIDBackend_ReadDIDRef_t

typedef struct taf_diagDIDBackend_ReadDID* taf_diagDIDBackend_ReadDIDRef_t

Reference to the ReadDID request message.

◆ taf_diagDIDBackend_WriteDIDRef_t

typedef struct taf_diagDIDBackend_WriteDID* taf_diagDIDBackend_WriteDIDRef_t

Reference to the WriteDID request message.

◆ taf_diagDIDBackend_ReadDIDHandlerRef_t

typedef struct taf_diagDIDBackend_ReadDIDHandler* taf_diagDIDBackend_ReadDIDHandlerRef_t

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

◆ taf_diagDIDBackend_WriteDIDHandlerRef_t

typedef struct taf_diagDIDBackend_WriteDIDHandler* taf_diagDIDBackend_WriteDIDHandlerRef_t

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

◆ taf_diagDIDBackend_ReadDIDHandlerFunc_t

typedef void(* taf_diagDIDBackend_ReadDIDHandlerFunc_t) (taf_diagDIDBackend_ReadDIDRef_t readDIDRef, uint16_t dataId, void *contextPtr)

Handler for a received ReadDID message.

◆ taf_diagDIDBackend_WriteDIDHandlerFunc_t

typedef void(* taf_diagDIDBackend_WriteDIDHandlerFunc_t) (taf_diagDIDBackend_WriteDIDRef_t rxMsgRef, uint16_t dataId, const uint8_t *dataRecordPtr, size_t dataRecordSize, void *contextPtr)

Handler for a WriteDID message.

Enumeration Type Documentation

◆ taf_diagDIDBackend_ReadDIDErrorCode_t

Error code for ReadDID.

Enumerator
TAF_DIAGDIDBACKEND_READ_DID_NO_ERROR 
TAF_DIAGDIDBACKEND_READ_DID_RESPONSE_TOO_LONG 
TAF_DIAGDIDBACKEND_READ_DID_CONDITIONS_NOT_CORRECT 
TAF_DIAGDIDBACKEND_READ_DID_REQUEST_OUT_OF_RANGE 

◆ taf_diagDIDBackend_WriteDIDErrorCode_t

Error code for WriteDID.

Enumerator
TAF_DIAGDIDBACKEND_WRITE_DID_NO_ERROR 
TAF_DIAGDIDBACKEND_WRITE_DID_CONDITIONS_NOT_CORRECT 
TAF_DIAGDIDBACKEND_WRITE_DID_REQUEST_OUT_OF_RANGE 
TAF_DIAGDIDBACKEND_WRITE_DID_GENERAL_PROGRAMMING_FAILURE 

Function Documentation

◆ ifgen_taf_diagDIDBackend_HasLocalBinding()

LE_SHARED bool ifgen_taf_diagDIDBackend_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_taf_diagDIDBackend_InitCommonData()

LE_SHARED void ifgen_taf_diagDIDBackend_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_taf_diagDIDBackend_CleanupCommonData()

LE_SHARED void ifgen_taf_diagDIDBackend_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_taf_diagDIDBackend_OpenSession()

LE_SHARED le_result_t ifgen_taf_diagDIDBackend_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_taf_diagDIDBackend_AddReadDIDHandler()

LE_SHARED taf_diagDIDBackend_ReadDIDHandlerRef_t ifgen_taf_diagDIDBackend_AddReadDIDHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_ReadDIDHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagDIDBackend_ReadDID'

This event provides information about the received ReadDID message.

Parameters
[in]handlerPtrReadDID message handler.
[in]contextPtr

◆ ifgen_taf_diagDIDBackend_RemoveReadDIDHandler()

LE_SHARED void ifgen_taf_diagDIDBackend_RemoveReadDIDHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_ReadDIDHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_diagDIDBackend_ReadDID'

Parameters
[in]handlerRef

◆ ifgen_taf_diagDIDBackend_SendReadDIDResp()

LE_SHARED le_result_t ifgen_taf_diagDIDBackend_SendReadDIDResp ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_ReadDIDRef_t  readDIDRef,
taf_diagDIDBackend_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]readDIDRefReadDID message reference.
[in]errCodeError code type.
[in]dataPtrData payload.
[in]dataSize

◆ ifgen_taf_diagDIDBackend_AddWriteDIDHandler()

LE_SHARED taf_diagDIDBackend_WriteDIDHandlerRef_t ifgen_taf_diagDIDBackend_AddWriteDIDHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_WriteDIDHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagDIDBackend_WriteDID'

This event provides information about the received ReadDID message.

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

◆ ifgen_taf_diagDIDBackend_RemoveWriteDIDHandler()

LE_SHARED void ifgen_taf_diagDIDBackend_RemoveWriteDIDHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_WriteDIDHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_diagDIDBackend_WriteDID'

Parameters
[in]handlerRef

◆ ifgen_taf_diagDIDBackend_SendWriteDIDResp()

LE_SHARED le_result_t ifgen_taf_diagDIDBackend_SendWriteDIDResp ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagDIDBackend_WriteDIDRef_t  rxMsgRef,
taf_diagDIDBackend_WriteDIDErrorCode_t  errCode,
uint16_t  dataId 
)

Sends a response message for the 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.