Snapdragon® Telematics Application Framework (TelAF) Interface Specification
taf_diagSecurity_server.c File Reference

Data Structures

struct  _ServerData_t
 

Macros

#define HIGH_SERVER_DATA_COUNT   3
 
#define _LOCK   LE_ASSERT(pthread_mutex_lock(&_Mutex) == 0);
 
#define _UNLOCK   LE_ASSERT(pthread_mutex_unlock(&_Mutex) == 0);
 
#define TRACE(...)
 
#define IS_TRACE_ENABLED   0
 

Typedefs

typedef void(* RemoveHandlerFunc_t) (void *handlerRef)
 

Functions

 LE_MEM_DEFINE_STATIC_POOL (taf_diagSecurity_ServerData, HIGH_SERVER_DATA_COUNT, sizeof(_ServerData_t))
 
 LE_REF_DEFINE_STATIC_MAP (taf_diagSecurity_ServerHandlers, LE_MEM_BLOCKS(taf_diagSecurity_ServerCmd, HIGH_SERVER_DATA_COUNT))
 
 __attribute__ ((unused))
 [in] Not used More...
 
le_msg_ServiceRef_t taf_diagSecurity_GetServiceRef (void)
 
le_msg_SessionRef_t taf_diagSecurity_GetClientSessionRef (void)
 
void taf_diagSecurity_AdvertiseService (void)
 
static void Handle_taf_diagSecurity_GetService (le_msg_MessageRef_t _msgRef)
 
static void AsyncResponse_taf_diagSecurity_AddRxSesTypeCheckHandler (taf_diagSecurity_RxSesTypeCheckRef_t rxSesTypeRef, taf_diagSecurity_SessionType_t sesCtrlType, void *contextPtr)
 
static void Handle_taf_diagSecurity_AddRxSesTypeCheckHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_RemoveRxSesTypeCheckHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_SendSesTypeCheckResp (le_msg_MessageRef_t _msgRef)
 
static void AsyncResponse_taf_diagSecurity_AddSesChangeHandler (taf_diagSecurity_SesChangeRef_t sesChangeRef, taf_diagSecurity_SessionType_t previousType, taf_diagSecurity_SessionType_t currentType, void *contextPtr)
 
static void Handle_taf_diagSecurity_AddSesChangeHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_RemoveSesChangeHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_GetCurrentSesType (le_msg_MessageRef_t _msgRef)
 
static void AsyncResponse_taf_diagSecurity_AddRxSecAccessMsgHandler (taf_diagSecurity_RxSecAccessMsgRef_t rxMsgRef, uint8_t accessType, void *contextPtr)
 
