F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
IntervalTimer.hpp
Go to the documentation of this file.
1 
7 #ifndef _IntervalTimer_hpp_
8 #define _IntervalTimer_hpp_
9 
10 #include <Fw/Types/BasicTypes.hpp>
11 
12 namespace Os {
13  class IntervalTimer {
14  public:
21  typedef struct {
22  U32 upper;
23  U32 lower;
24  } RawTime;
25 
26  IntervalTimer();
27  virtual ~IntervalTimer();
28 
29  //------------ Common Functions ------------
30  // Common functions, typically do not need to be implemented by an OS support package.
31  // Common implementations in IntervalTimerCommon.cpp.
32  //------------------------------------------
37  void start(void);
42  void stop(void);
48  U32 getDiffUsec(void);
49 
50  //------------ Platform Functions ------------
51  // Platform functions, typically do need to be implemented by an OS support package, as
52  // they are dependent on the platform definition of "RawTime".
53  //------------------------------------------
54 
61  static U32 getDiffUsec(const RawTime& t1, const RawTime& t2);
66  static void getRawTime(RawTime& time);
68 
69  //------------ Internal Member Variables ------------
70  RawTime m_startTime;
72 
73  //------------ Disabled (private) Copy Constructor ------------
75  };
76 }
77 
78 #endif
Os
Definition: File.cpp:7
PRIVATE
#define PRIVATE
overridable private for unit testing
Definition: BasicTypes.hpp:118
Os::IntervalTimer::RawTime
Definition: IntervalTimer.hpp:21
Os::IntervalTimer::getDiffUsec
U32 getDiffUsec(void)
Definition: IntervalTimerCommon.cpp:34
Os::IntervalTimer::IntervalTimer
IntervalTimer(IntervalTimer &)
Disabled copy constructor.
Os::IntervalTimer::stop
void stop(void)
Definition: IntervalTimerCommon.cpp:30
Os::IntervalTimer
Definition: IntervalTimer.hpp:13
Os::IntervalTimer::getRawTime
static void getRawTime(RawTime &time)
Definition: IntervalTimer.cpp:9
Os::IntervalTimer::m_stopTime
RawTime m_stopTime
Stored end time.
Definition: IntervalTimer.hpp:71
Os::IntervalTimer::~IntervalTimer
virtual ~IntervalTimer()
Destructor.
Definition: IntervalTimer.cpp:7
Os::IntervalTimer::RawTime::lower
U32 lower
Lower 32-bits part of time value. Platform dependent.
Definition: IntervalTimer.hpp:23
Os::IntervalTimer::start
void start(void)
Definition: IntervalTimerCommon.cpp:26
Os::IntervalTimer::RawTime::upper
U32 upper
Upper 32-bits part of time value. Platform dependent.
Definition: IntervalTimer.hpp:22
Os::IntervalTimer::IntervalTimer
IntervalTimer()
Constructor.
Definition: IntervalTimer.cpp:5
BasicTypes.hpp
Declares ISF basic types.