23#ifndef LORAWANINTERFACE_H_
24#define LORAWANINTERFACE_H_
26#include "platform/Callback.h"
27#include "platform/ScopedLock.h"
28#include "events/EventQueue.h"
353 int16_t
send(uint8_t port,
const uint8_t *data, uint16_t length,
int flags);
389 int16_t
receive(uint8_t port, uint8_t *data, uint16_t length,
int flags);
414 int16_t
receive(uint8_t *data, uint16_t length, uint8_t &port,
int &flags);
573 LoRaPHY *_default_phy;
LoRaWAN stack layer implementation.
Interface for the radios, containing the main functions that a radio needs, and five callback functio...
LoRaWANInterface Class A network interface for LoRaWAN.
int16_t receive(uint8_t *data, uint16_t length, uint8_t &port, int &flags)
Receives a message from the Network Server on any port.
int16_t receive(uint8_t port, uint8_t *data, uint16_t length, int flags)
Receives a message from the Network Server on a specific port.
lorawan_status_t disable_adaptive_datarate()
Disables adaptive data rate.
lorawan_status_t remove_channel_plan()
Removes an active channel plan.
lorawan_status_t remove_channel(uint8_t index)
Removes a single channel.
lorawan_status_t add_link_check_request()
Validate the connectivity with the network.
lorawan_status_t add_app_callbacks(lorawan_app_callbacks_t *callbacks)
Add application callbacks to the stack.
lorawan_status_t get_rx_metadata(lorawan_rx_metadata &metadata)
Get hold of RX meta-data.
lorawan_status_t set_datarate(uint8_t data_rate)
Sets up a particular data rate.
LoRaWANInterface(LoRaRadio &radio, LoRaPHY &phy)
Constructs a LoRaWANInterface using the user provided PHY object.
lorawan_status_t enable_adaptive_datarate()
Enables adaptive data rate (ADR)
lorawan_status_t set_channel_plan(const lorawan_channelplan_t &channel_plan)
Sets the channel plan.
lorawan_status_t cancel_sending(void)
Cancel outgoing transmission.
lorawan_status_t set_confirmed_msg_retries(uint8_t count)
Sets up the retry counter for confirmed messages.
void remove_link_check_request()
Removes link check request sticky MAC command.
lorawan_status_t set_device_class(device_class_t device_class)
Change device class.
lorawan_status_t get_backoff_metadata(int &backoff)
Get hold of backoff time.
void unlock(void)
Releases exclusive access to the stack.
lorawan_status_t connect()
Connect OTAA or ABP using the Mbed OS config system.
lorawan_status_t get_tx_metadata(lorawan_tx_metadata &metadata)
Get hold of TX meta-data.
lorawan_status_t initialize(events::EventQueue *queue)
Initialize the LoRa stack.
lorawan_status_t disconnect()
Disconnect the current session.
lorawan_status_t get_channel_plan(lorawan_channelplan_t &channel_plan)
Gets the channel plans from the LoRa stack.
void lock(void)
Provides exclusive access to the stack.
LoRaWANInterface(LoRaRadio &radio)
Constructs a LoRaWANInterface using the LoRaWANStack instance underneath.
lorawan_status_t connect(const lorawan_connect_t &connect)
Connect OTAA or ABP with parameters.
int16_t send(uint8_t port, const uint8_t *data, uint16_t length, int flags)
Send message to gateway.
LoRaWANStack Class A controller layer for LoRaWAN MAC and PHY.
RAII-style mechanism for owning a lock of Lockable object for the duration of a scoped block.
Contains data structures required by LoRaWANBase class.
enum lorawan_status lorawan_status_t
lorawan_status_t contains status codes in response to stack operations
device_class_t
LoRaWAN device classes definition.
DO NOT MODIFY, WILL BREAK THE API!
Stack level callback functions.
lorawan_connect_t structure