Zigbee Protocol Controller 1.6.0
ZigPC Data Storage API

API for the creating, updating, and deleting persistent information. More...

Modules

 ZigPC datastore accessor templates.
 Templates and datastore accessor classes.
 
 ZigPC datastore node identifiers.
 Datastore related identifiers.
 
 ZigPC datastore utility functions.
 Datastore related utility functions.
 

Classes

struct  __attribute__
 Network information. More...
 

Functions

sl_status_t zigpc_datastore_create_network (void)
 Create network entity to be persisted. The read/write APIs can be used to manipulate the data associated with the network. More...
 
sl_status_t zigpc_datastore_read_network (zigpc_network_data_t *const data)
 Read data from persisted network entity. More...
 
sl_status_t zigpc_datastore_write_network (const zigpc_network_data_t *data)
 Write data to persisted network entity. More...
 
sl_status_t zigpc_datastore_remove_network (void)
 Remove persisted network entity. More...
 
size_t zigpc_datastore_get_device_count (void)
 Get count of devices persisted under the network. More...
 
sl_status_t zigpc_datastore_find_device_by_index (size_t index, zigbee_eui64_t *const eui64)
 Find a particular device entity and retrieve its search key (EUI64) based on an index. See zigpc_datastore_get_device_count on getting the total number of devices persisted. More...
 
sl_status_t zigpc_datastore_create_device (const zigbee_eui64_t eui64)
 Create device entity to be persisted under the network. The read/write APIs can be used to manipulate the data associated with this device entity. More...
 
sl_status_t zigpc_datastore_read_device (const zigbee_eui64_t eui64, zigpc_device_data_t *const data)
 Read data from a persisted device entity. More...
 
bool zigpc_datastore_is_device_contained (zigbee_eui64_uint_t device_eui64)
 Check is the datastore contains a device entity. More...
 
sl_status_t zigpc_datastore_write_device (const zigbee_eui64_t eui64, const zigpc_device_data_t *data)
 Write data to a persisted device entity. More...
 
sl_status_t zigpc_datastore_remove_device (const zigbee_eui64_t eui64)
 Remove persisted device entity. More...
 
sl_status_t zigpc_datastore_remove_device_children (const zigbee_eui64_t eui64)
 Remove persisted children under device entity. More...
 
size_t zigpc_datastore_get_endpoint_count (const zigbee_eui64_t eui64)
 Get count of endpoints persisted under a device. More...
 
sl_status_t zigpc_datastore_find_endpoint_by_index (const zigbee_eui64_t eui64, size_t index, zigbee_endpoint_id_t *endpoint_id)
 Find a particular endpoint entity persisted under a device and retrieve its search key (endpoint_id) based on an index. See zigpc_datastore_get_endpoint_count on getting the total number of endpoints persisted under a device. More...
 
sl_status_t zigpc_datastore_create_endpoint (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id)
 Create endpoint entity to be persisted under a device. The read/write APIs can be used to manipulate the data associated with this endpoint entity. More...
 
sl_status_t zigpc_datastore_read_endpoint (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zigpc_endpoint_data_t *const data)
 Read data from a persisted endpoint entity. More...
 
sl_status_t zigpc_datastore_write_endpoint (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, const zigpc_endpoint_data_t *data)
 Write data to a persisted device entity. More...
 
sl_status_t zigpc_datastore_remove_endpoint (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id)
 Remove persisted endpoint entity. More...
 
size_t zigpc_datastore_get_group_count (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported)
 Get count of groups persisted under an endpoint. More...
 
sl_status_t zigpc_datastore_find_group_by_index (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, size_t index, zigbee_group_id_t *group_id)
 Find a particular group entity persisted under a device endpoint and retrieve its search key (group_id) based on an index. See zigpc_datastore_get_group_count on getting the total number of groupss persisted under a device endpoint. More...
 
bool zigpc_datastore_contains_group (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, zigbee_group_id_t group_id)
 Determine if a particular group ID is supported under a device endpoint. More...
 
