reactor-c
C Runtime for Lingua Franca
Loading...
Searching...
No Matches
socket_stat_t Struct Reference

#include <clock-sync.h>

Data Fields

instant_t remote_physical_clock_snapshot_T1
 
instant_t local_physical_clock_snapshot_T2
 
interval_t local_delay
 
int received_T4_messages_in_current_sync_window
 
interval_t history
 
interval_t network_stat_round_trip_delay_max
 
int network_stat_sample_index
 
interval_t clock_synchronization_error_bound
 
interval_t network_stat_samples [_LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL]
 

Detailed Description

Statistics for a given socket. The RTI initiates a clock synchronization action by sending its current physical time T1 to a federate. The federate records the local time T2 that it receives T1. It sends a reply at local time T3, which the RTI receives at its time T4. The RTI sends back T4. The round trip delay on the socket is therefore estimated as: (T4 - T1) - (T3 - T2).

Field Documentation

◆ clock_synchronization_error_bound

interval_t socket_stat_t::clock_synchronization_error_bound

◆ history

interval_t socket_stat_t::history

◆ local_delay

interval_t socket_stat_t::local_delay

◆ local_physical_clock_snapshot_T2

instant_t socket_stat_t::local_physical_clock_snapshot_T2

◆ network_stat_round_trip_delay_max

interval_t socket_stat_t::network_stat_round_trip_delay_max

FIXME: TODO: A federate should create a socket_stat_t for every federate it is connected to and keep record of the following stats

◆ network_stat_sample_index

int socket_stat_t::network_stat_sample_index

◆ network_stat_samples

interval_t socket_stat_t::network_stat_samples[_LF_CLOCK_SYNC_EXCHANGES_PER_INTERVAL]

◆ received_T4_messages_in_current_sync_window

int socket_stat_t::received_T4_messages_in_current_sync_window

◆ remote_physical_clock_snapshot_T1

instant_t socket_stat_t::remote_physical_clock_snapshot_T1

The documentation for this struct was generated from the following file: