Skip to content

Commit fe041d8

Browse files
committed
Add flag for posix-tcp
1 parent 7dd32d4 commit fe041d8

File tree

7 files changed

+8
-4
lines changed

7 files changed

+8
-4
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ set(BUILD_UNIT_TESTS OFF CACHE BOOL "Build unit tests")
99
set(TEST_COVERAGE OFF CACHE BOOL "Compute test coverage")
1010
set(ASAN OFF CACHE BOOL "Compile with AddressSanitizer")
1111
set(PLATFORM "POSIX" CACHE STRING "Platform to target")
12-
1312
set(EVENT_QUEUE_SIZE 10 CACHE STRING "Static size of the event queue")
1413
set(REACTION_QUEUE_SIZE 10 CACHE STRING "Static size of the reaction queue")
14+
set(NETWORK_POSIX_TCP OFF CACHE BOOL "Use POSIX TCP NetworkChannel")
1515

1616
# Code coverage setup
1717
if(TEST_COVERAGE)

examples/posix/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
cmake_minimum_required(VERSION 3.20.0)
22
set(PLATFORM "POSIX" CACHE STRING "Platform to target")
3+
set(NETWORK_POSIX_TCP ON)
34

45
# Find all .c files in the src directory
56
file(GLOB C_FILES "${CMAKE_CURRENT_SOURCE_DIR}/*.c")

examples/zephyr/basic_federated/federated_receiver/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ set(BOARD frdm_k64f)
33
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
44
project(reactor-uc-zephyr)
55

6+
set(NETWORK_POSIX_TCP ON)
67
set(PLATFORM "ZEPHYR" CACHE STRING "Platform to target")
78
add_subdirectory(../../../../ reactor-uc)
89

examples/zephyr/basic_federated/federated_sender/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ set(BOARD frdm_k64f)
44
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
55
project(reactor-uc-zephyr)
66

7+
8+
set(NETWORK_POSIX_TCP ON)
79
set(PLATFORM "ZEPHYR" CACHE STRING "Platform to target")
810
add_subdirectory(../../../../ reactor-uc)
911

src/network_bundles.c

Whitespace-only changes.

src/network_channel.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#ifdef NETWORK_POSIX_TCP
2+
#include "platform/posix/tcp_ip_channel.c"
3+
#endif

src/platform.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,8 @@
11
#if defined(PLATFORM_POSIX)
22
#include "platform/posix/posix.c"
3-
#include "platform/posix/tcp_ip_channel.c"
43
#elif defined(PLATFORM_RIOT)
5-
#include "platform/posix/tcp_ip_channel.c"
64
#include "platform/riot/riot.c"
75
#elif defined(PLATFORM_ZEPHYR)
8-
#include "platform/posix/tcp_ip_channel.c"
96
#include "platform/zephyr/zephyr.c"
107
#elif defined(PLATFORM_PICO)
118
#include "platform/pico/pico.c"

0 commit comments

Comments
 (0)