Zigbee Protocol Controller 1.6.0
attribute_store_node.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
14#ifndef ATTRIBUTE_STORE_NODE_H
15#define ATTRIBUTE_STORE_NODE_H
16
17// Includes from this component
18#include "attribute_store.h"
19
20// Generic includes
21#include <vector>
22
31#ifdef __cplusplus
32extern "C" {
33#endif
34
40{
41 public:
48 // An attribute value can be anything. From a simple boolean/byte
49 // to byte array or string.
50 // We have strings in configuration CC or
51 // byte arrays in Association or Indicator CCs
53 std::vector<uint8_t> desired_value;
55 std::vector<uint8_t> reported_value;
59 std::vector<attribute_store_node *> child_nodes;
62
83
97
111
115 void log();
122 void log(uint8_t indent);
128 void log_children(uint8_t indent);
129
130 private:
135};
136
137#ifdef __cplusplus
138}
139#endif
140
143#endif // ATTRIBUTE_STORE_NODE_H
A node in the attribute store tree.
Definition: attribute_store_node.h:40
attribute_store_node(attribute_store_node *_parent_node, attribute_store_type_t _type, attribute_store_node_t _id)
Node class constructor.
std::vector< uint8_t > desired_value
Desired value for the node attribute.
Definition: attribute_store_node.h:53
void remove_child_link(attribute_store_node *_child_node)
Removes a child from the list of children for the current node.
attribute_store_type_t type
Definition: attribute_store_node.h:44
void log()
Logs the content of the a Node using Unify Logging system.
void log(uint8_t indent)
Logs the content of the a Node using Unify Logging system, indicating an indent to use for the curren...
std::vector< attribute_store_node * > child_nodes
Pointers to child nodes. There will be 0 to N child nodes.
Definition: attribute_store_node.h:59
attribute_store_node * find_id(attribute_store_node_t _id)
Finds if this node or one of its children have a given public interface ID.
std::vector< uint8_t > reported_value
Reported value for the node attribute.
Definition: attribute_store_node.h:55
attribute_store_node * parent_node
Pointer to the parent node in the tree.
Definition: attribute_store_node.h:57
attribute_store_node * add_child(attribute_store_type_t _type, attribute_store_node_t _id)
Add a child for the current node.
bool undergoing_deletion
Node is being deleted.
Definition: attribute_store_node.h:61
attribute_store_node_t id
Definition: attribute_store_node.h:47
~attribute_store_node()
Node class destructor.
void log_children(uint8_t indent)
Logs the content of the a Node and all its children using Unify Logging system.