Go to the documentation of this file.
32 #define TIMERR_ROOT -1600
34 #define TIMERR_BADDAY TIMERR_ROOT - 3
35 #define TIMERR_BADHOUR TIMERR_ROOT - 4
36 #define TIMERR_BADMIN TIMERR_ROOT - 5
37 #define TIMERR_BADMONTH TIMERR_ROOT - 6
38 #define TIMERR_BADMSEC TIMERR_ROOT - 7
39 #define TIMERR_BADSEC TIMERR_ROOT - 8
40 #define TIMERR_BADYEAR TIMERR_ROOT - 9
41 #define TIMERR_LEAPACCESS TIMERR_ROOT - 10
42 #define TIMERR_LEAPBADYEAR TIMERR_ROOT - 11
43 #define TIMERR_LEAPBADMONTH TIMERR_ROOT - 12
44 #define TIMERR_LEAPBADDAY TIMERR_ROOT - 13
45 #define TIMERR_LEAPBADLEAP TIMERR_ROOT - 14
46 #define TIMERR_LEAPOPEN TIMERR_ROOT - 15
47 #define TIMERR_MONTHCALC TIMERR_ROOT - 16
48 #define TIMERR_BADUTC TIMERR_ROOT - 17
49 #define TIMERR_UTCCOLON2 TIMERR_ROOT - 18
50 #define TIMERR_UTCDASH1 TIMERR_ROOT - 19
51 #define TIMERR_UTCDOT1 TIMERR_ROOT - 20
52 #define TIMERR_UTCMONTH TIMERR_ROOT - 21
53 #define TIMERR_UTCT TIMERR_ROOT - 22
54 #define TIMERR_NOINIT TIMERR_ROOT - 23
55 #define TIMERR_BADTAI TIMERR_ROOT - 24
114 }
else if (gdt2 ==
NULL)
120 }
else if ((gdt1->
year == gdt2->
year)
123 }
else if ((gdt1->
year == gdt2->
year)
125 && (gdt1->
day < gdt2->
day)) {
127 }
else if ((gdt1->
year == gdt2->
year)
131 }
else if ((gdt1->
year == gdt2->
year)
135 }
else if ((gdt1->
year == gdt2->
year)
138 && (gdt1->
sec < gdt2->
sec)) {
161 }
else if (leap2 ==
NULL)
165 if (leap1->
tai < leap2->
tai) {
181 bool operator()(
const long long l1,
const long long l2)
const {
186 typedef std::set<const TimGdtStruct*, ltGDT>
GDTSet;
187 typedef std::set<unsigned long long, lsCDS>
CDSSet;
248 void tai2Unix(
double inTai, timespec*);
290 int cds2Tai(
unsigned long long inCds,
double *outTai);
303 int tai2Cds(
double inTai,
unsigned long long *outCds);
312 int dispCds(
unsigned long long inCds);
356 int tai2String(
double inTai,
char* outString,
int inFormat = 1);
398 NONE, INT, FLOAT, STRING, EOS
402 static const char *TOKEN_SEPARATORS;
405 static const char *TOKEN_SEPARATORS_UTC;
445 int adjustLeapDay(
int inYear);
454 int calcLeapDays(
int inYear);
464 int getTaiLeapSecond(
double inTai,
int withLeap);
473 int isExactLeapSecond(
double inTai);
484 int getLeapSecond(
int inYear,
int inMonth,
int inDay);
495 int readLeapSecondFile(
const char * inFilename);
510 int parseLeapFileLine(
char *inBuffer,
int *outYear,
int *outMonth,
511 int *outDay,
int *outLeap);
531 void displayLeap(
void);
550 char *nextField(
char *inBuffer,
char delin,
char *outSub);
560 TokenStruct getNextToken(
const char* tokens);
572 TokenStruct getNextToken(
char * parseString,
const char* tokens);
592 bool isNegativeLeapSecondCDS(
long long inCDS);
599 void initNegativeLeaps(
void);
614 static char myMonthStr[13][13];
617 static int myDayInMonth[13];
623 GDTSet* myGDTNegativeLeaps;
626 CDSSet* myCDSNegativeLeaps;
629 std::map<std::string, int> myMonthMap;
941 return myErrorString;
960 std::exception* myCause;
969 unsigned long long ll;
991 static int makeCds(
unsigned int inDay,
unsigned long long inMsec,
992 unsigned long long *outCds);
1004 static int parseCds(
unsigned long long inCds,
unsigned int *outDay,
1005 unsigned long long *outMsec);
1015 static int displayCds(
unsigned long long inCds);
int cds2Tai(unsigned long long inCds, double *outTai)
static const int ERR_MONTHCALC
bool operator()(const TimGdtStruct *gdt1, const TimGdtStruct *gdt2) const
static const int ERR_LEAPOPEN
static const int ERR_UTCDOT1
void setMicros(unsigned short)
unsigned short getMicros()
int taiSubtractDelta(double *ioTai, double inDelta)
const std::string ERR_BADHOUR_MSG
const std::string ERR_UTCMONTH_MSG
const std::string MAX_TAI_VALUE_EXCEEDED_MSG
static const int ERR_LEAPBADMONTH
static const int ERR_LEAPBADYEAR
static const int ERR_UTCDASH1
double unix2Tai(timespec *tspec)
std::string getErrorString() const
const std::string ERR_UTCDASH1_MSG
const std::string ERR_NOINIT_MSG
const std::string ERR_BADDAY_MSG
static const int ERR_BADMSEC
static const int NAME_NOT_FOUND
static const int MAX_TAI_VALUE_EXCEEDED
const std::string ERR_BADMSEC_MSG
int taiAddDelta(double *ioTai, double inDelta)
const std::string ERR_BADUTC_MSG
const std::string IOEXCEPTION_Msg
const std::string ERR_MONTHCALC_MSG
static const int ERR_LEAPBADDAY
static int parseCds(unsigned long long inCds, unsigned int *outDay, unsigned long long *outMsec)
const std::string ERR_LEAPREAD_MSG
void setDays(unsigned short)
static const int ERR_BADMIN
static VcstTime * getInstance(void)
static const int ERR_BADUTC
std::set< unsigned long long, lsCDS > CDSSet
const std::string EXCEPTION_STRING
const std::string ERR_LEAPBADMONTH_MSG
static const int ERR_BADMONTH
static int displayCds(unsigned long long inCds)
static const int ERR_UTCMONTH
static const int ERR_LEAPREAD
const std::string ERR_LEAPBADYEAR_MSG
bool operator()(const LeapStruct *leap1, const LeapStruct *leap2) const
const std::string ERR_BADMIN_MSG
int tai2Cds(double inTai, unsigned long long *outCds)
int tai2Gdt(double inTai, TimGdtStruct *outGdt)
static const int ERR_LEAPACCESS
static const int ERR_LEAPBADLEAP
int tai2String(double inTai, char *outString, int inFormat=1)
static int makeCds(unsigned int inDay, unsigned long long inMsec, unsigned long long *outCds)
const std::string ERR_BADSEC_MSG
static const int ERR_UTCCOLON2
static const int ERR_UTCT
static const int ERR_BADTAI
static const int IOEXCEPTION
void tai2Unix(double inTai, timespec *)
const std::string ERR_LEAPBADLEAP_MSG
static std::string errorMessage(int errNo=1)
const std::string ERR_UTCDOT1_MSG
static const int ERR_BADHOUR
const std::string ERR_LEAPOPEN_MSG
const std::string ERR_LEAPBADDAY_MSG
const std::string ERR_UTCT_MSG
bool operator()(const long long l1, const long long l2) const
static const int ERR_BADSEC
void setMillis(unsigned int)
int string2Tai(std::string inString, double *outTai)
std::set< const TimGdtStruct *, ltGDT > GDTSet
static const int ERR_NOINIT
int gdt2Tai(TimGdtStruct *inGdt, double *outTai)
const std::string ERR_BADTAI_MSG
const std::string ERR_LEAPACCESS_MSG
const std::string ERR_BADYEAR_MSG
const std::string ERR_UTCCOLON2_MSG
static const int EXCEPTION_CODE
static const int ERR_BADYEAR
static const int ERR_BADDAY
int dispCds(unsigned long long inCds)
const std::string ERR_BADMONTH_MSG