F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
TimerVal.hpp
Go to the documentation of this file.
1/*
2 * TimerVal.hpp
3 *
4 * Created on: Aug 5, 2015
5 * Author: timothycanham
6 */
7
8#ifndef TIMERVAL_HPP_
9#define TIMERVAL_HPP_
10
12#include <Os/IntervalTimer.hpp>
13
14namespace Svc {
15
21
22 class TimerVal: public Fw::Serializable {
23 public:
24
25 enum {
26 SERIALIZED_SIZE = sizeof(U32) + sizeof(U32)
27 };
28
29 TimerVal();
30
36
37 TimerVal(const TimerVal& other);
38
44
45 TimerVal& operator=(const TimerVal& other);
46
51
52 virtual ~TimerVal() {}
53
59
61
67
69
74
79
80 void take();
81
88
89 U32 diffUSec(const TimerVal& time);
90
91 PRIVATE:
92 TimerVal(U32 upper, U32 lower);
94 };
95
96} /* namespace Svc */
97
98#endif /* TIMERVAL_HPP_ */
forward declaration
Serializable class for carrying timer values.
Definition TimerVal.hpp:22
TimerVal()
Default constructor.
Definition TimerVal.cpp:13
Os::IntervalTimer::RawTime getTimerVal() const
Returns the current timer value.
Definition TimerVal.cpp:34
@ SERIALIZED_SIZE
size of TimerVal private members
Definition TimerVal.hpp:26
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization function.
Definition TimerVal.cpp:46
virtual ~TimerVal()
Destructor.
Definition TimerVal.hpp:52
TimerVal & operator=(const TimerVal &other)
Timer equal operator.
Definition TimerVal.cpp:28
void take()
Function to store a timer value.
Definition TimerVal.cpp:38
U32 diffUSec(const TimerVal &time)
Compute difference function.
Definition TimerVal.cpp:42
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization function.
Definition TimerVal.cpp:54
SerializeStatus
forward declaration for string