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

Go to the source code of this file.

Macros

#define IFGEN_TAF_DIAGROUTINECTRL_PROTOCOL_ID   "a3bff18606be73a2773cdaa20d2da870"
 
#define IFGEN_TAF_DIAGROUTINECTRL_MSG_SIZE   4115
 
#define TAF_DIAGROUTINECTRL_MAX_PAYLOAD_SIZE   4095
 

Typedefs

typedef struct taf_diagRoutineCtrl_Service * taf_diagRoutineCtrl_ServiceRef_t
 
typedef struct taf_diagRoutineCtrl_RxMsg * taf_diagRoutineCtrl_RxMsgRef_t
 
typedef struct taf_diagRoutineCtrl_RxMsgHandler * taf_diagRoutineCtrl_RxMsgHandlerRef_t
 
typedef void(* taf_diagRoutineCtrl_RxMsgHandlerFunc_t) (taf_diagRoutineCtrl_RxMsgRef_t rxMsgRef, taf_diagRoutineCtrl_Type_t routineCtrlType, uint16_t identifier, void *contextPtr)
 

Enumerations

enum  taf_diagRoutineCtrl_Type_t { TAF_DIAGROUTINECTRL_START_ROUTINE = 1, TAF_DIAGROUTINECTRL_STOP_ROUTINE = 2, TAF_DIAGROUTINECTRL_REQUEST_ROUTINE_RESULTS = 3 }
 
enum  taf_diagRoutineCtrl_ErrorCode_t { TAF_DIAGROUTINECTRL_NO_ERROR = 0, TAF_DIAGROUTINECTRL_CONDITIONS_NOT_CORRECT = 34, TAF_DIAGROUTINECTRL_GENERAL_PROGRAMMING_FAILURE = 114 }
 

Functions

LE_SHARED bool ifgen_taf_diagRoutineCtrl_HasLocalBinding (void)
 
LE_SHARED void ifgen_taf_diagRoutineCtrl_InitCommonData (void)
 
LE_SHARED void ifgen_taf_diagRoutineCtrl_CleanupCommonData (le_msg_SessionRef_t _ifgen_sessionRef)
 
LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_OpenSession (le_msg_SessionRef_t _ifgen_sessionRef, bool isBlocking)
 
LE_SHARED taf_diagRoutineCtrl_ServiceRef_t ifgen_taf_diagRoutineCtrl_GetService (le_msg_SessionRef_t _ifgen_sessionRef, uint16_t identifier)
 
LE_SHARED taf_diagRoutineCtrl_RxMsgHandlerRef_t ifgen_taf_diagRoutineCtrl_AddRxMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagRoutineCtrl_ServiceRef_t svcRef, taf_diagRoutineCtrl_RxMsgHandlerFunc_t handlerPtr, void *contextPtr)
 
LE_SHARED void ifgen_taf_diagRoutineCtrl_RemoveRxMsgHandler (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagRoutineCtrl_RxMsgHandlerRef_t handlerRef)
 
LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_GetRoutineCtrlRec (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagRoutineCtrl_RxMsgRef_t rxMsgRef, uint8_t *optionRecPtr, size_t *optionRecSizePtr)
 
LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_SendResp (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagRoutineCtrl_RxMsgRef_t rxMsgRef, taf_diagRoutineCtrl_ErrorCode_t errCode, const uint8_t *dataPtr, size_t dataSize)
 
LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_RemoveSvc (le_msg_SessionRef_t _ifgen_sessionRef, taf_diagRoutineCtrl_ServiceRef_t svcRef)
 

Macro Definition Documentation

◆ IFGEN_TAF_DIAGROUTINECTRL_PROTOCOL_ID

#define IFGEN_TAF_DIAGROUTINECTRL_PROTOCOL_ID   "a3bff18606be73a2773cdaa20d2da870"

◆ IFGEN_TAF_DIAGROUTINECTRL_MSG_SIZE

#define IFGEN_TAF_DIAGROUTINECTRL_MSG_SIZE   4115

◆ TAF_DIAGROUTINECTRL_MAX_PAYLOAD_SIZE

#define TAF_DIAGROUTINECTRL_MAX_PAYLOAD_SIZE   4095

The maximum size of the payload data in bytes.

Typedef Documentation

◆ taf_diagRoutineCtrl_ServiceRef_t

typedef struct taf_diagRoutineCtrl_Service* taf_diagRoutineCtrl_ServiceRef_t

Reference to the RoutineControl service.

◆ taf_diagRoutineCtrl_RxMsgRef_t

typedef struct taf_diagRoutineCtrl_RxMsg* taf_diagRoutineCtrl_RxMsgRef_t

Reference to the RoutineControl received request message.

◆ taf_diagRoutineCtrl_RxMsgHandlerRef_t

typedef struct taf_diagRoutineCtrl_RxMsgHandler* taf_diagRoutineCtrl_RxMsgHandlerRef_t

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

