5.2.6.2. General Commands
The general commands supported by ZCL of ESP Zigbee Core.
5.2.6.2.1. API Reference
5.2.6.2.1.1. Header File
5.2.6.2.1.2. Functions
-
ezb_zcl_reporting_info_t ezb_zcl_reporting_info_find(uint8_t ep_id, uint16_t cluster_id, uint8_t role, uint16_t attr_id, uint16_t manuf_code)
Find ZCL reporting information.
- Parameters:
ep_id -- [in] The identifier of the endpoint to which the reporting information belongs.
cluster_id -- [in] The identifier of the cluster to which the reporting information belongs.
role -- [in] The role of the cluster to which the reporting information belongs.
attr_id -- [in] The identifier of the attribute to which the reporting information belongs.
manuf_code -- [in] The manufacturer code to which the reporting information belongs.
- Returns:
The handle of the matching reporting information. EZB_ZCL_INVALID_REPORTING_INFO if not found.
-
ezb_err_t ezb_zcl_reporting_start_attr_report(ezb_zcl_reporting_info_t info)
Start ZCL attribute reporting.
- Parameters:
info -- [in] The handle of the reporting information.
- Returns:
The error code. See ezb_err_t.
-
ezb_err_t ezb_zcl_reporting_stop_attr_report(ezb_zcl_reporting_info_t info)
Stop ZCL attribute reporting.
- Parameters:
info -- [in] The handle of the reporting information.
- Returns:
The error code. See ezb_err_t.
-
ezb_err_t ezb_zcl_reporting_info_update(ezb_zcl_reporting_info_t info, uint16_t min_interval, uint16_t max_interval, const ezb_zcl_attr_variable_t *delta)
Update ZCL attribute reporting.
- Parameters:
info -- [in] Handle of the reporting information.
min_interval -- [in] Minimum reporting interval in seconds.
max_interval -- [in] Maximum reporting interval in seconds.
delta -- [in] Reportable change value.
- Returns:
The error code. See ezb_err_t.
-
ezb_err_t ezb_zcl_reporting_info_update_default_interval(ezb_zcl_reporting_info_t info, uint16_t def_min_interval, uint16_t def_max_interval)
Update ZCL attribute reporting default interval.
- Parameters:
info -- [in] Handle of the reporting information.
def_min_interval -- [in] Default minimum reporting interval in seconds.
def_max_interval -- [in] Default maximum reporting interval in seconds.
- Returns:
The error code. See ezb_err_t.
-
ezb_err_t ezb_zcl_reporting_info_remove(ezb_zcl_reporting_info_t info)
Remove ZCL attribute reporting.
- Parameters:
info -- [in] The handle of the reporting information.
- Returns:
The error code. See ezb_err_t.
5.2.6.2.1.3. Macros
-
EZB_ZCL_MIN_REPORTING_INTERVAL_DEFAULT
Default minimum reporting interval (in seconds).
-
EZB_ZCL_MAX_REPORTING_INTERVAL_DEFAULT
Default maximum reporting interval (0 means disabled).
-
EZB_ZCL_INVALID_REPORTING_INFO
5.2.6.2.1.4. Type Definitions
-
typedef void *ezb_zcl_reporting_info_t
Handle for reporting information.
5.2.6.2.1.5. Header File
5.2.6.2.1.6. Functions
-
ezb_err_t ezb_zcl_read_attr_cmd_req(const ezb_zcl_read_attr_cmd_t *cmd_req)
Send a ZCL read attribute command request.
This function sends a read attribute command to read one or more attributes from a cluster on a remote device.
- Parameters:
cmd_req -- [in] The pointer to the read attribute command structure. See ezb_zcl_read_attr_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_write_attr_cmd_req(const ezb_zcl_write_attr_cmd_t *cmd_req)
Send a ZCL write attribute command request.
This function sends a write attribute command to write one or more attributes to a cluster on a remote device.
- Parameters:
cmd_req -- [in] The pointer to the write attribute command structure. See ezb_zcl_write_attr_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_config_report_cmd_req(const ezb_zcl_config_report_cmd_t *cmd_req)
Send a ZCL configure reporting command request.
This function sends a configure reporting command to configure automatic attribute reporting for one or more attributes.
- Parameters:
cmd_req -- [in] The pointer to the configure report command structure. See ezb_zcl_config_report_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_read_report_config_cmd_req(const ezb_zcl_read_report_config_cmd_t *cmd_req)
Send a ZCL read reporting configuration command request.
This function sends a read reporting configuration command to query the current reporting configuration for one or more attributes.
- Parameters:
cmd_req -- [in] The pointer to the read report configuration command structure. See ezb_zcl_read_report_config_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_report_attr_cmd_req(const ezb_zcl_report_attr_cmd_t *cmd_req)
Send a ZCL report attribute command request.
This function sends an unsolicited report attribute command to report the current value of one or more attributes. This is typically used by servers to notify clients of attribute value changes.
- Parameters:
cmd_req -- [in] The pointer to the report attribute command structure. See ezb_zcl_report_attr_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_disc_attr_cmd_req(const ezb_zcl_disc_attr_cmd_t *cmd_req)
Send a ZCL discover attributes command request.
This function sends a discover attributes command to query a remote device for the attributes it supports in a cluster.
- Parameters:
cmd_req -- [in] The pointer to the discover attributes command structure. See ezb_zcl_disc_attr_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_disc_cmd_cmd_req(const ezb_zcl_disc_cmd_cmd_t *cmd_req)
Send a ZCL discover commands command request.
This function sends a discover commands command to query a remote device for the commands it supports (received or generated) in a cluster.
- Parameters:
cmd_req -- [in] The pointer to the discover commands command structure. See ezb_zcl_disc_cmd_cmd_s.
- Returns:
Error code.
-
ezb_err_t ezb_zcl_default_rsp_cmd_req(const ezb_zcl_default_rsp_cmd_t *cmd_req)
Send a ZCL default response command request.
This function sends a ZCL default response command to respond a command.
- Parameters:
cmd_req -- [in] The pointer to the default response command structure. See ezb_zcl_default_rsp_cmd_s.
- Returns:
Error code.
5.2.6.2.1.7. Structures
-
struct ezb_zcl_read_attr_cmd_s
Structure for ZCL read attribute command request.
This structure is used to construct a ZCL read attribute command. The command can read one or more attributes from a cluster on a remote device.
Note
The attr_field array must contain at least attr_number elements.
Note
The response will be delivered via the callback specified in cmd_ctrl.cnf_ctx.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint8_t attr_number
Number of attributes to read (1-255). Must match the size of attr_field array.
-
uint16_t *attr_field
Array of attribute IDs to read. Must be valid for the specified cluster_id.
-
struct ezb_zcl_read_attr_cmd_s payload
Command payload containing attribute IDs to read.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_write_attr_cmd_s
Structure for ZCL write attribute command request.
This structure is used to construct a ZCL write attribute command. The command can write one or more attributes to a cluster on a remote device.
Note
The attr_field array must contain at least attr_number elements.
Note
Each attribute's value must match its specified data type and size.
Note
The response will be delivered via the callback specified in cmd_ctrl.cnf_ctx.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint8_t attr_number
Number of attributes to write (1-255). Must match the size of attr_field array.
-
ezb_zcl_attribute_t *attr_field
Array of attributes to write. Each element contains ID, type, size, and value.
-
struct ezb_zcl_write_attr_cmd_s payload
Command payload containing attributes to write.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_config_report_record_s
Structure for ZCL configure reporting record.
This structure specifies the reporting configuration for a single attribute. The union field (client or server) is used based on the direction field.
Note
For direction = EZB_ZCL_REPORTING_SEND (0), use the client structure.
Note
For direction = EZB_ZCL_REPORTING_RECV (1), use the server structure.
Note
Setting max_interval to 0xFFFF disables periodic reporting.
Note
For analog attributes, reportable_change specifies the minimum delta to trigger a report.
Public Members
-
uint8_t direction
Reporting direction, either EZB_ZCL_REPORTING_SEND or EZB_ZCL_REPORTING_RECV.
-
uint16_t attr_id
Identifier of the attribute to configure reporting.
-
uint8_t attr_type
Type of the attribute. See ezb_zcl_attr_type_t.
-
uint16_t min_interval
Minimum reporting interval in seconds (0x0001-0xFFFE). Use 0 for immediate reporting.
-
uint16_t max_interval
Maximum reporting interval in seconds (0x0001-0xFFFE). Use 0xFFFF to disable periodic reporting.
-
ezb_zcl_attr_variable_t reportable_change
Minimum change to attribute value that triggers a report. Required for analog attributes. Must match attr_type size.
-
struct ezb_zcl_config_report_record_s client
Client-side reporting configuration (server reports to client).
-
uint16_t timeout
Timeout period in seconds for server-side reporting (0x0001-0xFFFE).
-
struct ezb_zcl_config_report_record_s server
Server-side reporting configuration (client receives reports from server).
- union ezb_zcl_config_report_record_s
Union of reporting configuration for client or server.
-
uint8_t direction
-
struct ezb_zcl_config_report_cmd_s
Structure for ZCL configure reporting command request.
This structure is used to construct a ZCL configure reporting command.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint16_t record_number
Number of report configuration records in the record_field array.
-
ezb_zcl_config_report_record_t *record_field
Array of report configuration records. See ezb_zcl_config_report_record_s.
-
struct ezb_zcl_config_report_cmd_s payload
Command payload containing report configuration records.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_read_report_config_record_s
Structure for a single read report configuration record.
This structure is used to construct a single read report configuration record.
-
struct ezb_zcl_read_report_config_cmd_s
Structure for ZCL read report configuration command request.
This structure is used to construct a ZCL read report configuration command.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint16_t record_number
Number of attribute records in the record_field array.
-
ezb_zcl_read_report_config_record_t *record_field
Array of attribute records. See ezb_zcl_read_report_config_record_s.
-
struct ezb_zcl_read_report_config_cmd_s payload
Payload containing attribute records.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_report_attr_cmd_s
Structure for ZCL report attribute command request.
This structure is used to construct a ZCL report attribute command. This command is typically sent by a server to notify clients of attribute value changes. The command will report all attributes configured for reporting that have changed.
Note
The actual attributes reported depend on the reporting configuration and which attributes have changed since the last report.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint16_t attr_id
Identifier of the attribute to report. This triggers reporting for this attribute and any other attributes configured for consolidated reporting.
-
struct ezb_zcl_report_attr_cmd_s payload
Command payload for attribute reporting.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_disc_attr_cmd_s
Structure for ZCL discover attributes command request.
This structure is used to construct a ZCL discover attributes command, which queries a remote device for the attributes it supports in a cluster. The response will contain a list of supported attributes starting from start_attr_id.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint16_t start_attr_id
Identifier of the attribute at which to begin discovery.
-
uint8_t max_attr_number
Maximum number of attribute identifiers to return (1-255).
-
struct ezb_zcl_disc_attr_cmd_s payload
Command payload for attribute discovery.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_disc_cmd_cmd_s
Structure for ZCL discover commands command request.
This structure is used to construct a ZCL discover commands command, which queries a remote device for the commands it supports in a cluster. The response will contain a list of supported commands.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint8_t is_recv
Command direction: 1 for received commands, 0 for generated commands.
-
uint16_t start_cmd_id
Identifier of the command at which to begin discovery.
-
uint8_t max_cmd_number
Maximum number of commands to return.
-
struct ezb_zcl_disc_cmd_cmd_s payload
Command payload for command discovery.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_default_rsp_cmd_s
Structure for ZCL default response command request.
This structure is used to construct a ZCL default response command.
Public Members
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
Command control structure. See ezb_zcl_cmd_ctrl_s.
-
uint8_t tsn
Transaction sequence number.
-
uint8_t rsp_to_cmd
Identifier of the command to which this is a response.
-
uint8_t status_code
Status code of the response. See ezb_zcl_status_t.
-
struct ezb_zcl_default_rsp_cmd_s payload
Command payload for default response.
-
ezb_zcl_cmd_ctrl_t cmd_ctrl
-
struct ezb_zcl_read_attr_rsp_variable_s
Structure for a single read attribute response variable.
This structure represents one attribute in a read attribute response. Multiple attributes are linked together in a list using the next pointer.
Note
The attr_value pointer is only valid if status is EZB_ZCL_STATUS_SUCCESS.
Note
The memory for attr_value is managed by the ZCL stack and will be freed when the message is processed. Copy the value if you need to retain it.
Public Members
-
uint16_t attr_id
Identifier of the attribute that was read.
-
uint8_t status
Status of the read operation. See ezb_zcl_status_t.
-
uint8_t attr_type
Type of the attribute. See ezb_zcl_attr_type_t. Only valid if status is SUCCESS.
-
void *attr_value
Pointer to the attribute value buffer. Only valid if status is SUCCESS.
-
struct ezb_zcl_read_attr_rsp_variable_s *next
Pointer to the next variable in the response list, or NULL if last.
-
uint16_t attr_id
-
struct ezb_zcl_cmd_read_attr_rsp_message_s
Structure for ZCL read attribute response message.
This message structure is delivered to the application callback when a read attribute response is received. It contains the results of the read operation for each requested attribute.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
ezb_zcl_read_attr_rsp_variable_t *variables
Linked list of attribute response variables. Each variable contains one attribute's read result.
-
struct ezb_zcl_cmd_read_attr_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_read_attr_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_write_attr_rsp_variable_s
Structure for a single write attribute response variable.
This structure represents the result of writing one attribute in a write attribute response. Multiple attributes are linked together in a list.
Note
If status is EZB_ZCL_STATUS_SUCCESS, the attr_id field is omitted (set to 0xFFFF) to save space in the response.
Public Members
-
ezb_zcl_status_t status
Status of the write operation. See ezb_zcl_status_t.
-
uint16_t attr_id
Attribute ID that was written. Only present if status is not SUCCESS.
-
struct ezb_zcl_write_attr_rsp_variable_s *next
Pointer to the next variable in the response list, or NULL if last.
-
ezb_zcl_status_t status
-
struct ezb_zcl_cmd_write_attr_rsp_message_s
Structure for ZCL write attribute response message.
This message structure is delivered to the application callback when a write attribute response is received. It contains the results of the write operation for each attribute that was written.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
ezb_zcl_write_attr_rsp_variable_t *variables
Linked list of write response variables. Each variable contains one attribute's write result.
-
struct ezb_zcl_cmd_write_attr_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_write_attr_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_config_report_rsp_variable_s
Structure for a single configure report response variable.
This structure represents the result of configuring reporting for one attribute in a configure reporting response. Multiple attributes are linked together in a list.
Note
If status is EZB_ZCL_STATUS_SUCCESS, the direction and attr_id fields are omitted (set to 0xFF and 0xFFFF respectively) to save space.
Public Members
-
uint8_t status
Status of the configure report operation. See ezb_zcl_status_t.
-
uint8_t direction
Reporting direction: EZB_ZCL_REPORTING_SEND or EZB_ZCL_REPORTING_RECV. Only present if status is not SUCCESS.
-
uint16_t attr_id
Attribute ID for the report. Only present if status is not SUCCESS.
-
struct ezb_zcl_config_report_rsp_variable_s *next
Pointer to the next variable in the response list, or NULL if it is the last variable.
-
uint8_t status
-
struct ezb_zcl_cmd_config_report_rsp_message_s
Structure for ZCL configure reporting response message.
This message structure is delivered to the application callback when a configure reporting response is received. It contains the results of configuring reporting for each requested attribute.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
ezb_zcl_config_report_rsp_variable_t *variables
Linked list of configure report response variables. Each variable contains one attribute's configuration result.
-
struct ezb_zcl_cmd_config_report_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_config_report_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_read_report_config_rsp_variable_s
Structure for a single read report configuration response variable.
This structure represents the reporting configuration for one attribute in a read report configuration response. Multiple attributes are linked together in a list. The union field (client or server) is used based on the direction field.
Note
If status is not EZB_ZCL_STATUS_SUCCESS, the union fields are omitted.
Public Members
-
ezb_zcl_status_t status
Status of the read report configuration operation. See ezb_zcl_status_t.
-
uint8_t direction
Reporting direction, either EZB_ZCL_REPORTING_SEND or EZB_ZCL_REPORTING_RECV.
-
uint16_t attr_id
Identifier of the attribute for the report.
-
uint8_t attr_type
Type of the attribute. See ezb_zcl_attr_type_t. Only valid if status is SUCCESS and direction is SEND.
-
uint16_t min_interval
Minimum reporting interval in seconds.
-
uint16_t max_interval
Maximum reporting interval in seconds.
-
ezb_zcl_attr_variable_t delta
Minimum change to attribute value that triggers a report.
-
struct ezb_zcl_read_report_config_rsp_variable_s client
Reporting configuration when the direction is EZB_ZCL_REPORTING_SEND.
-
uint16_t timeout
Timeout period in seconds.
-
struct ezb_zcl_read_report_config_rsp_variable_s server
Reporting configuration when the direction is EZB_ZCL_REPORTING_RECV.
- union ezb_zcl_read_report_config_rsp_variable_s
Union of reporting configuration for client or server.
-
struct ezb_zcl_read_report_config_rsp_variable_s *next
Pointer to the next variable in the response list, or NULL if it is the last variable.
-
ezb_zcl_status_t status
-
struct ezb_zcl_cmd_read_report_config_rsp_message_s
Structure for ZCL read report configuration response message.
This message structure is delivered to the application callback when a read report configuration response is received. It contains the current reporting configuration for each requested attribute.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
ezb_zcl_read_report_config_rsp_variable_t *variables
Linked list of read report configuration variables. Each variable contains one attribute's reporting configuration.
-
struct ezb_zcl_cmd_read_report_config_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_read_report_config_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_report_attr_variable_s
Structure for a single report attribute variable.
This structure represents one attribute in an unsolicited report attribute message. Multiple attributes can be reported in a single message for efficiency. The attributes are linked together in a list.
Note
The memory for attr_value is managed by the ZCL stack and will be freed when the message is processed. Copy the value if you need to retain it.
Public Members
-
uint16_t attr_id
Identifier of the attribute being reported.
-
uint8_t attr_type
Type of the attribute. See ezb_zcl_attr_type_t.
-
void *attr_value
Pointer to the attribute value buffer. The size depends on attr_type.
-
struct ezb_zcl_report_attr_variable_s *next
Pointer to the next variable in the report list, or NULL if it is the last variable.
-
uint16_t attr_id
-
struct ezb_zcl_cmd_report_attr_message_s
Structure for ZCL report attribute message.
This message structure is delivered to the application callback when an unsolicited report attribute command is received. This typically occurs when a remote device reports attribute value changes based on configured reporting.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received report. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
ezb_zcl_report_attr_variable_t *variables
Linked list of report attribute variables.
-
struct ezb_zcl_cmd_report_attr_message_s in
Input data from the received report.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_report_attr_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_disc_attr_variable_s
Structure for a single discover attribute variable.
This structure represents one discovered attribute in a discover attributes response. Multiple attributes are linked together in a list.
Public Members
-
uint16_t attr_id
Identifier of the attribute discovered.
-
uint8_t attr_type
Type of the attribute. See ezb_zcl_attr_type_t.
-
struct ezb_zcl_disc_attr_variable_s *next
Pointer to the next variable in the discovery list, or NULL if it is the last variable.
-
uint16_t attr_id
-
struct ezb_zcl_cmd_discover_attributes_rsp_message_s
Structure for ZCL discover attributes response message.
This message structure is delivered to the application callback when a discover attributes response is received. It contains a list of attributes supported by the remote device in the specified cluster.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
uint8_t is_completed
Discovery is completed, 1 if all attributes have been discovered, 0 if more attributes exist beyond the returned list.
-
ezb_zcl_disc_attr_variable_t *variables
Linked list of discovered attribute variables.
-
struct ezb_zcl_cmd_discover_attributes_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_discover_attributes_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_disc_cmd_variable_s
Structure for a single discover command variable.
This structure represents one discovered command in a discover commands response. Multiple commands are linked together in a list.
Public Members
-
uint8_t cmd_id
Identifier of the command discovered.
-
struct ezb_zcl_disc_cmd_variable_s *next
Pointer to the next variable in the discovery list, or NULL if it is the last variable.
-
uint8_t cmd_id
-
struct ezb_zcl_cmd_discover_commands_rsp_message_s
Structure for ZCL discover commands response message.
This message structure is delivered to the application callback when a discover commands response is received. It contains a list of commands supported by the remote device in the specified cluster.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
uint8_t is_recv
Command direction: 1 for received commands, 0 for generated commands.
-
uint8_t is_completed
Discovery is completed, 1 if all commands have been discovered, 0 if more commands exist beyond the returned list.
-
ezb_zcl_disc_cmd_variable_t *variables
Linked list of discovered command variables.
-
struct ezb_zcl_cmd_discover_commands_rsp_message_s in
Input data from the received response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_discover_commands_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
-
struct ezb_zcl_cmd_default_rsp_message_s
Structure for ZCL default response message.
This message structure is delivered to the application callback when a default response is received. A default response is sent when a command cannot be processed or when the disable default response bit is not set.
Public Members
-
ezb_zcl_message_info_t info
Common information about the received response. See ezb_zcl_message_info_s.
-
const ezb_zcl_cmd_hdr_t *header
ZCL command header information. See ezb_zcl_cmd_hdr_s.
-
uint8_t rsp_to_cmd
Identifier of the command to which this is a response.
-
uint8_t status_code
Status code of the response. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_default_rsp_message_s in
Input data from the received default response.
-
ezb_zcl_status_t result
Status of processing in application. See ezb_zcl_status_t.
-
struct ezb_zcl_cmd_default_rsp_message_s out
Output data to be returned to the ZCL stack.
-
ezb_zcl_message_info_t info
5.2.6.2.1.8. Type Definitions
-
typedef struct ezb_zcl_read_attr_cmd_s ezb_zcl_read_attr_cmd_t
Structure for ZCL read attribute command request.
This structure is used to construct a ZCL read attribute command. The command can read one or more attributes from a cluster on a remote device.
Note
The attr_field array must contain at least attr_number elements.
Note
The response will be delivered via the callback specified in cmd_ctrl.cnf_ctx.
-
typedef struct ezb_zcl_write_attr_cmd_s ezb_zcl_write_attr_cmd_t
Structure for ZCL write attribute command request.
This structure is used to construct a ZCL write attribute command. The command can write one or more attributes to a cluster on a remote device.
Note
The attr_field array must contain at least attr_number elements.
Note
Each attribute's value must match its specified data type and size.
Note
The response will be delivered via the callback specified in cmd_ctrl.cnf_ctx.
-
typedef struct ezb_zcl_config_report_record_s ezb_zcl_config_report_record_t
Structure for ZCL configure reporting record.
This structure specifies the reporting configuration for a single attribute. The union field (client or server) is used based on the direction field.
Note
For direction = EZB_ZCL_REPORTING_SEND (0), use the client structure.
Note
For direction = EZB_ZCL_REPORTING_RECV (1), use the server structure.
Note
Setting max_interval to 0xFFFF disables periodic reporting.
Note
For analog attributes, reportable_change specifies the minimum delta to trigger a report.
-
typedef struct ezb_zcl_config_report_cmd_s ezb_zcl_config_report_cmd_t
Structure for ZCL configure reporting command request.
This structure is used to construct a ZCL configure reporting command.
-
typedef struct ezb_zcl_read_report_config_record_s ezb_zcl_read_report_config_record_t
Structure for a single read report configuration record.
This structure is used to construct a single read report configuration record.
-
typedef struct ezb_zcl_read_report_config_cmd_s ezb_zcl_read_report_config_cmd_t
Structure for ZCL read report configuration command request.
This structure is used to construct a ZCL read report configuration command.
-
typedef struct ezb_zcl_report_attr_cmd_s ezb_zcl_report_attr_cmd_t
Structure for ZCL report attribute command request.
This structure is used to construct a ZCL report attribute command. This command is typically sent by a server to notify clients of attribute value changes. The command will report all attributes configured for reporting that have changed.
Note
The actual attributes reported depend on the reporting configuration and which attributes have changed since the last report.
-
typedef struct ezb_zcl_disc_attr_cmd_s ezb_zcl_disc_attr_cmd_t
Structure for ZCL discover attributes command request.
This structure is used to construct a ZCL discover attributes command, which queries a remote device for the attributes it supports in a cluster. The response will contain a list of supported attributes starting from start_attr_id.
-
typedef struct ezb_zcl_disc_cmd_cmd_s ezb_zcl_disc_cmd_cmd_t
Structure for ZCL discover commands command request.
This structure is used to construct a ZCL discover commands command, which queries a remote device for the commands it supports in a cluster. The response will contain a list of supported commands.
-
typedef struct ezb_zcl_default_rsp_cmd_s ezb_zcl_default_rsp_cmd_t
Structure for ZCL default response command request.
This structure is used to construct a ZCL default response command.
-
typedef struct ezb_zcl_read_attr_rsp_variable_s ezb_zcl_read_attr_rsp_variable_t
Structure for a single read attribute response variable.
This structure represents one attribute in a read attribute response. Multiple attributes are linked together in a list using the next pointer.
Note
The attr_value pointer is only valid if status is EZB_ZCL_STATUS_SUCCESS.
Note
The memory for attr_value is managed by the ZCL stack and will be freed when the message is processed. Copy the value if you need to retain it.
-
typedef struct ezb_zcl_cmd_read_attr_rsp_message_s ezb_zcl_cmd_read_attr_rsp_message_t
Structure for ZCL read attribute response message.
This message structure is delivered to the application callback when a read attribute response is received. It contains the results of the read operation for each requested attribute.
-
typedef struct ezb_zcl_write_attr_rsp_variable_s ezb_zcl_write_attr_rsp_variable_t
Structure for a single write attribute response variable.
This structure represents the result of writing one attribute in a write attribute response. Multiple attributes are linked together in a list.
Note
If status is EZB_ZCL_STATUS_SUCCESS, the attr_id field is omitted (set to 0xFFFF) to save space in the response.
-
typedef struct ezb_zcl_cmd_write_attr_rsp_message_s ezb_zcl_cmd_write_attr_rsp_message_t
Structure for ZCL write attribute response message.
This message structure is delivered to the application callback when a write attribute response is received. It contains the results of the write operation for each attribute that was written.
-
typedef struct ezb_zcl_config_report_rsp_variable_s ezb_zcl_config_report_rsp_variable_t
Structure for a single configure report response variable.
This structure represents the result of configuring reporting for one attribute in a configure reporting response. Multiple attributes are linked together in a list.
Note
If status is EZB_ZCL_STATUS_SUCCESS, the direction and attr_id fields are omitted (set to 0xFF and 0xFFFF respectively) to save space.
-
typedef struct ezb_zcl_cmd_config_report_rsp_message_s ezb_zcl_cmd_config_report_rsp_message_t
Structure for ZCL configure reporting response message.
This message structure is delivered to the application callback when a configure reporting response is received. It contains the results of configuring reporting for each requested attribute.
-
typedef struct ezb_zcl_read_report_config_rsp_variable_s ezb_zcl_read_report_config_rsp_variable_t
Structure for a single read report configuration response variable.
This structure represents the reporting configuration for one attribute in a read report configuration response. Multiple attributes are linked together in a list. The union field (client or server) is used based on the direction field.
Note
If status is not EZB_ZCL_STATUS_SUCCESS, the union fields are omitted.
-
typedef struct ezb_zcl_cmd_read_report_config_rsp_message_s ezb_zcl_cmd_read_report_config_rsp_message_t
Structure for ZCL read report configuration response message.
This message structure is delivered to the application callback when a read report configuration response is received. It contains the current reporting configuration for each requested attribute.
-
typedef struct ezb_zcl_report_attr_variable_s ezb_zcl_report_attr_variable_t
Structure for a single report attribute variable.
This structure represents one attribute in an unsolicited report attribute message. Multiple attributes can be reported in a single message for efficiency. The attributes are linked together in a list.
Note
The memory for attr_value is managed by the ZCL stack and will be freed when the message is processed. Copy the value if you need to retain it.
-
typedef struct ezb_zcl_cmd_report_attr_message_s ezb_zcl_cmd_report_attr_message_t
Structure for ZCL report attribute message.
This message structure is delivered to the application callback when an unsolicited report attribute command is received. This typically occurs when a remote device reports attribute value changes based on configured reporting.
-
typedef struct ezb_zcl_disc_attr_variable_s ezb_zcl_disc_attr_variable_t
Structure for a single discover attribute variable.
This structure represents one discovered attribute in a discover attributes response. Multiple attributes are linked together in a list.
-
typedef struct ezb_zcl_cmd_discover_attributes_rsp_message_s ezb_zcl_cmd_discover_attributes_rsp_message_t
Structure for ZCL discover attributes response message.
This message structure is delivered to the application callback when a discover attributes response is received. It contains a list of attributes supported by the remote device in the specified cluster.
-
typedef struct ezb_zcl_disc_cmd_variable_s ezb_zcl_disc_cmd_variable_t
Structure for a single discover command variable.
This structure represents one discovered command in a discover commands response. Multiple commands are linked together in a list.
-
typedef struct ezb_zcl_cmd_discover_commands_rsp_message_s ezb_zcl_cmd_discover_commands_rsp_message_t
Structure for ZCL discover commands response message.
This message structure is delivered to the application callback when a discover commands response is received. It contains a list of commands supported by the remote device in the specified cluster.
-
typedef struct ezb_zcl_cmd_default_rsp_message_s ezb_zcl_cmd_default_rsp_message_t
Structure for ZCL default response message.
This message structure is delivered to the application callback when a default response is received. A default response is sent when a command cannot be processed or when the disable default response bit is not set.