wiki:Old/Documentation/OTG/FuncSpec/TimingControl

Version 1 (modified by zhibinwu, 19 years ago) ( diff )

Orbit > OTG > Function Specifications > Timing Control

Timing

Requirements

OTG and OTR are communication programs which need good timing functions. OTG needs to control its packet deliver phase. It introduces an "wait" operation between packet transmission. OTR does not need an "wait" operation, but still need report timestamps of packet reception.

Implementation

An UnixTime class is designed for this purpose. There are two kinds of clocks in this class:

  • Absolute Time: Clock refer to an absolute starting time (like 01/01/2000).
  • Relative Time: Clock refer to the start of the program(construction of the UnixTime class object)

Absolute time is used for showing the rx_timestamp and tx_timestamp. Because those two timestamps will be compared to show packet delay, they have to be of some absoulte referrence which beyonds its respective process.

Relative clock is used to report gen_timestamp ( packet generation time). Also, this clock could be paused and resumed. To realize this, its origin_ (orgin time) would be shifted whenever an pasue-resume operation occured.

Note: See TracWiki for help on using the wiki.