  | 
        
           Wirepas SDK
           
         | 
        
          
         | 
      
    
  
 
  
  
 
Go to the documentation of this file.
   22 #ifndef APP_LIB_SETTINGS_H_ 
   23 #define APP_LIB_SETTINGS_H_ 
   32 #define APP_LIB_SETTINGS_NAME 0x74ced676   
   35 #define APP_LIB_SETTINGS_VERSION 0x20c 
   44 #define APP_LIB_SETTINGS_AES_KEY_NUM_BYTES 16 
   64 #define CHANNEL_NO_CHANNEL 0 
  110 typedef struct __attribute__((packed))
 
  114         const uint8_t (*encryption_key_p)
 
  116         const uint8_t (*authentication_key_p)
 
  119     } network_key_pair, management_key_pair;
 
  123         uint8_t key_management:1;  
 
  124         uint8_t revoke_keys:1;     
 
  245     const uint8_t * key_p);
 
  410     const uint8_t * key_p);
 
  447     const uint8_t * key_p);
 
  471                                                      uint16_t * ac_max_value_p);
 
  521                                                      uint16_t ac_max_value);
 
  580     uint16_t * min_value_p, uint16_t * max_value_p);
 
  597     uint16_t * min_value_p, uint16_t * max_value_p);
 
  655     uint8_t * channels_p, 
size_t num_bytes);
 
  694     const uint8_t * channels_p, 
size_t num_bytes);
 
  747 #define APP_LIB_SETTINGS_MAX_NODE_UID_SIZE 79 
  
 
app_lib_settings_is_valid_network_address_f isValidNetworkAddress
 
app_res_e(* app_lib_settings_get_reserved_channels_f)(uint8_t *channels_p, size_t num_bytes)
Get reserved channels.
 
app_lib_settings_set_group_query_cb_f registerGroupQuery
 
app_res_e(* app_lib_settings_set_network_channel_f)(app_lib_settings_net_channel_t channel)
Set network channel.
 
app_res_e(* app_lib_settings_set_authentication_key_f)(const uint8_t *key_p)
Set authentication key.
 
uint8_t app_lib_settings_net_channel_t
Channel type definition.
 
@ APP_LIB_SETTINGS_ROLE_SUBNODE_LE
 
app_res_e(* app_lib_settings_set_reserved_channels_f)(const uint8_t *channels_p, size_t num_bytes)
Set reserved channels.
 
@ APP_LIB_SETTINGS_ROLE_ADVERTISER
 
app_lib_settings_get_feature_lock_key_f getFeatureLockKey
 
app_lib_settings_get_authentication_key_f getAuthenticationKey
 
app_res_e(* app_lib_settings_set_node_address_f)(app_addr_t addr)
Set node address.
 
@ APP_LIB_SETTINGS_ROLE_HEADNODE_LE
 
#define APP_LIB_SETTINGS_MAX_NODE_UID_SIZE
 
app_lib_settings_get_ac_range_f getAcRange
 
app_res_e(* app_lib_settings_set_offline_scan_f)(uint16_t max_scan)
Set the maximum offline scan interval in seconds.
 
app_lib_settings_is_valid_node_role_f isValidNodeRole
 
app_res_e(* app_lib_settings_get_network_address_f)(app_lib_settings_net_addr_t *addr_p)
Get network address.
 
bool(* app_lib_settings_is_group_cb_f)(app_addr_t group_addr)
Callback used for determining on which multicast groups the device belongs.
 
app_res_e(* app_lib_settings_get_ac_range_f)(uint16_t *ac_min_value_p, uint16_t *ac_max_value_p)
Get the access cycle range.
 
app_res_e(* app_lib_settings_get_node_role_f)(app_lib_settings_role_t *role_p)
 
app_res_e(* app_lib_settings_register_node_uid_cb_f)(app_lib_settings_get_node_uid_cb_f cb)
Register a callback for retrieving the node UID.
 
bool(* app_lib_settings_is_valid_network_channel_f)(uint8_t channel)
Check that the network channel is valid.
 
app_lib_settings_get_offline_scan_f getOfflineScan
 
app_lib_settings_set_encryption_key_f setEncryptionKey
 
app_res_e(* app_lib_settings_get_node_address_f)(app_addr_t *addr_p)
Get node address.
 
uint32_t app_lib_settings_net_addr_t
Network address type definition.
 
app_res_e(* app_lib_settings_get_network_channel_limits_f)(uint16_t *min_value_p, uint16_t *max_value_p)
Get network channel range.
 
app_lib_settings_set_node_role_f setNodeRole
 
app_res_e(* app_lib_settings_get_feature_lock_key_f)(uint8_t *key_p)
Check if feature lock key is set.
 
app_res_e(* app_lib_settings_get_offline_scan_f)(uint16_t *max_scan_p)
Get the maximum offline scan interval in seconds.
 
