This component contains definitions and behaviours that is used to manipulate ZCL data types.
More...
|
size_t | zigpc_zcl_get_data_type_size (zigpc_zcl_data_type_t type) |
| Get data size of ZCL type passed in. More...
|
|
sl_status_t | zigpc_zcl_frame_init_command (zcl_frame_t *const frame, zcl_command_id_t command_id, uint8_t frame_control) |
| Initialize the ZCL Frame for sending ZCL command. More...
|
|
sl_status_t | zigpc_zcl_frame_fill_data (zcl_frame_t *const frame, zigpc_zcl_data_type_t type, const void *data) |
| Populate the given ZCL frame with data. The data copied is dictated by the type passed in. Once successfully copied into the frame, the buffer size is incremented based on the size of the data type passed in. More...
|
|
sl_status_t | zigpc_zcl_frame_fill_data_array (zcl_frame_t *const frame, zigpc_zcl_data_type_t type, size_t type_count, const void *data) |
| Populate the ZCL frame with an array of the given ZCL data type. Once successfully copied into the frame, the buffer size is incremented based on the size of the data type and array count passed in. More...
|
|
sl_status_t | zigpc_zcl_build_command_frame (zcl_frame_t *const frame, const zigpc_zcl_frame_type_t frame_type, const zcl_cluster_id_t cluster_id, const zcl_command_id_t command_id, const size_t command_arg_count, const zigpc_zcl_frame_data_t *const command_arg_list) |
| Build a ZCL command frame to be sent on the Zigbee network. More...
|
|
size_t | zigpc_zcl_get_type_size (zigpc_zcl_data_type_t type) |
| zigpc_zcl_get_type_size - retrieve the size (in bytes) of a given ZCL type More...
|
|
size_t | zigpc_zcl_get_number_supported_clusters () |
| zigpc_zcl_get_number_supported_clusters More...
|
|
const uint16_t * | zigpc_zcl_get_supported_cluster_list () |
| zigpc_zcl_get_supported_cluster_list More...
|
|
This component contains definitions and behaviours that is used to manipulate ZCL data types.
◆ zigpc_zcl_frame_type_t
ZCL frame control types.
Enumerator |
---|
ZIGPC_ZCL_FRAME_TYPE_CMD_TO_SERVER | |
ZIGPC_ZCL_FRAME_TYPE_GLOBAL_CMD_TO_SERVER | |
◆ zigpc_zcl_build_command_frame()
Build a ZCL command frame to be sent on the Zigbee network.
NOTE: Ensure pointers to data passed through command argument list is valid in the context that this function is called.
- Parameters
-
frame | Pointer to ZCL frame container to be populated. |
frame_type | ZCL frame information. |
cluster_id | Cluster identifier. |
command_id | Cluster command identifier. |
command_arg_count | Command argument list count. |
command_arg_list | Command argument type and data list. arguments. |
- Returns
- sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if if invalid pointers are passed in, or other error related to the ZCL command argument appending process.
◆ zigpc_zcl_frame_fill_data()
Populate the given ZCL frame with data. The data copied is dictated by the type passed in. Once successfully copied into the frame, the buffer size is incremented based on the size of the data type passed in.
- Parameters
-
frame | Pointer to the ZCL frame to be populated. |
type | Type of data to be transferred to the frame. |
data | Pointer to the data to be transferred. |
- Returns
- sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if if invalid pointers are passed in, or SL_STATUS_WOULD_OVERFLOW if appending data would cause buffer overflow.
◆ zigpc_zcl_frame_fill_data_array()
Populate the ZCL frame with an array of the given ZCL data type. Once successfully copied into the frame, the buffer size is incremented based on the size of the data type and array count passed in.
- Parameters
-
frame | Pointer to the ZCL frame to be populated. |
type | Type of data to be transferred to the frame. |
type_count | Number of data elements to be compied. |
data | Pointer to the data to be transferred. |
- Returns
- sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if if invalid pointers are passed in, SL_STATUS_WOULD_OVERFLOW if appending data would cause buffer overflow, or SL_STATUS_INVALID_COUNT if the count of elements is 0.
◆ zigpc_zcl_frame_init_command()
Initialize the ZCL Frame for sending ZCL command.
- Parameters
-
frame | Pointer to frame to be initialized. |
command_id | ZCL Command ID to be populated in the frame. |
frame_control | ZCL frame control field to be populated. |
- Returns
- sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if if invalid pointers are passed in.
◆ zigpc_zcl_get_data_type_size()
Get data size of ZCL type passed in.
- Parameters
-
type | ZCL data type to lookup |
- Returns
- size_t Number of bytes occupied by the data with ZCL type; if size information is not found, 0 is returned.
◆ zigpc_zcl_get_number_supported_clusters()
size_t zigpc_zcl_get_number_supported_clusters |
( |
| ) |
|
zigpc_zcl_get_number_supported_clusters
- Returns
- the number of unique supported ZCL clusters
◆ zigpc_zcl_get_supported_cluster_list()
const uint16_t * zigpc_zcl_get_supported_cluster_list |
( |
| ) |
|
zigpc_zcl_get_supported_cluster_list
- Returns
- a const pointer to the static list of the ID's of supported clusters
◆ zigpc_zcl_get_type_size()
zigpc_zcl_get_type_size - retrieve the size (in bytes) of a given ZCL type
- Parameters
-
- Returns
- the size in bytes of the requested type. returns 0 if no type or an invalid type was found