Z-Wave Protocol Controller Reference
zpc_attribute_store.c File Reference
#include "zpc_attribute_store.h"
#include "zpc_attribute_store_network_helper.h"
#include "unify_dotdot_attribute_store_node_state.h"
#include "attribute_store_defined_attribute_types.h"
#include "zpc_attribute_store_type_registration.h"
#include "zpc_attribute_store_register_default_attribute_type_data.h"
#include "unify_dotdot_defined_attribute_types.h"
#include <string.h>
#include "zwave_network_management.h"
#include "attribute_store_helper.h"
#include "attribute_store_configuration.h"
#include "unify_dotdot_attribute_store.h"
#include "dotdot_mqtt.h"
#include "sl_log.h"
Include dependency graph for zpc_attribute_store.c:

Macros

#define LOG_TAG   "zpc_attribute_store"
 

Functions

static void zpc_attribute_store_update_all_network_statuses (attribute_store_node_t home_id_node, NodeStateNetworkStatus old_value, NodeStateNetworkStatus new_value)
 Finds all NodeIDs network statuses with one value and change them to a new one. More...
 
bool is_zpc_unid (const unid_t unid)
 Verify if a UNID is the ZPC's UNID. More...
 
attribute_store_node_t get_zpc_network_node ()
 Returns the HomeID (attribute store) node of our current network. More...
 
attribute_store_node_t get_zpc_node_id_node ()
 Returns the NodeID (attribute store) node of our current network / NodeID. More...
 
attribute_store_node_t get_zpc_endpoint_id_node (zwave_endpoint_id_t endpoint_id)
 Returns the Endpoint ID (attribute store) node of our current network / NodeID for a specified Endpoint ID. More...
 
static sl_status_t invoke_update_callbacks_in_network ()
 
void disable_unsupported_ucl_commands ()
 
sl_status_t zpc_attribute_store_init ()
 Initialize attribute store specifically for ZPC. More...
 

Variables

const unify_dotdot_attribute_store_configuration_t zpc_configuration
 

Macro Definition Documentation

◆ LOG_TAG

#define LOG_TAG   "zpc_attribute_store"

Function Documentation

◆ disable_unsupported_ucl_commands()

void disable_unsupported_ucl_commands ( )
Here is the caller graph for this function:

◆ invoke_update_callbacks_in_network()

static sl_status_t invoke_update_callbacks_in_network ( )
static
Here is the call graph for this function:
Here is the caller graph for this function:

◆ zpc_attribute_store_update_all_network_statuses()

static void zpc_attribute_store_update_all_network_statuses ( attribute_store_node_t  home_id_node,
NodeStateNetworkStatus  old_value,
NodeStateNetworkStatus  new_value 
)
static

Finds all NodeIDs network statuses with one value and change them to a new one.

Network status nodes will be updated only if they currently have the "old_value" reported value.

Parameters
home_id_nodeThe attribute Store node for the HomeID.
old_valueNetwork status previous value
new_valueNetwork status new value
Here is the caller graph for this function:

Variable Documentation

◆ zpc_configuration

const unify_dotdot_attribute_store_configuration_t zpc_configuration
Initial value:
= {
.get_endpoint_node_function
.get_unid_endpoint_function
.update_attribute_desired_values_on_commands = true,
.clear_reported_on_desired_updates = false,
.automatic_deduction_of_supported_commands = true,
.force_read_attributes_enabled = true,
.write_attributes_enabled = true,
.publish_desired_attribute_values_to_mqtt = true,
.publish_reported_attribute_values_to_mqtt = true,
.node_type = ATTRIBUTE_NODE_ID,
.endpoint_type = ATTRIBUTE_ENDPOINT_ID,
}
sl_status_t attribute_store_network_helper_get_unid_from_node(attribute_store_node_t node, unid_t unid)
Traverse up the tree from a node and finds under which UNID it is.
Definition: zpc_attribute_store_network_helper.c:280
attribute_store_node_t attribute_store_network_helper_get_endpoint_node(const unid_t node_unid, zwave_endpoint_id_t endpoint_id)
Take a UNID/endpoint combination and returns its attribute store node.
Definition: zpc_attribute_store_network_helper.c:199
sl_status_t attribute_store_network_helper_get_unid_endpoint_from_node(attribute_store_node_t node, unid_t unid, zwave_endpoint_id_t *endpoint_id)
Traverse the tree up from a node and find under which UNID/endpoints it is.
Definition: zpc_attribute_store_network_helper.c:229