Zigbee Protocol Controller 1.6.0
zigpc_datastore_util.hpp
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
22#ifndef ZIGPC_DATASTORE_UTIL_HPP
23#define ZIGPC_DATASTORE_UTIL_HPP
24
25#include "zigpc_datastore_id.h"
26
32
33/**********************************
34 **********************************
35 *
36 * Utility Entity Find API
37 *
38 **********************************
39 **********************************/
40
41namespace zigpc_datastore
42{
43namespace util
44{
53{
54 NetworkAccessor network;
56}
57
67{
69 NetworkAccessor network;
70 DeviceAccessor device;
71
73 return device.find(nwk_node, eui64);
74}
75
87 zigbee_endpoint_id_t endpoint_id)
88{
91 NetworkAccessor network;
92 DeviceAccessor device;
93 EndpointAccessor endpoint;
94
96 dev_node = device.find(nwk_node, eui64);
97 return endpoint.find(dev_node, endpoint_id);
98}
99
109 ClusterAccessor &cluster,
110 zcl_cluster_side_t cluster_side,
111 zcl_cluster_id_t cluster_id);
112
122 EndpointAccessor &endpoint,
123 zigbee_endpoint_id_t endpoint_id,
124 zcl_cluster_side_t cluster_side);
125
134 DeviceAccessor &device,
135 zigbee_eui64_uint_t device_id);
136
137} // namespace util
138} // namespace zigpc_datastore
139
142#endif //ZIGPC_DATASTORE_UTIL_HPP
Definition: zigpc_datastore_accessor.hpp:662
Definition: zigpc_datastore_accessor.hpp:578
Definition: zigpc_datastore_accessor.hpp:596
Definition: zigpc_datastore_accessor.hpp:561
attribute_store_node_t find(attribute_store_node_t parent, search_key_t key)
Find an entity based based on the key.
Definition: zigpc_datastore_accessor.hpp:83
attribute_store_node_t attribute_store_get_root()
Retrieve the root node of the tree.
datastore_attribute_id_t attribute_store_node_t
Handle to identify attribute store nodes.
Definition: attribute_store.h:101
enum e_zcl_cluster_side zcl_cluster_side_t
An enum representing the role of the cluster on the network.
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
#define PRIMARY_NETWORK_NUM
Definition: zigpc_datastore_id.h:30
static const uint8_t PRIMARY_NETWORK_ENTRY
Default network index to use.
Definition: zigpc_datastore_util.hpp:31
void log_clusters_under_ep(attribute_store_node_t ep_parent, EndpointAccessor &endpoint, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side)
Helper to log clusters under an enedpoint.
attribute_store_node_t get_cluster_parent(zigbee_eui64_uint_t eui64, zigbee_endpoint_id_t endpoint_id)
Retrieve the attribute store node ID of the cluster parent (the endpoint entity)
Definition: zigpc_datastore_util.hpp:86
void log_endpoints_under_dev(attribute_store_node_t dev_parent, DeviceAccessor &device, zigbee_eui64_uint_t device_id)
Helper to log clusters under an enedpoint.
attribute_store_node_t get_device_parent(void)
Retrieve the attribute store node ID of the device parent, the network entity.
Definition: zigpc_datastore_util.hpp:52
void log_attributes_under_cluster(attribute_store_node_t cluster_parent, ClusterAccessor &cluster, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id)
Helper to log attributes under a cluster.
attribute_store_node_t get_endpoint_parent(zigbee_eui64_uint_t eui64)
Retrieve the attribute store node ID of the endpoint parent (the device entity)
Definition: zigpc_datastore_util.hpp:66
Definition: zigpc_datastore.hpp:38