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

Contains data structures required by LoRaWANBase class. More...

#include "platform/Callback.h"

Go to the source code of this file.

Data Structures

struct  lorawan_connect_otaa_t
 The lorawan_connect_otaa structure. More...
 
struct  lorawan_connect_abp_t
 The lorawan_connect_abp structure. More...
 
struct  lorawan_connect
 lorawan_connect_t structure More...
 
struct  lorawan_app_callbacks_t
 Stack level callback functions. More...
 
union  dr_range_t
 DO NOT MODIFY, WILL BREAK THE API! More...
 
struct  dr_range_t::fields_s
 The structure to store the minimum and the maximum datarate. More...
 
struct  channel_params_t
 DO NOT MODIFY, WILL BREAK THE API! More...
 
struct  lora_channels_s
 DO NOT MODIFY, WILL BREAK THE API! More...
 
struct  lora_channelplan
 DO NOT MODIFY, WILL BREAK THE API! More...
 
struct  lorawan_tx_metadata
 Meta-data collection for a transmission. More...
 
struct  lorawan_rx_metadata
 Meta-data collection for the received packet. More...
 

Macros

#define LORAWAN_NETWORK_ID_MASK   (uint32_t) 0xFE000000
 A mask for the network ID. More...
 
#define MSG_UNCONFIRMED_FLAG   0x01
 Option Flags for send(), receive() APIs. More...
 
#define DR_0   0
 
#define DR_1   1
 
#define DR_2   2
 
#define DR_3   3
 
#define DR_4   4
 
#define DR_5   5
 
#define DR_6   6
 
#define DR_7   7
 
#define DR_8   8
 
#define DR_9   9
 
#define DR_10   10
 
#define DR_11   11
 
#define DR_12   12
 
#define DR_13   13
 
#define DR_14   14
 
#define DR_15   15
 

Typedefs

typedef enum lorawan_status lorawan_status_t
 lorawan_status_t contains status codes in response to stack operations More...
 
typedef struct lorawan_connect lorawan_connect_t
 lorawan_connect_t structure More...
 
typedef enum lora_events lorawan_event_t
 Events needed to announce stack operation results. More...
 
typedef struct lora_channels_s loramac_channel_t
 DO NOT MODIFY, WILL BREAK THE API! More...
 
typedef struct lora_channelplan lorawan_channelplan_t
 DO NOT MODIFY, WILL BREAK THE API! More...
 
typedef enum lorawan_connect_type lorawan_connect_type_t
 Enumeration for LoRaWAN connection type. More...
 

Enumerations

Detailed Description

Contains data structures required by LoRaWANBase class.

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

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_types.h.

Macro Definition Documentation

#define DR_0   0
Region SF
AS923 SF12 - BW125
AU915 SF10 - BW125
CN470 SF12 - BW125
CN779 SF12 - BW125
EU433 SF12 - BW125
EU868 SF12 - BW125
IN865 SF12 - BW125
KR920 SF12 - BW125
US915 SF10 - BW125
US915_HYBRID SF10 - BW125

Definition at line 368 of file lorawan_types.h.

#define DR_1   1
Region SF
AS923 SF11 - BW125
AU915 SF9 - BW125
CN470 SF11 - BW125
CN779 SF11 - BW125
EU433 SF11 - BW125
EU868 SF11 - BW125
IN865 SF11 - BW125
KR920 SF11 - BW125
US915 SF9 - BW125
US915_HYBRID SF9 - BW125

Definition at line 384 of file lorawan_types.h.

#define DR_10   10
Region SF
AS923 RFU
AU915 SF10 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF10 - BW500
US915_HYBRID SF10 - BW500

Definition at line 528 of file lorawan_types.h.

#define DR_11   11
Region SF
AS923 RFU
AU915 SF9 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF9 - BW500
US915_HYBRID SF9 - BW500

Definition at line 544 of file lorawan_types.h.

#define DR_12   12
Region SF
AS923 RFU
AU915 SF8 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF8 - BW500
US915_HYBRID SF8 - BW500

Definition at line 560 of file lorawan_types.h.

#define DR_13   13
Region SF
AS923 RFU
AU915 SF7 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF7 - BW500
US915_HYBRID SF7 - BW500

Definition at line 576 of file lorawan_types.h.

#define DR_14   14
Region SF
AS923 RFU
AU915 RFU
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 RFU
US915_HYBRID RFU

Definition at line 592 of file lorawan_types.h.

