Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations
lorawan_data_structures.h File Reference

Contains common data structures used by Mbed-OS LoRaWAN mplementation. More...

#include <inttypes.h>
#include "lorawan_types.h"

Go to the source code of this file.

Data Structures

struct  band_t
 Default user application maximum data size for transmission. More...
 
struct  rx2_channel_params
 
struct  lora_mac_system_params_t
 
struct  multicast_params_s
 
union  loramac_mhdr_t
 
struct  loramac_mhdr_t::hdr_bits_s
 
union  loramac_frame_ctrl_t
 
struct  loramac_frame_ctrl_t::ctrl_bits_s
 
struct  loramac_mcps_confirm_t
 
struct  loramac_mcps_indication_t
 
struct  mlme_join_req_t
 
struct  mlme_cw_tx_mode_t
 
struct  loramac_mlme_confirm_t
 
struct  loramac_mlme_indication_t
 
struct  loramac_tx_message_t
 Stack level TX message structure. More...
 
union  rx_message_u
 lora_mac_rx_message_by_type_t union More...
 
struct  loramac_rx_message_t
 loramac_rx_message_t More...
 
struct  lorawan_session
 LoRaWAN session. More...
 
struct  rx_config_params_t
 
struct  timer_event_t
 Timer object description. More...
 
struct  loramac_keys
 
struct  lorawan_timers
 
struct  loramac_protocol_params
 

Macros

#define LORAMAC_MFR_LEN   4
 
#define LORA_MAC_FRMPAYLOAD_OVERHEAD   13
 
#define LORA_MAX_NB_CHANNELS   16
 LoRaMac maximum number of channels. More...
 
#define LORAMAC_PHY_MAXPAYLOAD   255
 Maximum PHY layer payload size for reception. More...
 

Typedefs

typedef uint32_t lorawan_time_t
 Timer time variable definition. More...
 
typedef struct multicast_params_s multicast_params_t
 
typedef enum device_states device_states_t
 End-device states. More...
 
typedef struct lorawan_session lorawan_session_t
 LoRaWAN session. More...
 

Enumerations

Detailed Description

Contains common data structures used by Mbed-OS LoRaWAN mplementation.

