F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
RawTimeStatusEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title RawTimeStatusEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for RawTimeStatus enum
5 // ======================================================================
6 
7 #ifndef Os_RawTimeStatusEnumAc_HPP
8 #define Os_RawTimeStatusEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Os {
15 
17  class RawTimeStatus :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
33  OP_OK = 0,
42  };
43 
45  typedef T t;
46 
47  public:
48 
49  // ----------------------------------------------------------------------
50  // Constants
51  // ----------------------------------------------------------------------
52 
53  enum {
58  };
59 
60  public:
61 
62  // ----------------------------------------------------------------------
63  // Constructors
64  // ----------------------------------------------------------------------
65 
68  {
69  this->e = OP_OK;
70  }
71 
74  const T e1
75  )
76  {
77  this->e = e1;
78  }
79 
82  const RawTimeStatus& obj
83  )
84  {
85  this->e = obj.e;
86  }
87 
88  public:
89 
90  // ----------------------------------------------------------------------
91  // Operators
92  // ----------------------------------------------------------------------
93 
96  const RawTimeStatus& obj
97  );
98 
101  T e1
102  );
103 
105  operator T() const
106  {
107  return this->e;
108  }
109 
111  bool operator==(T e1) const
112  {
113  return this->e == e1;
114  }
115 
117  bool operator!=(T e1) const
118  {
119  return !(*this == e1);
120  }
121 
122 #ifdef BUILD_UT
123 
125  friend std::ostream& operator<<(
126  std::ostream& os,
127  const RawTimeStatus& obj
128  );
129 
130 #endif
131 
132  public:
133 
134  // ----------------------------------------------------------------------
135  // Member functions
136  // ----------------------------------------------------------------------
137 
139  bool isValid() const;
140 
143  Fw::SerialBufferBase& buffer,
145  ) const;
146 
149  Fw::SerialBufferBase& buffer,
151  );
152 
153 #if FW_SERIALIZABLE_TO_STRING
154 
156  void toString(
157  Fw::StringBase& sb
158  ) const;
159 
160 #endif
161 
162  public:
163 
164  // ----------------------------------------------------------------------
165  // Member variables
166  // ----------------------------------------------------------------------
167 
169  T e;
170 
171  };
172 
173 }
174 
175 #endif
bool operator==(T e1) const
Equality operator.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
FPP shadow-enum representing Os::RawTime::Status.
bool operator!=(T e1) const
Inequality operator.
Operation result caused an overflow.
RawTime feature is not supported.
bool isValid() const
Check raw enum value for validity.
The size of the serial representation.
RawTimeStatus()
Constructor (default value of OP_OK)
T e
The raw enum value.
SerializeStatus
forward declaration for string
U8 SerialType
The serial representation type.
Operation was successful.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Parameters invalid for current platform.
RawTimeStatus & operator=(const RawTimeStatus &obj)
Copy assignment operator (object)
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
T
The raw enum type.
RawTimeStatus(const RawTimeStatus &obj)
Copy constructor.
T t
For backwards compatibility.
RawTimeStatus(const T e1)
Constructor (user-provided value)
Endianness
Big endian serialization.
The number of enumerated constants.