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

Go to the source code of this file.

Functions

le_msg_ServiceRef_t taf_diagDataID_GetServiceRef (void)
 
le_msg_SessionRef_t taf_diagDataID_GetClientSessionRef (void)
 
void taf_diagDataID_AdvertiseService (void)
 
taf_diagDataID_ServiceRef_t taf_diagDataID_GetService (void)
 
taf_diagDataID_RxReadDIDMsgHandlerRef_t taf_diagDataID_AddRxReadDIDMsgHandler (taf_diagDataID_ServiceRef_t svcRef, taf_diagDataID_RxReadDIDMsgHandlerFunc_t handlerPtr, void *contextPtr)
 
void taf_diagDataID_RemoveRxReadDIDMsgHandler (taf_diagDataID_RxReadDIDMsgHandlerRef_t handlerRef)
 
le_result_t taf_diagDataID_SendReadDIDResp (taf_diagDataID_RxReadDIDMsgRef_t rxMsgRef, taf_diagDataID_ReadDIDErrorCode_t errCode, const uint8_t *dataPtr, size_t dataSize)
 
taf_diagDataID_RxWriteDIDMsgHandlerRef_t taf_diagDataID_AddRxWriteDIDMsgHandler (taf_diagDataID_ServiceRef_t svcRef, taf_diagDataID_RxWriteDIDMsgHandlerFunc_t handlerPtr, void *contextPtr)
 
void taf_diagDataID_RemoveRxWriteDIDMsgHandler (taf_diagDataID_RxWriteDIDMsgHandlerRef_t handlerRef)
 
le_result_t taf_diagDataID_GetWriteDataRecord (taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, uint8_t *dataRecordPtr, size_t *dataRecordSizePtr)
 
le_result_t taf_diagDataID_SendWriteDIDResp (taf_diagDataID_RxWriteDIDMsgRef_t rxMsgRef, taf_diagDataID_WriteDIDErrorCode_t errCode, uint16_t dataId)
 
le_result_t taf_diagDataID_RemoveSvc (taf_diagDataID_ServiceRef_t svcRef)
 

Function Documentation

◆ taf_diagDataID_GetServiceRef()

le_msg_ServiceRef_t taf_diagDataID_GetServiceRef ( void  )

Get the server service reference

◆ taf_diagDataID_GetClientSessionRef()

le_msg_SessionRef_t taf_diagDataID_GetClientSessionRef ( void  )

Get the client session reference for the current message

◆ taf_diagDataID_AdvertiseService()

void taf_diagDataID_AdvertiseService ( void  )

Initialize the server and advertise the service.

◆ taf_diagDataID_GetService()

taf_diagDataID_ServiceRef_t taf_diagDataID_GetService ( void  )

Error code for ReadDID. Error code for WriteDID. Reference to the DataID service. Reference to the ReadDID received request message. Reference to the WriteDID received request message. Handler for a received ReadDID message. Reference type used by Add/Remove functions for EVENT 'taf_diagDataID_RxReadDIDMsg' Handler for a received WriteDID message. Reference type used by Add/Remove functions for EVENT 'taf_diagDataID_RxWriteDIDMsg' 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.

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.

◆ taf_diagDataID_AddRxReadDIDMsgHandler()

taf_diagDataID_RxReadDIDMsgHandlerRef_t taf_diagDataID_AddRxReadDIDMsgHandler ( 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

◆ taf_diagDataID_RemoveRxReadDIDMsgHandler()

void taf_diagDataID_RemoveRxReadDIDMsgHandler ( taf_diagDataID_RxReadDIDMsgHandlerRef_t  handlerRef)

Remove handler function for EVENT 'taf_diagDataID_RxReadDIDMsg'

Parameters
[in]handlerRef

◆ taf_diagDataID_SendReadDIDResp()

le_result_t taf_diagDataID_SendReadDIDResp ( 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

◆ taf_diagDataID_AddRxWriteDIDMsgHandler()

taf_diagDataID_RxWriteDIDMsgHandlerRef_t taf_diagDataID_AddRxWriteDIDMsgHandler ( 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

◆ taf_diagDataID_RemoveRxWriteDIDMsgHandler()

void taf_diagDataID_RemoveRxWriteDIDMsgHandler ( taf_diagDataID_RxWriteDIDMsgHandlerRef_t  handlerRef)

Remove handler function for EVENT 'taf_diagDataID_RxWriteDIDMsg'

Parameters
[in]handlerRef

◆ taf_diagDataID_GetWriteDataRecord()

le_result_t taf_diagDataID_GetWriteDataRecord ( 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

◆ taf_diagDataID_SendWriteDIDResp()

le_result_t taf_diagDataID_SendWriteDIDResp ( 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.

◆ taf_diagDataID_RemoveSvc()

le_result_t taf_diagDataID_RemoveSvc ( taf_diagDataID_ServiceRef_t  svcRef)

Removes the DID service.

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