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 I32 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::SerializeBufferBase& buffer
135  ) const;
136 
139  Fw::SerializeBufferBase& buffer
140  );
141 
142 #if FW_SERIALIZABLE_TO_STRING
143 
145  void toString(
146  Fw::StringBase& sb
147  ) const;
148 
149 #endif
150 
151  public:
152 
153  // ----------------------------------------------------------------------
154  // Member variables
155  // ----------------------------------------------------------------------
156 
158  T e;
159 
160  };
161 
162 }
163 
164 #endif
bool operator!=(T e1) const
Inequality operator.
TlmValid(const TlmValid &obj)
Copy constructor.
bool operator==(T e1) const
Equality operator.
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
I32 SerialType
The serial representation type.
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.
T t
For backwards compatibility.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
T
The raw enum type.
bool isValid() const
Check raw enum value for validity.
TlmValid()
Constructor (default value of VALID)
forward declaration
The size of the serial representation.
The number of enumerated constants.