From bcfe7d012506ebb001875d91cff92f0ba6157df5 Mon Sep 17 00:00:00 2001 From: Byeonggil Jun Date: Thu, 21 Mar 2024 17:31:05 -0700 Subject: [PATCH] Do not use a current tag to update last known status on input port in centralized coodination --- core/federated/federate.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/federated/federate.c b/core/federated/federate.c index 584e9fc3b..edf795238 100644 --- a/core/federated/federate.c +++ b/core/federated/federate.c @@ -260,14 +260,17 @@ static void update_last_known_status_on_input_ports(tag_t tag) { * @param portID The port ID. */ static void update_last_known_status_on_input_port(environment_t* env, tag_t tag, int port_id) { +#ifdef FEDERATED_DECENTRALIZED if (lf_tag_compare(tag, env->current_tag) < 0) tag = env->current_tag; +#endif // FEDERATED_DECENTRALIZED trigger_t* input_port_action = action_for_port(port_id)->trigger; int comparison = lf_tag_compare(tag, input_port_action->last_known_status_tag); if (comparison == 0) tag.microstep++; if (comparison >= 0) { - LF_PRINT_LOG("Updating the last known status tag of port %d from " PRINTF_TAG " to " PRINTF_TAG ".", port_id, + LF_PRINT_LOG("At tag " PRINTF_TAG ", Updating the last known status tag of port %d from " PRINTF_TAG " to " PRINTF_TAG ".", + env->current_tag.time, env->current_tag.microstep, port_id, input_port_action->last_known_status_tag.time - lf_time_start(), input_port_action->last_known_status_tag.microstep, tag.time - lf_time_start(), tag.microstep); input_port_action->last_known_status_tag = tag;