sl_status_t zigpc_datastore_create_group (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, zigbee_group_id_t group_id)
 Create group entity to be persisted under a device endpoint. The read/write APIs can be used to manipulate the data associated with this group entity. More...
 
sl_status_t zigpc_datastore_read_group (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, zigbee_group_id_t group_id, zigpc_group_data_t *const data)
 Read data from a persisted group entity. More...
 
sl_status_t zigpc_datastore_write_group (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, zigbee_group_id_t group_id, const zigpc_group_data_t *data)
 Write data to a persisted group entity. More...
 
sl_status_t zigpc_datastore_remove_group (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, bool is_reported, zigbee_group_id_t group_id)
 Remove persisted group entity. More...
 
size_t zigpc_datastore_get_cluster_count (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side)
 Get count of clusters persisted under a device endpoint. More...
 
sl_status_t zigpc_datastore_find_cluster_by_index (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, size_t index, zcl_cluster_id_t *cluster_id)
 Find a particular cluster entity persisted under a device endpoint and retrieve its search key (cluster_id) based on an index. See zigpc_datastore_get_cluster_count on getting the total number of clusters persisted under a device endpoint. More...
 
bool zigpc_datastore_contains_cluster (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id)
 Determine if a particular cluster ID is supported under a device endpoint. More...
 
sl_status_t zigpc_datastore_create_cluster (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id)
 Create cluster entity to be persisted under a device endpoint. The read/write APIs can be used to manipulate the data associated with this cluster entity. More...
 
sl_status_t zigpc_datastore_read_cluster (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zigpc_cluster_data_t *const data)
 Read data from a persisted cluster entity. More...
 
sl_status_t zigpc_datastore_write_cluster (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, const zigpc_cluster_data_t *data)
 Write data to a persisted cluster entity. More...
 
sl_status_t zigpc_datastore_remove_cluster (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id)
 Remove persisted cluster entity. More...
 
size_t zigpc_datastore_get_attribute_count (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id)
 Get count of attributes persisted under a cluster. More...
 
sl_status_t zigpc_datastore_read_attribute_list (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zcl_attribute_id_t *const attribute_list, size_t *attribute_count)
 Read the attribute list under a given cluster. More...
 
sl_status_t zigpc_datastore_write_attribute_list (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, const zcl_attribute_id_t *attribute_list, size_t attribute_count)
 Write attribute list under a given cluster. This function will overwrite any existing list by removing any pre-existing list. More...
 
size_t zigpc_datastore_get_command_count (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zcl_command_type_t command_type)
 Get count of commands persisted under a cluster based on the command type passed in. More...
 
sl_status_t zigpc_datastore_read_command_list (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zcl_command_type_t command_type, zcl_command_id_t *const command_list, size_t *command_count)
 Read command list under a given cluster based on the command type passed in. More...
 
sl_status_t zigpc_datastore_write_command_list (const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zcl_command_type_t command_type, const zcl_command_id_t *command_list, size_t command_count)
 Write command list under a given cluster based on the command type passed in. This function will overwrite any existing list by removing any pre-existing list. More...
 
sl_status_t zigpc_datastore_find_endpoint_containing_cluster (const zigbee_eui64_t eui64, zcl_cluster_side_t cluster_side, zcl_cluster_id_t cluster_id, zigbee_endpoint_id_t *const endpoint_id)
 Find the endpoint identifier under a device containing a particular cluster identifier. More...
 
void zigpc_datastore_log_device_disc_state (const zigbee_eui64_t eui64)
 Log the stored discovery information under a device which includes: endpoints, clusters, attributes, and command support information. More...
 
sl_status_t zigpc_datastore_log_network (const char *log_tag, sl_log_level_t log_level, const char *log_prefix)
 Log the network information. More...
 
sl_status_t zigpc_datastore_log_device (const char *log_tag, sl_log_level_t log_level, const char *log_prefix, const zigbee_eui64_t eui64)
 Log single device entity. More...
 
void zigpc_datastore_log_clusters (const zigbee_eui64_t eui64, const zigbee_endpoint_id_t endpoint_id)
 Log clusters on an EUI64, endpoint. Logs both server and client clusters. More...
 

