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

Health states. More...

#include <Fw/Types/HealthEnumAc.hpp>

Inheritance diagram for Fw::Health:
Fw::Serializable

Public Types

enum  T { HEALTHY = 0 , SICK = 1 , FAILED = 2 }
 The raw enum type. More...
 
enum  { SERIALIZED_SIZE = sizeof(SerialType) , NUM_CONSTANTS = 3 }
 
typedef I32 SerialType
 The serial representation type. More...
 
typedef T t
 For backwards compatibility. More...
 
- Public Types inherited from Fw::Serializable
using SizeType = NATIVE_UINT_TYPE
 

Public Member Functions

 Health ()
 Constructor (default value of HEALTHY) More...
 
 Health (const T e1)
 Constructor (user-provided value) More...
 
 Health (const Health &obj)
 Copy constructor. More...
 
Healthoperator= (const Health &obj)
 Copy assignment operator (object) More...
 
Healthoperator= (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 serialize (Fw::SerializeBufferBase &buffer) const
 Serialize raw enum value to SerialType. More...
 
Fw::SerializeStatus deserialize (Fw::SerializeBufferBase &buffer)
 Deserialize raw enum value from SerialType. More...
 

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

Health states.

Definition at line 17 of file HealthEnumAc.hpp.

Member Typedef Documentation

◆ SerialType

The serial representation type.

Definition at line 28 of file HealthEnumAc.hpp.

◆ t

typedef T Fw::Health::t

For backwards compatibility.

Definition at line 41 of file HealthEnumAc.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 HealthEnumAc.hpp.

◆ T

The raw enum type.

Enumerator
HEALTHY 

Healthy state.

SICK 

Sick state.

FAILED 

Failed state.

Definition at line 31 of file HealthEnumAc.hpp.

Constructor & Destructor Documentation

◆ Health() [1/3]

Fw::Health::Health ( )
inline

Constructor (default value of HEALTHY)

Definition at line 63 of file HealthEnumAc.hpp.

◆ Health() [2/3]

Fw::Health::Health ( const T  e1)
inline

Constructor (user-provided value)

Parameters
e1The raw enum value

Definition at line 69 of file HealthEnumAc.hpp.

◆ Health() [3/3]

Fw::Health::Health ( const Health obj)
inline

Copy constructor.

Parameters
objThe source object

Definition at line 77 of file HealthEnumAc.hpp.

Member Function Documentation

◆ deserialize()

Fw::SerializeStatus Fw::Health::deserialize ( Fw::SerializeBufferBase buffer)
virtual

Deserialize raw enum value from SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 63 of file HealthEnumAc.cpp.

◆ isValid()

bool Fw::Health::isValid ( ) const

Check raw enum value for validity.

Definition at line 48 of file HealthEnumAc.cpp.

◆ operator T()

Fw::Health::operator T ( ) const
inline

Conversion operator.

Definition at line 101 of file HealthEnumAc.hpp.

◆ operator!=()

bool Fw::Health::operator!= ( T  e1) const
inline

Inequality operator.

Definition at line 113 of file HealthEnumAc.hpp.

◆ operator=() [1/2]

Health & Fw::Health::operator= ( const Health obj)

Copy assignment operator (object)

Parameters
objThe source object

Definition at line 19 of file HealthEnumAc.cpp.

◆ operator=() [2/2]

Health & Fw::Health::operator= ( T  e1)

Copy assignment operator (raw enum)

Parameters
e1The enum value

Definition at line 26 of file HealthEnumAc.cpp.

◆ operator==()

bool Fw::Health::operator== ( T  e1) const
inline

Equality operator.

Definition at line 107 of file HealthEnumAc.hpp.

◆ serialize()

Fw::SerializeStatus Fw::Health::serialize ( Fw::SerializeBufferBase buffer) const
virtual

Serialize raw enum value to SerialType.

Parameters
bufferThe serial buffer

Implements Fw::Serializable.

Definition at line 54 of file HealthEnumAc.cpp.

Member Data Documentation

◆ e

T Fw::Health::e

The raw enum value.

Definition at line 163 of file HealthEnumAc.hpp.


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