LoRaMacCommand Class Helper class for LoRaMac layer to handle any MAC commands. More...
#include <LoRaMacCommand.h>
Public Member Functions | |
void | clear_command_buffer (void) |
Clear MAC command buffer. More... | |
uint8_t | get_mac_cmd_length () const |
Get the length of MAC commands. More... | |
uint8_t * | get_mac_commands_buffer () |
Get MAC command buffer. More... | |
void | parse_mac_commands_to_repeat () |
Parses the MAC commands which must be re-sent. More... | |
void | clear_repeat_buffer () |
Clear MAC command repeat buffer. More... | |
void | copy_repeat_commands_to_buffer () |
Copy MAC commands from repeat buffer to actual MAC command buffer. More... | |
uint8_t | get_repeat_commands_length () const |
Get the length of MAC commands in repeat buffer. More... | |
void | clear_sticky_mac_cmd () |
Clear sticky MAC commands. More... | |
bool | has_sticky_mac_cmd () const |
Check if MAC command buffer contains sticky commands. More... | |
lorawan_status_t | process_mac_commands (const uint8_t *payload, uint8_t mac_index, uint8_t commands_size, uint8_t snr, loramac_mlme_confirm_t &mlme_conf, lora_mac_system_params_t &mac_params, LoRaPHY &lora_phy) |
Decodes MAC commands in the fOpts field and in the payload. More... | |
lorawan_status_t | add_link_check_req () |
Adds a new LinkCheckReq MAC command to be sent. More... | |
void | set_batterylevel_callback (mbed::Callback< uint8_t(void)> battery_level) |
Set battery level query callback method If callback is not set, BAT_LEVEL_NO_MEASURE is returned. More... | |
LoRaMacCommand Class Helper class for LoRaMac layer to handle any MAC commands.
Definition at line 57 of file LoRaMacCommand.h.
lorawan_status_t add_link_check_req | ( | ) |
Adds a new LinkCheckReq MAC command to be sent.
void clear_command_buffer | ( | void | ) |
Clear MAC command buffer.
void clear_repeat_buffer | ( | ) |
Clear MAC command repeat buffer.
void clear_sticky_mac_cmd | ( | ) |
Clear sticky MAC commands.
void copy_repeat_commands_to_buffer | ( | ) |
Copy MAC commands from repeat buffer to actual MAC command buffer.
uint8_t get_mac_cmd_length | ( | ) | const |
Get the length of MAC commands.
uint8_t* get_mac_commands_buffer | ( | ) |
Get MAC command buffer.
uint8_t get_repeat_commands_length | ( | ) | const |
Get the length of MAC commands in repeat buffer.
bool has_sticky_mac_cmd | ( | ) | const |
Check if MAC command buffer contains sticky commands.
void parse_mac_commands_to_repeat | ( | ) |
Parses the MAC commands which must be re-sent.
lorawan_status_t process_mac_commands | ( | const uint8_t * | payload, |
uint8_t | mac_index, | ||
uint8_t | commands_size, | ||
uint8_t | snr, | ||
loramac_mlme_confirm_t & | mlme_conf, | ||
lora_mac_system_params_t & | mac_params, | ||
LoRaPHY & | lora_phy | ||
) |
Decodes MAC commands in the fOpts field and in the payload.
void set_batterylevel_callback | ( | mbed::Callback< uint8_t(void)> | battery_level | ) |
Set battery level query callback method If callback is not set, BAT_LEVEL_NO_MEASURE is returned.