Wirepas SDK
control_node.h File Reference

Go to the source code of this file.

Typedefs

typedef void(* control_node_ack_cb_f) (uint8_t *bytes, uint8_t len)
 Callback function type used with lib_control_node_conf_t. More...
 

Functions

control_node_ret_e Control_Node_init (control_node_conf_t *conf)
 Initialize Directed Advertiser libray for control node. More...
 
control_node_ret_e Control_Node_send (app_lib_data_to_send_t *data, app_lib_data_data_sent_cb_f sent_cb)
 Send a data packet. More...
 

Data Structures

struct  control_node_conf_t
 Configuration structure for Control node. More...
 

Typedef Documentation

◆ control_node_ack_cb_f

typedef void(* control_node_ack_cb_f) (uint8_t *bytes, uint8_t len)

Callback function type used with lib_control_node_conf_t.

Parameters
[in]bytesUSER data received in DA ack packet.
[in]lenLength of received USER data.

Definition at line 21 of file control_node.h.

Function Documentation

◆ Control_Node_init()

control_node_ret_e Control_Node_init ( control_node_conf_t conf)

Initialize Directed Advertiser libray for control node.

Parameters
[in]confPointer to the configuration structure.
Returns
Result code, normally CONTROL_RET_OK. See lib_control_node_ret_e for other return code.

◆ Control_Node_send()

control_node_ret_e Control_Node_send ( app_lib_data_to_send_t data,
app_lib_data_data_sent_cb_f  sent_cb 
)

Send a data packet.

Parameters
[in]dataData to send
[in]sent_cbDA packet sent callback.
Returns
Result code, normally CONTROL_RET_OK. See lib_control_node_ret_e for other return code.
Note
data->dest_address willbe overwritten by strongest DA router.

Data Structure Documentation

◆ control_node_conf_t

struct control_node_conf_t

Configuration structure for Control node.

Definition at line 26 of file control_node.h.

Data Fields
control_node_ack_cb_f ack_cb

Ack data received callback.

uint32_t diag_period_ms

Directed Advertiser diagnostic interval, in milli-seconds. APP_SCHEDULER_STOP_TASK to disable. As a failsafe, any value under 30sec will disable DA diagnostics.

uint32_t packet_ttl_ms

Set maximum queueing time for advertiser data packets; 0 to disable the feature.