entry point for all incoming ZCL messages
More...
Go to the source code of this file.
|
| zb_uint8_t | tr_zcl_command_cb (zb_uint8_t param) |
| | callback that can be defined in the user application to handle incoming ZCL messages
|
| zb_uint8_t | tr_zcl_specific_cluster_cmd_handler (zb_uint8_t param) |
| | called when a ZCL command is received
|
| zb_uint8_t | tr_zcl_get_endpoint_by_cluster (zb_uint8_t ep_instance, zb_uint16_t cluster_id, zb_uint16_t cluster_role) |
| | get the endpoint number of the cluster at specified index in list of endpoints
|
| zb_uint8_t | tr_zcl_get_instance_by_cluster (zb_uint8_t endpoint_looking_for, zb_uint16_t cluster_id, zb_uint16_t cluster_role) |
| | get the endpoint number of the cluster by index
|
| void | tr_zcl_send_default_resp (zb_uint8_t param, zb_zcl_parsed_hdr_t *cmd_info, tr_zcl_cmd_handler_status_t handler_status, zb_uint16_t cluster_id) |
| | determines whether or not to send a default response
|
| void | tr_zcl_send_cluster_command_resp (zb_bufid_t buffer, zb_zcl_parsed_hdr_t *cmd_info, zb_uint16_t cluster_id, zb_uint8_t direction, zb_uint8_t zcl_cmd, zb_uint8_t payload_len, zb_uint8_t *payload, zb_callback_t sent_callback) |
| | used by cluster plugins to send a response and re-use the buffer for the command received
|
| void | tr_zcl_plugin_attributes_ready (void) |
| | this is called once the attributes are loaded from NVM
|
| char * | tr_zcl_find_cluster_name (zb_uint16_t cluster_id) |
| | get cluster name based on cluster ID
|
entry point for all incoming ZCL messages
SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com
◆ TR_ZCL_CONSTRUCT_FRAME_CONTROL_TO_CLIENT
| #define TR_ZCL_CONSTRUCT_FRAME_CONTROL_TO_CLIENT |
( |
| buf_ptr | ) |
|
Value: (ZB_ZCL_CONSTRUCT_SET_FRAME_CONTROL(*(buf_ptr), \
ZB_ZCL_FRAME_TYPE_CLUSTER_SPECIFIC, \
ZB_ZCL_NOT_MANUFACTURER_SPECIFIC, \
(buf_ptr)++)
#define TR_GLOBAL_RESPONSE_POLICY
Definition tr_zcl_endpoint_config.h:22
#define TR_ZCL_FRAME_DIRECTION_TO_CLIENT
Definition tr_zcl_common.h:18
◆ TR_ZCL_CONSTRUCT_FRAME_CONTROL_TO_SERVER
| #define TR_ZCL_CONSTRUCT_FRAME_CONTROL_TO_SERVER |
( |
| buf_ptr | ) |
|
Value: (ZB_ZCL_CONSTRUCT_SET_FRAME_CONTROL(*(buf_ptr), \
ZB_ZCL_FRAME_TYPE_CLUSTER_SPECIFIC, \
ZB_ZCL_NOT_MANUFACTURER_SPECIFIC, \
(buf_ptr)++)
#define TR_ZCL_FRAME_DIRECTION_TO_SERVER
Definition tr_zcl_common.h:17
◆ TR_ZCL_FRAME_DIRECTION_TO_CLIENT
| #define TR_ZCL_FRAME_DIRECTION_TO_CLIENT 0x01U |
◆ TR_ZCL_FRAME_DIRECTION_TO_SERVER
| #define TR_ZCL_FRAME_DIRECTION_TO_SERVER 0x00U |
◆ TR_ZCL_FRAME_TYPE_GLOBAL
| #define TR_ZCL_FRAME_TYPE_GLOBAL 0x00 |
◆ TR_ZCL_FRAME_TYPE_MASK
| #define TR_ZCL_FRAME_TYPE_MASK 0x03 |
◆ TR_ZCL_FRAME_TYPE_SPECIFIC
| #define TR_ZCL_FRAME_TYPE_SPECIFIC 0x01 |
◆ TR_ZCL_INVALID_ENDPOINT_NUMBER
| #define TR_ZCL_INVALID_ENDPOINT_NUMBER 0xFF |
◆ TR_ZCL_INVALID_INSTANCE_NUMBER
| #define TR_ZCL_INVALID_INSTANCE_NUMBER 0xFF |
◆ tr_zcl_cmd_handler_enum_t
| Enumerator |
|---|
| TR_ZCL_CMD_HDLR_USER_PROCESSED | |
| TR_ZCL_CMD_HDLR_PLUGIN_SENT_RESPONSE | |
| TR_ZCL_CMD_HDLR_ATTEMPT_DEF_RESP | |
◆ tr_zcl_find_cluster_name()
| char * tr_zcl_find_cluster_name |
( |
zb_uint16_t | cluster_id | ) |
|
get cluster name based on cluster ID
- Parameters
-
| cluster_id | cluster ID to get name for |
- Returns
- name of the cluster
◆ tr_zcl_get_endpoint_by_cluster()
| zb_uint8_t tr_zcl_get_endpoint_by_cluster |
( |
zb_uint8_t | ep_instance, |
|
|
zb_uint16_t | cluster_id, |
|
|
zb_uint16_t | cluster_role ) |
get the endpoint number of the cluster at specified index in list of endpoints
- Parameters
-
| ep_instance | endpoint instance indexed at 0 |
| cluster_id | ZCL cluster ID |
| cluster_role | client or server side |
- Returns
- endpoint number
◆ tr_zcl_get_instance_by_cluster()
| zb_uint8_t tr_zcl_get_instance_by_cluster |
( |
zb_uint8_t | endpoint_looking_for, |
|
|
zb_uint16_t | cluster_id, |
|
|
zb_uint16_t | cluster_role ) |
get the endpoint number of the cluster by index
- Parameters
-
| endpoint_looking_for | which endpoint number to look for |
| cluster_id | ZCL cluster ID |
| cluster_role | client or server side |
- Returns
- endpoint instance indexed at 0
◆ tr_zcl_plugin_attributes_ready()
| void tr_zcl_plugin_attributes_ready |
( |
void | | ) |
|
this is called once the attributes are loaded from NVM
◆ tr_zcl_send_cluster_command_resp()
| void tr_zcl_send_cluster_command_resp |
( |
zb_bufid_t | buffer, |
|
|
zb_zcl_parsed_hdr_t * | cmd_info, |
|
|
zb_uint16_t | cluster_id, |
|
|
zb_uint8_t | direction, |
|
|
zb_uint8_t | zcl_cmd, |
|
|
zb_uint8_t | payload_len, |
|
|
zb_uint8_t * | payload, |
|
|
zb_callback_t | sent_callback ) |
used by cluster plugins to send a response and re-use the buffer for the command received
- Parameters
-
| buffer | zb_bufid_t of the buffer to re-use |
| cmd_info | struct that contains zcl header info |
| cluster_id | ZCL cluster ID to use when sending |
| direction | either ZB_ZCL_FRAME_DIRECTION_TO_SRV or ZB_ZCL_FRAME_DIRECTION_TO_CLI |
| zcl_cmd | one byte value representing the ZCL command to send for the cluster ID specified |
| payload_len | length of the ZCL payload (does not include the ZCL header) |
| payload | pointer to an array of bytes that is the payload. length is specified in prior argument |
| sent_callback | pointer to a function to be called when the send is complete so the status of the sent command can be read. If sent_callback is NULL, the Zigbee stack will free the internal buffer. If sent_callback is not NULL, the callback is responsible for freeing the buffer by calling zb_buf_free(). |
◆ tr_zcl_send_default_resp()
| void tr_zcl_send_default_resp |
( |
zb_uint8_t | param, |
|
|
zb_zcl_parsed_hdr_t * | cmd_info, |
|
|
tr_zcl_cmd_handler_status_t | handler_status, |
|
|
zb_uint16_t | cluster_id ) |
determines whether or not to send a default response
- Parameters
-
| param | zb_bufid_t of a buffer |
| cmd_info | struct that contains zcl header info |
| handler_status | struct that contains ZCL status and info used to make send decision |
| cluster_id | ZCL cluster ID |
◆ tr_zcl_specific_cluster_cmd_handler()
| zb_uint8_t tr_zcl_specific_cluster_cmd_handler |
( |
zb_uint8_t | param | ) |
|
called when a ZCL command is received
- Parameters
-
| param | get ZCL packet info using: zb_zcl_parsed_hdr_t *cmd_info = ZB_BUF_GET_PARAM(param, zb_zcl_parsed_hdr_t); |
- Returns
- tr_zcl_command_cb