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

Data Structures

struct  _MULTICHAN_SOURCE_NODE_ID_
 
struct  _MULTICHAN_DEST_NODE_ID_
 
struct  MULTICHAN_DEST_NODE_ID_8bit
 
struct  _RECEIVE_OPTIONS_TYPE_EX_
 
struct  ZAF_TRANSPORT_TX_BUFFER
 
struct  ccc_pair_t
 
struct  agi_profile_t
 
struct  transmission_result_t
 
struct  _cc_handler_input_t
 Defines the input parameters of a command class handler. More...
 
struct  _cc_handler_output_t
 Defines the output parameters of a command class handler. More...
 
struct  CC_handler_map_t
 
struct  CC_handler_map_v2_t
 
struct  CC_handler_map_v3_t
 
struct  CC_handler_map_v4_t
 
struct  zaf_cc_config_t
 
struct  zaf_cc_config_entry_v1_t
 
struct  zaf_cc_list_t
 

Macros

#define HANDLER_SECTION   "zw_cc_handlers_v3"
 
#define cc_handlers_start   __start_zw_cc_handlers_v3
 
#define cc_handlers_stop   __stop_zw_cc_handlers_v3
 
#define REGISTER_CC_V5(cc, version, handler, basic_set_mapper, basic_get_mapper, lifeline_report_cb, flags, init_cb, reset_cb)
 
#define REGISTER_CC_V4(cc, version, handler, basic_set_mapper, basic_get_mapper, lifeline_report_cb, flags, init_cb, reset_cb)
 
#define REGISTER_CC_V3(cc, version, handler, basic_set_mapper, basic_get_mapper, lifeline_report_cb, flags)
 
#define REGISTER_CC_V2(cc, version, handler)
 
#define REGISTER_CC(cc, version, handler)
 
#define ZAF_CC_CONFIG_SECTION   "zw_zaf_cc_config"
 
#define ZAF_CC_REGISTER_CONFIG(cc, config, index)
 

Typedefs

typedef struct _MULTICHAN_SOURCE_NODE_ID_ MULTICHAN_SOURCE_NODE_ID
 
typedef struct _MULTICHAN_DEST_NODE_ID_ MULTICHAN_DEST_NODE_ID
 
typedef struct _RECEIVE_OPTIONS_TYPE_EX_ RECEIVE_OPTIONS_TYPE_EX
 
typedef ccc_pair_t cc_group_t
 
typedef cc_group_t CMD_CLASS_GRP
 
typedef agi_profile_t AGI_PROFILE
 
typedef zaf_job_status_t job_status_t
 
typedef job_status_t JOB_STATUS
 
typedef transmission_result_t TRANSMISSION_RESULT
 
typedef void(* cc_handler_t) (void)
 Defines a type for the generic command class handler.
 
typedef received_frame_status_t(* cc_handler_v1_t) (RECEIVE_OPTIONS_TYPE_EX *, ZW_APPLICATION_TX_BUFFER *, uint8_t)
 Defines a type for version 1 of the command class handler.
 
typedef received_frame_status_t(* cc_handler_v2_t) (RECEIVE_OPTIONS_TYPE_EX *, ZW_APPLICATION_TX_BUFFER *, uint8_t, ZW_APPLICATION_TX_BUFFER *, uint8_t *)
 Defines a type for version 2 of the command class handler.
 
typedef struct _cc_handler_input_t cc_handler_input_t
 Defines the input parameters of a command class handler.
 
typedef struct _cc_handler_output_t cc_handler_output_t
 Defines the output parameters of a command class handler.
 
typedef received_frame_status_t(* cc_handler_v3_t) (cc_handler_input_t *, cc_handler_output_t *)
 Defines a type for version 3 of the command class handler.
 
typedef void(* basic_set_mapper_t) (ZW_APPLICATION_TX_BUFFER *p_frame)
 
typedef void(* basic_get_mapper_t) (uint8_t endpoint, uint8_t *p_current_value, uint8_t *p_target_value, uint8_t *p_duration)
 
typedef void(* cc_init_function_t) (void)
 
typedef void(* cc_reset_function_t) (void)
 
typedef uint8_t(* lifeline_report_get_t) (cc_group_t *p_cc_pair)
 
typedef CC_handler_map_v4_t CC_handler_map_latest_t
 
typedef void(* ZAF_TX_Callback_t) (transmission_result_t *pTxResult)
 
typedef void(* ZW_TX_Callback_t) (uint8_t txStatus, TX_STATUS_TYPE *extendedTxStatus)
 
typedef void(* ZW_TX_Multi_Callback_t) (uint8_t txStatus)
 
typedef void(* ZW_Void_Callback_t) (void)
 
typedef zaf_cc_config_entry_v1_t zaf_cc_config_entry_latest_t
 

Enumerations

enum  e_cmd_handler_return_code_t {
  E_CMD_HANDLER_RETURN_CODE_FAIL ,
  E_CMD_HANDLER_RETURN_CODE_HANDLED ,
  E_CMD_HANDLER_RETURN_CODE_WORKING ,
  E_CMD_HANDLER_RETURN_CODE_NOT_SUPPORTED ,
  E_CMD_HANDLER_RETURN_CODE_NO_CHANGE
}
 
enum  received_frame_status_t {
  RECEIVED_FRAME_STATUS_NO_SUPPORT = 0x00 ,
  RECEIVED_FRAME_STATUS_WORKING = 0x01 ,
  RECEIVED_FRAME_STATUS_FAIL = 0x02 ,
  RECEIVED_FRAME_STATUS_CANCEL = 0x03 ,
  RECEIVED_FRAME_STATUS_CC_NOT_FOUND = 0x04 ,
  RECEIVED_FRAME_STATUS_SUCCESS = 0xFF
}
 
enum  zaf_job_status_t {
  JOB_STATUS_SUCCESS = 0 ,
  JOB_STATUS_BUSY ,
  JOB_STATUS_NO_DESTINATIONS
}
 
enum  TRANSMISSION_RESULT_FINISH_STATUS {
  TRANSMISSION_RESULT_NOT_FINISHED ,
  TRANSMISSION_RESULT_FINISHED ,
  TRANSMISSION_RESULT_UNKNOWN
}
 

Variables

const CC_handler_map_latest_t __start_zw_cc_handlers_v3
 
const CC_handler_map_latest_t __stop_zw_cc_handlers_v3
 

Detailed Description

Macro Definition Documentation

◆ cc_handlers_start

#define cc_handlers_start   __start_zw_cc_handlers_v3

◆ cc_handlers_stop

#define cc_handlers_stop   __stop_zw_cc_handlers_v3

◆ HANDLER_SECTION

#define HANDLER_SECTION   "zw_cc_handlers_v3"

◆ REGISTER_CC

#define REGISTER_CC ( cc,
version,
handler )
Value:
static const CC_handler_map_latest_t thisHandler##cc __attribute__((aligned(4), __used__, __section__( HANDLER_SECTION ))) = {1,cc,version,(cc_handler_t)handler,NULL,NULL,NULL,0,NULL,NULL}; \
void * dummy##cc
#define HANDLER_SECTION
Definition ZAF_types.h:355
void(* cc_handler_t)(void)
Defines a type for the generic command class handler.
Definition ZAF_types.h:195
#define NULL
Definition ZW_typedefs.h:32
Definition ZAF_types.h:309

Registers a given command class with version, handler, etc.

Requires a CC handler matching cc_handler_t.

◆ REGISTER_CC_V2

#define REGISTER_CC_V2 ( cc,
version,
handler )
Value:
static const CC_handler_map_latest_t thisHandler##cc __attribute__((aligned(4), __used__, __section__( HANDLER_SECTION ))) = {2,cc,version,(cc_handler_t)handler,NULL,NULL,NULL,0,NULL,NULL}; \
void * dummy##cc

Registers a given command class with version, handler, etc.

Requires a CC handler matching cc_handler_v2_t.

◆ REGISTER_CC_V3

#define REGISTER_CC_V3 ( cc,
version,
handler,
basic_set_mapper,
basic_get_mapper,
lifeline_report_cb,
flags )
Value:
static const CC_handler_map_latest_t thisHandler##cc __attribute__((aligned(4), __used__, __section__( HANDLER_SECTION ))) = {2,cc,version,(cc_handler_t)handler,basic_set_mapper,basic_get_mapper,lifeline_report_cb,flags,NULL,NULL}; \
void * dummy##cc

