Skip to content

Commit 235b765

Browse files
committed
DriftingOscillatorBase: Added documentation.
1 parent 004725c commit 235b765

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

src/inet/clock/base/DriftingOscillatorBase.ned

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,21 @@
88
package inet.clock.base;
99

1010
//
11-
// Base module for oscillators that drift relative to the nominal tick
12-
// length over time.
11+
// Base module for oscillators whose effective tick rate may drift relative to a
12+
// nominal tick length. This module provides the mapping used by clocks without
13+
// generating one event per tick.
14+
//
15+
// Summary
16+
// -------
17+
// - Defines a computation origin o (o ≤ now) and a nominal tick length L.
18+
// - Actual tick spacing may differ from L due to drift/compensation; the
19+
// current tick length is managed internally and may change over time.
20+
// - Mapping operations follow ~IOscillator semantics:
21+
// N(Δt): number of ticks in (0, Δt] from the origin,
22+
// I(n) : minimal Δt ≥ 0 such that N(Δt) ≥ n.
23+
// - When rate-related state changes, the origin and phase are updated so that
24+
// the first tick not earlier than the change time remains consistent (no
25+
// double or missed ticks).
1326
//
1427
simple DriftingOscillatorBase extends OscillatorBase
1528
{

0 commit comments

Comments
 (0)