F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FlagIdEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FlagIdEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FlagId enum
5 // ======================================================================
6 
7 #ifndef Svc_Fpy_FlagIdEnumAc_HPP
8 #define Svc_Fpy_FlagIdEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
16  namespace Fpy {
17 
18  class FlagId :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  typedef U8 SerialType;
30 
32  enum T {
35  };
36 
38  typedef T t;
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Constants
44  // ----------------------------------------------------------------------
45 
46  enum {
51  };
52 
53  public:
54 
55  // ----------------------------------------------------------------------
56  // Constructors
57  // ----------------------------------------------------------------------
58 
61  {
62  this->e = EXIT_ON_CMD_FAIL;
63  }
64 
67  const T e1
68  )
69  {
70  this->e = e1;
71  }
72 
75  const FlagId& obj
76  )
77  {
78  this->e = obj.e;
79  }
80 
81  public:
82 
83  // ----------------------------------------------------------------------
84  // Operators
85  // ----------------------------------------------------------------------
86 
89  const FlagId& obj
90  );
91 
94  T e1
95  );
96 
98  operator T() const
99  {
100  return this->e;
101  }
102 
104  bool operator==(T e1) const
105  {
106  return this->e == e1;
107  }
108 
110  bool operator!=(T e1) const
111  {
112  return !(*this == e1);
113  }
114 
115 #ifdef BUILD_UT
116 
118  friend std::ostream& operator<<(
119  std::ostream& os,
120  const FlagId& obj
121  );
122 
123 #endif
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Member functions
129  // ----------------------------------------------------------------------
130 
132  bool isValid() const;
133 
136  Fw::SerializeBufferBase& buffer,
138  ) const;
139 
142  Fw::SerializeBufferBase& buffer,
144  );
145 
146 #if FW_SERIALIZABLE_TO_STRING
147 
149  void toString(
150  Fw::StringBase& sb
151  ) const;
152 
153 #endif
154 
155  public:
156 
157  // ----------------------------------------------------------------------
158  // Member variables
159  // ----------------------------------------------------------------------
160 
162  T e;
163 
164  };
165 
166  }
167 
168 }
169 
170 #endif
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
T
The raw enum type.
The size of the serial representation.
U8 SerialType
The serial representation type.
FlagId & operator=(const FlagId &obj)
Copy assignment operator (object)
The number of enumerated constants.
SerializeStatus
forward declaration for string
T e
The raw enum value.
FlagId(const T e1)
Constructor (user-provided value)
FlagId()
Constructor (default value of EXIT_ON_CMD_FAIL)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
if true, the sequence will exit with an error if a command fails
bool operator==(T e1) const
Equality operator.
RateGroupDivider component implementation.
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
bool isValid() const
Check raw enum value for validity.
Endianness
bool operator!=(T e1) const
Inequality operator.
FlagId(const FlagId &obj)
Copy constructor.
Big endian serialization.
T t
For backwards compatibility.