F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DeserialStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DeserialStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for DeserialStatus enum
5 // ======================================================================
6 
7 #ifndef Fw_DeserialStatusEnumAc_HPP
8 #define Fw_DeserialStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
32  OK = 0,
41  };
42 
44  typedef T t;
45 
46  public:
47 
48  // ----------------------------------------------------------------------
49  // Constants
50  // ----------------------------------------------------------------------
51 
52  enum {
57  };
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Constructors
63  // ----------------------------------------------------------------------
64 
67  {
68  this->e = OK;
69  }
70 
73  const T e1
74  )
75  {
76  this->e = e1;
77  }
78 
81  const DeserialStatus& obj
82  )
83  {
84  this->e = obj.e;
85  }
86 
87  public:
88 
89  // ----------------------------------------------------------------------
90  // Operators
91  // ----------------------------------------------------------------------
92 
95  const DeserialStatus& obj
96  );
97 
100  T e1
101  );
102 
104  operator T() const
105  {
106  return this->e;
107  }
108 
110  bool operator==(T e1) const
111  {
112  return this->e == e1;
113  }
114 
116  bool operator!=(T e1) const
117  {
118  return !(*this == e1);
119  }
120 
121 #ifdef BUILD_UT
122 
124  friend std::ostream& operator<<(
125  std::ostream& os,
126  const DeserialStatus& obj
127  );
128 
129 #endif
130 
131  public:
132 
133  // ----------------------------------------------------------------------
134  // Member functions
135  // ----------------------------------------------------------------------
136 
138  bool isValid() const;
139 
142  Fw::SerialBufferBase& buffer,
144  ) const;
145 
148  Fw::SerialBufferBase& buffer,
150  );
151 
152 #if FW_SERIALIZABLE_TO_STRING
153 
155  void toString(
156  Fw::StringBase& sb
157  ) const;
158 
159 #endif
160 
161  public:
162 
163  // ----------------------------------------------------------------------
164  // Member variables
165  // ----------------------------------------------------------------------
166 
168  T e;
169 
170  };
171 
172 }
173 
174 #endif
The size of the serial representation.
Deserialized type ID didn&#39;t match.
Deserialization buffer was empty when trying to read data.
DeserialStatus(const DeserialStatus &obj)
Copy constructor.
Deserialization status.
The number of enumerated constants.
Deserialization data had incorrect values (unexpected data types)
bool operator==(T e1) const
Equality operator.
SerializeStatus
forward declaration for string
T e
The raw enum value.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
DeserialStatus(const T e1)
Constructor (user-provided value)
bool operator!=(T e1) const
Inequality operator.
bool isValid() const
Check raw enum value for validity.
DeserialStatus()
Constructor (default value of OK)
U8 SerialType
The serial representation type.
Data was left in in the buffer, but not enough to deserialize.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
T t
For backwards compatibility.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
T
The raw enum type.
Implementation of malloc based allocator.
Endianness
Big endian serialization.
DeserialStatus & operator=(const DeserialStatus &obj)
Copy assignment operator (object)