#define DR_15   15
Region SF
AS923 RFU
AU915 RFU
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 RFU
US915_HYBRID RFU

Definition at line 608 of file lorawan_types.h.

#define DR_2   2
Region SF
AS923 SF10 - BW125
AU915 SF8 - BW125
CN470 SF10 - BW125
CN779 SF10 - BW125
EU433 SF10 - BW125
EU868 SF10 - BW125
IN865 SF10 - BW125
KR920 SF10 - BW125
US915 SF8 - BW125
US915_HYBRID SF8 - BW125

Definition at line 400 of file lorawan_types.h.

#define DR_3   3
Region SF
AS923 SF9 - BW125
AU915 SF7 - BW125
CN470 SF9 - BW125
CN779 SF9 - BW125
EU433 SF9 - BW125
EU868 SF9 - BW125
IN865 SF9 - BW125
KR920 SF9 - BW125
US915 SF7 - BW125
US915_HYBRID SF7 - BW125

Definition at line 416 of file lorawan_types.h.

#define DR_4   4
Region SF
AS923 SF8 - BW125
AU915 SF8 - BW500
CN470 SF8 - BW125
CN779 SF8 - BW125
EU433 SF8 - BW125
EU868 SF8 - BW125
IN865 SF8 - BW125
KR920 SF8 - BW125
US915 SF8 - BW500
US915_HYBRID SF8 - BW500

Definition at line 432 of file lorawan_types.h.

#define DR_5   5
Region SF
AS923 SF7 - BW125
AU915 RFU
CN470 SF7 - BW125
CN779 SF7 - BW125
EU433 SF7 - BW125
EU868 SF7 - BW125
IN865 SF7 - BW125
KR920 SF7 - BW125
US915 RFU
US915_HYBRID RFU

Definition at line 448 of file lorawan_types.h.

#define DR_6   6
Region SF
AS923 SF7 - BW250
AU915 RFU
CN470 SF12 - BW125
CN779 SF7 - BW250
EU433 SF7 - BW250
EU868 SF7 - BW250
IN865 SF7 - BW250
KR920 RFU
US915 RFU
US915_HYBRID RFU

Definition at line 464 of file lorawan_types.h.

#define DR_7   7
Region SF
AS923 FSK
AU915 RFU
CN470 SF12 - BW125
CN779 FSK
EU433 FSK
EU868 FSK
IN865 FSK
KR920 RFU
US915 RFU
US915_HYBRID RFU

Definition at line 480 of file lorawan_types.h.

#define DR_8   8
Region SF
AS923 RFU
AU915 SF12 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF12 - BW500
US915_HYBRID SF12 - BW500

Definition at line 496 of file lorawan_types.h.

#define DR_9   9
Region SF
AS923 RFU
AU915 SF11 - BW500
CN470 RFU
CN779 RFU
EU433 RFU
EU868 RFU
IN865 RFU
KR920 RFU
US915 SF11 - BW500
US915_HYBRID SF11 - BW500

Definition at line 512 of file lorawan_types.h.

#define LORAWAN_NETWORK_ID_MASK   (uint32_t) 0xFE000000

A mask for the network ID.

Definition at line 40 of file lorawan_types.h.

#define MSG_UNCONFIRMED_FLAG   0x01

Option Flags for send(), receive() APIs.

Special Notes for UPLINK: i) All of the flags are mutually exclusive. ii) MSG_MULTICAST_FLAG cannot be used.

Definition at line 49 of file lorawan_types.h.

Typedef Documentation

DO NOT MODIFY, WILL BREAK THE API!

Structure to hold parameters for a LoRa channel.

DO NOT MODIFY, WILL BREAK THE API!

This data structures contains LoRaWAN channel plan, i.e., a pointer to a list of channels and the total number of channels included in the plan.

lorawan_connect_t structure

A structure representing the parameters for different connections.

Enumeration for LoRaWAN connection type.

Events needed to announce stack operation results.

CONNECTED - When the connection is complete DISCONNECTED - When the protocol is shut down in response to disconnect() TX_DONE - When a packet is sent TX_TIMEOUT, - When stack was unable to send packet in TX window TX_ERROR, - A general TX error CRYPTO_ERROR, - A crypto error indicating wrong keys TX_SCHEDULING_ERROR, - When stack is unable to schedule packet RX_DONE, - When there is something to receive RX_TIMEOUT, - Not yet mapped RX_ERROR - A general RX error JOIN_FAILURE - When all Joining retries are exhausted UPLINK_REQUIRED - Stack indicates application that some uplink needed AUTOMATIC_UPLINK_ERROR - Stack tried automatically send uplink but some error occurred. Application should initiate uplink as soon as possible.

lorawan_status_t contains status codes in response to stack operations

Enumeration Type Documentation

LoRaWAN device classes definition.

LoRaWAN Specification V1.0.2, chapter 2.1.

Enumerator
CLASS_A 

LoRaWAN device class A.

LoRaWAN Specification V1.0.2, chapter 3.

CLASS_B 

LoRaWAN device class B.

LoRaWAN Specification V1.0.2, chapter 8.

CLASS_C 

LoRaWAN device class C.

LoRaWAN Specification V1.0.2, chapter 17.

Definition at line 59 of file lorawan_types.h.

Events needed to announce stack operation results.

CONNECTED - When the connection is complete DISCONNECTED - When the protocol is shut down in response to disconnect() TX_DONE - When a packet is sent TX_TIMEOUT, - When stack was unable to send packet in TX window TX_ERROR, - A general TX error CRYPTO_ERROR, - A crypto error indicating wrong keys TX_SCHEDULING_ERROR, - When stack is unable to schedule packet RX_DONE, - When there is something to receive RX_TIMEOUT, - Not yet mapped RX_ERROR - A general RX error JOIN_FAILURE - When all Joining retries are exhausted UPLINK_REQUIRED - Stack indicates application that some uplink needed AUTOMATIC_UPLINK_ERROR - Stack tried automatically send uplink but some error occurred. Application should initiate uplink as soon as possible.

Definition at line 210 of file lorawan_types.h.

Enumeration for LoRaWAN connection type.

Enumerator
LORAWAN_CONNECTION_OTAA 

Over The Air Activation.

LORAWAN_CONNECTION_ABP 

Activation By Personalization.

Definition at line 613 of file lorawan_types.h.

lorawan_status_t contains status codes in response to stack operations

Enumerator
LORAWAN_STATUS_OK 

Service started successfully.

LORAWAN_STATUS_BUSY 

Service not started - LoRaMAC is busy.

LORAWAN_STATUS_WOULD_BLOCK 

LoRaMAC cannot send at the moment or have nothing to read.

LORAWAN_STATUS_SERVICE_UNKNOWN 

Service unknown.

LORAWAN_STATUS_PARAMETER_INVALID 

Service not started - invalid parameter.

LORAWAN_STATUS_FREQUENCY_INVALID 

Service not started - invalid frequency.

LORAWAN_STATUS_DATARATE_INVALID 

Service not started - invalid datarate.

LORAWAN_STATUS_FREQ_AND_DR_INVALID 

Service not started - invalid frequency and datarate.

LORAWAN_STATUS_NO_NETWORK_JOINED 

Service not started - the device is not in a LoRaWAN.

LORAWAN_STATUS_LENGTH_ERROR 

Service not started - payload lenght error.

LORAWAN_STATUS_DEVICE_OFF 

Service not started - the device is switched off.

LORAWAN_STATUS_NOT_INITIALIZED 

Service not started - stack not initialized.

LORAWAN_STATUS_UNSUPPORTED 

Service not supported.

LORAWAN_STATUS_CRYPTO_FAIL 

Service not started - crypto failure.

LORAWAN_STATUS_PORT_INVALID 

Invalid port.

LORAWAN_STATUS_CONNECT_IN_PROGRESS 

Services started - Connection in progress.

LORAWAN_STATUS_NO_ACTIVE_SESSIONS 

Services not started - No active session.

LORAWAN_STATUS_IDLE 

Services started - Idle at the moment.

LORAWAN_STATUS_NO_OP 

Cannot perform requested operation.

LORAWAN_STATUS_DUTYCYCLE_RESTRICTED 

Transmission will continue after duty cycle backoff.

LORAWAN_STATUS_NO_CHANNEL_FOUND 

None of the channels is enabled at the moment.

LORAWAN_STATUS_NO_FREE_CHANNEL_FOUND 

None of the enabled channels is ready for another TX (duty cycle limited)

LORAWAN_STATUS_METADATA_NOT_AVAILABLE 

Meta-data after an RX or TX is stale.

LORAWAN_STATUS_ALREADY_CONNECTED 

The device has already joined a network.

Definition at line 84 of file lorawan_types.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.