Registers a given command class with version, handler, etc.

Every CC must register itself using the latest REGISTER_CC macro. Doing so will enable ZAF to process certain parts without the need for additional handling in the application. One example being the dispatching of command class frames to the correct command class.

Using this macro will make the linker place a variable in a specific linker section which effectively will create an array of registered command classes. ZAF uses this array to look up different information about the supported command classes.

Please see existing command classes for examples of usage.

Remarks
Requires a CC handler matching cc_handler_v2_t.
Parameters
[in]ccThe command class number, e.g. COMMAND_CLASS_VERSION.
[in]versionThe version of the command class the the implementation covers.
[in]handlerAddress of the handler function.
[in]basic_set_mapperAddress of the Basic Set mapper function.
[in]basic_get_mapperAddress of the Basic Get mapper function.
[in]lifeline_report_cbPointer to a function that will set one or more command class / command pairs. Some command classes are required to report via Lifeline and each Lifeline report callback will populate the list of command class / command pairs for the Association Group Command List Report. The list of mandatory command class / command pairs can be found under "Lifeline Reports" in https://sdomembers.z-wavealliance.org/wg/AWG/document/120.
[in]flagsReserved for future use.

◆ REGISTER_CC_V4

#define REGISTER_CC_V4 ( cc,
version,
handler,
basic_set_mapper,
basic_get_mapper,
lifeline_report_cb,
flags,
init_cb,
reset_cb )
Value:
static const CC_handler_map_latest_t thisHandler##cc __attribute__((aligned(4), __used__, __section__( HANDLER_SECTION ))) = {2,cc,version,(cc_handler_t)handler,basic_set_mapper,basic_get_mapper,lifeline_report_cb,flags,init_cb,reset_cb}; \
void * dummy##cc

Registers a given command class with version, handler, etc.

Every CC must register itself using the latest REGISTER_CC macro. Doing so will enable ZAF to process certain parts without the need for additional handling in the application. One example being the dispatching of command class frames to the correct command class.

Using this macro will make the linker place a variable in a specific linker section which effectively will create an array of registered command classes. ZAF uses this array to look up different information about the supported command classes.

Please see existing command classes for examples of usage.

Remarks
Requires a CC handler matching cc_handler_v2_t.
Parameters
[in]ccThe command class number, e.g. COMMAND_CLASS_VERSION.
[in]versionThe version of the command class the the implementation covers.
[in]handlerAddress of the handler function.
[in]basic_set_mapperAddress of the Basic Set mapper function.
[in]basic_get_mapperAddress of the Basic Get mapper function.
[in]lifeline_report_cbPointer to a function that will set one or more command class / command pairs. Some command classes are required to report via Lifeline and each Lifeline report callback will populate the list of command class / command pairs for the Association Group Command List Report. The list of mandatory command class / command pairs can be found under "Lifeline Reports" in https://sdomembers.z-wavealliance.org/wg/AWG/document/120.
[in]flagsReserved for future use.
[in]init_cbThe CC init function to be invoked by ZAF_Init().
[in]reset_cbThe CC reset function to be invoked on factory reset.

◆ REGISTER_CC_V5

#define REGISTER_CC_V5 ( cc,
version,
handler,
basic_set_mapper,
basic_get_mapper,
lifeline_report_cb,
flags,
init_cb,
reset_cb )
Value:
static const CC_handler_map_latest_t thisHandler##cc __attribute__((aligned(4), __used__, __section__( HANDLER_SECTION ))) = {3,cc,version,(cc_handler_t)handler,basic_set_mapper,basic_get_mapper,lifeline_report_cb,flags,init_cb,reset_cb}; \
void * dummy##cc

Registers a given command class with version, handler, etc.

Every CC must register itself using the latest REGISTER_CC macro. Doing so will enable ZAF to process certain parts without the need for additional handling in the application. One example being the dispatching of command class frames to the correct command class.

Using this macro will make the linker place a variable in a specific linker section which effectively will create an array of registered command classes. ZAF uses this array to look up different information about the supported command classes.

