7#ifndef NODECONFIGURATION_H_
8#define NODECONFIGURATION_H_
67 const uint8_t * my_authentication_key_p,
68 const uint8_t * my_encryption_key_p)
74 if (lib_settings->getNodeAddress(&node_addr) !=
APP_RES_OK)
77 res = lib_settings->setNodeAddress(my_addr);
84 if (my_authentication_key_p != NULL
85 && lib_settings->getAuthenticationKey(NULL) !=
APP_RES_OK)
88 res = lib_settings->setAuthenticationKey(my_authentication_key_p);
96 if (my_encryption_key_p != NULL
97 && lib_settings->getEncryptionKey(NULL) !=
APP_RES_OK)
100 res = lib_settings->setEncryptionKey(my_encryption_key_p);
110 if (lib_settings->getNetworkAddress(&network_addr) !=
APP_RES_OK)
113 res = lib_settings->setNetworkAddress(my_network_addr);
122 if (lib_settings->getNetworkChannel(&network_ch) !=
APP_RES_OK)
125 res = lib_settings->setNetworkChannel(my_network_ch);
144 if ((address & 0xFF000000) == 0x80000000)
147 address &= 0x7fffffff;
182 res = lib_settings->setNodeAddress(new_addr);
187 res = lib_settings->setNodeRole(new_role);
192 res = lib_settings->setNetworkAddress(new_network_addr);
197 res = lib_settings->setNetworkChannel(new_network_ch);
226#if defined(NETWORK_ADDRESS) & defined(NETWORK_CHANNEL)
__STATIC_INLINE app_res_e configureNode(app_addr_t my_addr, app_lib_settings_net_addr_t my_network_addr, app_lib_settings_net_channel_t my_network_ch, const uint8_t *my_authentication_key_p, const uint8_t *my_encryption_key_p)
Helper function to initially setup a node if not already configured. This configuration can be modifi...
__STATIC_INLINE app_res_e configureNodeFromBuildParameters()
Wrapper on top of configureNode to get parameters from build system and hardcoded values from chip (f...
__STATIC_INLINE app_addr_t getUniqueAddress()
Helper function to generate a unique unicast address.
const uint8_t * authen_key_p
const uint8_t * cipher_key_p
__STATIC_INLINE app_res_e OverrideNodeConfig(app_addr_t new_addr, app_lib_settings_role_t new_role, app_lib_settings_net_addr_t new_network_addr, app_lib_settings_net_channel_t new_network_ch)
Helper function to apply new configuration on a node. Will override old configuration.
@ APP_RES_NOT_IMPLEMENTED
uint32_t app_lib_settings_net_addr_t
Network address type definition.
uint8_t app_lib_settings_role_t
Node role type.
uint8_t app_lib_settings_net_channel_t
Channel type definition.