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?
After a short mailing list discussion with Andrew, the proposal is:
Add an optional string field to the timeStamp structure
The default (if omitted or empty) is to use Posix time.
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?