Please see existing command classes for examples of usage.

Remarks
Requires a CC handler matching cc_handler_v3_t.
Parameters
[in]ccThe command class number, e.g. COMMAND_CLASS_VERSION.
[in]versionThe version of the command class the the implementation covers.
[in]handlerAddress of the handler function.
[in]basic_set_mapperAddress of the Basic Set mapper function.
[in]basic_get_mapperAddress of the Basic Get mapper function.
[in]lifeline_report_cbPointer to a function that will set one or more command class / command pairs. Some command classes are required to report via Lifeline and each Lifeline report callback will populate the list of command class / command pairs for the Association Group Command List Report. The list of mandatory command class / command pairs can be found under "Lifeline Reports" in https://sdomembers.z-wavealliance.org/wg/AWG/document/120.
[in]flagsReserved for future use.
[in]init_cbThe CC init function to be invoked by ZAF_Init().
[in]reset_cbThe CC reset function to be invoked on factory reset.

◆ ZAF_CC_CONFIG_SECTION

#define ZAF_CC_CONFIG_SECTION   "zw_zaf_cc_config"

◆ ZAF_CC_REGISTER_CONFIG

#define ZAF_CC_REGISTER_CONFIG ( cc,
config,
index )
Value:
static const zaf_cc_config_entry_latest_t cc_config##index##cc __attribute__((aligned(4), __used__, __section__(ZAF_CC_CONFIG_SECTION))) = { cc, (zaf_cc_config_t *) config }; \
void * cc_register_config##index##cc
#define ZAF_CC_CONFIG_SECTION
Definition ZAF_types.h:519
Definition ZAF_types.h:503
Definition ZAF_types.h:498

Registers a given command class configuration.

Parameters
[in]ccThe command class number, e.g. COMMAND_CLASS_VERSION.
[in]configThe address of the corresponding CC configuration.
[in]indexA unique index for a set of configurations

Typedef Documentation

◆ AGI_PROFILE

For backwards compatibility.

◆ basic_get_mapper_t

typedef void(* basic_get_mapper_t) (uint8_t endpoint, uint8_t *p_current_value, uint8_t *p_target_value, uint8_t *p_duration)

Basic Get mapper function type.

Use this type when defining a function for Basic Get mapping.

Parameters
[in]endpointThe endpoint that received the Basic Get command.
[out]p_current_valuePointer to variable where the current value can be written.
[out]p_target_valuePointer to variable where the target value can be written.
[out]p_durationPointer to variable where the duration can be written.

◆ basic_set_mapper_t

typedef void(* basic_set_mapper_t) (ZW_APPLICATION_TX_BUFFER *p_frame)

Basic Set mapper function type.

Use this type when defining a function for Basic Set mapping.

Parameters
[out]p_frameThe frame that must have command class and command replaced by the command class that defines the Basic Set mapping function.

◆ cc_group_t

For backwards compatibility.

◆ cc_handler_input_t

Defines the input parameters of a command class handler.

◆ CC_handler_map_latest_t

Defines a type for the latest available CC handle type.

Users of the CC handle must use this type to avoid changes caused by a future handle version.

◆ cc_handler_output_t

Defines the output parameters of a command class handler.

◆ cc_handler_t

typedef void(* cc_handler_t) (void)

Defines a type for the generic command class handler.

◆ cc_handler_v1_t

typedef received_frame_status_t(* cc_handler_v1_t) (RECEIVE_OPTIONS_TYPE_EX *, ZW_APPLICATION_TX_BUFFER *, uint8_t)

Defines a type for version 1 of the command class handler.

◆ cc_handler_v2_t

typedef received_frame_status_t(* cc_handler_v2_t) (RECEIVE_OPTIONS_TYPE_EX *, ZW_APPLICATION_TX_BUFFER *, uint8_t, ZW_APPLICATION_TX_BUFFER *, uint8_t *)

Defines a type for version 2 of the command class handler.

◆ cc_handler_v3_t

Defines a type for version 3 of the command class handler.

◆ cc_init_function_t

typedef void(* cc_init_function_t) (void)

◆ cc_reset_function_t

typedef void(* cc_reset_function_t) (void)

◆ CMD_CLASS_GRP

