Timer model¶
Requirements fixing what a timer is and when it expires. Every timer in this set —
tS3_Server, tP2_Server, tP_Client, tS3_Client and the spacing timers —
is a timer in the sense these requirements give, and every requirement that starts,
stops or reads one relies on them.
Throughout this set, to start, restart or reload a timer is to set it running with zero elapsed time, whether or not it was running; to stop or disable a timer is to make it not running, whether or not it was. The vocabulary is fixed here, once, because the timer requirements of every document use all five words and a reader should not have to ask whether a start of a running timer is a restart: it is.
A requirement that leaves a running timer alone says so.
A timer shall at any instant be either running or not running. Rationale: several requirements in this set condition on whether a timer is running. Without a stated two-state model those conditions have no subject. |
Low-Level Requirement: A timer carries the value the parameter had when it was started UDSS_LLR_0076
|
A timer shall be loaded, when set running, with the value of the parameter the requirement that sets it running names, as that parameter stands at that instant. Rationale: loading the value at the start rather than reading the parameter live is
what lets a parameter change while a timer runs without moving a window already open,
which |
A timer shall expire when the elapsed time since it was set running reaches the value
it was loaded with under Rationale: the set states both readings because the two bound different things. A timer bounding this side’s own conduct takes the conservative reading and expires at “reaches”; one protecting a conformant peer from being faulted for a response that arrives exactly at the window’s edge expires only once the elapsed time strictly exceeds the loaded value. |
Only a running timer shall expire. A timer that is not running has no elapsed time and shall not be evaluated, whether or not the requirement that acts on its expiry repeats the condition. Rationale: the requirements that act on an expiry are written as conditions on the expiry alone, and without this a stopped timer whose loaded value the elapsed time already exceeds could be read as expiring the moment anything looked at it. |
Expiry shall be evaluated only when a timestamp is supplied. A timer set running by an input, or by the action a requirement takes on another timer’s expiry, shall therefore expire no earlier than the next timestamp supplied; a timer loaded with zero expires on that next timestamp, or, where the requirement says “exceeds”, on the first later one. Rationale: this settles when a timer whose loaded value the elapsed time already reaches, zero included, first expires: not in the call that set it running, whose timestamp preceded the input, but at the next. |
The session layer shall report the earliest timestamp at which a supplied timestamp could cause a timer to expire, or shall report that no timer is running. The report is not an output in the sense of Rationale: The report is how the caller learns the instant, rather than a timer trait the session
layer calls: |
Where a timestamp is supplied alongside another input, the session layer shall act on every timer expiry that timestamp causes before it processes that input, and shall process the input against the state those expiries leave. Where a requirement in this set evaluates a condition against the state as it was before the input in hand, that state is the state after every expiry the input’s timestamp caused; every requirement in this set that conditions on state reads it so, whether or not it says so. Every indication an expiry produces shall precede any output of the input the timestamp
accompanies and any rejection report for that input under Rationale: A message arriving exactly at Indications precede the input’s own outputs for the same reason the expiries precede the
input: the elapsed time preceded its arrival. The case is stated because the first
paragraph reaches it only by reading “processes” as covering output emission, and for a
rejected input does not reach it at all — the input is not processed. It is stated for
the rejected input too because that input produces no outputs of its own to order the
indications against, only a rejection report; |