Detailed Description

API for the creating, updating, and deleting persistent information.

The ZigPC datastore component allows components to persist discovery information using the tree-based storage API provided by the shared Unify attribute store component. The desired fields in the attribute store are used as a container to store the search keys for network, device, endpoint, and cluster entity searching. The following APIs are available for each of these entities: create, read, write, remove, get_count, and find_by_index.

In order to perist an entity, it should first be created before any data can be read/written from it.

The get_count and find_by_index operations can be used to iterate through sub-entities (i.e. iterating through endpoints in a device).

The following diagram shows the relationship between each of these entities:

Function Documentation

◆ zigpc_datastore_contains_cluster()

bool zigpc_datastore_contains_cluster ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id 
)

Determine if a particular cluster ID is supported under a device endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier to find.
Returns
bool TRUE if the cluster identifier exists under the device endpoint, FALSE if not.

◆ zigpc_datastore_contains_group()

bool zigpc_datastore_contains_group ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
zigbee_group_id_t  group_id 
)

Determine if a particular group ID is supported under a device endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
group_idReference to group identifier search key to populate.
Returns
bool TRUE if the group identifier exists under the device endpoint, FALSE if not.

◆ zigpc_datastore_create_cluster()

sl_status_t zigpc_datastore_create_cluster ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id 
)

Create cluster entity to be persisted under a device endpoint. The read/write APIs can be used to manipulate the data associated with this cluster entity.

Parameters
eui64Device identifier to persist under.
endpoint_idEndpoint identifier to persist under.
cluster_idCluster identifier.
cluster_sideCluster side (server/client).
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_ALREADY_EXISTS if the cluster node already exists, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized or SL_STATUS_FAIL if the creation process fails.

◆ zigpc_datastore_create_device()

sl_status_t zigpc_datastore_create_device ( const zigbee_eui64_t  eui64)

Create device entity to be persisted under the network. The read/write APIs can be used to manipulate the data associated with this device entity.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_ALREADY_EXISTS if the device node already exists, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized or SL_STATUS_FAIL if the creation process fails.

◆ zigpc_datastore_create_endpoint()

sl_status_t zigpc_datastore_create_endpoint ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id 
)

Create endpoint entity to be persisted under a device. The read/write APIs can be used to manipulate the data associated with this endpoint entity.

Parameters
eui64Device identifier to persist under.
endpoint_idEndpoint identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_ALREADY_EXISTS if the device node already exists, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized or SL_STATUS_FAIL if the creation process fails.

◆ zigpc_datastore_create_group()

sl_status_t zigpc_datastore_create_group ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
zigbee_group_id_t  group_id 
)

Create group entity to be persisted under a device endpoint. The read/write APIs can be used to manipulate the data associated with this group entity.

Parameters
eui64Device identifier to persist under.
endpoint_idEndpoint identifier to persist under.
is_reportedLook in stored reported/desired state.
group_idReference to group identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_ALREADY_EXISTS if the group node already exists, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized or SL_STATUS_FAIL if the creation process fails.

◆ zigpc_datastore_create_network()

sl_status_t zigpc_datastore_create_network ( void  )

Create network entity to be persisted. The read/write APIs can be used to manipulate the data associated with the network.

Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_ALREADY_EXISTS if the network node already exists, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized or SL_STATUS_FAIL if the creation process fails.

◆ zigpc_datastore_find_cluster_by_index()

sl_status_t zigpc_datastore_find_cluster_by_index ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
size_t  index,
zcl_cluster_id_t cluster_id 
)

Find a particular cluster entity persisted under a device endpoint and retrieve its search key (cluster_id) based on an index. See zigpc_datastore_get_cluster_count on getting the total number of clusters persisted under a device endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
indexIndex to retrieve.
cluster_idReference to cluster identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK if the endpoint is found, SL_STATUS_NOT_FOUND if the cluster node is not found, SL_STATUS_NULL_POINTER if the provided EUI64 or endpoint_id is invalid, or SL_STATUS_FAIL if the find process fails.

◆ zigpc_datastore_find_device_by_index()

