F´ Flight Software - C/C++ Documentation NASA-v1.6.0
A framework for building embedded system applications to NASA flight quality standards.
|
Serializable class for carrying timer values. More...
#include <Svc/Cycle/TimerVal.hpp>
Public Types | |
enum | { SERIALIZED_SIZE = sizeof(U32) + sizeof(U32) } |
Public Member Functions | |
TimerVal () | |
Default constructor. | |
TimerVal (const TimerVal &other) | |
Timer copy constructor. | |
TimerVal & | operator= (const TimerVal &other) |
Timer equal operator. | |
virtual | ~TimerVal () |
Destructor. | |
Fw::SerializeStatus | serialize (Fw::SerializeBufferBase &buffer) const |
Serialization function. | |
Fw::SerializeStatus | deserialize (Fw::SerializeBufferBase &buffer) |
Deserialization function. | |
Os::IntervalTimer::RawTime | getTimerVal () const |
Returns the current timer value. | |
void | take () |
Function to store a timer value. | |
U32 | diffUSec (const TimerVal &time) |
Compute difference function. | |
virtual SerializeStatus | serialize (SerializeBufferBase &buffer) const =0 |
serialize contents | |
virtual SerializeStatus | deserialize (SerializeBufferBase &buffer)=0 |
deserialize to contents | |
Additional Inherited Members | |
Protected Member Functions inherited from Fw::Serializable | |
Serializable () | |
Default constructor. | |
virtual | ~Serializable () |
destructor | |
Serializable class for carrying timer values.
This class carries a timer value. It is meant to be passed through ports that carry timing info.
Definition at line 22 of file TimerVal.hpp.
anonymous enum |
Enumerator | |
---|---|
SERIALIZED_SIZE | size of TimerVal private members |
Definition at line 25 of file TimerVal.hpp.
Svc::TimerVal::TimerVal | ( | ) |
Default constructor.
Definition at line 13 of file TimerVal.cpp.
Svc::TimerVal::TimerVal | ( | const TimerVal & | other | ) |
Timer copy constructor.
constructs a TimerVal with another timer as the source
other | source timer value copy constructor |
Definition at line 23 of file TimerVal.cpp.
|
inlinevirtual |
|
virtual |
Deserialization function.
Deserializes timer values
buffer | source buffer for serialization data deserialize to contents |
Implements Fw::Serializable.
Definition at line 54 of file TimerVal.cpp.
U32 Svc::TimerVal::diffUSec | ( | const TimerVal & | time | ) |
Compute difference function.
This function computes the difference in time between the internal value and the passed value. It is computed as internal - time parameter.
time | time to compute difference from takes difference between stored time and passed time |
Definition at line 42 of file TimerVal.cpp.
Os::IntervalTimer::RawTime Svc::TimerVal::getTimerVal | ( | ) | const |
Returns the current timer value.
Definition at line 34 of file TimerVal.cpp.
Timer equal operator.
copies timer value from another timer as the source
other | source timer value equal operator |
Definition at line 28 of file TimerVal.cpp.
|
virtual |
Serialization function.
Serializes timer values
buffer | destination buffer for serialization data serialize contents |
Implements Fw::Serializable.
Definition at line 46 of file TimerVal.cpp.
void Svc::TimerVal::take | ( | ) |
Function to store a timer value.
This function calls the Os::IntervalTimer function to store a timer value in the private data of the object Take raw time
Definition at line 38 of file TimerVal.cpp.