static void Handle_taf_diagSecurity_AddRxSecAccessMsgHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_RemoveRxSecAccessMsgHandler (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_GetSecAccessPayloadLen (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_GetSecAccessPayload (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_SendSecAccessResp (le_msg_MessageRef_t _msgRef)
 
static void Handle_taf_diagSecurity_RemoveSvc (le_msg_MessageRef_t _msgRef)
 
static void ServerMsgRecvHandler (le_msg_MessageRef_t msgRef, void *contextPtr)
 

Variables

static le_mem_PoolRef_t _ServerDataPool
 
static le_ref_MapRef_t _HandlerRefMap
 

Macro Definition Documentation

◆ HIGH_SERVER_DATA_COUNT

#define HIGH_SERVER_DATA_COUNT   3

Expected number of simultaneous server data objects.

◆ _LOCK

#define _LOCK   LE_ASSERT(pthread_mutex_lock(&_Mutex) == 0);

◆ _UNLOCK

#define _UNLOCK   LE_ASSERT(pthread_mutex_unlock(&_Mutex) == 0);

◆ TRACE

#define TRACE (   ...)

Trace reference used for controlling tracing in this module.

◆ IS_TRACE_ENABLED

#define IS_TRACE_ENABLED   0

Typedef Documentation

◆ RemoveHandlerFunc_t

typedef void(* RemoveHandlerFunc_t) (void *handlerRef)

Type definition for generic function to remove a handler, given the handler ref.

Function Documentation

◆ LE_MEM_DEFINE_STATIC_POOL()

LE_MEM_DEFINE_STATIC_POOL ( taf_diagSecurity_ServerData  ,
HIGH_SERVER_DATA_COUNT  ,
sizeof(_ServerData_t  
)

Static pool for server data objects

◆ LE_REF_DEFINE_STATIC_MAP()

LE_REF_DEFINE_STATIC_MAP ( taf_diagSecurity_ServerHandlers  ,
LE_MEM_BLOCKS(taf_diagSecurity_ServerCmd, HIGH_SERVER_DATA_COUNT  
)

Static safe reference map for use with Add/Remove handler references

◆ __attribute__()

__attribute__ ( (unused)  )

[in] Not used

[in] Reference to the message.

Mutex and associated macros for use with the above HandlerRefMap.

Unused attribute is needed because this variable may not always get used. Per-server data:

  • Server service reference
  • Server thread reference
  • Client session reference

Cleanup client data if the client is no longer connected

Send the message to the client (queued version)

This is a wrapper around le_msg_Send() with an extra parameter so that it can be used with le_event_QueueFunctionToThread().

Send the message to the client.

◆ taf_diagSecurity_GetServiceRef()

le_msg_ServiceRef_t taf_diagSecurity_GetServiceRef ( void  )

Get the server service reference

◆ taf_diagSecurity_GetClientSessionRef()

le_msg_SessionRef_t taf_diagSecurity_GetClientSessionRef ( void  )

Get the client session reference for the current message

◆ taf_diagSecurity_AdvertiseService()

void taf_diagSecurity_AdvertiseService ( void  )

Initialize the server and advertise the service.

◆ Handle_taf_diagSecurity_GetService()

static void Handle_taf_diagSecurity_GetService ( le_msg_MessageRef_t  _msgRef)
static

◆ AsyncResponse_taf_diagSecurity_AddRxSesTypeCheckHandler()

static void AsyncResponse_taf_diagSecurity_AddRxSesTypeCheckHandler ( taf_diagSecurity_RxSesTypeCheckRef_t  rxSesTypeRef,
taf_diagSecurity_SessionType_t  sesCtrlType,
void *  contextPtr 
)
static

◆ Handle_taf_diagSecurity_AddRxSesTypeCheckHandler()

static void Handle_taf_diagSecurity_AddRxSesTypeCheckHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_RemoveRxSesTypeCheckHandler()

static void Handle_taf_diagSecurity_RemoveRxSesTypeCheckHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_SendSesTypeCheckResp()

static void Handle_taf_diagSecurity_SendSesTypeCheckResp ( le_msg_MessageRef_t  _msgRef)
static

◆ AsyncResponse_taf_diagSecurity_AddSesChangeHandler()

static void AsyncResponse_taf_diagSecurity_AddSesChangeHandler ( taf_diagSecurity_SesChangeRef_t  sesChangeRef,
taf_diagSecurity_SessionType_t  previousType,
taf_diagSecurity_SessionType_t  currentType,
void *  contextPtr 
)
static

◆ Handle_taf_diagSecurity_AddSesChangeHandler()

static void Handle_taf_diagSecurity_AddSesChangeHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_RemoveSesChangeHandler()

static void Handle_taf_diagSecurity_RemoveSesChangeHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_GetCurrentSesType()

static void Handle_taf_diagSecurity_GetCurrentSesType ( le_msg_MessageRef_t  _msgRef)
static

◆ AsyncResponse_taf_diagSecurity_AddRxSecAccessMsgHandler()

static void AsyncResponse_taf_diagSecurity_AddRxSecAccessMsgHandler ( taf_diagSecurity_RxSecAccessMsgRef_t  rxMsgRef,
uint8_t  accessType,
void *  contextPtr 
)
static

◆ Handle_taf_diagSecurity_AddRxSecAccessMsgHandler()

static void Handle_taf_diagSecurity_AddRxSecAccessMsgHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_RemoveRxSecAccessMsgHandler()

static void Handle_taf_diagSecurity_RemoveRxSecAccessMsgHandler ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_GetSecAccessPayloadLen()

static void Handle_taf_diagSecurity_GetSecAccessPayloadLen ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_GetSecAccessPayload()

static void Handle_taf_diagSecurity_GetSecAccessPayload ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_SendSecAccessResp()

static void Handle_taf_diagSecurity_SendSecAccessResp ( le_msg_MessageRef_t  _msgRef)
static

◆ Handle_taf_diagSecurity_RemoveSvc()

static void Handle_taf_diagSecurity_RemoveSvc ( le_msg_MessageRef_t  _msgRef)
static

◆ ServerMsgRecvHandler()

static void ServerMsgRecvHandler ( le_msg_MessageRef_t  msgRef,
void *  contextPtr 
)
static

Variable Documentation

◆ _ServerDataPool

le_mem_PoolRef_t _ServerDataPool
static

The memory pool for server data objects

◆ _HandlerRefMap

le_ref_MapRef_t _HandlerRefMap
static

Safe Reference Map for use with Add/Remove handler references

Warning
Use _Mutex, defined below, to protect accesses to this data.