sl_status_t zigpc_datastore_find_device_by_index ( size_t  index,
zigbee_eui64_t *const  eui64 
)

Find a particular device entity and retrieve its search key (EUI64) based on an index. See zigpc_datastore_get_device_count on getting the total number of devices persisted.

Parameters
indexIndex to retrieve.
eui64Reference to device identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK if the device under the index is found, SL_STATUS_NOT_FOUND if the device is not found, SL_STATUS_NULL_POINTER if the provided EUI64 is invalid, or SL_STATUS_FAIL if the find process fails.

◆ zigpc_datastore_find_endpoint_by_index()

sl_status_t zigpc_datastore_find_endpoint_by_index ( const zigbee_eui64_t  eui64,
size_t  index,
zigbee_endpoint_id_t endpoint_id 
)

Find a particular endpoint entity persisted under a device and retrieve its search key (endpoint_id) based on an index. See zigpc_datastore_get_endpoint_count on getting the total number of endpoints persisted under a device.

Parameters
eui64Device identifier.
indexIndex to retrieve.
endpoint_idReference to endpoint identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK if the endpoint is found, SL_STATUS_NOT_FOUND if the endpoint is not found, SL_STATUS_NULL_POINTER if the provided EUI64 or endpoint_id is invalid, or SL_STATUS_FAIL if the find process fails.

◆ zigpc_datastore_find_endpoint_containing_cluster()

sl_status_t zigpc_datastore_find_endpoint_containing_cluster ( const zigbee_eui64_t  eui64,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zigbee_endpoint_id_t *const  endpoint_id 
)

Find the endpoint identifier under a device containing a particular cluster identifier.

Parameters
eui64Device identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
endpoint_idReference to endpoint identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK if the endpoint is found and populated, SL_STATUS_NOT_FOUND if the endpoint is not found under the device, SL_STATUS_NULL_POINTER if the provided EUI64 or endpoint_id is invalid, or SL_STATUS_FAIL if the find process fails.

◆ zigpc_datastore_find_group_by_index()

sl_status_t zigpc_datastore_find_group_by_index ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
size_t  index,
zigbee_group_id_t group_id 
)

Find a particular group entity persisted under a device endpoint and retrieve its search key (group_id) based on an index. See zigpc_datastore_get_group_count on getting the total number of groupss persisted under a device endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
indexIndex to retrieve.
Returns
sl_status_t SL_STATUS_OK if the endpoint is found, SL_STATUS_NOT_FOUND if the group node is not found, SL_STATUS_NULL_POINTER if the provided EUI64 or endpoint_id is invalid, or SL_STATUS_FAIL if the find process fails.

◆ zigpc_datastore_get_attribute_count()

size_t zigpc_datastore_get_attribute_count ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id 
)

Get count of attributes persisted under a cluster.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
Returns
size_t Number of attributes persisted.

◆ zigpc_datastore_get_cluster_count()

size_t zigpc_datastore_get_cluster_count ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side 
)

Get count of clusters persisted under a device endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
Returns
size_t Number of endpoints persisted.

◆ zigpc_datastore_get_command_count()

size_t zigpc_datastore_get_command_count ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zcl_command_type_t  command_type 
)

Get count of commands persisted under a cluster based on the command type passed in.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
command_typeType of commands under the cluster (out/in).
Returns
size_t Number of commands persisted.

◆ zigpc_datastore_get_device_count()

size_t zigpc_datastore_get_device_count ( void  )

Get count of devices persisted under the network.

Returns
size_t Number of devices persisted.

◆ zigpc_datastore_get_endpoint_count()

size_t zigpc_datastore_get_endpoint_count ( const zigbee_eui64_t  eui64)

Get count of endpoints persisted under a device.

Parameters
eui64Device identifier.
Returns
size_t Number of endpoints persisted.

◆ zigpc_datastore_get_group_count()

size_t zigpc_datastore_get_group_count ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported 
)

Get count of groups persisted under an endpoint.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
Returns
size_t Number of groups persisted.

◆ zigpc_datastore_is_device_contained()

