ADTF  3.18.2
timesynchronizer.h
Go to the documentation of this file.
1 
7 #ifndef _TIME_SYNCHRONIZER_CLASS_HEADER_
8 #define _TIME_SYNCHRONIZER_CLASS_HEADER_
9 
10 namespace A_UTILS_NS
11 {
12 
22 {
24 
25  static const int nMaxDatumCount = 16;
26 
28  struct tDatum
29  {
30  tTimeStamp nInternalTime;
31  tTimeStamp nExternalTime;
32  };
33 
34 public:
39 
48 
61  tVoid AddDatum(tTimeStamp nInternalTime, tTimeStamp nExternalTime);
62 
74  tTimeStamp GetInternalTime(tUInt64 nExternalTime) const;
75 
76 protected:
84 };
85 
86 } // namespace A_UTILS_NS
87 
88 
89 #endif
void tVoid
The tVoid is always the definition for the void (non-type).
int tInt
type definition for signed integer value (platform and compiler dependent type).
double tFloat64
type definition for Float64 (64bit double values) (platform and compiler independent type).
uint64_t tUInt64
type definition for unsigned integer values (64bit) (platform and compiler independent type).
Time synchronization helper class for synchronizing value from an external clock to internal clock va...
tFloat64 m_nErrorLimit
Error limit for accepting or rejecting new data points.
tFloat64 m_nOffset
Offset between internal and external time.
tDatum m_oDatumSum
Sum of all values in m_aDatum.
tInt m_nLastDatumIndex
Last index in data array.
tInt m_nValidDatumCount
Number of data points.
tTimeStamp GetInternalTime(tUInt64 nExternalTime) const
Returns approximated value of internal clock corresponging to given external clock value.
tVoid Reset()
Resets object to initial state.
static const int nMaxDatumCount
Maximum number of data points.
tVoid AddDatum(tTimeStamp nInternalTime, tTimeStamp nExternalTime)
Adds a new data point of internal and extrernal time values to the data collection.
tFloat64 m_nScale
Scale difference between internal and external time.
tDatum m_aDatum[nMaxDatumCount]
Data points for synchronization.
#define A_UTILS_D(__pclassname_)
Helper macro for d-pattern definitions.
Definition: d_ptr.h:270
ADTF A_UTIL Namespace - Within adtf this is used as adtf::util or adtf_util.
Definition: d_ptr.h:11
Struct consisting of internal and external time.