Zigbee Protocol Controller 1.6.0
zcl_attribute_info.h
Go to the documentation of this file.
1/*******************************************************************************
2 * # License
3 * <b>Copyright 2020 Silicon Laboratories Inc. www.silabs.com</b>
4 *******************************************************************************
5 *
6 * The licensor of this software is Silicon Laboratories Inc. Your use of this
7 * software is governed by the terms of Silicon Labs Master Software License
8 * Agreement (MSLA) available at
9 * www.silabs.com/about-us/legal/master-software-license-agreement. This
10 * software is distributed to you in Source Code format and is governed by the
11 * sections of the MSLA applicable to Source Code.
12 *
13 ******************************************************************************/
14
26#ifndef ATTRIBUTE_INFO_H
27#define ATTRIBUTE_INFO_H
28
29#include "sl_status.h"
30#include "zigpc_common_zigbee.h"
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#define ZCL_WRITE_MAX_DATA_SIZE 16
37
46
55 const zcl_cluster_id_t cluster_id);
56
68 const zcl_cluster_id_t cluster_id, zcl_attribute_t *attribute_list);
69
70#ifdef COMPILE_UNUSED_CODE
71
86sl_status_t retrieve_cluster_name_length(const zcl_cluster_id_t cluster_id,
87 unsigned int *strlen);
98sl_status_t retrieve_cluster_name(const zcl_cluster_id_t cluster_id,
99 char *cluster_name,
100 unsigned int strlen);
101
113sl_status_t retrieve_cluster_id_from_name(const char *cluster_name,
114 unsigned int strlen,
115 zcl_cluster_id_t *cluster_id);
116
134 retrieve_attribute_name_length(const zcl_cluster_id_t cluster_id,
135 const zcl_attribute_id_t attribute_id,
136 unsigned int *length);
137
153sl_status_t retrieve_attribute_name(const zcl_cluster_id_t cluster_id,
154 const zcl_attribute_id_t attribute_id,
155 char *attribute_name,
156 unsigned int str_length);
157
170sl_status_t retrieve_attribute_type(const zcl_cluster_id_t cluster_id,
171 const zcl_attribute_id_t attribute_id,
172 enum e_zcl_attribute_type *type);
173
187sl_status_t retrieve_attribute_id_from_name(const zcl_cluster_id_t cluster_id,
188 const char *attribute_name,
189 unsigned int str_length,
190 zcl_attribute_id_t *attribute_id);
191
205sl_status_t attribute_val_to_string(uint8_t *data,
206 enum e_zcl_attribute_type type,
207 char *str,
208 unsigned int strlen);
209
223sl_status_t attribute_string_to_val(const char *value_string,
224 unsigned int strlen,
225 enum e_zcl_attribute_type type,
226 uint8_t *data,
227 size_t data_size);
228#endif // COMPILE_UNUSED_CODE
229
230#ifdef __cplusplus
231}
232#endif //__cplusplus
233
234#endif //ATTRIBUTES_INFO_H
sl_status_t zigpc_zcl_profiles_init(void)
init_cluster_attributes - the API for instantiating cluster attributes Required to set up all attribu...
size_t zigpc_zclprofiles_get_cluster_attribute_count(const zcl_cluster_id_t cluster_id)
Retrieve number of attributes of a given cluster.
sl_status_t zigpc_zclprofiles_get_cluster_attribute_list(const zcl_cluster_id_t cluster_id, zcl_attribute_t *attribute_list)
zigpc_zclprofiles_get_cluster_attribute_list - Retrieve the attributes of a given cluster ID....
#define data
Definition: ctimer.c:49
uint32_t sl_status_t
Definition: sl_status.h:139
uint16_t zcl_attribute_id_t
A representation of the endpoint cluster attribute ID used in ZCL.
Definition: zigpc_common_zigbee.h:260
e_zcl_attribute_type
Definition: zigpc_common_zigbee.h:325
uint16_t zcl_cluster_id_t
A representation of the endpoint cluster id used in ZCL.
Definition: zigpc_common_zigbee.h:254
SL Status Codes.
Definition: zigpc_common_zigbee.h:339