bool zigpc_datastore_is_device_contained ( zigbee_eui64_uint_t  device_eui64)

Check is the datastore contains a device entity.

Parameters
device_eui64
Returns
True if the device is found, false otherwise

◆ zigpc_datastore_log_clusters()

void zigpc_datastore_log_clusters ( const zigbee_eui64_t  eui64,
const zigbee_endpoint_id_t  endpoint_id 
)

Log clusters on an EUI64, endpoint. Logs both server and client clusters.

Parameters
eui64Address whose clusters should be logged
endpoint_idEndpoint whose clusters should be logged

◆ zigpc_datastore_log_device()

sl_status_t zigpc_datastore_log_device ( const char *  log_tag,
sl_log_level_t  log_level,
const char *  log_prefix,
const zigbee_eui64_t  eui64 
)

Log single device entity.

Parameters
log_tagTag to log the message under.
log_levelLevel to log the message under.
log_prefixString to prefix log message.
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK if the device is successfully logged, SL_STATUS_NULL_POINTER if the log_tag provided is invalid, or SL_STATUS_NOT_FOUND if the device entity is not found.

◆ zigpc_datastore_log_device_disc_state()

void zigpc_datastore_log_device_disc_state ( const zigbee_eui64_t  eui64)

Log the stored discovery information under a device which includes: endpoints, clusters, attributes, and command support information.

Parameters
eui64Device identifier.

◆ zigpc_datastore_log_network()

sl_status_t zigpc_datastore_log_network ( const char *  log_tag,
sl_log_level_t  log_level,
const char *  log_prefix 
)

Log the network information.

Parameters
log_tagTag to log the message under.
log_levelLevel to log the message under.
log_prefixString to prefix log message.
Returns
sl_status_t SL_STATUS_OK if the network is successfully logged, SL_STATUS_NULL_POINTER if the log_tag provided is invalid, or SL_STATUS_NOT_FOUND if the network entity is not found.

◆ zigpc_datastore_read_attribute_list()

sl_status_t zigpc_datastore_read_attribute_list ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zcl_attribute_id_t *const  attribute_list,
size_t *  attribute_count 
)

Read the attribute list under a given cluster.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
attribute_listAttribute list to populate.
attribute_countReference to attribute list count; IN: Provides the capacity of list passed in; OUT: updates with number of items populated into the list.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid list provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_INVALID_COUNT if the attribute list passed in has insufficient capacity, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_cluster()

sl_status_t zigpc_datastore_read_cluster ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zigpc_cluster_data_t *const  data 
)

Read data from a persisted cluster entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_idCluster identifier.
cluster_sideCluster side (server/client).
dataCluster data to be read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_command_list()

sl_status_t zigpc_datastore_read_command_list ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zcl_command_type_t  command_type,
zcl_command_id_t *const  command_list,
size_t *  command_count 
)

Read command list under a given cluster based on the command type passed in.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
command_typeType of commands under the cluster (out/in).
command_listCommand list to populate.
command_countReference to command list count; IN: Provides the capacity of list passed in; OUT: updates with number of items populated into the list.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid list provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_INVALID_COUNT if the command list passed in has insufficient capacity, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_device()

sl_status_t zigpc_datastore_read_device ( const zigbee_eui64_t  eui64,
zigpc_device_data_t *const  data 
)

Read data from a persisted device entity.

Parameters
eui64Device identifier.
dataDevice information to read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the device node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_endpoint()

sl_status_t zigpc_datastore_read_endpoint ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zigpc_endpoint_data_t *const  data 
)

Read data from a persisted endpoint entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
dataEndpoint data to be read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the endpoint node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_group()

sl_status_t zigpc_datastore_read_group ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
zigbee_group_id_t  group_id,
zigpc_group_data_t *const  data 
)

Read data from a persisted group entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
group_idReference to group identifier search key to populate.
dataGroup data to be read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the group node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_read_network()

sl_status_t zigpc_datastore_read_network ( zigpc_network_data_t *const  data)

Read data from persisted network entity.

Parameters
dataNetwork information to read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the network node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the read process fails.

