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 "FpConfig.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 I32 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::SerializeBufferBase& buffer
144  ) const;
145 
148  Fw::SerializeBufferBase& buffer
149  );
150 
151 #if FW_SERIALIZABLE_TO_STRING
152 
154  void toString(
155  Fw::StringBase& sb
156  ) const;
157 
158 #endif
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Member variables
164  // ----------------------------------------------------------------------
165 
167  T e;
168 
169  };
170 
171 }
172 
173 #endif
bool operator==(T e1) const
Equality operator.
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.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
The number of enumerated constants.
RawTimeStatus()
Constructor (default value of OP_OK)
T e
The raw enum value.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
SerializeStatus
forward declaration for string
The size of the serial representation.
Operation was successful.
C++-compatible configuration header for fprime configuration.
I32 SerialType
The serial representation type.
Parameters invalid for current platform.
RawTimeStatus & operator=(const RawTimeStatus &obj)
Copy assignment operator (object)
T
The raw enum type.
RawTimeStatus(const RawTimeStatus &obj)
Copy constructor.
T t
For backwards compatibility.
forward declaration
RawTimeStatus(const T e1)
Constructor (user-provided value)