F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TlmValidEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TlmValidEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for TlmValid enum
5 // ======================================================================
6 
7 #ifndef Fw_TlmValidEnumAc_HPP
8 #define Fw_TlmValidEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
16  class TlmValid :
17  public Fw::Serializable
18  {
19 
20  public:
21 
22  // ----------------------------------------------------------------------
23  // Types
24  // ----------------------------------------------------------------------
25 
27  typedef U8 SerialType;
28 
30  enum T {
31  VALID = 0,
32  INVALID = 1,
33  };
34 
36  typedef T t;
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Constants
42  // ----------------------------------------------------------------------
43 
44  enum {
49  };
50 
51  public:
52 
53  // ----------------------------------------------------------------------
54  // Constructors
55  // ----------------------------------------------------------------------
56 
59  {
60  this->e = VALID;
61  }
62 
65  const T e1
66  )
67  {
68  this->e = e1;
69  }
70 
73  const TlmValid& obj
74  )
75  {
76  this->e = obj.e;
77  }
78 
79  public:
80 
81  // ----------------------------------------------------------------------
82  // Operators
83  // ----------------------------------------------------------------------
84 
87  const TlmValid& obj
88  );
89 
92  T e1
93  );
94 
96  operator T() const
97  {
98  return this->e;
99  }
100 
102  bool operator==(T e1) const
103  {
104  return this->e == e1;
105  }
106 
108  bool operator!=(T e1) const
109  {
110  return !(*this == e1);
111  }
112 
113 #ifdef BUILD_UT
114 
116  friend std::ostream& operator<<(
117  std::ostream& os,
118  const TlmValid& obj
119  );
120 
121 #endif
122 
123  public:
124 
125  // ----------------------------------------------------------------------
126  // Member functions
127  // ----------------------------------------------------------------------
128 
130  bool isValid() const;
131 
134  Fw::SerialBufferBase& buffer,
136  ) const;
137 
140  Fw::SerialBufferBase& buffer,
142  );
143 
144 #if FW_SERIALIZABLE_TO_STRING
145 
147  void toString(
148  Fw::StringBase& sb
149  ) const;
150 
151 #endif
152 
153  public:
154 
155  // ----------------------------------------------------------------------
156  // Member variables
157  // ----------------------------------------------------------------------
158 
160  T e;
161 
162  };
163 
164 }
165 
166 #endif
bool operator!=(T e1) const
Inequality operator.
TlmValid(const TlmValid &obj)
Copy constructor.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
bool operator==(T e1) const
Equality operator.
The number of enumerated constants.
SerializeStatus
forward declaration for string
TlmValid & operator=(const TlmValid &obj)
Copy assignment operator (object)
TlmValid(const T e1)
Constructor (user-provided value)
T e
The raw enum value.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
T t
For backwards compatibility.
U8 SerialType
The serial representation type.
T
The raw enum type.
bool isValid() const
Check raw enum value for validity.
TlmValid()
Constructor (default value of VALID)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
The size of the serial representation.
Implementation of malloc based allocator.
Endianness
Big endian serialization.