app_res_e(* app_lib_settings_reset_all_f)(void)
Reset all settings to default values.
 
app_lib_settings_register_node_uid_cb_f registerNodeUidCb
 
app_res_e(* app_lib_settings_get_ac_range_limits_f)(uint16_t *min_value_p, uint16_t *max_value_p)
Get access cycle range limits.
 
bool(* app_lib_settings_is_valid_node_role_f)(app_lib_settings_role_t role)
Check that the node role is valid.
 
app_res_e(* app_lib_settings_set_feature_lock_key_f)(const uint8_t *key_p)
Set feature lock key.
 
uint8_t network_key_pair_seq
 
app_lib_settings_get_network_channel_f getNetworkChannel
 
app_lib_settings_set_network_address_f setNetworkAddress
 
app_lib_settings_get_reserved_channels_f getReservedChannels
 
app_lib_settings_get_ac_range_limits_f getAcRangeLimits
 
app_res_e(* app_lib_settings_set_feature_lock_bits_f)(uint32_t bits)
Set feature lock bits.
 
app_res_e(* app_lib_settings_get_network_channel_f)(app_lib_settings_net_channel_t *channel_p)
Get network channel.
 
app_res_e(* app_lib_settings_set_encryption_key_f)(const uint8_t *key_p)
Set encryption key.
 
app_res_e(* app_lib_settings_key_management_config_f)(const app_lib_settings_key_management_configuration_t *key_mgmt_cfg_p)
Key management configuration using the settings API.
 
app_lib_settings_get_node_address_f getNodeAddress
 
uint8_t management_key_pair_seq
 
app_lib_settings_set_node_address_f setNodeAddress
 
app_lib_settings_get_feature_lock_bits_f getFeatureLockBits
 
app_res_e(* app_lib_settings_set_ac_range_f)(uint16_t ac_min_value, uint16_t ac_max_value)
Set range for access cycle.
 
app_res_e(* app_lib_settings_set_network_address_f)(app_lib_settings_net_addr_t addr)
Set network address.
 
@ APP_LIB_SETTINGS_ROLE_SINK_LL
 
app_lib_settings_get_encryption_key_f getEncryptionKey
 
#define APP_LIB_SETTINGS_AES_KEY_NUM_BYTES
AES key size in bytes.
 
@ APP_LIB_SETTINGS_ROLE_AUTOROLE_LE
 
app_lib_settings_set_network_channel_f setNetworkChannel
 
app_res_e(* app_lib_settings_get_encryption_key_f)(uint8_t *key_p)
Check if encryption key is set.
 
bool(* app_lib_settings_get_node_uid_cb_f)(uint8_t buffer[79], uint32_t *length)
Callback for providing the node UID to the stack.
 
Structure to hold key management configuration information for the settings API.
 
@ APP_LIB_SETTINGS_ROLE_SINK_LE
 
@ APP_LIB_SETTINGS_ROLE_SUBNODE_LL
 
app_res_e(* app_lib_settings_set_node_role_f)(app_lib_settings_role_t role)
Set node role.
 
bool(* app_lib_settings_is_valid_network_address_f)(app_lib_settings_net_addr_t addr)
Check that the network address is valid.
 
app_lib_settings_is_valid_node_address_f isValidNodeAddress
 
app_res_e(* app_lib_settings_set_group_query_cb_f)(app_lib_settings_is_group_cb_f cb)
Set the callback function for multicat groups.
 
app_lib_settings_set_feature_lock_key_f setFeatureLockKey
 
uint8_t app_lib_settings_role_t
Node role type.
 
app_lib_settings_get_network_address_f getNetworkAddress
 
app_lib_settings_set_ac_range_f setAcRange
 
app_lib_settings_get_network_channel_limits_f getNetworkChannelLimits
 
app_lib_settings_set_reserved_channels_f setReservedChannels
 
app_lib_settings_key_management_config_f keyManagementConfiguration
 
app_res_e(* app_lib_settings_get_feature_lock_bits_f)(uint32_t *bits_p)
Get feature lock bits.
 
bool(* app_lib_settings_is_valid_node_address_f)(app_addr_t addr)
Check that the node address is valid.
 
app_lib_settings_reset_all_f resetAll
 
app_lib_settings_set_feature_lock_bits_f setFeatureLockBits
 
app_lib_settings_get_node_role_f getNodeRole
 
app_lib_settings_is_valid_network_channel_f isValidNetworkChannel
 
@ APP_LIB_SETTINGS_ROLE_HEADNODE_LL
 
app_res_e(* app_lib_settings_get_authentication_key_f)(uint8_t *key_p)
Check if authentication key is set.
 
app_lib_settings_set_authentication_key_f setAuthenticationKey
 
app_lib_settings_set_offline_scan_f setOfflineScan
 
@ APP_LIB_SETTINGS_ROLE_AUTOROLE_LL