Infineon Logo AIROC BTSDK v4.9 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups
Application Thread Serialization

Data Structures

struct  wiced_app_event_srzn_cb_t
 Structure used in AIROC stack to add callback and data into task queue. More...
 

Typedefs

typedef enum
wiced_app_event_serialization_failure_code 
wiced_app_event_serialization_failure_code_t
 AIROC APP Event Serialization Failure Code. More...
 
typedef void( wiced_app_event_debug_callback_t )(wiced_app_event_serialization_failure_code_t error_code)
 AIROC Application Event Serialization Handler Debug Callback. More...
 

Enumerations

enum  wiced_app_event_serialization_failure_code {
  WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_INVALID = 0x00, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_NOT_INITIALIZED = 0x10, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_NO_MEMORY = 0x20, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_QUEUE_FULL = 0x21,
  WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_MUTEX_CREATE_FAIL = 0x30, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_MUTEX_GET_FAIL = 0x31, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_MUTEX_PUT_FAIL = 0x32, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_EVENT_SET_FAIL = 0x40,
  WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_EVENT_INVALID_VALUE = 0x41, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_EVENT_QUEUE_ADD_FAIL = 0x50, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_HANDLER_MUTEX_GET_FAIL = 0x60, WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_HANDLER_MUTEX_PUT_FAIL = 0x61,
  WICED_APP_EVENT_SERIALIZATION_FAILURE_CODE_HANDLER_EVENT_SET_FAIL = 0x62
}
 AIROC APP Event Serialization Failure Code. More...
 

Functions

wiced_bool_t wiced_app_event_serialize (int(*fn)(void *), void *data)
 This function lets you serialize a call onto the application thread, which has been instantiated by the AIROC stack and is used to interact with the application in an event-based fashion. More...
 
void wiced_app_event_serialization_debug_callback_register (wiced_app_event_debug_callback_t *callback)
 AIROC Application Event Serialization Handler Debug Callback Register. More...
 

Detailed Description

Typedef Documentation

typedef void( wiced_app_event_debug_callback_t)(wiced_app_event_serialization_failure_code_t error_code)

AIROC Application Event Serialization Handler Debug Callback.

Parameters
[in]errorcode: Refer to the error codes defined in the section, "Failure code for handling the event", in enum, wiced_app_event_serialization_failure_code_t.
Note
This is used for debugging the serialization event handler in application layer

AIROC APP Event Serialization Failure Code.

Note
This failure code is used to check the failure status if the return value of wiced_app_event_serialize() utility is FALSE.

Enumeration Type Documentation

AIROC APP Event Serialization Failure Code.

Note
This failure code is used to check the failure status if the return value of wiced_app_event_serialize() utility is FALSE.

Function Documentation

void wiced_app_event_serialization_debug_callback_register ( wiced_app_event_debug_callback_t callback)

AIROC Application Event Serialization Handler Debug Callback Register.

Parameters
[in]callback
Note
While an error in occurred in the serialization event handler, the registered callback will be called to indicate current situation with error code defined in wiced_app_event_serialization_failure_code_t.
wiced_bool_t wiced_app_event_serialize ( int(*)(void *)  fn,
void *  data 
)

This function lets you serialize a call onto the application thread, which has been instantiated by the AIROC stack and is used to interact with the application in an event-based fashion.

Once serialized, tasks are pushed onto a task queue, where they are pulled based on pre-defined priority of the application thread. The queue is 16 deep, but this is shared with the stack.

Parameters
[in]fnfunction to execute once dequeued from app thread
[in]datapointer to non-local data to be sent as arg to callback
Returns
  • WICED_TRUE indicates success
  • WICED_FALSE indicates failure
Note
The data parameter must point to non-local data as the pointer will be accessed after the current function returns.
Data will not be freed by stack. If allocated by app, must be freed by app.