F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
MeasurementStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title MeasurementStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for MeasurementStatus enum
5 // ======================================================================
6 
7 #ifndef Svc_MeasurementStatusEnumAc_HPP
8 #define Svc_MeasurementStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
33  OK = 0,
35  FAILURE = 1,
37  STALE = 2,
38  };
39 
41  typedef T t;
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Constants
47  // ----------------------------------------------------------------------
48 
49  enum {
54  };
55 
56  public:
57 
58  // ----------------------------------------------------------------------
59  // Constructors
60  // ----------------------------------------------------------------------
61 
64  {
65  this->e = OK;
66  }
67 
70  const T e1
71  )
72  {
73  this->e = e1;
74  }
75 
78  const MeasurementStatus& obj
79  )
80  {
81  this->e = obj.e;
82  }
83 
84  public:
85 
86  // ----------------------------------------------------------------------
87  // Operators
88  // ----------------------------------------------------------------------
89 
92  const MeasurementStatus& obj
93  );
94 
97  T e1
98  );
99 
101  operator T() const
102  {
103  return this->e;
104  }
105 
107  bool operator==(T e1) const
108  {
109  return this->e == e1;
110  }
111 
113  bool operator!=(T e1) const
114  {
115  return !(*this == e1);
116  }
117 
118 #ifdef BUILD_UT
119 
121  friend std::ostream& operator<<(
122  std::ostream& os,
123  const MeasurementStatus& obj
124  );
125 
126 #endif
127 
128  public:
129 
130  // ----------------------------------------------------------------------
131  // Member functions
132  // ----------------------------------------------------------------------
133 
135  bool isValid() const;
136 
139  Fw::SerialBufferBase& buffer,
141  ) const;
142 
145  Fw::SerialBufferBase& buffer,
147  );
148 
149 #if FW_SERIALIZABLE_TO_STRING
150 
152  void toString(
153  Fw::StringBase& sb
154  ) const;
155 
156 #endif
157 
158  public:
159 
160  // ----------------------------------------------------------------------
161  // Member variables
162  // ----------------------------------------------------------------------
163 
165  T e;
166 
167  };
168 
169 }
170 
171 #endif
bool operator!=(T e1) const
Inequality operator.
U8 SerialType
The serial representation type.
MeasurementStatus & operator=(const MeasurementStatus &obj)
Copy assignment operator (object)
MeasurementStatus()
Constructor (default value of OK)
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
SerializeStatus
forward declaration for string
bool isValid() const
Check raw enum value for validity.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
MeasurementStatus(const T e1)
Constructor (user-provided value)
An enumeration for measurement status.
MeasurementStatus(const MeasurementStatus &obj)
Copy constructor.
The number of enumerated constants.
Failure to retrieve measurement.
The size of the serial representation.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
bool operator==(T e1) const
Equality operator.
T t
For backwards compatibility.
RateGroupDivider component implementation.
Endianness
Big endian serialization.