Skip to content

Commit

Permalink
Fix a trace point for DNET
Browse files Browse the repository at this point in the history
  • Loading branch information
byeonggiljun committed Apr 23, 2024
1 parent 1c2777d commit 4ebd09e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
9 changes: 9 additions & 0 deletions core/federated/RTI/rti_remote.c
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,15 @@ void notify_provisional_tag_advance_grant(scheduling_node_t* e, tag_t tag) {
}

void send_downstream_next_event_tag(scheduling_node_t* e, tag_t tag) {
if (e->state == NOT_CONNECTED) {
return;
}
// Need to make sure that the destination federate's thread has already
// sent the starting MSG_TYPE_TIMESTAMP message.
while (e->state == PENDING) {
// Need to wait here.
lf_cond_wait(&sent_start_time);
}
size_t message_length = 1 + sizeof(int64_t) + sizeof(uint32_t);
unsigned char buffer[message_length];
buffer[0] = MSG_TYPE_DOWNSTREAM_NEXT_EVENT_TAG;
Expand Down
2 changes: 2 additions & 0 deletions util/tracing/trace_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ const char* trace_event_names[] = {
"Sending P2P_MSG",
"Sending ADR_AD",
"Sending ADR_QR",
"Sending DNET",
// Receiving messages
"Receiving ACK",
"Receiving FAILED",
Expand All @@ -118,6 +119,7 @@ const char* trace_event_names[] = {
"Receiving P2P_MSG",
"Receiving ADR_AD",
"Receiving ADR_QR",
"Receiving DNET",
"Receiving UNIDENTIFIED",
};

Expand Down

0 comments on commit 4ebd09e

Please sign in to comment.