Zigbee Protocol Controller 1.6.0
StoreListAccessor< list_entry_t > Class Template Referenceabstract

#include <zigpc_datastore_accessor.hpp>

Public Member Functions

 StoreListAccessor (attribute_store_type_t node_type, std::string label)
 
virtual ~StoreListAccessor ()=default
 
sl_status_t read_list (attribute_store_node_t list_parent, list_entry_t *const list, size_t list_capacity)
 Read the list of entries. More...
 
sl_status_t create_list (attribute_store_node_t list_parent, const list_entry_t *list, size_t list_count)
 Create the list into the store if it doesn't exist already. More...
 
sl_status_t remove_list (attribute_store_node_t list_parent)
 Remove a list under the node ID passed in. More...
 
virtual std::string to_str (attribute_store_node_t parent, size_t list_count)=0
 

Private Attributes

StoreAccessor< list_entry_t, uint8_t > list_entry
 

Constructor & Destructor Documentation

◆ StoreListAccessor()

template<typename list_entry_t >
StoreListAccessor< list_entry_t >::StoreListAccessor ( attribute_store_type_t  node_type,
std::string  label 
)
inlineexplicit

◆ ~StoreListAccessor()

template<typename list_entry_t >
virtual StoreListAccessor< list_entry_t >::~StoreListAccessor ( )
virtualdefault

Member Function Documentation

◆ create_list()

template<typename list_entry_t >
sl_status_t StoreListAccessor< list_entry_t >::create_list ( attribute_store_node_t  list_parent,
const list_entry_t *  list,
size_t  list_count 
)
inline

Create the list into the store if it doesn't exist already.

NOTE: if this function returns SL_STATUS_ALREADY_EXISTS, ensure that the parent entity has it's children of this entity type removed.

Parameters
parentParent node to read entries under.
listReference to list to write.
list_countNumber of items in the list.
Returns
sl_status_t SL_STATUS_OK if the list entries are added successfully, SL_STATUS_NOT_FOUND if the parent is not found, or SL_STATUS_ALREADY_EXISTS if an array already exists, or SL_STATUS_NULL_POINTER if invalid list reference is passed, or SL_STATUS_FAIL if the create process failed.

◆ read_list()

template<typename list_entry_t >
sl_status_t StoreListAccessor< list_entry_t >::read_list ( attribute_store_node_t  list_parent,
list_entry_t *const  list,
size_t  list_capacity 
)
inline

Read the list of entries.

Parameters
parentParent node to read entries under.
listReference to list to write.
list_capacityNumber of items in the list.
Returns
sl_status_t SL_STATUS_OK if the list entries are read successfully, SL_STATUS_NOT_FOUND if the parent is not found, or SL_STATUS_NULL_POINTER if invalid list reference is passed, or SL_STATUS_FAIL if the read process failed.

◆ remove_list()

template<typename list_entry_t >
sl_status_t StoreListAccessor< list_entry_t >::remove_list ( attribute_store_node_t  list_parent)
inline

Remove a list under the node ID passed in.

Parameters
parentParent Node ID that has the list.
Returns
sl_status_t

◆ to_str()

template<typename list_entry_t >
virtual std::string StoreListAccessor< list_entry_t >::to_str ( attribute_store_node_t  parent,
size_t  list_count 
)
pure virtual

Member Data Documentation

◆ list_entry

template<typename list_entry_t >
StoreAccessor<list_entry_t, uint8_t> StoreListAccessor< list_entry_t >::list_entry
private

The documentation for this class was generated from the following file: