Zigbee Protocol Controller 1.6.0
|
A node in the attribute store tree. More...
#include <attribute_store_node.h>
Public Member Functions | |
attribute_store_node (attribute_store_node *_parent_node, attribute_store_type_t _type, attribute_store_node_t _id) | |
Node class constructor. More... | |
~attribute_store_node () | |
Node class destructor. More... | |
attribute_store_node * | add_child (attribute_store_type_t _type, attribute_store_node_t _id) |
Add a child for the current node. More... | |
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. More... | |
void | log () |
Logs the content of the a Node using Unify Logging system. More... | |
void | log (uint8_t indent) |
Logs the content of the a Node using Unify Logging system, indicating an indent to use for the current element. More... | |
void | log_children (uint8_t indent) |
Logs the content of the a Node and all its children using Unify Logging system. More... | |
Public Attributes | |
attribute_store_type_t | type |
attribute_store_node_t | id |
std::vector< uint8_t > | desired_value |
Desired value for the node attribute. More... | |
std::vector< uint8_t > | reported_value |
Reported value for the node attribute. More... | |
attribute_store_node * | parent_node |
Pointer to the parent node in the tree. More... | |
std::vector< attribute_store_node * > | child_nodes |
Pointers to child nodes. There will be 0 to N child nodes. More... | |
bool | undergoing_deletion |
Node is being deleted. More... | |
Private Member Functions | |
void | remove_child_link (attribute_store_node *_child_node) |
Removes a child from the list of children for the current node. More... | |
A node in the attribute store tree.
attribute_store_node::attribute_store_node | ( | attribute_store_node * | _parent_node, |
attribute_store_type_t | _type, | ||
attribute_store_node_t | _id | ||
) |
Node class constructor.
Create a node object under the parent node indicated by the pointer. The attribute ID is also assigned immediately.
_parent_node | Pointer to the parent node. |
_type | The attribute Type to assign to the new node. |
_id | The unique ID used to identify to assign to the new node in the persistent datastore/ public interface. |
attribute_store_node::~attribute_store_node | ( | ) |
Node class destructor.
Destroy the Node object and all its children.
attribute_store_node * attribute_store_node::add_child | ( | attribute_store_type_t | _type, |
attribute_store_node_t | _id | ||
) |
Add a child for the current node.
This function will instanciance a new child under the current node.
_type | The attribute Type to assign to the new node. |
_id | The unique ID used to identify to assign to the new node. |
attribute_store_node * 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.
This functions returns the pointer to the node found with the given id. If no node has this ID assigned under the tree, it will return NULL.
_id | The unique ID to search for under the node. |
void attribute_store_node::log | ( | ) |
Logs the content of the a Node using Unify Logging system.
void attribute_store_node::log | ( | uint8_t | indent | ) |
Logs the content of the a Node using Unify Logging system, indicating an indent to use for the current element.
indent | Number of spaces to insert before the current entry. |
void attribute_store_node::log_children | ( | uint8_t | indent | ) |
Logs the content of the a Node and all its children using Unify Logging system.
indent | Number of spaces to insert before the children. |
|
private |
Removes a child from the list of children for the current node.
std::vector<attribute_store_node *> attribute_store_node::child_nodes |
Pointers to child nodes. There will be 0 to N child nodes.
std::vector<uint8_t> attribute_store_node::desired_value |
Desired value for the node attribute.
attribute_store_node_t attribute_store_node::id |
Unique ID used by the public interface to identify this instance of a node
attribute_store_node* attribute_store_node::parent_node |
Pointer to the parent node in the tree.
std::vector<uint8_t> attribute_store_node::reported_value |
Reported value for the node attribute.
attribute_store_type_t attribute_store_node::type |
Type used to identify what the attribute represents. (e.g. Binary Switch value, HomeID, Version of a Comamand Class, etc.)
bool attribute_store_node::undergoing_deletion |
Node is being deleted.