______ _
/ _____) _ | |
( (____ _____ ____ _| |_ _____ ____| |__
\____ \| ___ | (_ _) ___ |/ ___) _ \
_____) ) ____| | | || |_| ____( (___| | | |
(______/|_____)_|_|_| \__)_____)\____)_| |_|
(C)2013 Semtech
___ _____ _ ___ _ _____ ___ ___ ___ ___
/ __|_ _/_\ / __| |/ / __/ _ \| _ \/ __| __|
\__ \ | |/ _ \ (__| ' <| _| (_) | / (__| _|
|___/ |_/_/ \_\___|_|\_\_| \___/|_|_\\___|___|
embedded.connectivity.solutions===============

Description: LoRa PHY layer

License: Revised BSD License, see LICENSE.TXT file include in the project

Maintainer: Miguel Luis ( Semtech ), Gregory Cristian ( Semtech ) and Daniel Jaeckle ( STACKFORCE )

Copyright (c) 2017, Arm Limited and affiliates. SPDX-License-Identifier: BSD-3-Clause

Definition in file lorawan_data_structures.h.

Macro Definition Documentation

#define LORA_MAC_FRMPAYLOAD_OVERHEAD   13

The FRMPayload overhead to be used when setting the Radio.SetMaxPayloadLength in the RxWindowSetup function. The maximum PHYPayload = MaxPayloadOfDatarate/MaxPayloadOfDatarateRepeater + LORA_MAC_FRMPAYLOAD_OVERHEAD

Definition at line 58 of file lorawan_data_structures.h.

#define LORA_MAX_NB_CHANNELS   16

LoRaMac maximum number of channels.

Definition at line 63 of file lorawan_data_structures.h.

#define LORAMAC_MFR_LEN   4

Sets the length of the LoRaMAC footer field. Mainly indicates the MIC field length.

Definition at line 51 of file lorawan_data_structures.h.

#define LORAMAC_PHY_MAXPAYLOAD   255

Maximum PHY layer payload size for reception.

Definition at line 68 of file lorawan_data_structures.h.

Typedef Documentation

End-device states.

LoRaWAN session.

A structure for keeping session details.

typedef uint32_t lorawan_time_t

Timer time variable definition.

Definition at line 44 of file lorawan_data_structures.h.

LoRaMAC multicast channel parameter.

Enumeration Type Documentation

LoRaMAC battery level indicator.

Enumerator
BAT_LEVEL_EXT_SRC 

An external power source.

BAT_LEVEL_EMPTY 

Battery level empty.

BAT_LEVEL_FULL 

Battery level full.

BAT_LEVEL_NO_MEASURE 

Battery level - no measurement available.

Definition at line 391 of file lorawan_data_structures.h.

End-device states.

Definition at line 837 of file lorawan_data_structures.h.

The enumeration containing the status of the operation of a MAC service.

Enumerator
LORAMAC_EVENT_INFO_STATUS_OK 

Service performed successfully.

LORAMAC_EVENT_INFO_STATUS_ERROR 

An error occurred during the execution of the service.

LORAMAC_EVENT_INFO_STATUS_TX_TIMEOUT 

A TX timeout occurred.

LORAMAC_EVENT_INFO_STATUS_RX1_TIMEOUT 

An RX timeout occurred on receive window 1.

LORAMAC_EVENT_INFO_STATUS_RX2_TIMEOUT 

An RX timeout occurred on receive window 2.

LORAMAC_EVENT_INFO_STATUS_RX1_ERROR 

An RX error occurred on receive window 1.

LORAMAC_EVENT_INFO_STATUS_RX2_ERROR 

An RX error occurred on receive window 2.

LORAMAC_EVENT_INFO_STATUS_JOIN_FAIL 

An error occurred in the join procedure.

LORAMAC_EVENT_INFO_STATUS_DOWNLINK_REPEATED 

A frame with an invalid downlink counter was received. The downlink counter of the frame was equal to the local copy of the downlink counter of the node.

LORAMAC_EVENT_INFO_STATUS_TX_DR_PAYLOAD_SIZE_ERROR 

The MAC could not retransmit a frame since the MAC decreased the datarate. The payload size is not applicable for the datarate.

LORAMAC_EVENT_INFO_STATUS_DOWNLINK_TOO_MANY_FRAMES_LOST 

The node has lost MAX_FCNT_GAP or more frames.

LORAMAC_EVENT_INFO_STATUS_ADDRESS_FAIL 

An address error occurred.

LORAMAC_EVENT_INFO_STATUS_MIC_FAIL 

Message integrity check failure.

LORAMAC_EVENT_INFO_STATUS_CRYPTO_FAIL 

Crypto methods failure

Definition at line 479 of file lorawan_data_structures.h.

LoRaMAC frame types.

LoRaWAN Specification V1.0.2, chapter 4.2.1, table 1.

Enumerator
FRAME_TYPE_JOIN_REQ 

LoRaMAC join request frame.

FRAME_TYPE_JOIN_ACCEPT 

LoRaMAC join accept frame.

FRAME_TYPE_DATA_UNCONFIRMED_UP 

LoRaMAC unconfirmed uplink frame.

FRAME_TYPE_DATA_UNCONFIRMED_DOWN 

LoRaMAC unconfirmed downlink frame.

FRAME_TYPE_DATA_CONFIRMED_UP 

LoRaMAC confirmed uplink frame.

FRAME_TYPE_DATA_CONFIRMED_DOWN 

LoRaMAC confirmed downlink frame.

FRAME_TYPE_RFU 

LoRaMAC RFU frame.

FRAME_TYPE_PROPRIETARY 

LoRaMAC proprietary frame.

Definition at line 265 of file lorawan_data_structures.h.

LoRaMAC data services.

The following table list the primitives supported by a specific MAC data service:

Name Request Indication Response Confirm
MCPS_UNCONFIRMED YES YES NO YES
MCPS_CONFIRMED YES YES NO YES
MCPS_MULTICAST NO YES NO NO
MCPS_PROPRIETARY YES YES NO YES
Enumerator
MCPS_UNCONFIRMED 

Unconfirmed LoRaMAC frame.

MCPS_CONFIRMED 

Confirmed LoRaMAC frame.

MCPS_MULTICAST 

Multicast LoRaMAC frame.

MCPS_PROPRIETARY 

Proprietary frame.

Definition at line 556 of file lorawan_data_structures.h.

LoRaMAC management services.

The following table list the primitives supported by a specific MAC management service:

Name Request Indication Response Confirm
MLME_JOIN YES NO NO YES
MLME_LINK_CHECK YES NO NO YES
MLME_TXCW YES NO NO YES
MLME_SCHEDULE_UPLINK NO YES NO NO
Enumerator
MLME_JOIN 

Initiates the Over-the-Air activation.

LoRaWAN Specification V1.0.2, chapter 6.2.

MLME_LINK_CHECK 

LinkCheckReq - Connectivity validation.

LoRaWAN Specification V1.0.2, chapter 5, table 4.

MLME_TXCW 

Sets TX continuous wave mode.

LoRaWAN end-device certification.

MLME_TXCW_1 

Sets TX continuous wave mode (new LoRa-Alliance CC definition).

LoRaWAN end-device certification.

MLME_SCHEDULE_UPLINK 

Indicates that the application shall perform an uplink as soon as possible.

Definition at line 708 of file lorawan_data_structures.h.

LoRaMAC mote MAC commands.

LoRaWAN Specification V1.0.2, chapter 5, table 4.

Enumerator
MOTE_MAC_LINK_CHECK_REQ 

LinkCheckReq

MOTE_MAC_LINK_ADR_ANS 

LinkADRAns

MOTE_MAC_DUTY_CYCLE_ANS 

DutyCycleAns

MOTE_MAC_RX_PARAM_SETUP_ANS 

RXParamSetupAns

MOTE_MAC_DEV_STATUS_ANS 

DevStatusAns

MOTE_MAC_NEW_CHANNEL_ANS 

NewChannelAns

MOTE_MAC_RX_TIMING_SETUP_ANS 

RXTimingSetupAns

MOTE_MAC_TX_PARAM_SETUP_ANS 

TXParamSetupAns

MOTE_MAC_DL_CHANNEL_ANS 

DlChannelAns

Definition at line 305 of file lorawan_data_structures.h.

lora_mac_rx_message_type_t

An enum representing a structure for RX messages.

Enumerator
LORAMAC_RX_MLME_CONFIRM 

lora_mac_mlme_confirm_t

LORAMAC_RX_MCPS_CONFIRM 

lora_mac_mcps_confirm_t

LORAMAC_RX_MCPS_INDICATION 

lora_mac_mcps_indication_t

Definition at line 939 of file lorawan_data_structures.h.

enum rx_slot_t

LoRaMAC receive window enumeration

Enumerator
RX_SLOT_WIN_1 

LoRaMAC receive window 1

RX_SLOT_WIN_2 

LoRaMAC receive window 2

RX_SLOT_WIN_CLASS_C 

LoRaMAC receive window 2 for class c - continuous listening

RX_SLOT_WIN_PING_SLOT 

LoRaMAC class b ping slot window

Definition at line 137 of file lorawan_data_structures.h.

LoRaMAC server MAC commands.

LoRaWAN Specification V1.0.2 chapter 5, table 4.

Enumerator
SRV_MAC_LINK_CHECK_ANS 

LinkCheckAns

SRV_MAC_LINK_ADR_REQ 

LinkADRReq

SRV_MAC_DUTY_CYCLE_REQ 

DutyCycleReq

SRV_MAC_RX_PARAM_SETUP_REQ 

RXParamSetupReq

SRV_MAC_DEV_STATUS_REQ 

DevStatusReq

SRV_MAC_NEW_CHANNEL_REQ 

NewChannelReq

SRV_MAC_RX_TIMING_SETUP_REQ 

RXTimingSetupReq

SRV_MAC_TX_PARAM_SETUP_REQ 

NewChannelReq

SRV_MAC_DL_CHANNEL_REQ 

DlChannelReq

Definition at line 349 of file lorawan_data_structures.h.

Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.