-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Have LFC generate a main function that can optionally be included in the build * CI * CI * CI * Setup LFC in RIOT container * Switch to riot master * Fix * Install LFC deps in zephyr CI also * WIP * WIP * WIP: SimpleFederated.lf now compiles. But invoking CMake correctly to generate two binaries and a shell script in `bin` is not working * Generate a launch script for federated native * Make federated launch script executable * WIP * Rework the handling of connections * Various fixes to get all standalone tests to pass again * Formatting * More WIP * Formatting * More WIP * Add @interface attr * More WIP * More WIP * More WIP * All tests are passing * Refactor * Formatting * Refactorings * More docs * CI * Fixes * TcpIp fixes * Revert more tcp stuff * Avoid flooding log when a federate closes a socket * Remove merge mistake * Formatting * Fix posix federated * More minor fixes * Format * Minimum event queue of 2 * Remove some dead code * Also close send_failed socketpair on reset * Generate return 0 in main function * Only generate launch script when we target native * Set timeout of 1minute on our LF tests * Add some info prints * Add was_ever_connected API to network_channel * Fix some warnings in unit-tests * Avoid some unnecessary LF_INFO calls * Do not timestamp logs for FlexPRET * Format * Make RIOT compile * Fix makefile and missing comma * Remove build.sh in riot Lf example * Use global _lf_environment * Fix missing _lf_environment in test * Dont need environment arg to TcpIp and CoapUdp ctors * Coap updates * Remove stale ref * Fix APPLICATION name * Fix make clean * Add all riot examples to the CI again * Fix hello_lf example make clean command not working * Rename FEDERATION -> FEDERATE * Make build scripts more realistic --------- Co-authored-by: erlingrj <[email protected]>
- Loading branch information
1 parent
c592b89
commit 5144e03
Showing
12 changed files
with
148 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
REMOTE_ADDRESS=fe80::8cc3:33ff:febb:1b3 make all -C ./sender | ||
REMOTE_ADDRESS=fe80::44e5:1bff:fee4:dac8 make all -C ./receiver |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
REACTOR_UC_PATH ?= $(CURDIR)/../../../ | ||
|
||
# The name of the LF application inside "./src" to build/run/flash etc. | ||
LF_MAIN ?= CoapFederatedLF | ||
FEDERATE ?= r1 | ||
|
||
# Execute the LF compiler if build target is "all" | ||
ifeq ($(firstword $(MAKECMDGOALS)),all) | ||
_ := $(shell $(REACTOR_UC_PATH)/lfc/bin/lfc-dev src/$(LF_MAIN).lf) | ||
endif | ||
|
||
# ---- RIOT specific configuration ---- | ||
# This has to be the absolute path to the RIOT base directory: | ||
RIOTBASE ?= $(CURDIR)/../../../../RIOT | ||
|
||
# If no BOARD is found in the environment, use this default: | ||
BOARD ?= native | ||
|
||
# Comment this out to disable code in RIOT that does safety checking | ||
# which is not needed in a production environment but helps in the | ||
# development process: | ||
DEVELHELP ?= 1 | ||
|
||
# Change this to 0 show compiler invocation lines by default: | ||
QUIET ?= 1 | ||
|
||
# Enable reactor-uc features | ||
CFLAGS += -DNETWORK_CHANNEL_COAP_RIOT | ||
|
||
# Configure CoAP retransmission timeout | ||
CFLAGS += -DCONFIG_GCOAP_NO_RETRANS_BACKOFF=1 | ||
CFLAGS += -DCONFIG_COAP_ACK_TIMEOUT_MS=400 | ||
CFLAGS += -DCONFIG_COAP_MAX_RETRANSMIT=4 | ||
|
||
include $(REACTOR_UC_PATH)/make/riot/riot-lfc.mk |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#!/bin/bash | ||
FEDERATE=r1 PORT=tap0 make all | ||
FEDERATE=r2 PORT=tap1 make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
target uC { | ||
platform: RIOT, | ||
timeout: 1sec | ||
} | ||
|
||
reactor Src(id: int = 0) { | ||
output out: int | ||
reaction(startup) -> out{= | ||
printf("Hello from Src!\n"); | ||
lf_set(out, self->id); | ||
=} | ||
} | ||
|
||
reactor Dst { | ||
input in: int | ||
state check: bool = false | ||
reaction(startup) {= | ||
printf("Hello from Dst!\n"); | ||
=} | ||
reaction(in) {= | ||
printf("Received %d from Src\n", in->value); | ||
validate(in->value == 42); | ||
self->check = true; | ||
env->request_shutdown(env); | ||
=} | ||
|
||
reaction(shutdown) {= | ||
validate(self->check); | ||
=} | ||
} | ||
|
||
federated reactor { | ||
@interface_coap(name="if1", address="fe80::44e5:1bff:fee4:dac8") | ||
r1 = new Src(id=42) | ||
|
||
@interface_coap(name="if1", address="fe80::8cc3:33ff:febb:1b3") | ||
r2 = new Dst() | ||
|
||
@link(left="if1", right="if1") | ||
r1.out -> r2.in | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
make all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters