23#ifndef NET_GNRC_LORAWAN_H
24#define NET_GNRC_LORAWAN_H
41#ifndef CONFIG_GNRC_LORAWAN_MIN_SYMBOLS_TIMEOUT
42#define CONFIG_GNRC_LORAWAN_MIN_SYMBOLS_TIMEOUT 30
46#define GNRC_LORAWAN_REQ_STATUS_SUCCESS (0)
47#define GNRC_LORAWAN_REQ_STATUS_DEFERRED (1)
335 assert(redundancy <= (0xF - 1));
POSIX.1-2008 compliant version of the assert macro.
#define assert(cond)
abort the program if assertion is false
GNRC LoRaWAN internal header.
void gnrc_lorawan_timeout_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer that the timer was fired.
void gnrc_lorawan_mlme_indication(gnrc_lorawan_t *mac, mlme_indication_t *ind)
MLME indication callback.
mlme_activation_t
LoRaWAN activation mechanism.
static void gnrc_lorawan_radio_rx_error_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer reception of a frame went wrong.
mlme_type_t
MLME primitive types.
void gnrc_lorawan_mlme_request(gnrc_lorawan_t *mac, const mlme_request_t *mlme_request, mlme_confirm_t *mlme_confirm)
Perform a MLME request.
void gnrc_lorawan_mcps_confirm(gnrc_lorawan_t *mac, mcps_confirm_t *confirm)
MCPS Confirm callback.
static void gnrc_lorawan_set_uncnf_redundancy(gnrc_lorawan_t *mac, uint8_t redundancy)
Set unconfirmed uplink redundancy.
void gnrc_lorawan_set_timer(gnrc_lorawan_t *mac, uint32_t us)
Set a timer with the given time.
void gnrc_lorawan_mcps_request(gnrc_lorawan_t *mac, const mcps_request_t *mcps_request, mcps_confirm_t *mcps_confirm)
Perform a MCPS request.
void gnrc_lorawan_mcps_indication(gnrc_lorawan_t *mac, mcps_indication_t *ind)
MCPS indication callback.
void gnrc_lorawan_radio_rx_timeout_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer there was a timeout event.
mcps_type_t
MCPS primitive types.
netdev_t * gnrc_lorawan_get_netdev(gnrc_lorawan_t *mac)
Get netdev pointer from mac descriptor.
void gnrc_lorawan_mlme_confirm(gnrc_lorawan_t *mac, mlme_confirm_t *confirm)
MLME confirm callback.
void gnrc_lorawan_radio_tx_done_cb(gnrc_lorawan_t *mac)
Indicate the MAC layer when the transmission finished.
void gnrc_lorawan_remove_timer(gnrc_lorawan_t *mac)
Remove the current timer.
int gnrc_lorawan_phy_set_channel_mask(gnrc_lorawan_t *mac, uint16_t channel_mask)
Set the channel mask in order to enable or disable LoRaWAN channels.
mlme_mib_type_t
MAC Information Base attributes.
void gnrc_lorawan_radio_rx_done_cb(gnrc_lorawan_t *mac, uint8_t *data, size_t size)
Fetch a LoRaWAN packet from the radio.
void gnrc_lorawan_init(gnrc_lorawan_t *mac, uint8_t *joineui, const gnrc_lorawan_key_ctx_t *ctx)
Init GNRC LoRaWAN.
@ MCPS_EVENT_RX
MCPS RX event.
@ MCPS_EVENT_NO_RX
MCPS no RX event.
@ MLME_ACTIVATION_NONE
MAC layer is not activated.
@ MLME_ACTIVATION_ABP
MAC layer activated by ABP.
@ MLME_ACTIVATION_OTAA
MAC layer activated by OTAA.
@ MLME_JOIN
join a LoRaWAN network
@ MLME_LINK_CHECK
perform a Link Check
@ MLME_RESET
reset the MAC layer
@ MLME_SCHEDULE_UPLINK
schedule uplink indication
@ MCPS_UNCONFIRMED
unconfirmed data
@ MCPS_CONFIRMED
confirmed data
@ MIB_ACTIVATION_METHOD
type is activation method
@ MIB_RX2_DR
type is rx2 DR
@ MIB_DEV_ADDR
type is dev addr
GNRC LoRaWAN key context struct.
uint8_t redundancy
unconfirmed uplink redundancy
GNRC LoRaWAN mac descriptor.
gnrc_lorawan_mcps_t mcps
MCPS descriptor.
iolist structure definition
Mac Common Part Sublayer (MCPS) confirm representation.
int16_t status
status of the MCPS confirm
iolist_t * msdu
pointer to the msdu
mcps_type_t type
type of the MCPS confirm
Mac Common Part Sublayer (MCPS) indication representation.
mcps_data_t data
MCPS Data holder.
mcps_type_t type
type of the MCPS indication
Mac Common Part Sublayer (MCPS) request representation.
mcps_data_t data
MCPS data holder.
mcps_type_t type
type of the MCPS request
MAC (sub) Layer Management Entity (MLME) confirm representation.
mlme_type_t type
type of the MLME confirm
mlme_mib_t mib
MIB confirmation data.
int16_t status
status of the MLME confirm
mlme_link_req_confirm_t link_req
Link Check confirmation data.
MAC (sub) Layer Management Entity (MLME) indication representation.
mlme_type_t type
type of the MLME indication
MLME Link Check confirmation data.
MAC Information Base descriptor for MLME Request-Confirm.
mlme_mib_type_t type
MIB attribute identifier.
void * dev_addr
pointer to the dev_addr
mlme_activation_t activation
holds activation mechanism
MAC (sub) Layer Management Entity (MLME) request representation.
mlme_mib_t mib
MIB holder.
mlme_lorawan_join_t join
Join Data holder.
mlme_type_t type
type of the MLME request
Structure to hold driver state.