◆ taf_diagRoutineCtrl_RxMsgHandlerFunc_t

typedef void(* taf_diagRoutineCtrl_RxMsgHandlerFunc_t) (taf_diagRoutineCtrl_RxMsgRef_t rxMsgRef, taf_diagRoutineCtrl_Type_t routineCtrlType, uint16_t identifier, void *contextPtr)

Handler for a Rx RoutineControl message.

Enumeration Type Documentation

◆ taf_diagRoutineCtrl_Type_t

RoutineControl type.

Enumerator
TAF_DIAGROUTINECTRL_START_ROUTINE 

Start the routine.

TAF_DIAGROUTINECTRL_STOP_ROUTINE 

Stop the routine.

TAF_DIAGROUTINECTRL_REQUEST_ROUTINE_RESULTS 

Return result values of the routine.

◆ taf_diagRoutineCtrl_ErrorCode_t

Error code for RoutineControl.

Enumerator
TAF_DIAGROUTINECTRL_NO_ERROR 

Success.

TAF_DIAGROUTINECTRL_CONDITIONS_NOT_CORRECT 

Condition is not correct.

TAF_DIAGROUTINECTRL_GENERAL_PROGRAMMING_FAILURE 

Programming failure.

Function Documentation

◆ ifgen_taf_diagRoutineCtrl_HasLocalBinding()

LE_SHARED bool ifgen_taf_diagRoutineCtrl_HasLocalBinding ( void  )

Get if this client bound locally.

◆ ifgen_taf_diagRoutineCtrl_InitCommonData()

LE_SHARED void ifgen_taf_diagRoutineCtrl_InitCommonData ( void  )

Init data that is common across all threads

◆ ifgen_taf_diagRoutineCtrl_CleanupCommonData()

LE_SHARED void ifgen_taf_diagRoutineCtrl_CleanupCommonData ( le_msg_SessionRef_t  _ifgen_sessionRef)

Cleanup the data of a session

◆ ifgen_taf_diagRoutineCtrl_OpenSession()

LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_OpenSession ( le_msg_SessionRef_t  _ifgen_sessionRef,
bool  isBlocking 
)

Perform common initialization and open a session

◆ ifgen_taf_diagRoutineCtrl_GetService()

LE_SHARED taf_diagRoutineCtrl_ServiceRef_t ifgen_taf_diagRoutineCtrl_GetService ( le_msg_SessionRef_t  _ifgen_sessionRef,
uint16_t  identifier 
)

Gets the reference to a RoutineControl service, if there's no RoutineControl 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.
Parameters
[in]identifierRoutine identifier.

◆ ifgen_taf_diagRoutineCtrl_AddRxMsgHandler()

LE_SHARED taf_diagRoutineCtrl_RxMsgHandlerRef_t ifgen_taf_diagRoutineCtrl_AddRxMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagRoutineCtrl_ServiceRef_t  svcRef,
taf_diagRoutineCtrl_RxMsgHandlerFunc_t  handlerPtr,
void *  contextPtr 
)

Add handler function for EVENT 'taf_diagRoutineCtrl_RxMsg'

This event provides information on Rx RoutineControl message.

Parameters
[in]svcRefService reference.
[in]handlerPtr
[in]contextPtr

◆ ifgen_taf_diagRoutineCtrl_RemoveRxMsgHandler()

LE_SHARED void ifgen_taf_diagRoutineCtrl_RemoveRxMsgHandler ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagRoutineCtrl_RxMsgHandlerRef_t  handlerRef 
)

Remove handler function for EVENT 'taf_diagRoutineCtrl_RxMsg'

Parameters
[in]handlerRef

◆ ifgen_taf_diagRoutineCtrl_GetRoutineCtrlRec()

LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_GetRoutineCtrlRec ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagRoutineCtrl_RxMsgRef_t  rxMsgRef,
uint8_t *  optionRecPtr,
size_t *  optionRecSizePtr 
)

Gets the RoutineControl option record of the Rx RoutineControl 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]optionRecPtrRoutineControl option record.
[in,out]optionRecSizePtr

◆ ifgen_taf_diagRoutineCtrl_SendResp()

LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_SendResp ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagRoutineCtrl_RxMsgRef_t  rxMsgRef,
taf_diagRoutineCtrl_ErrorCode_t  errCode,
const uint8_t *  dataPtr,
size_t  dataSize 
)

Sends a response message for the Rx RoutineControl 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]dataPtrPayload data.
[in]dataSize

◆ ifgen_taf_diagRoutineCtrl_RemoveSvc()

LE_SHARED le_result_t ifgen_taf_diagRoutineCtrl_RemoveSvc ( le_msg_SessionRef_t  _ifgen_sessionRef,
taf_diagRoutineCtrl_ServiceRef_t  svcRef 
)

Removes the RoutineControl server service.

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