Earth Observation Mission CFI Software Lib Software User Manual |
00001 //-------------------------------------------------------- 00002 // Earth Observation Mission CFI Software. Version 4.16 00003 //-------------------------------------------------------- 00004 00005 //-------------------------------------------------------------------- 00006 // CVS Info: $Id: EETime.h,v 1.10 2014-02-20 20:02:28 cavm Exp $ 00007 //-------------------------------------------------------------------- 00008 00009 #ifndef _EECFI_TIME_H 00010 #define _EECFI_TIME_H 00011 00012 00013 //--INCLUDE----------------------------------------------------------- 00014 #include "LibData.h" 00015 #include "CfiClass.h" 00016 #include "TimeCorrelation.h" 00017 00018 //--NAMESPACES-------------------------------------------------------- 00019 using namespace std; 00020 00021 namespace EECFI 00022 { 00023 00027 class XL_DECL Time: public CfiClass 00028 { 00029 // Friend classes 00030 friend class StateVector; 00031 friend class StarData; 00032 00033 public: 00034 00035 double time; 00036 long ref; 00037 long format; 00038 00040 Time(double value = 0, 00041 long reference = XLCFI_TIME_TAI, 00042 long timeFormat = XLCFI_PROC); 00043 00045 Time(TimeCorrelation timeCorr, 00046 double value = 0, 00047 long reference = XLCFI_TIME_TAI, 00048 long timeFormat = XLCFI_PROC); 00049 00051 ~Time() {}; 00052 00054 void setAscii(string asciiTime, 00055 long reference = XLCFI_TIME_TAI, 00056 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00057 00060 void setTransport(long transportTime[4], 00061 long reference = XLCFI_TIME_TAI, 00062 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00063 00065 void setProcessing(double procTime, 00066 long reference = XLCFI_TIME_TAI, 00067 long timeFormat = XLCFI_PROC); 00068 00070 void setCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00071 CucTimeConfig config, 00072 long reference = XLCFI_TIME_TAI) throw (CfiError); // AN-673 00073 00075 void getAscii(string &asciiTime, 00076 long reference = XLCFI_TIME_TAI, 00077 long timeFormat = XLCFI_ASCII_STD) throw (CfiError); 00078 00081 void getTransport(long transportTime[4], 00082 long reference = XLCFI_TIME_TAI, 00083 long timeFormat = XLCFI_TRANS_STD) throw (CfiError); 00084 00086 Time getProcessing(long reference = XLCFI_TIME_TAI, 00087 long timeFormat = XLCFI_PROC) throw (CfiError); 00088 00090 void getCuc(unsigned char cucTime[XLCFI_MAX_CUC_ARRAY_LENGTH], 00091 CucTimeConfig config, 00092 long reference = XLCFI_TIME_TAI ) throw (CfiError); // AN-673 00093 00095 void change(long reference, 00096 long timeFormat = XLCFI_PROC) throw (CfiError); 00097 00099 void setBOM(); 00101 void setEOM(); 00102 00103 // Date arithmetic operators. 00105 Time operator+(const double d) const; 00107 Time operator-(const double d) const; 00109 double operator-(const Time &t) const throw (CfiError); 00110 00111 // Time comparisons. 00113 bool operator>( const Time &t) const throw (CfiError); 00115 bool operator<( const Time &t) const throw (CfiError); 00117 bool operator>=(const Time &t) const throw (CfiError); 00119 bool operator<=(const Time &t) const throw (CfiError); 00121 bool operator==(const Time &t) const throw (CfiError); 00123 bool operator!=(const Time &t) const throw (CfiError); 00124 00125 00126 protected: 00127 00129 GenericId* getTimeId(); 00130 00131 private: 00132 00133 TimeCorrelation timeId; 00134 int isBOM_EOM; 00135 00136 }; 00137 00138 } // closing namespace 00139 00140 #endif