Zigbee Protocol Controller 1.6.0
attribute_management_int.h
Go to the documentation of this file.
1/*******************************************************************************
2 * # License
3 * <b>Copyright 2021 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#ifndef ATTRIBUTE_MANAGEMENT_INT_H
15#define ATTRIBUTE_MANAGEMENT_INT_H
16
17#include "sl_status.h"
18#include "sys/ctimer.h"
19
20#include "zigpc_common_zigbee.h"
21
22#ifdef __cplusplus
23extern "C" {
24#endif
25
27 = CLOCK_SECOND * 5;
28
40static const unsigned int ZIGPC_ATTRMGMT_READ_RECORDS_LIMIT_PER_MESSAGE = 25;
41
54
62static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MIN_DEFAULT = 1000;
63
71static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MAX_DEFAULT = 10000;
72
82
88
99
107};
108
116typedef struct {
119
127typedef struct {
131
140typedef struct {
144 struct ctimer timer;
146
154typedef struct {
160 unsigned int attr_string_size;
162
169typedef struct {
175 uint8_t *data;
177
182typedef struct {
189
206 const void *data,
207 size_t data_size);
208
218 size_t count,
219 size_t limit);
220
234 const zigbee_eui64_t eui64, const zigbee_endpoint_t endpoint);
235
247
258 const zigbee_eui64_t eui64,
259 zigbee_endpoint_id_t endpoint_id,
260 zcl_cluster_id_t cluster_id);
261
270
271
286 zigbee_endpoint_id_t endpoint_id,
287 zcl_cluster_id_t cluster_id);
288
305 zigbee_endpoint_id_t endpoint_id,
306 zcl_cluster_id_t cluster_id,
307 bool is_read_response,
308 const zcl_frame_t *frame);
309
323 const zigbee_eui64_t eui64,
324 zigbee_endpoint_id_t endpoint_id,
325 zcl_cluster_id_t cluster_id,
326 const zcl_frame_t *frame);
327
328#ifdef COMPILE_UNUSED_CODE
329
338sl_status_t update_attribute_from_report(const attribute_report_t report);
339
340#endif // COMPILE_UNUSED_CODE
341
349
362 const zigbee_endpoint_id_t endpoint_id,
363 const zcl_cluster_id_t cluster_id,
364 const zcl_attribute_id_t attr_id,
365 const uint8_t *attr_value);
366
376
385
395
409 zigbee_endpoint_id_t endpoint_id,
410 zcl_cluster_id_t cluster_id);
411
424 zigbee_endpoint_id_t endpoint_id,
425 zcl_cluster_id_t cluster_id);
426
433
434#ifdef __cplusplus
435}
436#endif
437
438#endif //ATTRIBUTE_MANAGEMENT_INT_H
sl_status_t zigpc_attrmgmt_send_read_attributes_command(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id)
Send a ZCL Global Read Attribute Command to the associated device, endpoint, and cluster combination.
sl_status_t zigpc_attrmgmt_publish_reported(const zigbee_eui64_uint_t eui64, const zigbee_endpoint_id_t endpoint_id, const zcl_cluster_id_t cluster_id, const zcl_attribute_id_t attr_id, const uint8_t *attr_value)
Publish Reported Attribute Values.
sl_status_t zigpc_attrmgmt_configure_reports_for_endpoint(const zigbee_eui64_t eui64, const zigbee_endpoint_t endpoint)
zigpc_attrmgmt_configure_reports_for_endpoint - API for sending a ZCL command to the zigpc_gateway to...
attr_mgmt_evt
the enum representing the events handled by the attribute management Contiki process....
Definition: attribute_management_int.h:96
@ ZIGPC_ATTR_MGMT_EVT_CONFIGURE_RESPONSE
Definition: attribute_management_int.h:105
@ ZIGPC_ATTR_MGMT_EVT_ATTR_UPDATE
Event corresponding to a new attribute update message received.
Definition: attribute_management_int.h:104
@ ZIGPC_ATTR_MGMT_EVT_INIT_ENDPOINT
Definition: attribute_management_int.h:98
@ ZIGPC_ATTR_MGMT_EVT_READ_ATTRIBUTES_COMMAND
Definition: attribute_management_int.h:106
@ ZIGPC_ATTR_MGMT_EVT_INIT_NODE
Definition: attribute_management_int.h:97
sl_status_t zigpc_attrmgmt_add_poll_entry(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id)
zigpc_attrmgmt_add_poll_entry
static const unsigned int ZIGPC_ATTR_MGMT_DELAY_READ_ATTRIBUTES
Definition: attribute_management_int.h:27
static const unsigned int ZIGPC_ATTRMGMT_REPORT_RECORDS_LIMIT_PER_MESSAGE
Limit of Configure Reporting Records to send per ZCL Message.
Definition: attribute_management_int.h:53
sl_status_t zigpc_attrmgmt_process_send_event(const enum attr_mgmt_evt event, const void *data, size_t data_size)
Send an event and associated data to the attribute management Contiki process. Based on the data and ...
Definition: attribute_management_process.c:58
sl_status_t zigpc_attribute_management_read_cluster_attributes(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id)
Request to send a Read Attribute commands to the associated device, endpoint, and cluster combination...
Definition: attribute_management.c:57
void zigpc_attrmgmt_empty_poll_list()
zigpc_attrmgmt_empty_poll_list
sl_status_t attr_mgmt_gateway_init_observer(void)
attr_mgmt_gateway_init_observer - the function that initiates all observers from the zigpc_gateway....
Definition: zigpc_attrmgmt_gateway.c:97
sl_status_t zigpc_attrmgmt_send_poll_attributes()
zigpc_attrmgmt_send_poll_attributes
static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MAX_DEFAULT
Default Configure Reporting Record Maximum Interval (Seconds).
Definition: attribute_management_int.h:71
sl_status_t zigpc_attrmgmt_receive_configure_response_frame(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id, const zcl_frame_t *frame)
zigpc_attrmgmt_receive_configure_response_frame Process a configure attribute response frame Accepts ...
static const uint32_t ZIGPC_ATTRMGMT_REPORT_CHANGE_DEFAULT
Default Configure Reporting Record Reportable Change to allow any change to be reported.
Definition: attribute_management_int.h:81
size_t zigpc_attrmgmt_get_poll_list_max_size()
zigpc_attrmgmt_get_poll_list_Max_size
sl_status_t zigpc_attrmgmt_remove_poll_entry(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id)
void zigpc_attrmgmt_send_delayed_read_command_callback(void *read_data)
Callback invoked by zigpc_attrmgmt_send_delayed_read_command after delay of ZIGPC_ATTR_MGMT_DELAY_REA...
static const uint32_t ZIGPC_ATTRMGMT_DEFAULT_POLL_SIZE
Default poll list size. The maximum number of clusters that can be stoed in the poll list.
Definition: attribute_management_int.h:87
size_t zigpc_attrmgmt_get_records_to_send_in_message(size_t start_index, size_t count, size_t limit)
Determine the number of records to send per ZCL message.
sl_status_t node_send_report_config_cmd(const zigbee_node_t node)
node_send_report_config_cmd - API for sending a ZCL command to the zigpc_gateway to configure reports...
Definition: attribute_management_process.c:186
sl_status_t zigpc_attrmgmt_receive_attribute_frame(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_id_t cluster_id, bool is_read_response, const zcl_frame_t *frame)
Process Attribute update response frames received from the a Device. This function is capable of proc...
Definition: zigpc_attrmgmt_receive.c:28
size_t zigpc_attrmgmt_get_poll_list_current_size()
zigpc_attrmgmt_get_poll_list_size
static const unsigned int ZIGPC_ATTRMGMT_READ_RECORDS_LIMIT_PER_MESSAGE
Limit of Read Attribute Records to send per ZCL Message.
Definition: attribute_management_int.h:40
static const uint16_t ZIGPC_ATTRMGMT_REPORT_INTERVAL_MIN_DEFAULT
Default Configure Reporting Record Minimum Interval (Seconds).
Definition: attribute_management_int.h:62
#define CLOCK_SECOND
Definition: clock.h:131
#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
uint8_t zigbee_eui64_t[ZIGBEE_EUI64_SIZE]
Zigbee Device EUI64 ID.
Definition: zigpc_common_zigbee.h:193
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
uint64_t zigbee_eui64_uint_t
Zigbee Device Identifier (stored as integer)
Definition: zigpc_common_zigbee.h:199
uint8_t zigbee_endpoint_id_t
A representation of the endpoint id used on the Zigbee protocol.
Definition: zigpc_common_zigbee.h:248
SL Status Codes.
the structure used to represent a report record used by the ZCL application framework when sending at...
Definition: attribute_management_int.h:169
enum e_zcl_attribute_type type
Definition: attribute_management_int.h:174
zigbee_endpoint_id_t endpoint_id
Definition: attribute_management_int.h:171
zcl_cluster_id_t cluster_id
Definition: attribute_management_int.h:172
zcl_attribute_id_t attribute_id
Definition: attribute_management_int.h:173
zigbee_eui64_t eui64
Definition: attribute_management_int.h:170
uint8_t * data
Definition: attribute_management_int.h:175
Definition: ctimer.h:64
the data structure representing all data required to handle a "Configure Reports - Endpoint" event,...
Definition: attribute_management_int.h:127
zigbee_endpoint_t endpoint
Definition: attribute_management_int.h:129
zigbee_eui64_t eui64
Definition: attribute_management_int.h:128
the data structure representing all data required to handle a "Configure Reports - Node" event,...
Definition: attribute_management_int.h:116
zigbee_node_t node
Definition: attribute_management_int.h:117
Definition: timer.h:91
Definition: zigpc_common_zigbee.h:293
a model for a zigbee ZCL endpoint
Definition: zigpc_common_zigbee.h:362
A model for a Zigbee End Node.
Definition: zigpc_common_zigbee.h:453
the structure used to initialize attribute data. In order to populate initial values of all attribute...
Definition: attribute_management_int.h:140
zigbee_eui64_t eui64
Definition: attribute_management_int.h:141
zigbee_endpoint_id_t endpoint_id
Definition: attribute_management_int.h:142
zcl_cluster_id_t cluster_id
Definition: attribute_management_int.h:143
the structure used to send a write attribute command. Contains all the information from MQTT and expe...
Definition: attribute_management_int.h:154
unsigned int cluster_string_size
Definition: attribute_management_int.h:158
unsigned int attr_string_size
Definition: attribute_management_int.h:160
zigbee_endpoint_id_t endpoint_id
Definition: attribute_management_int.h:156
char * attributes_string
Definition: attribute_management_int.h:159
zigbee_eui64_t eui64
Definition: attribute_management_int.h:155
char * cluster_string
Definition: attribute_management_int.h:157
the structure used to represent the data received on a report for a changed attribute
Definition: attribute_management_int.h:182
bool is_read_response
Definition: attribute_management_int.h:186
zcl_cluster_id_t cluster_id
Definition: attribute_management_int.h:185
zcl_frame_t frame
Definition: attribute_management_int.h:187
zigbee_eui64_t eui64
Definition: attribute_management_int.h:183
zigbee_endpoint_id_t endpoint_id
Definition: attribute_management_int.h:184