inet
inet copied to clipboard
Setting clock oscillator compensation factor causes cannot schedule message to the past
The OscillatorBasedClock::scheduleClockEventAt and OscillatorBasedClock::scheduleClockEventAfter functions calculate with the raw simtime values. If the raw value is 1E-12 then the calculation results in a zero and causes problems with message scheduling. These functions should use double arithmetic and include the oscillator compensation factor in the calculation.
For reproduction:
omnetpp: omnetpp-6.0.x branch (ec0c7f3cf3cb0a0c31029f10947645c9f5b14c11) inet: 765613890f051eb8663f37b2dfefb76509109f47
showcases/tsn/timesychronization/clockdrift, OutOfBandSynchronizationConstantDrift config
also add to config:
*.source*.app[1].synchronizationOscillatorCompensationFactorError = uniform(0.5, 2)
(this is needed for the error)