-
Notifications
You must be signed in to change notification settings - Fork 3
Basic federated support on Zephyr #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
… agreement or shutdown agreement.
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Self-review done
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
project(reactor-uc-zephyr) | ||
|
||
# TODO: Improve the way of pickng which Network channels to add to the build. | ||
set(NETWORK_POSIX_TCP ON CACHE BOOL "blah") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
... "blah"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes... using CMake options is irritating since I cannot just do set(NETWORK_POSIX_TCP ON)
I need that whole line. We should address this with #75
#define DEFINE_FEDERATED_OUTPUT_CONNECTION(ConnectionName, BufferType) \ | ||
typedef struct { \ | ||
FederatedOutputConnection super; \ | ||
BufferType buffer[1]; \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this suffer from the same problem that also action suffered, where values would be overwritten?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it does not have a TriggerDataQueue, it is only a temporary place to store the value in case it is overwritten with other calls to lf_set
@@ -17,6 +17,10 @@ | |||
|
|||
#include "proto/message.pb.h" | |||
|
|||
#ifdef MIN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because sometimes MIN
is already defined, it is the case for Zephyr, so then we undef to avoid errors
src/platform/posix/tcp_ip_channel.c
Outdated
memset(&self->receive_thread_stack, 0, TCP_IP_CHANNEL_RECV_THREAD_STACK_SIZE); | ||
if (pthread_attr_init(&self->receive_thread_attr) < 0) { | ||
LF_ERR(NET, "pthread_attr_init failed with %d", errno); | ||
throw(""); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add error message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done!
Memory usage after merging this PR will be: Memory Reportaction_microstep_test_c
action_test_c
delayed_conn_test_c
event_queue_test_c
physical_action_test_c
port_test_c
reaction_queue_test_c
shutdown_test_c
startup_test_c
timer_test_c
trigger_data_queue_test_c
|
@tanneberger I have addressed your comments. CI is failing, but the fixes are in the |
This PR mainly adds an example of federated execution on Zephyr using TcpIpChannel