CC_Invoker#

Typedefs#

typedef void *
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().

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().

Functions#

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.

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.

void
ZAF_CC_init_specific(uint8_t cmdClass)

Initializes a specific command class.

void
ZAF_CC_reset_specific(uint8_t cmdClass)

Resets specific command class.

void
ZAF_CC_foreach(zaf_cc_invoker_callback_t callback, zaf_cc_context_t context)

Invokes callback for each registered CC.

size_t

Returns the size of the handler map.

void
ZAF_CC_config_foreach(zaf_cc_config_invoker_callback_t callback, void *context)

Invokes callback for each registered CC configuration.

size_t

Returns the size of the config entry.

Typedef Documentation#

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) )(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.


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) )(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.


Function Documentation#

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.

Parameters
TypeDirectionArgument NameDescription
CC_handler_map_latest_t const *const[in]p_cc_entry

Pointer to command class entry.

cc_handler_input_t *[in]input

Input data. See cc_handler_input_t for details

cc_handler_output_t *[out]output

Output data. See cc_handler_output_t for details

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.

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.


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.

Parameters
TypeDirectionArgument NameDescription
cc_handler_input_t *[in]input

Input data. See cc_handler_input_t for details

cc_handler_output_t *[out]output

Output data. See cc_handler_output_t for details

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

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_init_specific#

void ZAF_CC_init_specific (uint8_t cmdClass)

Initializes a specific command class.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AcmdClass

The CC to initialize


ZAF_CC_reset_specific#

void ZAF_CC_reset_specific (uint8_t cmdClass)

Resets specific command class.

Parameters
TypeDirectionArgument NameDescription
uint8_tN/AcmdClass

The CC to reset


ZAF_CC_foreach#

void ZAF_CC_foreach (zaf_cc_invoker_callback_t callback, zaf_cc_context_t context)

Invokes callback for each registered CC.

Parameters
TypeDirectionArgument NameDescription
zaf_cc_invoker_callback_tN/Acallback

Callback function to invoke.

zaf_cc_context_tN/Acontext

Context to pass on to the callback function.

Will stop if the callback returns true.


ZAF_CC_handler_map_size#

size_t ZAF_CC_handler_map_size (void )

Returns the size of the handler map.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • size_t Handler map 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.

Parameters
TypeDirectionArgument NameDescription
zaf_cc_config_invoker_callback_tN/Acallback

Callback function to invoke.

void *N/Acontext

Context to pass on to the callback function.

Will stop if the callback returns true.


ZAF_CC_config_entry_size#

size_t ZAF_CC_config_entry_size (void )

Returns the size of the config entry.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Returns

  • size_t Config entry size