Menu

#15 NTTypes: timeStamp and TAI

open
nobody
NTTypes (2)
5
2015-05-18
2015-02-18
Ralph Lange
No

Currently, the NT time stamp type is defined as

structure timeStamp
    long secondsPastEpoch
    int  nanoseconds
    int  userTag

ITER will use TAI as well as UTC time standards.
There might be cases of mixed use of both within a single machine, even within a single EPICS DB.

Any client must know which standard is being used, as conversion is non-trivial because it needs tables that have to be updated usually every year. (Which is one reason why for embedded systems and/or PLCs it should be avoided having to do these transformations.)

How well do NTTypes handle this? Would it be useful to add an optional enum?

Discussion

  • Ralph Lange

    Ralph Lange - 2015-02-25

    After a short mailing list discussion with Andrew, the proposal is:

    Add an optional string field to the timeStamp structure

        string timeStandard :opt
    

    The default (if omitted or empty) is to use Posix time.

     
  • Ralph Lange

    Ralph Lange - 2015-05-18

    As for the defined string values:
    I would say the values should either be all-uppercase or not be case-sensitive. "POSIX" being different from "Posix" does not make much sense.
    The usual way to write POSIX and TAI is all-uppercase, so in doubt I would opt for that.

    Do we have something that could enforce uppercase?

     

Log in to post a comment.

MongoDB Logo MongoDB