mirror of https://github.com/ARMmbed/mbed-os.git
Merge pull request #13410 from ashok-rao/lorawan-refactor
Refactoring \lorawan --> moving it inside \connectivity.pull/13435/head
commit
327fe532b2
|
@ -12,7 +12,7 @@ Folders containing files under different permissive license than Apache 2.0 are
|
|||
- [features/FEATURE_PSA/FEATURE_TFM](./features/FEATURE_PSA/FEATURE_TFM) - BSD-3-Clause
|
||||
- [features/FEATURE_PSA/FEATURE_MBED_PSA_SRV/services/attestation](./features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation) - BSD-3-Clause
|
||||
- [features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor](./features/FEATURE_PSA/TARGET_MBED_PSA_SRV/services/attestation/qcbor) - BSD-3-Clause
|
||||
- [features/lorawan](./features/lorawan) - Revised BSD
|
||||
- [connectivity/lorawan](./connectivity/lorawan) - Revised BSD
|
||||
- [connectivity/lwipstack](./connectivity/lwipstack) - BSD-style, MIT-style
|
||||
- [connectivity/nanostack/sal-stack-nanostack](./connectivity/nanostack/sal-stack-nanostack) - BSD-3-Clause
|
||||
- [features/frameworks/unity/unity](./features/frameworks/unity/unity) - MIT
|
||||
|
|
|
@ -146,11 +146,12 @@ set(unittest-includes-base
|
|||
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/device"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/cellular/include/cellular/framework/common"
|
||||
"${PROJECT_SOURCE_DIR}/../features/lorawan"
|
||||
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack"
|
||||
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack/mac"
|
||||
"${PROJECT_SOURCE_DIR}/../features/lorawan/lorastack/phy"
|
||||
"${PROJECT_SOURCE_DIR}/../features/lorawan/system"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/include/lorawan"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack/mac"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan/lorastack/phy"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/lorawan"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/mbedtls"
|
||||
"${PROJECT_SOURCE_DIR}/../connectivity/mbedtls/include"
|
||||
)
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
#include <cstddef>
|
||||
|
||||
#include "lorawan_types.h"
|
||||
#include "lorawan_data_structures.h"
|
||||
#include "system/lorawan_data_structures.h"
|
||||
|
||||
namespace LoRaMac_stub {
|
||||
extern bool bool_value;
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
*/
|
||||
|
||||
#include "mbed_assert.h"
|
||||
#include "LoRaWANTimer.h"
|
||||
#include "system/LoRaWANTimer.h"
|
||||
|
||||
#include "LoRaWANTimer_stub.h"
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
* limitations under the License.
|
||||
*/
|
||||
|
||||
#include "LoRaWANTimer.h"
|
||||
#include "system/LoRaWANTimer.h"
|
||||
|
||||
namespace LoRaWANTimer_stub {
|
||||
extern lorawan_time_t time_value;
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
UNITTESTS/*
|
|
@ -23,6 +23,7 @@
|
|||
#include "greentea-client/test_env.h"
|
||||
|
||||
#include "Semaphore.h"
|
||||
#include "ThisThread.h"
|
||||
|
||||
#include "mbed_trace.h"
|
||||
#define TRACE_GROUP "RTST"
|
||||
|
@ -61,7 +62,7 @@ static volatile event_t received_event;
|
|||
|
||||
static void tx_done()
|
||||
{
|
||||
ThisThread::sleep_for(2);
|
||||
rtos::ThisThread::sleep_for(2);
|
||||
TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
||||
received_event = EV_TX_DONE;
|
||||
TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
||||
|
@ -69,7 +70,7 @@ static void tx_done()
|
|||
|
||||
static void tx_timeout()
|
||||
{
|
||||
ThisThread::sleep_for(2);
|
||||
rtos::ThisThread::sleep_for(2);
|
||||
TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
||||
received_event = EV_TX_TIMEOUT;
|
||||
TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
||||
|
@ -77,7 +78,7 @@ static void tx_timeout()
|
|||
|
||||
static void rx_done(const uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr)
|
||||
{
|
||||
ThisThread::sleep_for(2);
|
||||
rtos::ThisThread::sleep_for(2);
|
||||
TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
||||
received_event = EV_RX_DONE;
|
||||
TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
||||
|
@ -85,7 +86,7 @@ static void rx_done(const uint8_t *payload, uint16_t size, int16_t rssi, int8_t
|
|||
|
||||
static void rx_timeout()
|
||||
{
|
||||
ThisThread::sleep_for(2);
|
||||
rtos::ThisThread::sleep_for(2);
|
||||
TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
||||
received_event = EV_RX_TIMEOUT;
|
||||
TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
||||
|
@ -93,7 +94,7 @@ static void rx_timeout()
|
|||
|
||||
static void rx_error()
|
||||
{
|
||||
ThisThread::sleep_for(2);
|
||||
rtos::ThisThread::sleep_for(2);
|
||||
TEST_ASSERT_EQUAL(EV_NONE, received_event);
|
||||
received_event = EV_RX_ERROR;
|
||||
TEST_ASSERT_EQUAL(osOK, event_sem.release());
|
||||
|
@ -146,7 +147,7 @@ void test_set_rx_config()
|
|||
0, // payload_len,
|
||||
false, false, 0, // crc_on, freq_hop_on, hop_period,
|
||||
true, false); // iq_inverted, rx_continuous
|
||||
radio->receive(100);
|
||||
radio->receive();
|
||||
|
||||
TEST_ASSERT_EQUAL(RF_RX_RUNNING, radio->get_status());
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaMac")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/mac/LoRaMac.cpp
|
||||
../connectivity/lorawan/lorastack/mac/LoRaMac.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/mac
|
||||
../connectivity/lorawan/lorastack/mac
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loramac/Test_LoRaMac.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaMac.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANStack_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaMacChannelPlan")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/mac/LoRaMacChannelPlan.cpp
|
||||
../connectivity/lorawan/lorastack/mac/LoRaMacChannelPlan.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/mac
|
||||
../connectivity/lorawan/lorastack/mac
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loramacchannelplan/Test_LoRaMacChannelPlan.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaMacChannelPlan.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
)
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaMacCommand")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/mac/LoRaMacCommand.cpp
|
||||
../connectivity/lorawan/lorastack/mac/LoRaMacCommand.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/mac
|
||||
../connectivity/lorawan/lorastack/mac
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loramaccommand/Test_LoRaMacCommand.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaMacCommand.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
)
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaMacCrypto")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/mac/LoRaMacCrypto.cpp
|
||||
../connectivity/lorawan/lorastack/mac/LoRaMacCrypto.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/mac
|
||||
../connectivity/lorawan/lorastack/mac
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loramaccrypto/Test_LoRaMacCrypto.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaMacCrypto.cpp
|
||||
stubs/cipher_stub.c
|
||||
stubs/aes_stub.c
|
||||
stubs/cmac_stub.c
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHY")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHY.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHY.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphy/Test_LoRaPHY.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHY.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
)
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYAS923")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYAS923.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYAS923.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyas923/Test_LoRaPHYAS923.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYAS923.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYAU915")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYAU915.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYAU915.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyau915/Test_LoRaPHYAU915.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYAU915.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYCN470")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYCN470.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYCN470.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphycn470/Test_LoRaPHYCN470.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYCN470.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYCN779")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYCN779.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYCN779.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphycn779/Test_LoRaPHYCN779.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYCN779.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYEU433")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYEU433.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYEU433.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyeu433/Test_LoRaPHYEU433.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYEU433.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYEU868")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYEU868.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYEU868.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyeu868/Test_LoRaPHYEU868.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYEU868.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYIN865")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYIN865.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYIN865.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyin865/Test_LoRaPHYIN865.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYIN865.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
||||
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYKR920")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYKR920.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYKR920.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphykr920/Test_LoRaPHYKR920.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYKR920.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
|
@ -20,18 +20,18 @@ set(TEST_SUITE_NAME "lorawan_LoRaPHYUS915")
|
|||
|
||||
# Source files
|
||||
set(unittest-sources
|
||||
../features/lorawan/lorastack/phy/LoRaPHYUS915.cpp
|
||||
../connectivity/lorawan/lorastack/phy/LoRaPHYUS915.cpp
|
||||
)
|
||||
|
||||
# Add test specific include paths
|
||||
set(unittest-includes ${unittest-includes}
|
||||
target_h
|
||||
../features/lorawan/lorastack/phy
|
||||
../connectivity/lorawan/lorastack/phy
|
||||
)
|
||||
|
||||
# Test & stub files
|
||||
set(unittest-test-sources
|
||||
features/lorawan/loraphyus915/Test_LoRaPHYUS915.cpp
|
||||
${CMAKE_CURRENT_LIST_DIR}/Test_LoRaPHYUS915.cpp
|
||||
stubs/LoRaPHY_stub.cpp
|
||||
stubs/LoRaWANTimer_stub.cpp
|
||||
stubs/mbed_assert_stub.cpp
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue