Nicolas Borla / Mbed OS BBR_1Ebene
Embed: (wiki syntax)

« Back to documentation index

lorawan_app_callbacks_t Struct Reference

lorawan_app_callbacks_t Struct Reference

Stack level callback functions. More...

#include <lorawan_types.h>

Data Fields

mbed::Callback< void(lorawan_event_t)> events
 Mandatory.
mbed::Callback< void(uint8_t,
uint8_t)> 
link_check_resp
 Optional.

Detailed Description

Stack level callback functions.

'lorawan_app_callbacks_t' is a structure that holds pointers to the application provided methods which are needed to be called in response to certain requests. The structure is default constructed to set all pointers to NULL. So if the user does not provide the pointer, a response will not be posted. However, the 'lorawan_events' callback is mandatory to be provided as it contains essential events.

A link check request could be sent whenever the device tries to send a message and if the network server responds with a link check response, the stack notifies the application be calling the appropriate method set using 'link_check_resp' callback. The result is thus transported to the application via callback function provided.

As can be seen from declaration, mbed::Callback<void(uint8_t, uint8_t)> *link_check_resp) carries two parameters. First one is Demodulation Margin and the second one is number of gateways involved in the path to network server.

'battery_level' callback goes in the down direction, i.e., it informs the stack about the battery level by calling a function provided by the upper layers.

Definition at line 267 of file lorawan_types.h.


Field Documentation

mbed::Callback<void(lorawan_event_t)> events

Mandatory.

Event Callback must be provided

Definition at line 271 of file lorawan_types.h.

mbed::Callback<void(uint8_t, uint8_t)> link_check_resp

Optional.

Definition at line 276 of file lorawan_types.h.