F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TimeBase Class Reference

Define enumeration for Time base types. More...

#include <default/config/TimeBaseEnumAc.hpp>

Inheritance diagram for TimeBase:
Fw::Serializable

Public Types

enum  T { TB_NONE = 0, TB_PROC_TIME = 1, TB_WORKSTATION_TIME = 2, TB_DONT_CARE = 65535 }
 The raw enum type. More...
 
enum  { SERIALIZED_SIZE = sizeof(SerialType), NUM_CONSTANTS = 4 }
 
typedef U16 SerialType
 The serial representation type. More...
 
typedef T t
 For backwards compatibility. More...
 
- Public Types inherited from Fw::Serializable
using SizeType = FwSizeType
 

Public Member Functions

 TimeBase ()
 Constructor (default value of TB_NONE) More...
 
 TimeBase (const T e1)
 Constructor (user-provided value) More...
 
 TimeBase (const TimeBase &obj)
 Copy constructor. More...
 
TimeBaseoperator= (const TimeBase &obj)
 Copy assignment operator (object) More...
 
TimeBaseoperator= (T e1)
 Copy assignment operator (raw enum) More...
 
 operator T () const
 Conversion operator. More...
 
bool operator== (T e1) const
 Equality operator. More...
 
bool operator!= (T e1) const
 Inequality operator. More...
 
bool isValid () const
 Check raw enum value for validity. More...
 
Fw::SerializeStatus serializeTo (Fw::SerializeBufferBase &buffer) const
 Serialize raw enum value to SerialType. More...
 
Fw::SerializeStatus deserializeFrom (Fw::SerializeBufferBase &buffer)
 Deserialize raw enum value from SerialType. More...
 
- Public Member Functions inherited from Fw::Serializable
SerializeStatus serialize (SerializeBufferBase &buffer) const
 
SerializeStatus deserialize (SerializeBufferBase &buffer)
 

Public Attributes

T e
 The raw enum value. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Fw::Serializable
 Serializable ()
 Default constructor. More...
 
virtual ~Serializable ()
 destructor More...
 

Detailed Description

Define enumeration for Time base types.

Definition at line 15 of file TimeBaseEnumAc.hpp.

Member Typedef Documentation

◆ SerialType

typedef U16 TimeBase::SerialType

The serial representation type.

Definition at line 26 of file TimeBaseEnumAc.hpp.

◆ t

typedef T TimeBase::t

For backwards compatibility.

Definition at line 41 of file TimeBaseEnumAc.hpp.

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
SERIALIZED_SIZE 

The size of the serial representation.

NUM_CONSTANTS 

The number of enumerated constants.

Definition at line 49 of file TimeBaseEnumAc.hpp.

◆ T

The raw enum type.

Enumerator
TB_NONE 

No time base has been established (Required)

TB_PROC_TIME 

Indicates time is processor cycle time. Not tied to external time.

TB_WORKSTATION_TIME 

Time as reported on workstation where software is running. For testing. (Required)

TB_DONT_CARE 

Don't care value for sequences. If FwTimeBaseStoreType is changed, value should be changed (Required)

Definition at line 29 of file TimeBaseEnumAc.hpp.

Constructor & Destructor Documentation

◆ TimeBase() [1/3]

TimeBase::TimeBase ( )
inline

Constructor (default value of TB_NONE)

Definition at line 63 of file TimeBaseEnumAc.hpp.

◆ TimeBase() [2/3]

TimeBase::TimeBase ( const T  e1)
inline

Constructor (user-provided value)

Parameters
e1The raw enum value

Definition at line 69 of file TimeBaseEnumAc.hpp.

◆ TimeBase() [3/3]

TimeBase::TimeBase ( const TimeBase obj)
inline

Copy constructor.

Parameters
objThe source object

Definition at line 77 of file TimeBaseEnumAc.hpp.

Member Function Documentation

◆ deserializeFrom()

Fw::SerializeStatus TimeBase::deserializeFrom ( Fw::SerializeBufferBase buffer)
virtual

Deserialize raw enum value from SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 63 of file TimeBaseEnumAc.cpp.

◆ isValid()

bool TimeBase::isValid ( ) const

Check raw enum value for validity.

Definition at line 47 of file TimeBaseEnumAc.cpp.

◆ operator T()

TimeBase::operator T ( ) const
inline

Conversion operator.

Definition at line 101 of file TimeBaseEnumAc.hpp.

◆ operator!=()

bool TimeBase::operator!= ( T  e1) const
inline

Inequality operator.

Definition at line 113 of file TimeBaseEnumAc.hpp.

◆ operator=() [1/2]

TimeBase & TimeBase::operator= ( const TimeBase obj)

Copy assignment operator (object)

Parameters
objThe source object

Definition at line 18 of file TimeBaseEnumAc.cpp.

◆ operator=() [2/2]

TimeBase & TimeBase::operator= ( T  e1)

Copy assignment operator (raw enum)

Parameters
e1The enum value

Definition at line 25 of file TimeBaseEnumAc.cpp.

◆ operator==()

bool TimeBase::operator== ( T  e1) const
inline

Equality operator.

Definition at line 107 of file TimeBaseEnumAc.hpp.

◆ serializeTo()

Fw::SerializeStatus TimeBase::serializeTo ( Fw::SerializeBufferBase buffer) const
virtual

Serialize raw enum value to SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 54 of file TimeBaseEnumAc.cpp.

Member Data Documentation

◆ e

T TimeBase::e

The raw enum value.

Definition at line 163 of file TimeBaseEnumAc.hpp.


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