
#include "zb_types.h"#include "zcl/zb_zcl_config.h"#include "zcl/zb_zcl_common.h"#include "zcl/zb_zcl_commands.h"#include "zcl/zb_zcl_reporting.h"#include "zcl/zb_zcl_cvc_commands.h"#include "zcl/zb_zcl_grpw_bed_sensor.h"#include "zcl/zb_zcl_grpw_freq_agility.h"Data Structures | |
| struct | zb_zcl_device_callback_param_s |
| Data for Device user application callback. This structure has receive to User application callback (see zb_callback_t). More... | |
| struct | zcl_cluster_handlers_s |
| struct | zb_discover_cmd_list |
Macros | |
| #define | ZB_ZCL_VERSION 8U |
| ZCL version. According ZCL 8 spec: 3.2.2.2.1 ZCLVersion Attribute The ZCLVersion attribute represents a published set of foundation items (in Chapter 2), such as global commands and functional descriptions. For this version of the ZCL (this document), this attribute SHALL be set to 8. In the future, this value SHALL align with the release revision of the ZCL(CCB 2722). More... | |
| #define | ZB_ZCL_SET_MODIFY_ATTR_VALUE_CB(func_ptr) |
| Set modify attribute value callback. The macro sets a callback being called on external attribute change. The callback will be provided with all data necessary for correct value change handling. More... | |
| #define | ZB_ZCL_SET_REPORT_ATTR_CB(func_ptr) |
| Set report attribute callback. The macro sets a callback being called on receive attribute report. The callback will be provided with all data necessary for correct attribute handling. More... | |
| #define | ZB_ZCL_SET_NO_REPORTING_CB(func_ptr) |
| Set no reporting callback. The macro sets a callback being called on remote attribute reporting timeout. The callback will be provided with all data necessary for correct attribute report timeout handling. More... | |
| #define | ZB_ZCL_SET_DEFAULT_VALUE_CB(func_ptr) |
| Set "Set default value all attribute" callback. The macro sets a callback being called for need to set attribute to default value. More... | |
| #define | ZB_ZCL_SET_BROADCAST_EP_CB(func_ptr) ZCL_CTX().broadcast_ep_cb = (func_ptr) |
| Set user callback to notify an application a broadcast EP command received. More... | |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_IN_GET(_param, _ptype) ((const _ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in)) |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_OUT_GET(_param, _ptype) ((_ptype *) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.out)) |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_CMD_INFO(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->cb_param.gnr.in_cmd_info) |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_CB_ID(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->device_cb_id) |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_DEST_ENDPOINT(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->endpoint) |
| #define | ZB_ZCL_DEVICE_CMD_PARAM_STATUS(_param) ((ZB_ZCL_DEVICE_CMD_PARAM(_param))->status) |
| #define | ZB_BDB_COMM_ACTIVE_ENDP_LIST_LEN 4 |
| #define | BDB_MAX_IDENTIFY_QUERY_RESP_NUMBER 4 |
| #define | ZB_ZCL_GENERAL_GET_CMD_LISTS_PARAM 0xFFU |
| #define | ZB_ZCL_CLUSTER_HANDLERS_TABLE_SIZE 20 |
| #define | ZB_ZCL_NON_VALUE_INT32 ((zb_int32_t)0x80000000) |
| #define | ZB_ZCL_NON_VALUE_INT16 ((zb_int16_t)0x8000) |
| #define | ZB_ZCL_NON_VALUE_INT8 ((zb_int8_t)0x80) |
| #define | ZB_ZCL_NON_VALUE_INT24 ((zb_int24_t) { .low = 0x0000U, .high = 0x80U }) |
| #define | ZB_ZCL_NON_VALUE_UINT8 ((zb_uint8_t)0xff) |
| #define | ZB_ZCL_NON_VALUE_UINT16 ((zb_uint16_t)0xffff) |
| #define | ZB_ZCL_NON_VALUE_UINT32 ((zb_uint32_t)0xffffffff) |
| #define | ZB_ZCL_NON_VALUE_UINT24 ((zb_uint24_t) { .low = 0xffffU, .high = 0xffU }) |
| #define | ZCL_CTX() (*zb_zcl_get_ctx()) |
| #define | ZB_ZCL_MAX_EP_NUMBER 10U |
Functions | |
| zb_bool_t | bdb_start_top_level_commissioning (zb_uint8_t mode_mask) |
| Starts the specified device commissioning steps. More... | |
| void | bdb_cancel_joining (zb_bufid_t buf) |
| Cancels Network Steering procedure for a node not on the network. More... | |
| void | bdb_cancel_formation (zb_bufid_t buf) |
| Cancels Network Formation procedure. More... | |
| void | bdb_set_scan_duration (zb_uint8_t duration) |
| Sets scan duration for Energy Detection and Active scan. More... | |
| zb_ret_t | zb_bdb_close_network (zb_bufid_t buf) |
| Closes the network. More... | |
| zb_bool_t | zb_bdb_is_factory_new (void) |
| Checks if the device is factory new. More... | |
| zb_ret_t | zb_bdb_finding_binding_target (zb_uint8_t endpoint) |
| Starts EZ-Mode finding and binding procedure on the target's endpoint. More... | |
| zb_ret_t | zb_bdb_finding_binding_target_ext (zb_uint8_t endpoint, zb_uint16_t commissioning_time_secs) |
| Starts EZ-Mode finding and binding procedure on the target's endpoint with a given timeout. More... | |
| zb_ret_t | zb_bdb_finding_binding_initiator (zb_uint8_t endpoint, zb_bdb_comm_binding_callback_t user_binding_cb) |
| Starts BDB finding and binding procedure on the initiator. More... | |
| void | zb_bdb_finding_binding_target_cancel (void) |
| Cancels previously started finding and binding procedure on all target endpoints. More... | |
| void | zb_bdb_finding_binding_target_cancel_ep (zb_uint8_t endpoint) |
| Cancels previously started finding and binding procedure on the particular target endpoint. More... | |
| void | zb_bdb_finding_binding_initiator_cancel (void) |
| Cancel previously started finding and binding procedure on initiator. More... | |
| void | zb_set_bdb_primary_channel_set (zb_uint32_t channel_mask) |
| Sets primary channel set for the BDB energy scan. More... | |
| zb_uint32_t | zb_get_bdb_primary_channel_set (void) |
| Retrieves primary channel set for the BDB energy scan. More... | |
| void | zb_set_bdb_secondary_channel_set (zb_uint32_t channel_mask) |
| Sets secondary channel set for the BDB energy scan. More... | |
| zb_uint32_t | zb_get_bdb_secondary_channel_set (void) |
| void | zb_bdb_set_legacy_device_support (zb_uint8_t state) |
| Enables Zigbee PRO complaint commissioning support. More... | |
| void | zb_set_bdb_commissioning_mode (zb_uint8_t commissioning_mode) |
| Sets BDB commissioning mode. More... | |
| void | zb_zcl_send_cmd (zb_uint8_t param, const zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_zcl_frame_direction_t direction, zb_uint8_t src_ep, const void *payload, zb_uint8_t payload_size, zb_zcl_put_payload_cb_t put_payload, zb_zcl_cluster_id_t cluster_id, zb_zcl_disable_default_response_t def_resp, zb_uint8_t cmd_id, zb_callback_t cb) |
| void | zb_zcl_send_cmd_tsn (zb_uint8_t param, const zb_addr_u *dst_addr, zb_aps_addr_mode_t dst_addr_mode, zb_uint8_t dst_ep, zb_zcl_frame_direction_t direction, zb_uint8_t src_ep, const void *payload, zb_uint8_t payload_size, zb_zcl_put_payload_cb_t put_payload, zb_zcl_cluster_id_t cluster_id, zb_zcl_disable_default_response_t def_resp, zb_uint8_t cmd_id, zb_uint8_t tsn, zb_callback_t cb) |
| zb_bool_t | zb_zcl_send_default_handler (zb_uint8_t param, const zb_zcl_parsed_hdr_t *cmd_info, zb_zcl_status_t status) |
| void | zb_zcl_send_default_resp_ext (zb_uint8_t param, const zb_zcl_parsed_hdr_t *cmd_info, zb_zcl_status_t status) |
| zb_zcl_status_t | zb_zcl_zcl8_statuses_conversion (zb_zcl_status_t status) |
| #define ZB_ZCL_MAX_EP_NUMBER 10U |
| typedef zb_uint8_t*(* zb_zcl_put_payload_cb_t) (zb_uint8_t *, const void *) |
| void zb_zcl_send_cmd | ( | zb_uint8_t | param, |
| const zb_addr_u * | dst_addr, | ||
| zb_aps_addr_mode_t | dst_addr_mode, | ||
| zb_uint8_t | dst_ep, | ||
| zb_zcl_frame_direction_t | direction, | ||
| zb_uint8_t | src_ep, | ||
| const void * | payload, | ||
| zb_uint8_t | payload_size, | ||
| zb_zcl_put_payload_cb_t | put_payload, | ||
| zb_zcl_cluster_id_t | cluster_id, | ||
| zb_zcl_disable_default_response_t | def_resp, | ||
| zb_uint8_t | cmd_id, | ||
| zb_callback_t | cb | ||
| ) |
| void zb_zcl_send_cmd_tsn | ( | zb_uint8_t | param, |
| const zb_addr_u * | dst_addr, | ||
| zb_aps_addr_mode_t | dst_addr_mode, | ||
| zb_uint8_t | dst_ep, | ||
| zb_zcl_frame_direction_t | direction, | ||
| zb_uint8_t | src_ep, | ||
| const void * | payload, | ||
| zb_uint8_t | payload_size, | ||
| zb_zcl_put_payload_cb_t | put_payload, | ||
| zb_zcl_cluster_id_t | cluster_id, | ||
| zb_zcl_disable_default_response_t | def_resp, | ||
| zb_uint8_t | cmd_id, | ||
| zb_uint8_t | tsn, | ||
| zb_callback_t | cb | ||
| ) |
| zb_bool_t zb_zcl_send_default_handler | ( | zb_uint8_t | param, |
| const zb_zcl_parsed_hdr_t * | cmd_info, | ||
| zb_zcl_status_t | status | ||
| ) |
| void zb_zcl_send_default_resp_ext | ( | zb_uint8_t | param, |
| const zb_zcl_parsed_hdr_t * | cmd_info, | ||
| zb_zcl_status_t | status | ||
| ) |
| zb_zcl_status_t zb_zcl_zcl8_statuses_conversion | ( | zb_zcl_status_t | status | ) |
Convert deprecated statuses into ZCL8 statuses. Status enumerations (see ZCL8 spec 2.6.3) list was changed in ZCL8 spec. LIMIT_REACHED, DUPLICATE_EXISTS, SUCCESS ==> SUCCESS INCONSISTENT_STARTUP_STATE, DEFINED_OUT_OF_BAND, ACTION_DENIED, HARDWARE_FAILURE, SOFTWARE_FAILURE ==> FAILURE WRITE_ONLY, NOT_AUTHORIZED ==> NOT_AUTHORIZED MALFORMED_COMMAND, INVALID_FIELD ==> INVALID_FIELD UNSUP_CLUSTER_COMMAND, UNSUP_GENERAL_COMMAND, UNSUP_MANUF_CLUSTER_COMMAND, UNSUP_MANUF_GENERAL_COMMAND ==> UNSUP_COMMAND INCONSISTENT, CALIBRATION_ERROR, RESERVED ==> RESERVED The function will convert statuses in ZB_ZCL_AUTO_MODE and ZB_ZCL_COMPATIBILITY_MODE ZCL8 backward compatibility modes. ZB_ZCL_LEGACY_MODE implies that application can still use obsolete statuses, so in that mode the function doesn't make any conversion.
| status | - Status got over the air. |