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
Svc::TimerVal Class Reference

Serializable class for carrying timer values. More...

#include <Svc/Cycle/TimerVal.hpp>

Inheritance diagram for Svc::TimerVal:
Fw::Serializable

Public Types

enum  { SERIALIZED_SIZE = sizeof(U32) + sizeof(U32) }
 

Public Member Functions

 TimerVal ()
 Default constructor.
 
 TimerVal (const TimerVal &other)
 Timer copy constructor.
 
TimerValoperator= (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
 

Detailed Description

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.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SERIALIZED_SIZE 

size of TimerVal private members

Definition at line 25 of file TimerVal.hpp.

Constructor & Destructor Documentation

◆ TimerVal() [1/2]

Svc::TimerVal::TimerVal ( )

Default constructor.

Definition at line 13 of file TimerVal.cpp.

◆ TimerVal() [2/2]

Svc::TimerVal::TimerVal ( const TimerVal other)

Timer copy constructor.

constructs a TimerVal with another timer as the source

Parameters
othersource timer value copy constructor

Definition at line 23 of file TimerVal.cpp.

◆ ~TimerVal()

virtual Svc::TimerVal::~TimerVal ( )
inlinevirtual

Destructor.

Does nothing

Definition at line 52 of file TimerVal.hpp.

Member Function Documentation

◆ deserialize()

Fw::SerializeStatus Svc::TimerVal::deserialize ( Fw::SerializeBufferBase buffer)
virtual

Deserialization function.

Deserializes timer values

Parameters
buffersource buffer for serialization data deserialize to contents

Implements Fw::Serializable.

Definition at line 54 of file TimerVal.cpp.

◆ diffUSec()

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.

Parameters
timetime to compute difference from takes difference between stored time and passed time

Definition at line 42 of file TimerVal.cpp.

◆ getTimerVal()

Os::IntervalTimer::RawTime Svc::TimerVal::getTimerVal ( ) const

Returns the current timer value.

Definition at line 34 of file TimerVal.cpp.

◆ operator=()

TimerVal & Svc::TimerVal::operator= ( const TimerVal other)

Timer equal operator.

copies timer value from another timer as the source

Parameters
othersource timer value equal operator

Definition at line 28 of file TimerVal.cpp.

◆ serialize()

Fw::SerializeStatus Svc::TimerVal::serialize ( Fw::SerializeBufferBase buffer) const
virtual

Serialization function.

Serializes timer values

Parameters
bufferdestination buffer for serialization data serialize contents

Implements Fw::Serializable.

Definition at line 46 of file TimerVal.cpp.

◆ take()

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.


The documentation for this class was generated from the following files: