Skip to content

Commit d030c04

Browse files
authored
Merge pull request #9219 from hasnainvirk/lorawanbase_migration
LoRaWAN: Retiring LoRaWANBase class
2 parents dbd92c7 + 5fb383c commit d030c04

18 files changed

+578
-517
lines changed

features/lorawan/LoRaWANBase.h

Lines changed: 10 additions & 481 deletions
Large diffs are not rendered by default.

features/lorawan/LoRaWANInterface.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* @file
33
*
4-
* @brief Implementation of LoRaWANBase
4+
* @brief A LoRaWAN network interface
55
*
66
* Copyright (c) 2017, Arm Limited and affiliates.
77
* SPDX-License-Identifier: Apache-2.0
@@ -21,7 +21,10 @@
2121

2222
#include "LoRaWANInterface.h"
2323
#include "lorastack/phy/loraphy_target.h"
24+
#include "mbed-trace/mbed_trace.h"
25+
#define TRACE_GROUP "LSTK"
2426

27+
using namespace mbed;
2528
using namespace events;
2629

2730
LoRaWANInterface::LoRaWANInterface(LoRaRadio &radio)

features/lorawan/LoRaWANInterface.h

Lines changed: 505 additions & 29 deletions
Large diffs are not rendered by default.

features/lorawan/LoRaWANStack.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,9 @@
5454

5555
class LoRaPHY;
5656

57+
/** LoRaWANStack Class
58+
* A controller layer for LoRaWAN MAC and PHY
59+
*/
5760
class LoRaWANStack: private mbed::NonCopyable<LoRaWANStack> {
5861

5962
public:

features/lorawan/lorastack/mac/LoRaMac.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@
5656

5757
#include "platform/ScopedLock.h"
5858

59+
/** LoRaMac Class
60+
* Implementation of LoRaWAN MAC layer
61+
*/
5962
class LoRaMac {
6063

6164
public:

features/lorawan/lorastack/mac/LoRaMacCommand.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@
5151

5252
class LoRaMac;
5353

54+
/** LoRaMacCommand Class
55+
* Helper class for LoRaMac layer to handle any MAC commands
56+
*/
5457
class LoRaMacCommand {
5558

5659
public:

features/lorawan/lorastack/phy/LoRaPHY.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
#include "LoRaRadio.h"
4141
#include "lora_phy_ds.h"
4242

43+
/** LoRaPHY Class
44+
* Parent class for LoRa regional PHY implementations
45+
*/
4346
class LoRaPHY : private mbed::NonCopyable<LoRaPHY> {
4447

4548
public:

features/lorawan/lorastack/phy/LoRaPHYAS923.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_AS923_H_
3333
#define MBED_OS_LORAPHY_AS923_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
/*!
@@ -46,7 +48,6 @@
4648

4749
#define AS923_CHANNEL_MASK_SIZE 1
4850

49-
5051
class LoRaPHYAS923 : public LoRaPHY {
5152

5253
public:
@@ -68,4 +69,5 @@ class LoRaPHYAS923 : public LoRaPHY {
6869
uint16_t default_channel_mask[AS923_CHANNEL_MASK_SIZE];
6970
};
7071

72+
#endif /* DOXYGEN_ONLY*/
7173
#endif /* MBED_OS_LORAPHY_AS923_H_ */

features/lorawan/lorastack/phy/LoRaPHYAU915.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@
3333

3434
#define MBED_OS_LORAPHY_AU915_H_
3535

36+
#if !(DOXYGEN_ONLY)
37+
3638
#include "LoRaPHY.h"
3739

3840
// Definitions
@@ -48,7 +50,6 @@
4850

4951
#define AU915_CHANNEL_MASK_SIZE 5
5052

51-
5253
class LoRaPHYAU915 : public LoRaPHY {
5354

5455
public:
@@ -126,4 +127,6 @@ class LoRaPHYAU915 : public LoRaPHY {
126127
uint16_t default_channel_mask[AU915_CHANNEL_MASK_SIZE];
127128
};
128129

130+
#endif /* DOXYGEN_ONLY*/
129131
#endif /* MBED_OS_LORAPHY_AU915_H_ */
132+

features/lorawan/lorastack/phy/LoRaPHYCN470.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_CN470_H_
3333
#define MBED_OS_LORAPHY_CN470_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
// Definitions
@@ -94,4 +96,5 @@ class LoRaPHYCN470 : public LoRaPHY {
9496
uint16_t default_channel_mask[CN470_CHANNEL_MASK_SIZE];
9597
};
9698

99+
#endif /* DOXYGEN_ONLY*/
97100
#endif /* MBED_OS_LORAPHY_CN470_H_ */

features/lorawan/lorastack/phy/LoRaPHYCN779.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_CN779_H_
3333
#define MBED_OS_LORAPHY_CN779_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
#define CN779_MAX_NB_CHANNELS 16
@@ -70,4 +72,5 @@ class LoRaPHYCN779 : public LoRaPHY {
7072
uint16_t default_channel_mask[CN779_CHANNEL_MASK_SIZE];
7173
};
7274

75+
#endif /* DOXYGEN_ONLY*/
7376
#endif /* MBED_OS_LORAPHY_CN779_H_ */

features/lorawan/lorastack/phy/LoRaPHYEU433.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_EU433_H_
3333
#define MBED_OS_LORAPHY_EU433_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
/*!
@@ -76,5 +78,5 @@ class LoRaPHYEU433 : public LoRaPHY {
7678
uint16_t default_channel_mask[EU433_CHANNEL_MASK_SIZE];
7779
};
7880

79-
81+
#endif /* DOXYGEN_ONLY*/
8082
#endif /* MBED_OS_LORAPHY_EU433_H_ */

features/lorawan/lorastack/phy/LoRaPHYEU868.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_EU868_H_
3333
#define MBED_OS_LORAPHY_EU868_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
/*!
@@ -79,4 +81,5 @@ class LoRaPHYEU868 : public LoRaPHY {
7981
uint16_t default_channel_mask[EU868_CHANNEL_MASK_SIZE];
8082
};
8183

84+
#endif /* DOXYGEN_ONLY*/
8285
#endif /* MBED_OS_LORAPHY_EU868_H_ */

features/lorawan/lorastack/phy/LoRaPHYIN865.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@
3232
#ifndef MBED_OS_LORAPHY_IN865_H_
3333
#define MBED_OS_LORAPHY_IN865_H_
3434

35-
#include "LoRaPHY.h"
35+
#if !(DOXYGEN_ONLY)
3636

37+
#include "LoRaPHY.h"
3738

3839
/*!
3940
* LoRaMac maximum number of channels
@@ -79,4 +80,5 @@ class LoRaPHYIN865 : public LoRaPHY {
7980
uint16_t default_channel_mask[IN865_CHANNEL_MASK_SIZE];
8081
};
8182

83+
#endif /* DOXYGEN_ONLY */
8284
#endif /* MBED_OS_LORAPHY_IN865_H_ */

features/lorawan/lorastack/phy/LoRaPHYKR920.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHY_KR920_H_
3333
#define MBED_OS_LORAPHY_KR920_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
/*!
@@ -92,5 +94,6 @@ class LoRaPHYKR920 : public LoRaPHY {
9294
uint16_t default_channel_mask[KR920_CHANNEL_MASK_SIZE];
9395
};
9496

97+
#endif /* DOXYGEN_ONLY */
9598
#endif // MBED_OS_LORAPHY_KR920_H_
9699

features/lorawan/lorastack/phy/LoRaPHYUS915.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#ifndef MBED_OS_LORAPHYUS_915_H_
3333
#define MBED_OS_LORAPHYUS_915_H_
3434

35+
#if !(DOXYGEN_ONLY)
36+
3537
#include "LoRaPHY.h"
3638

3739
/*!
@@ -129,4 +131,5 @@ class LoRaPHYUS915 : public LoRaPHY {
129131
uint16_t default_channel_mask[US915_CHANNEL_MASK_SIZE];
130132
};
131133

134+
#endif /* DOXYGEN_ONLY */
132135
#endif /* MBED_OS_LORAPHY_US915_H_ */

features/lorawan/lorastack/phy/lora_phy_ds.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -480,21 +480,29 @@ typedef struct continuous_wave_mode_params_s {
480480
uint16_t timeout;
481481
} cw_mode_params_t;
482482

483+
/*!
484+
* Template for a table
485+
*/
483486
typedef struct {
484487
void *table;
485488
uint8_t size;
486489
} loraphy_table_t;
487490

491+
/*!
492+
* Contains information regarding channel configuration of
493+
* a given PHY
494+
*/
488495
typedef struct {
489-
490496
uint8_t channel_list_size;
491497
uint8_t mask_size;
492-
493498
uint16_t *mask;
494499
uint16_t *default_mask;
495500
channel_params_t *channel_list;
496501
} loraphy_channels_t;
497502

503+
/*!
504+
* Global configuration parameters of a given PHY
505+
*/
498506
typedef struct {
499507
bool duty_cycle_enabled;
500508
bool accept_tx_param_setup_req;

features/lorawan/system/lorawan_data_structures.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1040,6 +1040,9 @@ typedef struct {
10401040
int timer_id;
10411041
} timer_event_t;
10421042

1043+
/*!
1044+
* A composite structure containing device identifiers and security keys
1045+
*/
10431046
typedef struct {
10441047
/*!
10451048
* Device IEEE EUI
@@ -1070,6 +1073,9 @@ typedef struct {
10701073

10711074
} loramac_keys;
10721075

1076+
/*!
1077+
* A composite structure containing all the timers used in the LoRaWAN operation
1078+
*/
10731079
typedef struct {
10741080
/*!
10751081
* Aggregated duty cycle management
@@ -1107,6 +1113,9 @@ typedef struct {
11071113

11081114
} lorawan_timers;
11091115

1116+
/*!
1117+
* Global MAC layer configuration parameters
1118+
*/
11101119
typedef struct {
11111120

11121121
/*!

0 commit comments

Comments
 (0)