Skip to content

Commit 0ce691b

Browse files
committed
add cbor encoding for sending network configuration in cloud
1 parent bc06ddc commit 0ce691b

File tree

8 files changed

+605
-11
lines changed

8 files changed

+605
-11
lines changed

extras/test/CMakeLists.txt

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,17 @@ FetchContent_Declare(
2020
GIT_TAG main
2121
)
2222

23+
FetchContent_Declare(
24+
connectionhandler
25+
GIT_REPOSITORY https://github.com/arduino-libraries/Arduino_ConnectionHandler.git
26+
GIT_TAG master
27+
)
28+
2329
FetchContent_MakeAvailable(Catch2)
2430

2531
FetchContent_MakeAvailable(cloudutils)
32+
33+
FetchContent_MakeAvailable(connectionhandler)
2634
##########################################################################
2735

2836
include_directories(include)
@@ -55,6 +63,18 @@ target_include_directories(
5563
${cloudutils_SOURCE_DIR}/src/interfaces
5664
)
5765

66+
add_library(connectionhandler INTERFACE)
67+
68+
target_include_directories(
69+
connectionhandler INTERFACE
70+
${connectionhandler_SOURCE_DIR}/src/
71+
)
72+
73+
target_include_directories(
74+
connectionhandler INTERFACE
75+
${connectionhandler_SOURCE_DIR}/src/connectionHandlerModels
76+
)
77+
5878
##########################################################################
5979

6080
set(CMAKE_CXX_STANDARD 11)
@@ -126,12 +146,13 @@ set(TEST_TARGET_SRCS
126146

127147
##########################################################################
128148

149+
add_compile_definitions(BOARD_HAS_LORA BOARD_HAS_CATM1_NBIOT BOARD_HAS_WIFI BOARD_HAS_ETHERNET BOARD_HAS_CELLULAR BOARD_HAS_NB BOARD_HAS_GSM)
129150
add_compile_definitions(HOST HAS_TCP)
130151
add_compile_options(-Wall -Wextra -Wpedantic -Werror)
131152
add_compile_options(-Wno-cast-function-type)
132153

133154
set(CMAKE_C_FLAGS ${CMAKE_C_FLAGS} "--coverage")
134-
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage -Wno-deprecated-copy")
155+
set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "--coverage -Wno-deprecated-copy -Wno-missing-field-initializers")
135156

136157
##########################################################################
137158

@@ -140,6 +161,7 @@ add_executable(
140161
${TEST_TARGET_SRCS}
141162
)
142163

164+
target_link_libraries( ${TEST_TARGET} connectionhandler)
143165
target_link_libraries( ${TEST_TARGET} cloudutils)
144166
target_link_libraries( ${TEST_TARGET} Catch2WithMain )
145167

extras/test/include/Arduino.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
******************************************************************************/
1111

1212
#include <string>
13+
#include <IPAddress.h>
1314

1415
/******************************************************************************
1516
DEFINES

extras/test/include/IPAddress.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
Copyright (c) 2019 Arduino. All rights reserved.
3+
*/
4+
5+
#ifndef TEST_IPADDRESS_H_
6+
#define TEST_IPADDRESS_H_
7+
8+
enum IPType {
9+
IPv4,
10+
IPv6
11+
};
12+
13+
#endif

0 commit comments

Comments
 (0)