Trident IoT Z-Wave SDK
 
Loading...
Searching...
No Matches
CC_Invoker
+ Collaboration diagram for CC_Invoker:

Typedefs

typedef void * zaf_cc_context_t
 
typedef bool(* zaf_cc_invoker_callback_t) (CC_handler_map_latest_t const *const p_cc_entry, zaf_cc_context_t context)
 
typedef bool(* zaf_cc_config_invoker_callback_t) (zaf_cc_config_entry_latest_t const *const p_cc_config_entry, void *context)
 

Functions

received_frame_status_t ZAF_CC_invoke_specific (CC_handler_map_latest_t const *const p_cc_entry, cc_handler_input_t *input, cc_handler_output_t *output)
 
received_frame_status_t invoke_cc_handler (cc_handler_input_t *input, cc_handler_output_t *output)
 
void ZAF_CC_init_specific (uint8_t cmdClass)
 
void ZAF_CC_reset_specific (uint8_t cmdClass)
 
void ZAF_CC_foreach (zaf_cc_invoker_callback_t callback, zaf_cc_context_t context)
 
size_t ZAF_CC_handler_map_size (void)
 
void ZAF_CC_config_foreach (zaf_cc_config_invoker_callback_t callback, void *context)
 
size_t ZAF_CC_config_entry_size (void)
 

Detailed Description

Typedef Documentation

◆ zaf_cc_config_invoker_callback_t

typedef bool(* zaf_cc_config_invoker_callback_t) (zaf_cc_config_entry_latest_t const *const p_cc_config_entry, void *context)

Callback type for ZAF_CC_config_foreach().

The CC handler map must always be the latest available version.

◆ zaf_cc_context_t

typedef void* zaf_cc_context_t

◆ zaf_cc_invoker_callback_t

typedef bool(* zaf_cc_invoker_callback_t) (CC_handler_map_latest_t const *const p_cc_entry, zaf_cc_context_t context)

Callback type for ZAF_CC_foreach().

The CC handler map must always be the latest available version.

Function Documentation

◆ invoke_cc_handler()

received_frame_status_t invoke_cc_handler ( cc_handler_input_t * input,
cc_handler_output_t * output )

Invokes a handler based on the command class in the given frame.

This function is effectively a wrapper of ZAF_CC_invoke_specific() since it finds the corresponding CC entry and invokes ZAF_CC_invoke_specific().

Parameters
[in]inputInput data. See cc_handler_input_t for details
[out]outputOutput data. See cc_handler_output_t for details
Returns
Returns RECEIVED_FRAME_STATUS_CC_NOT_FOUND if the CC entry is not found or of the handler version is not supported. Otherwise, the return value from the handler is passed through.

◆ ZAF_CC_config_entry_size()

size_t ZAF_CC_config_entry_size ( void )

Returns the size of the config entry

Returns
size_t Config entry size

◆ ZAF_CC_config_foreach()

void ZAF_CC_config_foreach ( zaf_cc_config_invoker_callback_t callback,
void * context )

Invokes callback for each registered CC configuration.

Will stop if the callback returns true.

Parameters
callbackCallback function to invoke.
contextContext to pass on to the callback function.

◆ ZAF_CC_foreach()

void ZAF_CC_foreach ( zaf_cc_invoker_callback_t callback,
zaf_cc_context_t context )

Invokes callback for each registered CC.

Will stop if the callback returns true.

Parameters
callbackCallback function to invoke.
contextContext to pass on to the callback function.

◆ ZAF_CC_handler_map_size()

size_t ZAF_CC_handler_map_size ( void )

Returns the size of the handler map

Returns
size_t Handler map size

◆ ZAF_CC_init_specific()

void ZAF_CC_init_specific ( uint8_t cmdClass)

Initializes a specific command class.

Parameters
cmdClassThe CC to initialize

◆ ZAF_CC_invoke_specific()

received_frame_status_t ZAF_CC_invoke_specific ( CC_handler_map_latest_t const *const p_cc_entry,
cc_handler_input_t * input,
cc_handler_output_t * output )

Invokes the handler with the correct arguments for a given command class entry.

Command class handlers can be implemented in different versions having different parameters. This function will invoke the handler with the correct set of arguments based on the handler version.

Parameters
[in]p_cc_entryPointer to command class entry.
[in]inputInput data. See cc_handler_input_t for details
[out]outputOutput data. See cc_handler_output_t for details
Returns
Returns RECEIVED_FRAME_STATUS_CC_NOT_FOUND if the handler version is not supported. Otherwise, the return value from the handler is passed through.

◆ ZAF_CC_reset_specific()

void ZAF_CC_reset_specific ( uint8_t cmdClass)

Resets specific command class.

Parameters
cmdClassThe CC to reset