![]() |
Mads
Multi-Agent Distributed System
|
Result of a clock-offset measurement: offset_us added to a clock in the measured domain yields broker-host time (broker_host_clock - domain_clock). source/hops/origin_agent_id/seq are Agent-level bookkeeping the estimator does not fill in – only estimate()'s own offset_us/delay_us/samples/valid are computed from the timestamps.
More...
#include <clock_offset.hpp>
Public Member Functions | |
| std::string | clock_ref () const |
Public Attributes | |
| int64_t | offset_us = 0 |
| int64_t | delay_us = 0 |
| int64_t | jitter_us = 0 |
| size_t | samples = 0 |
| uint8_t | hops = 0 |
| ClockSource | source = ClockSource::None |
| std::string | origin_agent_id |
| uint64_t | seq = 0 |
| std::chrono::steady_clock::time_point | measured_at {} |
| bool | valid = false |
Result of a clock-offset measurement: offset_us added to a clock in the measured domain yields broker-host time (broker_host_clock - domain_clock). source/hops/origin_agent_id/seq are Agent-level bookkeeping the estimator does not fill in – only estimate()'s own offset_us/delay_us/samples/valid are computed from the timestamps.
Definition at line 51 of file clock_offset.hpp.
|
inline |
"<origin_agent_id>:<seq>", stamped onto corrected payloads so two agents can be proven to have used the same offset.
Definition at line 72 of file clock_offset.hpp.
References origin_agent_id, and seq.
| int64_t Mads::ClockOffsetResult::delay_us = 0 |
Definition at line 53 of file clock_offset.hpp.
| uint8_t Mads::ClockOffsetResult::hops = 0 |
0 = measured directly against the broker; >0 = chained through that many peer hops (a "peer"-source measurement composed on top of another agent's own adopted offset).
Definition at line 59 of file clock_offset.hpp.
| int64_t Mads::ClockOffsetResult::jitter_us = 0 |
Definition at line 54 of file clock_offset.hpp.
| std::chrono::steady_clock::time_point Mads::ClockOffsetResult::measured_at {} |
Local reception/measurement instant (steady_clock), used only for staleness – never compared across hosts.
Definition at line 67 of file clock_offset.hpp.
| int64_t Mads::ClockOffsetResult::offset_us = 0 |
Definition at line 52 of file clock_offset.hpp.
| std::string Mads::ClockOffsetResult::origin_agent_id |
Which agent's measurement this is – the tie-breaker and identity used by ClockConsensus's adoption rule.
Definition at line 63 of file clock_offset.hpp.
Referenced by clock_ref().
| size_t Mads::ClockOffsetResult::samples = 0 |
Definition at line 55 of file clock_offset.hpp.
| uint64_t Mads::ClockOffsetResult::seq = 0 |
Definition at line 64 of file clock_offset.hpp.
Referenced by clock_ref().
| ClockSource Mads::ClockOffsetResult::source = ClockSource::None |
Definition at line 60 of file clock_offset.hpp.
| bool Mads::ClockOffsetResult::valid = false |
Definition at line 68 of file clock_offset.hpp.