Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: TYBLE16_simple_data_logger TYBLE16_MP3_Air
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 |
This callback is optional. | |
mbed::Callback< uint8_t(void)> | battery_level |
This callback is 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.
'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 247 of file lorawan_types.h.
Field Documentation
mbed::Callback<uint8_t(void)> battery_level |
This callback is optional.
If the callback is not set, the stack returns 255 to gateway.
Battery level return value must follow the specification for DevStatusAns MAC command:
0 The end-device is connected to an external power source 1 - 254 The battery level, 1 being at minimum and 254 being at maximum 255 The end-device was not able to measure the battery level.
Definition at line 271 of file lorawan_types.h.
mbed::Callback<void(lorawan_event_t)> events |
mbed::Callback<void(uint8_t, uint8_t)> link_check_resp |
This callback is optional.
The first parameter to the callback function is the demodulation margin, and the second parameter is the number of gateways that successfully received the last request.
Definition at line 259 of file lorawan_types.h.
Generated on Tue Jul 12 2022 13:55:32 by
