Zigbee Protocol Controller 1.6.0
zcl_util.h
Go to the documentation of this file.
1/******************************************************************************
2 * # License
3 * <b>Copyright 2021 Silicon Laboratories Inc. www.silabs.com</b>
4 ******************************************************************************
5 * The licensor of this software is Silicon Laboratories Inc. Your use of this
6 * software is governed by the terms of Silicon Labs Master Software License
7 * Agreement (MSLA) available at
8 * www.silabs.com/about-us/legal/master-software-license-agreement. This
9 * software is distributed to you in Source Code format and is governed by the
10 * sections of the MSLA applicable to Source Code.
11 *
12 *****************************************************************************/
13
24#ifndef ZIGPC_ZCL_UTIL_H
25#define ZIGPC_ZCL_UTIL_H
26
27#include "zigpc_common_zigbee.h"
28
29#include "zcl_definitions.h"
30
31#ifdef __cplusplus
32extern "C" {
33#endif
34
39typedef enum {
40
47
49
56typedef struct {
58 const void *data;
60
69
80 zcl_command_id_t command_id,
81 uint8_t frame_control);
82
97 const void *data);
98
115 size_t type_count,
116 const void *data);
117
136 zcl_frame_t *const frame,
137 const zigpc_zcl_frame_type_t frame_type,
138 const zcl_cluster_id_t cluster_id,
139 const zcl_command_id_t command_id,
140 const size_t command_arg_count,
141 const zigpc_zcl_frame_data_t *const command_arg_list);
142
153
160
167
168#ifdef __cplusplus
169}
170#endif
171
172#endif /* ZIGPC_ZCL_UTIL_H */
173
#define data
Definition: ctimer.c:49
uint32_t sl_status_t
Definition: sl_status.h:139
#define ZCL_FRAME_CONTROL_DIRECTION_CLIENT_TO_SERVER
ZCL frame will be sent as a client to server message.
Definition: zigpc_common_zigbee.h:180
#define ZCL_FRAME_CONTROL_FRAME_TYPE_CLUSTER
ZCL frame will be set as being a cluster frame type.
Definition: zigpc_common_zigbee.h:174
uint16_t zcl_cluster_id_t
A representation of the endpoint cluster id used in ZCL.
Definition: zigpc_common_zigbee.h:254
#define ZCL_FRAME_CONTROL_FRAME_TYPE_GLOBAL_COMMAND
ZCL frame will be set as being a ZCL global command frame type.
Definition: zigpc_common_zigbee.h:168
uint8_t zcl_command_id_t
Definition: zigpc_common_zigbee.h:265
zigpc_zcl_data_type_t
ZCL data types.
Definition: zcl_definitions.h:40
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....
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
size_t zigpc_zcl_get_data_type_size(zigpc_zcl_data_type_t type)
Get data size of ZCL type passed in.
const uint16_t * zigpc_zcl_get_supported_cluster_list()
zigpc_zcl_get_supported_cluster_list
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 fr...
zigpc_zcl_frame_type_t
ZCL frame control types.
Definition: zcl_util.h:39
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.
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.
size_t zigpc_zcl_get_number_supported_clusters()
zigpc_zcl_get_number_supported_clusters
@ ZIGPC_ZCL_FRAME_TYPE_GLOBAL_CMD_TO_SERVER
Definition: zcl_util.h:44
@ ZIGPC_ZCL_FRAME_TYPE_CMD_TO_SERVER
Definition: zcl_util.h:41
Definition: zigpc_common_zigbee.h:293
Structure used to pass data for ZCL frame build helpers.
Definition: zcl_util.h:56
const void * data
Definition: zcl_util.h:58
zigpc_zcl_data_type_t type
Definition: zcl_util.h:57