◆ JOB_STATUS

◆ job_status_t

For backwards compatibility.

◆ lifeline_report_get_t

typedef uint8_t(* lifeline_report_get_t) (cc_group_t *p_cc_pair)

A lifeline report function must take an array of CC pairs as input and return the number of CC pairs being added to the array.

◆ MULTICHAN_DEST_NODE_ID

◆ MULTICHAN_SOURCE_NODE_ID

◆ RECEIVE_OPTIONS_TYPE_EX

Properties of the received frame. Used mostly by command classes to prepare response to a command.

◆ TRANSMISSION_RESULT

For backwards compatibility.

◆ zaf_cc_config_entry_latest_t

Eases the upgrade to future versions of the CC config struct.

◆ ZAF_TX_Callback_t

typedef void(* ZAF_TX_Callback_t) (transmission_result_t *pTxResult)

◆ ZW_TX_Callback_t

typedef void(* ZW_TX_Callback_t) (uint8_t txStatus, TX_STATUS_TYPE *extendedTxStatus)

Callback function triggered after completed transmission

Parameters
txStatusTransmit complete codes
extendedTxStatusExtended Tx Status

◆ ZW_TX_Multi_Callback_t

typedef void(* ZW_TX_Multi_Callback_t) (uint8_t txStatus)

Callback function triggered after ZW_SendDataMulti_Bridge completed transmission

Parameters
txStatusTransmit complete codes

◆ ZW_Void_Callback_t

typedef void(* ZW_Void_Callback_t) (void)

Generic Callback function type

Enumeration Type Documentation

◆ e_cmd_handler_return_code_t

Enumerator
E_CMD_HANDLER_RETURN_CODE_FAIL 

Not accepted or accepted but failed to execute. Command class returns FAIL.

E_CMD_HANDLER_RETURN_CODE_HANDLED 

Accepted and executed by the command handler. Command class returns SUCCESS.

E_CMD_HANDLER_RETURN_CODE_WORKING 

Accepted but is not fully executed. Command class returns WORKING.

E_CMD_HANDLER_RETURN_CODE_NOT_SUPPORTED 

Command handler does not support this command. Command class returns NO_SUPPORT.

E_CMD_HANDLER_RETURN_CODE_NO_CHANGE 

Accepted but device was already in final state, so no change was made. Command class returns SUCCESS.

◆ received_frame_status_t

Status on incoming frame. Use same values as cc_supervision_status_t

Enumerator
RECEIVED_FRAME_STATUS_NO_SUPPORT 

Frame not supported.

RECEIVED_FRAME_STATUS_WORKING 

Frame received successfully and timed change started.

RECEIVED_FRAME_STATUS_FAIL 

Could not handle incoming frame.

RECEIVED_FRAME_STATUS_CANCEL 

Don't care about status. CC or App will send the report.

RECEIVED_FRAME_STATUS_CC_NOT_FOUND 

CC handler was not found in CC handler map.

RECEIVED_FRAME_STATUS_SUCCESS 

Frame received successfully.

◆ TRANSMISSION_RESULT_FINISH_STATUS

Indicates whether all transmissions are done. Used by TRANSMISSION_RESULT.

Enumerator
TRANSMISSION_RESULT_NOT_FINISHED 

Still transmitting.

TRANSMISSION_RESULT_FINISHED 

Done transmitting to all nodes.

TRANSMISSION_RESULT_UNKNOWN 

Reserved for callbacks from the stack as the stack supplies no valid value for the finish field.

◆ zaf_job_status_t

Callback status used on framework API for request/response-job

Enumerator
JOB_STATUS_SUCCESS 

Job has been started.

JOB_STATUS_BUSY 

Job couldn't start.

JOB_STATUS_NO_DESTINATIONS 

Job couldn't start because there is no destinations.

Variable Documentation

◆ __start_zw_cc_handlers_v3

const CC_handler_map_latest_t __start_zw_cc_handlers_v3
extern

This is the first of the registered app handlers

◆ __stop_zw_cc_handlers_v3

const CC_handler_map_latest_t __stop_zw_cc_handlers_v3
extern

This marks the end of the handlers. The element after the last element. This means that this element is not valid.