Zigbee Protocol Controller 1.6.0
attribute_store_internal.h File Reference
#include "attribute_store.h"

Go to the source code of this file.

Macros

#define ATTRIBUTE_STORE_NULL_ID   (attribute_store_node_t)0
 NULL database ID, used to represent a non-existing node (i.e root's node parent) More...
 
#define ATTRIBUTE_STORE_ROOT_ID   (attribute_store_node_t)1
 Root node database ID. We always set that to the same value. More...
 
#define STORE_ATTRIBUTE(node)
 Saves a node that's in-memory in the datastore. More...
 
#define STORE_ROOT_ATTRIBUTE(root_node)
 Saves the root node in the datastore. More...
 

Functions

sl_status_t attribute_store_save_to_datastore ()
 Saves the entire attribute store to the datastore. More...
 
sl_status_t attribute_store_load_from_datastore ()
 Loads the entire attribute store from the datastore. More...
 

Macro Definition Documentation

◆ ATTRIBUTE_STORE_NULL_ID

#define ATTRIBUTE_STORE_NULL_ID   (attribute_store_node_t)0

NULL database ID, used to represent a non-existing node (i.e root's node parent)

◆ ATTRIBUTE_STORE_ROOT_ID

#define ATTRIBUTE_STORE_ROOT_ID   (attribute_store_node_t)1

Root node database ID. We always set that to the same value.

◆ STORE_ATTRIBUTE

#define STORE_ATTRIBUTE (   node)
Value:
node->type, \
node->parent_node->id, \
&node->reported_value[0], \
node->reported_value.size(), \
&node->desired_value[0], \
node->desired_value.size())
sl_status_t datastore_store_attribute(datastore_attribute_id_t id, uint32_t type, datastore_attribute_id_t parent_id, const uint8_t *reported_value, uint8_t reported_value_size, const uint8_t *desired_value, uint8_t desired_value_size)
Store an attribute in the persistent datastore.
Definition: datastore_attributes.c:228

Saves a node that's in-memory in the datastore.

◆ STORE_ROOT_ATTRIBUTE

#define STORE_ROOT_ATTRIBUTE (   root_node)
Value:
datastore_store_attribute(root_node->id, \
root_node->type, \
&root_node->reported_value[0], \
root_node->reported_value.size(), \
&root_node->desired_value[0], \
root_node->desired_value.size())
#define ATTRIBUTE_STORE_NULL_ID
NULL database ID, used to represent a non-existing node (i.e root's node parent)
Definition: attribute_store_internal.h:22

Saves the root node in the datastore.

Function Documentation

◆ attribute_store_load_from_datastore()

sl_status_t attribute_store_load_from_datastore ( )

Loads the entire attribute store from the datastore.

Returns
SL_STATUS_OK on success, other codes in case of error

◆ attribute_store_save_to_datastore()

sl_status_t attribute_store_save_to_datastore ( )

Saves the entire attribute store to the datastore.

Returns
SL_STATUS_OK on success, other codes in case of error