5.2.1. Common APIs and Defines
This section provides the common part APIs and defines of ESP Zigbee Core.
5.2.1.1. API Reference
5.2.1.1.1. Header File
5.2.1.1.2. Functions
-
static inline ezb_err_category_t ezb_get_err_category(ezb_err_t err)
Get the the error category of a given error code.
- Parameters:
err -- Error code.
- Returns:
The category of the given error code, refer to ezb_err_category_t
5.2.1.1.3. Macros
-
ESP_ZIGBEE_ERROR_H
-
EZB_MAKE_ERROR(category, code)
Construct an error code with category and code value.
- Parameters:
category -- [in] The category of the error, refer to ezb_err_category_t.
code -- [in] The code value indicating the error within the category.
-
EZB_ERR_NONE
Success without error
-
EZB_ERR_FAIL
Generic failure
-
EZB_ERR_NO_MEM
No sufficient memory
-
EZB_ERR_INV_ARG
Invalid argument
-
EZB_ERR_INV_STATE
Invalid state
-
EZB_ERR_INV_SIZE
Invalid size
-
EZB_ERR_NOT_FOUND
Requested resource not found
-
EZB_ERR_NOT_SUPPORTED
Operation is not supported
-
EZB_ERR_TIMEOUT
Operation timed out
-
EZB_ERR_ABORT
Operation is aborted
-
EZB_ERR_BUSY
Busy state
-
EZB_ERR_NOT_FINISHED
Operation is not fully finished
-
EZB_ERR_NOT_ALLOWED
Operation is not allowed
-
EZB_ERR_PARSE
Fail to parse frame/packet
-
EZB_ERR_EMPTY_DATA
Received Empty data
-
EZB_ERR_DROP
Frame is dropped
-
EZB_ERR_SECURITY
Fail to process security
5.2.1.1.4. Type Definitions
-
typedef int ezb_err_t
Error code representation. .
5.2.1.1.5. Enumerations
-
enum ezb_err_category_t
Error code category.
Values:
-
enumerator EZB_ERR_CATEGORY_GENERIC
Generic error
-
enumerator EZB_ERR_CATEGORY_MAC
Mac layer error
-
enumerator EZB_ERR_CATEGORY_NWK
NWK layer error
-
enumerator EZB_ERR_CATEGORY_APS
APS layer error
-
enumerator EZB_ERR_CATEGORY_ZDP
ZDP error
-
enumerator EZB_ERR_CATEGORY_ZCL
ZCL layer error
-
enumerator EZB_ERR_CATEGORY_MAX_NR
Total category number
-
enumerator EZB_ERR_CATEGORY_GENERIC
5.2.1.1.6. Header File
5.2.1.1.7. Functions
-
static inline bool ezb_eui64_compare(const struct ezb_eui64_s *eui64_1, const struct ezb_eui64_s *eui64_2)
Compare two EUI-64.
- Parameters:
eui64_1 -- [in] The first EUI-64.
eui64_2 -- [in] The second EUI-64.
- Returns:
True: The two EUI-64 are equal.
False: The two EUI-64 are not equal.
-
static inline void ezb_eui64_copy(struct ezb_eui64_s *dst, const struct ezb_eui64_s *src)
Copy an EUI-64.
- Parameters:
dst -- [out] The destination EUI-64 .
src -- [in] The source EUI-64.
-
static inline bool ezb_eui64_is_all_zero(const struct ezb_eui64_s *eui64)
Check if all the bits of an EUI-64 are zeros.
- Parameters:
eui64 -- [in] The EUI-64 to check.
- Returns:
True: All the bits of the EUI-64 are zeros.
False: Not all the bits of the EUI-64 are zeros.
-
static inline void ezb_eui64_set_all_zero(struct ezb_eui64_s *eui64)
Set all the bits of an EUI-64 to zeros.
- Parameters:
eui64 -- [in] The EUI-64 to set.
-
static inline bool ezb_eui64_is_all_ones(const struct ezb_eui64_s *eui64)
Check if all the bits of an EUI-64 are ones.
- Parameters:
eui64 -- [in] The EUI-64 to check.
- Returns:
True: All the bits of the EUI-64 are ones.
False: Not all the bits of the EUI-64 are ones.
-
static inline void ezb_eui64_set_all_ones(struct ezb_eui64_s *eui64)
Set all the bits of an EUI-64 to ones.
- Parameters:
eui64 -- [in] The EUI-64 to set.
-
static inline bool ezb_eui64_is_invalid(const struct ezb_eui64_s *eui64)
Check if an EUI-64 is invalid.
An EUI-64 is invalid if all the bits are zeros or ones.
- Parameters:
eui64 -- [in] The EUI-64 to check.
- Returns:
True: The EUI-64 is invalid.
False: The EUI-64 is valid.
-
static inline void ezb_address_set_short(ezb_address_t *address, ezb_shortaddr_t short_addr)
Set the address mode to EZB_ADDR_MODE_SHORT.
- Parameters:
address -- [in] The address to set.
short_addr -- [in] The short address to set.
-
static inline void ezb_address_set_extended(ezb_address_t *address, ezb_extaddr_t extended_addr)
Set the address to EZB_ADDR_MODE_EXT.
- Parameters:
address -- [in] The address to set.
extended_addr -- [in] The extended address to set.
-
static inline void ezb_address_set_none(ezb_address_t *address)
Set the address to EZB_ADDR_MODE_NONE.
- Parameters:
address -- [in] The address to set.
-
static inline bool ezb_address_is_short(const ezb_address_t *addr, ezb_shortaddr_t short_addr)
Check if the address is equal to a short address.
- Parameters:
addr -- [in] The address to check.
short_addr -- [in] The short address.
- Returns:
True: The mode is EZB_ADDR_MODE_SHORT and the address is equal to the short address.
False: The mode is not EZB_ADDR_MODE_SHORT or the address is not equal to the short address.
-
static inline bool ezb_address_is_extended(const ezb_address_t *addr, ezb_extaddr_t extended_addr)
Check if the address is equal to an extended address.
- Parameters:
addr -- [in] The address to check.
extended_addr -- [in] The extended address.
- Returns:
True: The mode is EZB_ADDR_MODE_EXT and the address is equal to the extended address.
False: The mode is not EZB_ADDR_MODE_EXT or the address is not equal to the extended address.
-
static inline bool ezb_address_compare(const ezb_address_t *addr1, const ezb_address_t *addr2)
Compare two addresses.
- Parameters:
addr1 -- [in] The first address.
addr2 -- [in] The second address.
- Returns:
True: The two addresses are equal.
False: The two addresses are not equal.
5.2.1.1.8. Unions
-
union ezb_addr_u
- #include <core_types.h>
Represents a union of IEEE 802.15.4 Short & Extended Address.
Public Members
-
ezb_shortaddr_t short_addr
16-bit network short address
-
ezb_grpaddr_t group_addr
Group address information
-
ezb_extaddr_t extended_addr
64-bit extended address
-
ezb_shortaddr_t short_addr
5.2.1.1.9. Structures
-
struct ezb_eui64_s
Represents the IEEE 802 64-bit extended universal identifier (EUI-64)
-
struct ezb_grpaddr_s
Represents the Zigbee APS Group Delivery Information.
Public Members
-
ezb_shortaddr_t group
16-bit group address
-
ezb_shortaddr_t bcast
16-bit broadcast address, used for transmission
-
ezb_shortaddr_t group
-
struct ezb_address_s
Represents a common address with address mode.
Public Members
-
ezb_addr_mode_t addr_mode
Address mode, refer to ezb_addr_mode_e
-
ezb_addr_t u
The data of address, refer to ezb_addr_u
-
ezb_addr_mode_t addr_mode
5.2.1.1.10. Macros
-
ESP_ZIGBEE_CORE_TYPES_H
-
EZB_ADDRESS_SHORT(addr)
Create a ezb_address_s with EZB_ADDR_MODE_SHORT.
- Parameters:
addr -- [in] The short address.
- Returns:
The ezb_address_s with EZB_ADDR_MODE_SHORT.
-
EZB_ADDRESS_EXTENDED(addr)
Create a ezb_address_s with EZB_ADDR_MODE_EXT.
- Parameters:
addr -- [in] The extended address.
- Returns:
The ezb_address_s with EZB_ADDR_MODE_EXT.
-
EZB_ADDRESS_NONE()
Create a ezb_address_s with EZB_ADDR_MODE_NONE.
- Returns:
The ezb_address_s with EZB_ADDR_MODE_NONE.
-
EZB_ADDRESS_GROUP(g, b)
Create a ezb_address_s with EZB_ADDR_MODE_GROUP.
- Parameters:
g -- [in] The group address.
b -- [in] The broadcast address.
- Returns:
The ezb_address_s with EZB_ADDR_MODE_GROUP.
-
EZB_AES_KEY_SIZE
-
EZB_CCM_KEY_SIZE
5.2.1.1.11. Type Definitions
-
typedef uint8_t ezb_addr_mode_t
Represents the IEEE 802.15.4 Address Mode.
-
typedef uint16_t ezb_panid_t
Represents the IEEE 802.15.4 PAN ID.
-
typedef uint16_t ezb_shortaddr_t
Represents the IEEE 802.15.4 Short Address.
-
typedef struct ezb_eui64_s ezb_extaddr_t
Represents the IEEE 802.15.4 Extended Address.
-
typedef struct ezb_eui64_s ezb_extpanid_t
Represents the Zigbee Extended PAN ID.
-
typedef struct ezb_grpaddr_s ezb_grpaddr_t
Represents the Zigbee APS Group Delivery Information.
-
typedef union ezb_addr_u ezb_addr_t
Represents a union of IEEE 802.15.4 Short & Extended Address.
-
typedef struct ezb_address_s ezb_address_t
Represents a common address with address mode.
5.2.1.1.12. Enumerations
-
enum ezb_addr_mode_e
Address mode definition. .
Values:
-
enumerator EZB_ADDR_MODE_NONE
MAC: PAN ID and address fields are not present. NWK: Reserved. APS: DstAddress and DstEndpoint not present.
-
enumerator EZB_ADDR_MODE_GROUP
MAC: Reserved. NWK: Reserved. APS: 16-bit group address for DstAddress; DstEndpoint not present.
-
enumerator EZB_ADDR_MODE_SHORT
MAC: Address field contains a short address (16 bit). NWK: 16-bit network address of a device or a 16-bit broadcast address. APS: 16-bit address for DstAddress and DstEndpoint present.
-
enumerator EZB_ADDR_MODE_EXT
MAC: Address field contains an extended address (64 bit). NWK: Reserved. APS: 64-bit extended address for DstAddress and DstEndpoint present.
-
enumerator EZB_ADDR_MODE_NONE
5.2.1.1.13. Header File
5.2.1.1.14. Functions
-
ezb_err_t ezb_core_init(void)
Initialize the ESP-Zigbee core .
- Returns:
EZB_ERR_NONE on success, error code otherwise.
-
void ezb_core_deinit(void)
Deinitialize the ESP-Zigbee core .
-
ezb_err_t ezb_config_memory(const ezb_mem_config_t *mem_cfg)
Configure the memory after the stack is initialized.
Note
This function must be called after ezb_core_init is called.
- Parameters:
mem_cfg -- [in] The memory configuration, see ezb_mem_config_s. The size of 0 in the configuration will use the default size.
- Returns:
EZB_ERR_NONE on success, error code otherwise.
-
ezb_err_t ezb_dev_start(bool autostart)
Start the Zigbee device. .
- Parameters:
autostart -- [in] - True: autostart mode,
False: no-autostart mode.
- Returns:
EZB_ERR_NONE on success, error code otherwise.
-
bool ezb_dev_is_started(void)
Check if the Zigbee device is started.
- Returns:
True: if the Zigbee device is started
False: if the Zigbee device is not started
-
void ezb_set_extended_address(const ezb_extaddr_t *extaddr)
Set the extended address of the Zigbee device.
Note
This is identical to ezb_nwk_set_extended_address.
- Parameters:
extaddr -- [in] The pointer to the 64-bit of extended address, in little-endian.
-
void ezb_get_extended_address(ezb_extaddr_t *extaddr)
Get the extended address of the Zigbee device.
Note
This is identical to ezb_nwk_get_extended_address.
- Parameters:
extaddr -- [out] The pointer to the 64-bit of extended address, in little-endian.
-
void ezb_set_short_address(ezb_shortaddr_t short_addr)
Set the short address of the Zigbee device.
Note
This is identical to ezb_nwk_set_short_address.
- Parameters:
short_addr -- [in] The short address of the Zigbee device.
-
ezb_shortaddr_t ezb_get_short_address(void)
Get the short address of the Zigbee device.
Note
This is identical to ezb_nwk_get_short_address.
- Returns:
The short address of the Zigbee device.
-
void ezb_set_use_extended_panid(const ezb_extpanid_t *extpanid)
Set the extended PAN ID to be used for commissioning. .
Note
This is identical to ezb_aps_set_use_extended_panid.
- Parameters:
extpanid -- [in] The pointer to the 64-bit of extended PAN ID, in little-endian.
-
void ezb_get_use_extended_panid(ezb_extpanid_t *extpanid)
Get the extended PAN ID to be used for commissioning. .
Note
This is identical to ezb_aps_get_use_extended_panid.
- Parameters:
extpanid -- [out] The pointer to the 64-bit of extended PAN ID, in little-endian.
-
void ezb_get_extended_panid(ezb_extpanid_t *extpanid)
Get the extended PAN ID of the network.
Note
This is identical to ezb_nwk_get_extended_panid.
- Parameters:
extpanid -- [out] The pointer to the 64-bit of extended PAN ID, in little-endian.
-
void ezb_set_panid(ezb_panid_t pan_id)
Set the PAN ID of the network.
Note
This is identical to ezb_nwk_set_panid.
- Parameters:
pan_id -- [in] The 16-bit of PAN ID, in little-endian.
-
ezb_panid_t ezb_get_panid(void)
Get the PAN ID of the network.
Note
This is identical to ezb_nwk_get_panid.
- Returns:
The 16-bit of PAN ID, in little-endian.
-
uint8_t ezb_get_current_channel(void)
Get the currently used channel.
Note
This is identical to ezb_nwk_get_current_channel.
- Returns:
The currently used channel.
-
void ezb_set_tx_power(int8_t power)
Set the tx power.
Note
This is identical to ezb_nwk_set_tx_power.
- Parameters:
power -- [in] The tx power in dBm.
-
void ezb_get_tx_power(int8_t *power)
Get the tx power.
Note
This is identical to ezb_nwk_get_tx_power.
- Parameters:
power -- [out] The tx power in dBm.
-
ezb_err_t ezb_set_channel_mask(uint32_t channel_mask)
Set the 2.4GHz channel mask.
Note
This is identical to ezb_aps_set_channel_mask.
- Parameters:
channel_mask -- [in] The 2.4GHz channel mask.
- Returns:
EZB_ERR_NONE: on success
EZB_ERR_INV_ARG: if the channel mask is out of range
-
uint32_t ezb_get_channel_mask(void)
Get the 2.4GHz channel mask.
Note
This is identical to ezb_aps_get_channel_mask.
- Returns:
A 32-bit channel mask
-
void ezb_set_rx_on_when_idle(bool rx_on)
Enable/Disable Rx when device is in IDLE state.
Note
This is identical to ezb_nwk_set_rx_on_when_idle.
- Parameters:
rx_on -- [in] True - Rx remains on during idle periods, False - Rx is put to sleep during idle periods.
-
bool ezb_get_rx_on_when_idle(void)
Get the current state of RxOnWhenIdle.
Note
This is identical to ezb_nwk_get_rx_on_when_idle.
- Returns:
The state of RxOnWhenIdle.
5.2.1.1.15. Structures
-
struct ezb_mem_config_s
The memory configuration structure.
Public Members
-
uint16_t buffer_pool_size
The capacity of the buffer pool
-
uint16_t address_table_size
The capacity of the address table
-
uint16_t neighbor_table_size
The capacity of the neighbor table
-
uint16_t route_table_size
The capacity of the route table
-
uint16_t route_discovery_table_size
The capacity of the route discovery table
-
uint16_t route_record_table_size
The capacity of the route record table
-
uint16_t aps_key_pair_set_size
The capacity of the APS device key pair set
-
uint16_t aps_bind_table_src_size
The capacity of source entries in the APS binding table
-
uint16_t aps_bind_table_dst_size
The capacity of destination entries in the APS binding table
-
uint16_t buffer_pool_size
5.2.1.1.16. Macros
-
ESP_ZIGBEE_CORE_H
-
EZB_ZIGBEE_VERSION_2004
-
EZB_ZIGBEE_VERSION_2006
-
EZB_ZIGBEE_STACK_STD
-
EZB_ZIGBEE_STACK_PRO
-
EZB_ZIGBEE_STACK_SPEC_LEGACY
-
EZB_ZIGBEE_STACK_SPEC_R21
-
EZB_ZIGBEE_STACK_SPEC_R22
-
EZB_ZIGBEE_STACK_SPEC_R23
-
EZB_ZIGBEE_FREQ_BAND_868MHZ
868-868.6 MHz
-
EZB_ZIGBEE_FREQ_BAND_SUB_GHZ_NA
902-928 MHz
-
EZB_ZIGBEE_FREQ_BAND_2P4GHZ
2400-2483.5 MHz
-
EZB_ZIGBEE_FREQ_BAND_SUB_GHZ_EU
863-876MHz, 915-921MHz
5.2.1.1.17. Type Definitions
-
typedef struct ezb_mem_config_s ezb_mem_config_t
The memory configuration structure.
5.2.1.1.18. Header File
5.2.1.1.19. Functions
-
const void *ezb_app_signal_get_params(const ezb_app_signal_t *signal)
Obtains pointer to parameters passed with application signal.
- Parameters:
signal -- [in] The pointer to the application signal, ezb_app_signal_t.
- Returns:
The pointer to the parameter of the application signal
-
ezb_app_signal_type_t ezb_app_signal_get_type(const ezb_app_signal_t *signal)
Obtains the type of the application signal.
- Parameters:
signal -- [in] The pointer to the application signal, ezb_app_signal_t.
- Returns:
The type of the application signal, ezb_app_signal_type_t
-
const char *ezb_app_signal_to_string(ezb_app_signal_type_t signal)
Stringify the Zigbee Device Object signal.
- Parameters:
signal -- [in] A ezb_app_signal_type_t object that expect to stringified
- Returns:
A string pointer of ezb_app_signal_type_t
-
ezb_err_t ezb_app_signal_add_handler(ezb_app_signal_handler_t handler)
Add an application signal handler.
- Parameters:
handler -- [in] The application signal handler, ezb_app_signal_handler_t
- Returns:
EZB_ERR_NONE on success, error code otherwise.
-
void ezb_app_signal_remove_handler(ezb_app_signal_handler_t handler)
Remove an application signal handler.
- Parameters:
handler -- [in] The application signal handler, ezb_app_signal_handler_t
5.2.1.1.20. Structures
-
struct ezb_zdo_signal_leave_params_s
The payload of EZB_ZDO_SIGNAL_LEAVE signal.
Public Members
-
ezb_zdo_leave_type_t leave_type
Leave type, refer to ezb_zdo_leave_type_t
-
ezb_zdo_leave_type_t leave_type
-
struct ezb_zdo_signal_leave_indication_params_s
The payload of EZB_ZDO_SIGNAL_LEAVE_INDICATION signal.
Public Members
-
ezb_shortaddr_t short_addr
Short address of device requested to leave or leaving device
-
ezb_extaddr_t device_addr
Long address of device requested to leave or leaving device
-
ezb_zdo_leave_type_t leave_type
Leave type, refer to ezb_zdo_leave_type_t
-
ezb_shortaddr_t short_addr
-
struct ezb_zdo_signal_device_annce_params_s
The payload of EZB_ZDO_SIGNAL_DEVICE_ANNCE signal.
Public Members
-
ezb_shortaddr_t short_addr
address of device that recently joined to network
-
ezb_extaddr_t device_addr
The 64-bit (IEEE) address assigned to the device.
-
uint8_t capability
The capability of the device.
-
ezb_shortaddr_t short_addr
-
struct ezb_zdo_signal_device_update_params_s
The payload of EZB_ZDO_SIGNAL_DEVICE_UPDATE signal.
Public Members
-
ezb_extaddr_t device_addr
Long Address of the updated device
-
ezb_shortaddr_t short_addr
Short Address of the updated device
-
ezb_zdo_upddev_status_t status
Indicates the updated status of the device, refer to ezb_zdo_upddev_status_t
-
ezb_zdo_tc_action_t tc_action
Trust center action, refer to ezb_zdo_tc_action_t
-
ezb_shortaddr_t parent_short
The short address of device's parent
-
ezb_extaddr_t device_addr
-
struct ezb_zdo_signal_device_authorized_params_s
The payload of EZB_ZDO_SIGNAL_DEVICE_AUTHORIZED signal.
Public Members
-
ezb_extaddr_t device_addr
Extended Address of the authorized device
-
ezb_shortaddr_t short_addr
Short Address of the authorized device
-
ezb_zdo_auth_type_t type
Authorization type, refer to ezb_zdo_auth_type_t
-
ezb_zdo_auth_status_t status
Authorization status, refer to ezb_zdo_auth_status_t
-
ezb_extaddr_t device_addr
The payload of EZB_ZDO_SIGNAL_DEVICE_UNAVAILABLE signal.
Public Members
Extended address of the unavailable device
Short address of unavailable device
-
struct ezb_bdb_signal_simple_params_s
The payload of BDB signals.
Public Members
-
uint8_t status
Indicates the status of the simple signal, refer to ezb_bdb_status_t
-
uint8_t status
-
struct ezb_nwk_signal_permit_join_status_params_s
The payload of EZB_NWK_SIGNAL_PERMIT_JOIN_STATUS signal.
Public Members
-
uint8_t duration
Duration of the permit joining state, in seconds
-
uint8_t duration
-
struct ezb_nwk_signal_network_status_params_s
The payload of EZB_NWK_SIGNAL_NETWORK_STATUS signal.
Public Members
-
uint8_t status
Error code associated with the failure, refer to ezb_nwk_network_status_t
-
ezb_shortaddr_t network_addr
Network device address associated with the status information
-
uint8_t unknown_command_id
Unknown command ID
-
uint8_t status
5.2.1.1.21. Macros
-
ESP_ZIGBEE_APP_SIGNAL_H
-
EZB_APP_SIGNAL(group, signal)
The macro to create an application signal.
The low 8 bits are the signal number in the group. The high 8bits are the signal group number.
- Parameters:
group -- The group of the application signal
signal -- The signal of the application signal
- Returns:
The application signal
5.2.1.1.22. Type Definitions
-
typedef enum ezb_app_signal_group_e ezb_app_signal_group_t
The group of the application signal.
-
typedef uint16_t ezb_app_signal_type_t
The type of application signal, see ezb_app_signal_type_e .
-
typedef uint8_t ezb_zdo_leave_type_t
Represents the type of leave.
-
typedef uint8_t ezb_zdo_tc_action_t
Represents the action of the trust center.
-
typedef uint8_t ezb_zdo_upddev_status_t
Represents the status of the device update.
-
typedef uint8_t ezb_zdo_auth_type_t
Represents the type of authorization.
-
typedef uint8_t ezb_zdo_auth_status_t
Represents the status of authorization.
-
typedef struct ezb_zdo_signal_leave_params_s ezb_zdo_signal_leave_params_t
The payload of EZB_ZDO_SIGNAL_LEAVE signal.
-
typedef struct ezb_zdo_signal_leave_indication_params_s ezb_zdo_signal_leave_indication_params_t
The payload of EZB_ZDO_SIGNAL_LEAVE_INDICATION signal.
-
typedef struct ezb_zdo_signal_device_annce_params_s ezb_zdo_signal_device_annce_params_t
The payload of EZB_ZDO_SIGNAL_DEVICE_ANNCE signal.
-
typedef struct ezb_zdo_signal_device_update_params_s ezb_zdo_signal_device_update_params_t
The payload of EZB_ZDO_SIGNAL_DEVICE_UPDATE signal.
-
typedef struct ezb_zdo_signal_device_authorized_params_s ezb_zdo_signal_device_authorized_params_t
The payload of EZB_ZDO_SIGNAL_DEVICE_AUTHORIZED signal.
The payload of EZB_ZDO_SIGNAL_DEVICE_UNAVAILABLE signal.
-
typedef struct ezb_bdb_signal_simple_params_s ezb_bdb_signal_simple_params_t
The payload of BDB signals.
-
typedef struct ezb_nwk_signal_permit_join_status_params_s ezb_nwk_signal_permit_join_status_params_t
The payload of EZB_NWK_SIGNAL_PERMIT_JOIN_STATUS signal.
-
typedef struct ezb_nwk_signal_network_status_params_s ezb_nwk_signal_network_status_params_t
The payload of EZB_NWK_SIGNAL_NETWORK_STATUS signal.
-
typedef void *ezb_app_signal_t
The application signal struct for ezb_app_signal_handler .
-
typedef bool (*ezb_app_signal_handler_t)(const ezb_app_signal_t *app_signal)
The pointer to the application signal handler function .
- Param app_signal:
[in] The pointer to the application signal, ezb_app_signal_t
- Return:
true if the application signal is handled, false otherwise
5.2.1.1.23. Enumerations
-
enum ezb_app_signal_group_e
The group of the application signal.
Values:
-
enumerator EZB_APP_SIGNAL_GROUP_ZDO
-
enumerator EZB_APP_SIGNAL_GROUP_BDB
-
enumerator EZB_APP_SIGNAL_GROUP_NWK
-
enumerator EZB_APP_SIGNAL_GROUP_MAX_NR
-
enumerator EZB_APP_SIGNAL_GROUP_ZDO
-
enum ezb_app_signal_type_e
signal passed to the ezb_application_signal_handler
Values:
-
enumerator EZB_ZDO_SIGNAL_DEFAULT_START
Overview:
The device has started in non-BDB commissioning mode.
When generated:
After the device has started and completed non-BDB commissioning.
In case of a commissioning error.
Payload:
None.
-
enumerator EZB_ZDO_SIGNAL_SKIP_STARTUP
Overview:
Stack framework (scheduler, buffer pool, NVRAM, etc.) startup complete, ready for initializing bdb commissioning.
When generated:
When the stack starts using the ezb_start(false) method.
Payload:
None.
-
enumerator EZB_ZDO_SIGNAL_ERROR
Overview:
Indicates corrupted or incorrect signal information.
When generated:
When incorrect signal information is detected.
Payload:
None
-
enumerator EZB_ZDO_SIGNAL_LEAVE
Overview:
Indicates that the current device has left the network.
When generated:
Upon receiving the Leave command.
Payload:
Refer to ezb_zdo_signal_leave_params_t
-
enumerator EZB_ZDO_SIGNAL_LEAVE_INDICATION
Overview:
Indicates that a device (child or neighbor) has left the network.
When generated:
When the leave command is received from the device.
Payload:
Refer to ezb_zdo_signal_leave_indication_params_t
-
enumerator EZB_ZDO_SIGNAL_DEVICE_ANNCE
Overview:
Indicates that a Zigbee device has joined or rejoined the network.
When generated:
Upon receiving the device_annce command.
Payload:
Refer to ezb_zdo_signal_device_annce_params_t
-
enumerator EZB_ZDO_SIGNAL_DEVICE_UNAVAILABLE
Overview:
Notify that the destination device is unavailable.
When generated:
When the stack could not send a packet over NWK or APS, for example:
No ACK on the MAC layer;
No response to a network address request;
No APS-ACK to an APS packet.
Payload:
Refer to ezb_zdo_signal_device_unavailable_params_t
-
enumerator EZB_ZDO_SIGNAL_DEVICE_UPDATE
Overview:
Indicates that a device has joined, rejoined, or left the network from the Trust Center or its parents.
When generated:
Standard device secured rejoin.
Standard device unsecured join.
Device left.
Standard device trust center rejoin.
Payload:
Refer to ezb_zdo_signal_device_update_params_t
-
enumerator EZB_ZDO_SIGNAL_DEVICE_AUTHORIZED
Overview:
Indicates that a new device has been authorized by the Trust Center in the network.
When generated:
Upon successful authorization.
Upon authorization failure.
Upon authorization timeout.
Payload:
Refer to ezb_zdo_signal_device_authorized_params_t
-
enumerator EZB_BDB_SIGNAL_DEVICE_FIRST_START
Overview:
Indicate the basic network information of factory new device has been initialized, ready for Zigbee commissioning
When generated:
Upon the basic device behavior has been initialization
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_DEVICE_REBOOT
Overview:
Indicate device joins or rejoins network from the configured network information.
When generated:
Upon the device joining or rejoining Zigbee network using configuration network information.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_STEERING
Overview:
Indicates the completion of BDB network steering.
When generated:
When the device initiates the network steering commissioning process.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_FORMATION
Overview:
Indicates the completion of BDB network formation.
When generated:
When the device initiates the network formation commissioning process.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_FINDING_AND_BINDING_INITIATOR_FINISHED
Overview:
Indicates the completion of BDB finding and binding (F&B) for a initiator endpoint.
When generated:
When F&B initiator timeout.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_FINDING_AND_BINDING_TARGET_FINISHED
Overview:
Indicates the completion of BDB finding and binding (F&B) for a target endpoint.
When generated:
When F&B target timeout.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_TOUCHLINK_INITIATOR_FINISHED
Overview:
Indicates the completion of Touchlink commissioning for a initiator.
When generated:
EZB_BDB_STATUS_SUCCESS: If the touchlink initiator successfully completes the commissioning procedure.
EZB_BDB_STATUS_NO_SCAN_RESPONSE: If no scan response is received while scanning for targets.
EZB_BDB_STATUS_NOT_PERMITTED: If the network type is centralized, or the initiator is in an incorrect commissioning state.
EZB_BDB_STATUS_NO_NETWORK: If the Touchlink initiator fails during the network_start process.
EZB_BDB_STATUS_NOT_AA_CAPABLE: If the initiator is not address assignment capable during touchlink.
EZB_BDB_STATUS_TARGET_FAILURE: If the touchlink initiator fails during the join_router or join_ed process.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_BDB_SIGNAL_TOUCHLINK_TARGET_FINISHED
Overview:
Indicates the completion of Touchlink commissioning for a target.
When generated:
EZB_BDB_STATUS_SUCCESS: If the touchlink target successfully completes the commissioning procedure.
EZB_BDB_STATUS_TARGET_FAILURE: If the touchlink target times out during commissioning (no target selected) or during a transaction (target selected but no subsequent step).
EZB_BDB_STATUS_NO_NETWORK: If the touchlink target is selected but fails during the network_start, join_router, or join_ed process.
Payload:
Refer to ezb_bdb_signal_simple_params_t
-
enumerator EZB_NWK_SIGNAL_DEVICE_ASSOCIATED
Overview:
[Obsolete] Indicates that a new device has initiated an association procedure.
When generated:
When a new device is associated.
Payload:
Refer to ezb_nwk_signal_device_associated_params_t
-
enumerator EZB_NWK_SIGNAL_NO_ACTIVE_LINKS_LEFT
Overview:
Indicates that the Neighbor Table has expired, and no active route links remain.
When generated:
When all routers in the neighbor table were stale.
Payload:
None
-
enumerator EZB_NWK_SIGNAL_PANID_CONFLICT_DETECTED
Overview:
Detects a PAN ID conflict and inquires for a resolution.
When generated:
Upon detecting a PAN ID conflict.
Payload:
None
-
enumerator EZB_NWK_SIGNAL_NETWORK_STATUS
Overview:
Indicates that a network failure has been detected.
When generated:
Triggered when the network encounters a failure and the application can implement error handling based on the reported status.
Payload:
Refer to ezb_nwk_signal_network_status_params_t
-
enumerator EZB_NWK_SIGNAL_PERMIT_JOIN_STATUS
Overview:
Indicates the status of the network (open or closed).
When generated:
When the network is opened.
When the network is closed.
Payload:
Refer to ezb_nwk_signal_permit_join_status_params_t
-
enumerator EZB_APP_SIGNAL_END
-
enumerator EZB_ZDO_SIGNAL_DEFAULT_START
-
enum ezb_zdo_leave_type_e
The type of leave.
Values:
-
enumerator EZB_ZDO_LEAVE_TYPE_RESET
Leave without rejoin
-
enumerator EZB_ZDO_LEAVE_TYPE_REJOIN
Leave with rejoin
-
enumerator EZB_ZDO_LEAVE_TYPE_RESET
-
enum ezb_zdo_tc_action_e
The action of the trust center.
Values:
-
enumerator EZB_ZDO_TC_ACTION_ACCEPT
Accept the device to join the network
-
enumerator EZB_ZDO_TC_ACTION_DENY
Deny the device to join the network
-
enumerator EZB_ZDO_TC_ACTION_IGNORE
Ignore the request to join the network
-
enumerator EZB_ZDO_TC_ACTION_ACCEPT
-
enum ezb_zdo_upddev_status_e
The status of the device update.
Values:
-
enumerator EZB_ZDO_UPDDEV_SECURE_REJOIN
Secure rejoin
-
enumerator EZB_ZDO_UPDDEV_UNSECURE_JOIN
Unsecure join
-
enumerator EZB_ZDO_UPDDEV_DEVICE_LEFT
Device left
-
enumerator EZB_ZDO_UPDDEV_TC_REJOIN
TC rejoin
-
enumerator EZB_ZDO_UPDDEV_SECURE_REJOIN