40 #ifndef __LORAMACCOMMAND_H__ 41 #define __LORAMACCOMMAND_H__ 50 #define LORA_MAC_COMMAND_MAX_LENGTH 128 121 uint8_t commands_size, uint8_t snr,
146 int32_t cmd_buffer_remaining()
const;
232 uint8_t mac_cmd_buf_idx;
238 uint8_t mac_cmd_buf_idx_to_repeat;
253 #endif //__LORAMACCOMMAND_H__ uint8_t * get_mac_commands_buffer()
Get MAC command buffer.
An abstract class providing radio object to children and provide base for implementing LoRa PHY layer...
LoRaMac Class Implementation of LoRaWAN MAC layer.
void clear_sticky_mac_cmd()
Clear sticky MAC commands.
void clear_repeat_buffer()
Clear MAC command repeat buffer.
void copy_repeat_commands_to_buffer()
Copy MAC commands from repeat buffer to actual MAC command buffer.
lorawan_status_t add_link_check_req()
Adds a new LinkCheckReq MAC command to be sent.
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...
LoRaPHY Class Parent class for LoRa regional PHY implementations.
void clear_command_buffer(void)
Clear MAC command buffer.
enum lorawan_status lorawan_status_t
lorawan_status_t contains status codes in response to stack operations
#define LORA_MAC_COMMAND_MAX_LENGTH
uint8_t get_mac_cmd_length() const
Get the length of MAC commands.
LoRaMacCommand Class Helper class for LoRaMac layer to handle any MAC commands.
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.
uint8_t get_repeat_commands_length() const
Get the length of MAC commands in repeat buffer.
void parse_mac_commands_to_repeat()
Parses the MAC commands which must be re-sent.
Contains common data structures used by Mbed-OS LoRaWAN mplementation.
bool has_sticky_mac_cmd() const
Check if MAC command buffer contains sticky commands.
Callback class based on template specialization.