00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ACSTIME_IDL
00026 #define ACSTIME_IDL
00027
00028 #include <baci.idl>
00029 #include "ACSTimeError.idl"
00030
00031 #pragma prefix "alma"
00032
00047 module acstime
00048 {
00052 const ACS::Time ACE_BEGIN = 122192928000000000;
00053
00057 const unsigned long STARTDATE = 577735;
00058
00062 const double EpochOriginInMJD = -100840.0;
00063
00067 const double EpochOriginInYears = 1582.793292;
00068
00077 enum TimeComparison
00078 {
00079 TCEqualTo,
00080 TCLessThan,
00081 TCGreaterThan,
00082 TCIndeterminate
00083 };
00084
00088 enum TimeSystem
00089 {
00090 TSArray,
00091 TSTAI,
00092 TSUTC
00093 };
00094
00112 struct Epoch
00113 {
00114 ACS::Time value;
00115 };
00116
00127 struct Duration
00128 {
00129 ACS::TimeInterval value;
00130 };
00131
00142 interface TimeoutHandler : ACS::OffShoot
00143 {
00148 void handleTimeout(in Epoch time);
00149 };
00150
00154 interface Timer : ACS::ACSComponent
00155 {
00189 long schedule(in TimeoutHandler handler,
00190 in Epoch start,
00191 in Duration period)
00192 raises(ACSTimeError::ArgErrorEx);
00193
00199 void cancel(in long id)
00200 raises(ACSTimeError::InvalidIDEx);
00201 };
00202
00210 interface Clock : ACS::CharacteristicComponent
00211 {
00217 Duration getTimeInterval(in Epoch prevEpoch);
00218
00232 readonly attribute ACS::RWlong array2TAI;
00233
00247 readonly attribute ACS::RWlong TAI2UTC;
00248
00249
00254 readonly attribute ACS::ROuLongLong now;
00255
00256
00264 Epoch fromISO8601(in TimeSystem ts, in string iso)
00265 raises (ACSTimeError::ArgErrorEx);
00266
00273 string toISO8601(in TimeSystem ts, in Epoch timeValue)
00274 raises (ACSTimeError::ArgErrorEx);
00275 };
00276 };
00277 #endif