00001
00002
00003
00004
00005
00006
00007
00008 #ifndef TRIGGERTIMESTAMP_H
00009 #define TRIGGERTIMESTAMP_H
00010
00011
00012
00013 #include <vector>
00014
00015 #include "AnnotatorCommApi.h"
00016 #include "MicrosecondTimestamp.h"
00017
00018 using namespace std;
00019
00020
00021
00022 namespace annotatorcomm
00023 {
00024
00025 namespace annotatorjr
00026 {
00027
00028
00029
00034 class ANNCOMM_API TriggerTimestamp : public MicrosecondTimestamp
00035 {
00036 public:
00037 static TriggerTimestamp makeTriggerTimestamp(vector<uint8_t> timestamp, int offset);
00038
00047 TriggerTimestamp(int year, int day, int second, long microsecond);
00048
00055 void offsetYear(int offset);
00056
00063 void offsetDays(int offset);
00064
00071 void offsetSeconds(int offset);
00072
00079 void offsetMicrosecond(int offset);
00080
00081 private:
00088 static int getDaysInYear(int year);
00089 };
00090
00091 }
00092
00093 }
00094
00095
00096
00097 #endif