◆ zigpc_datastore_remove_cluster()

sl_status_t zigpc_datastore_remove_cluster ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id 
)

Remove persisted cluster entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_idCluster identifier.
cluster_sideCluster side (server/client).
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the delete process fails.

◆ zigpc_datastore_remove_device()

sl_status_t zigpc_datastore_remove_device ( const zigbee_eui64_t  eui64)

Remove persisted device entity.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the device node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the delete process fails.

◆ zigpc_datastore_remove_device_children()

sl_status_t zigpc_datastore_remove_device_children ( const zigbee_eui64_t  eui64)

Remove persisted children under device entity.

Parameters
eui64Device identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the device node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the child delete process fails.

◆ zigpc_datastore_remove_endpoint()

sl_status_t zigpc_datastore_remove_endpoint ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id 
)

Remove persisted endpoint entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the endpoint node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the delete process fails.

◆ zigpc_datastore_remove_group()

sl_status_t zigpc_datastore_remove_group ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
zigbee_group_id_t  group_id 
)

Remove persisted group entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
group_idReference to group identifier search key to populate.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the group node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the delete process fails.

◆ zigpc_datastore_remove_network()

sl_status_t zigpc_datastore_remove_network ( void  )

Remove persisted network entity.

Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NOT_FOUND if the network node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the delete process fails.

◆ zigpc_datastore_write_attribute_list()

sl_status_t zigpc_datastore_write_attribute_list ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
const zcl_attribute_id_t attribute_list,
size_t  attribute_count 
)

Write attribute list under a given cluster. This function will overwrite any existing list by removing any pre-existing list.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
attribute_listAttribute list to persist.
attribute_countNumber of list items to persist.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid list provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_cluster()

sl_status_t zigpc_datastore_write_cluster ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
const zigpc_cluster_data_t *  data 
)

Write data to a persisted cluster entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_idCluster identifier.
cluster_sideCluster side (server/client).
dataCluster data to be written.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_command_list()

sl_status_t zigpc_datastore_write_command_list ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
zcl_cluster_side_t  cluster_side,
zcl_cluster_id_t  cluster_id,
zcl_command_type_t  command_type,
const zcl_command_id_t command_list,
size_t  command_count 
)

Write command list under a given cluster based on the command type passed in. This function will overwrite any existing list by removing any pre-existing list.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
cluster_sideCluster side (server/client).
cluster_idCluster identifier.
command_typeType of commands under the cluster (out/in).
command_listCommand list to persist.
command_countNumber of list items to persist.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid list provided, SL_STATUS_NOT_FOUND if the cluster node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_device()

sl_status_t zigpc_datastore_write_device ( const zigbee_eui64_t  eui64,
const zigpc_device_data_t *  data 
)

Write data to a persisted device entity.

Parameters
eui64Device identifier.
dataDevice information to write.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the device node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_endpoint()

sl_status_t zigpc_datastore_write_endpoint ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
const zigpc_endpoint_data_t *  data 
)

Write data to a persisted device entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
dataEndpoint data to be written.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the endpoint node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_group()

sl_status_t zigpc_datastore_write_group ( const zigbee_eui64_t  eui64,
zigbee_endpoint_id_t  endpoint_id,
bool  is_reported,
zigbee_group_id_t  group_id,
const zigpc_group_data_t *  data 
)

Write data to a persisted group entity.

Parameters
eui64Device identifier.
endpoint_idEndpoint identifier.
is_reportedLook in stored reported/desired state.
group_idReference to group identifier search key to populate.
dataGroup data to be read.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the group node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.

◆ zigpc_datastore_write_network()

sl_status_t zigpc_datastore_write_network ( const zigpc_network_data_t *  data)

Write data to persisted network entity.

Parameters
dataNetwork information to write.
Returns
sl_status_t SL_STATUS_OK on success, SL_STATUS_NULL_POINTER if invalid data object provided, SL_STATUS_NOT_FOUND if the network node does not exist, SL_STATUS_NOT_INITIALIZED if attribute store is not initialized, or SL_STATUS_FAIL if the write process fails.