123#ifndef ZIGPC_DATASTORE_H
124#define ZIGPC_DATASTORE_H
284 zigpc_device_data_t *
const data);
306 const zigpc_device_data_t *
data);
388 zigpc_endpoint_data_t *
const data);
403 const zigpc_endpoint_data_t *
data);
514 zigpc_group_data_t *
const data);
534 const zigpc_group_data_t *
data);
645 zigpc_cluster_data_t *
const data);
664 const zigpc_cluster_data_t *
data);
727 size_t *attribute_count);
750 size_t attribute_count);
803 size_t *command_count);
829 size_t command_count);
886 const char *log_prefix);
901 const char *log_prefix,
#define data
Definition: ctimer.c:49
__attribute__((unused)) static const char *event_names[]
enum sl_log_level sl_log_level_t
Log levels.
uint32_t sl_status_t
Definition: sl_status.h:139
uint16_t zcl_attribute_id_t
A representation of the endpoint cluster attribute ID used in ZCL.
Definition: zigpc_common_zigbee.h:260
zigbee_node_network_status
The possible states that a Zigbee node can be in.
Definition: zigpc_common_zigbee.h:394
uint16_t zigbee_panid_t
Zigbee Network PAN ID.
Definition: zigpc_common_zigbee.h:212
uint8_t zigbee_eui64_t[ZIGBEE_EUI64_SIZE]
Zigbee Device EUI64 ID.
Definition: zigpc_common_zigbee.h:193
enum e_zcl_cluster_side zcl_cluster_side_t
An enum representing the role of the cluster on the network.
uint8_t zigbee_radio_channel_t
Zigbee Network Radio Channel.
Definition: zigpc_common_zigbee.h:224
uint16_t zcl_cluster_id_t
A representation of the endpoint cluster id used in ZCL.
Definition: zigpc_common_zigbee.h:254
zcl_command_type_t
Definition: zigpc_common_zigbee.h:267
uint64_t zigbee_eui64_uint_t
Zigbee Device Identifier (stored as integer)
Definition: zigpc_common_zigbee.h:199
uint8_t zigbee_ext_panid_t[ZIGBEE_EXTENDED_PAN_ID_SIZE]
Zigbee Network Extended PAN ID.
Definition: zigpc_common_zigbee.h:218
uint16_t zigbee_group_id_t
Zigbee Group Id The internal representation of a group_id.
Definition: zigpc_common_zigbee.h:230
#define ZCL_GROUP_NAME_LENGTH
Expected length of a zigbee group name, as supported in the ZCL specification.
Definition: zigpc_common_zigbee.h:100
uint8_t zigbee_endpoint_id_t
A representation of the endpoint id used on the Zigbee protocol.
Definition: zigpc_common_zigbee.h:248
uint8_t zcl_command_id_t
Definition: zigpc_common_zigbee.h:265
sl_status_t zigpc_datastore_remove_network(void)
Remove persisted network entity.
void zigpc_datastore_log_device_disc_state(const zigbee_eui64_t eui64)
Log the stored discovery information under a device which includes: endpoints, clusters,...
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...
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.
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.
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 over...
bool zigpc_datastore_is_device_contained(zigbee_eui64_uint_t device_eui64)
Check is the datastore contains a device entity.
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.
sl_status_t zigpc_datastore_remove_endpoint(const zigbee_eui64_t eui64, zigbee_endpoint_id_t endpoint_id)
Remove persisted endpoint entity.
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 associa...
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.
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....
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.
size_t zigpc_datastore_get_endpoint_count(const zigbee_eui64_t eui64)
Get count of endpoints persisted under a 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.
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.
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 man...
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.
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_i...
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.
sl_status_t zigpc_datastore_read_network(zigpc_network_data_t *const data)
Read data from persisted network entity.
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.
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) ...
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.
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.
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.
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 ...
size_t zigpc_datastore_get_device_count(void)
Get count of devices persisted under the network.
sl_status_t zigpc_datastore_write_network(const zigpc_network_data_t *data)
Write data to persisted network entity.
sl_status_t zigpc_datastore_remove_device(const zigbee_eui64_t eui64)
Remove persisted device entity.
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.
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.
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 (clust...
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.
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 removin...
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.
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.
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.
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.
sl_status_t zigpc_datastore_remove_device_children(const zigbee_eui64_t eui64)
Remove persisted children under device entity.
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.
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.
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 manip...
uint8_t endpoint_discovered_count
Definition: zigpc_datastore.h:156
zigbee_ext_panid_t ext_panid
Definition: zigpc_datastore.h:144
enum zigbee_node_network_status network_status
Definition: zigpc_datastore.h:153
zigbee_panid_t panid
Definition: zigpc_datastore.h:143
uint8_t endpoint_total_count
Definition: zigpc_datastore.h:155
zigbee_eui64_t gateway_eui64
Definition: zigpc_datastore.h:142
zigbee_radio_channel_t radio_channel
Definition: zigpc_datastore.h:145
uint8_t zcl_version
Definition: zigpc_datastore.h:164
uint8_t dummy
Definition: zigpc_datastore.h:172
uint32_t max_cmd_delay
Definition: zigpc_datastore.h:154