15#ifndef APP_LIB_STATE_H_
16#define APP_LIB_STATE_H_
27#define APP_LIB_STATE_NAME 0x02f9c165
30#define APP_LIB_STATE_VERSION 0x20F
37#define APP_LIB_STATE_INVALID_ROUTE_COST UINT8_MAX
44#define APP_LIB_STATE_COST_UNKNOWN 0
51#define APP_LIB_STATE_LINKREL_UNKNOWN 0
uint8_t app_lib_settings_net_channel_t
Channel type definition.
app_lib_state_get_install_quality_f getInstallQual
app_lib_settings_net_channel_t(* app_lib_state_get_cluster_channel_t)(void)
Query cluster channel (i.e. operating channel) currently in use.
app_lib_state_get_access_cycle_f getAccessCycle
install_quality_error_code_e
Error codes for installation quality, if an error code is active, corrective action regarding the ins...
@ APP_LIB_STATE_INSTALL_QUALITY_ERROR_NONE
@ APP_LIB_STATE_INSTALL_QUALITY_ERROR_BADRSSI
@ APP_LIB_STATE_INSTALL_QUALITY_ERROR_NOROUTE
@ APP_LIB_STATE_INSTALL_QUALITY_ERROR_NONBORS
app_lib_state_scan_type_e scan_type
app_lib_state_set_on_beacon_cb_f setOnBeaconCb
app_lib_state_nbor_type_e
Neighbor type.
@ APP_LIB_STATE_NEIGHBOR_IS_NEXT_HOP
@ APP_LIB_STATE_NEIGHBOR_IS_MEMBER
@ APP_LIB_STATE_NEIGHBOR_IS_CLUSTER
app_lib_state_scan_stop_f stopScanNbors
app_res_e(* app_lib_state_get_install_quality_f)(app_lib_state_install_quality_t *qual_out)
Read installation quality, app_lib_state_install_quality_t.
app_res_e(* app_lib_state_set_sink_cost_f)(const uint8_t cost)
Set additional penalty for the sink usage.
app_res_e(* app_lib_state_stop_stack_f)(void)
Stop the stack.
app_res_e(* app_lib_state_get_nbors_f)(app_lib_state_nbor_list_t *nbors_list)
Get list of neighbors.
app_res_e(* app_lib_state_start_scan_nbors_f)(void)
Start neighbor scan.
app_lib_state_route_state_e state
void(* app_lib_state_on_stack_event_cb_f)(app_lib_stack_event_e event, void *param)
Function type stack events callback.
app_lib_state_get_route_f getRouteInfo
app_lib_state_set_stack_event_cb_f setOnStackEventCb
app_lib_state_stop_stack_f stopStack
uint8_t(* app_lib_state_get_stack_state_f)(void)
Get the stack state.
app_lib_state_route_state_e
Route state.
@ APP_LIB_STATE_ROUTE_STATE_PENDING
Acquiring next hop / route.
@ APP_LIB_STATE_ROUTE_STATE_INVALID
No next hop / route.
@ APP_LIB_STATE_ROUTE_STATE_VALID
Valid next hop / route.
app_lib_state_get_sink_cost_f getSinkCost
app_lib_state_beacon_type_e
Type for beacons, passed in app_lib_state_beacon_rx_t.
@ APP_LIB_STATE_BEACON_TYPE_CB
Cluster beacon.
@ APP_LIB_STATE_BEACON_TYPE_NB
Network beacon.
bool is_da_support
Sender supports Directed Advertiser sending packets to it.
bool is_sink
Device is sink.
app_lib_state_start_stack_f startStack
app_res_e(* app_lib_state_get_route_f)(app_lib_state_route_info_t *info)
Get route information.
void(* app_lib_state_on_beacon_cb_f)(const app_lib_state_beacon_rx_t *beacon)
Function type for a beacon reception callback.
app_lib_settings_net_channel_t channel
bool is_secured
This beacon is secured with encryption.
app_res_e(* app_lib_state_start_stack_f)(void)
Start the stack.
app_lib_state_nbor_info_t * nbors
app_lib_state_stack_state_e
Stack state flags.
@ APP_LIB_STATE_NETWORK_ADDRESS_NOT_SET
Network address is not set.
@ APP_LIB_STATE_NODE_ADDRESS_NOT_SET
Node address is not set.
@ APP_LIB_STATE_NETWORK_CHANNEL_NOT_SET
Network channel is not set.
@ APP_LIB_STATE_STOPPED
Stack is stopped.
@ APP_LIB_STATE_ACCESS_DENIED
Operation is not allowed.
@ APP_LIB_STATE_STARTED
Stack is started.
@ APP_LIB_STATE_ROLE_NOT_SET
Node role is not set.
@ APP_LIB_STATE_APP_CONFIG_DATA_NOT_SET
app_res_e(* app_lib_state_set_stack_event_cb_f)(app_lib_state_on_stack_event_cb_f cb)
Register callback for stack events.
app_lib_stack_event_e
List of event generated by the stack when registering to app_lib_state_set_stack_event_cb_f.
@ APP_LIB_STATE_STACK_EVENT_SCRAT_XFER_STARTED
@ APP_LIB_STATE_STACK_EVENT_ROUTE_CHANGED
@ APP_LIB_STATE_STACK_EVENT_SCAN_STARTED
@ APP_LIB_STATE_STACK_EVENT_SCRAT_XFER_STOPPED
@ APP_LIB_STATE_STACK_EVENT_SCAN_STOPPED
@ APP_LIB_STATE_STACK_EVENT_STACK_STARTED
@ APP_LIB_STATE_STACK_EVENT_STACK_STOPPED
app_lib_state_start_scan_nbors_f startScanNbors
app_lib_state_scan_type_e
Types of scans.
@ SCAN_TYPE_APP_ORIGINATED
@ SCAN_TYPE_STACK_ORIGINATED
app_lib_state_get_stack_state_f getStackState
app_lib_state_get_nbors_f getNbors
app_lib_state_diradv_support_e
Support type for directed advertiser, i.e. does neighbor support sending directed advertiser packets ...
@ APP_LIB_STATE_DIRADV_NOT_SUPPORTED
@ APP_LIB_STATE_DIRADV_UNKNOWN
@ APP_LIB_STATE_DIRADV_SUPPORTED
app_lib_state_set_sink_cost_f setSinkCost
int8_t txpower
Tx power in dB This equals maximum transmission power that sender can transmit (which is used when tr...
app_addr_t address
Address of the beacon sender.
app_res_e(* app_lib_state_get_sink_cost_f)(uint8_t *cost_p)
Query the currently set additional penalty for the sink usage.
app_lib_state_scan_nbors_type_e
Scan neighbor type to specify the scans that trigger the callback.
@ APP_LIB_STATE_SCAN_NBORS_ALL
@ APP_LIB_STATE_SCAN_NBORS_ONLY_REQUESTED
app_res_e(* app_lib_state_get_access_cycle_f)(uint16_t *ac_value_p)
Get current access cycle.
app_res_e(* app_lib_state_scan_stop_f)(void)
Stops an ongoing scan operation before it has ended.
app_res_e(* app_lib_state_set_on_beacon_cb_f)(app_lib_state_on_beacon_cb_f cb)
Set a callback to be called when a beacon is received.
app_lib_state_get_cluster_channel_t getClusterChannel
Neighbors info definition.
Neighbors list definition.
Information on started scan.
Structure for route information.
List of library functions.
Structure to hold the information about received beacons.
Information on neighbor scan.
Installation quality information. Contains information about the nodes installation location i....