F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
SystemResourceEnabledEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SystemResourceEnabledEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SystemResourceEnabled enum
5 // ======================================================================
6 
7 #ifndef Svc_SystemResourceEnabledEnumAc_HPP
8 #define Svc_SystemResourceEnabledEnumAc_HPP
9 
10 #include "FpConfig.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
17  public Fw::Serializable
18  {
19 
20  public:
21 
22  // ----------------------------------------------------------------------
23  // Types
24  // ----------------------------------------------------------------------
25 
27  typedef I32 SerialType;
28 
30  enum T {
31  DISABLED = 0,
32  ENABLED = 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 = DISABLED;
61  }
62 
65  const T e1
66  )
67  {
68  this->e = e1;
69  }
70 
73  const SystemResourceEnabled& obj
74  )
75  {
76  this->e = obj.e;
77  }
78 
79  public:
80 
81  // ----------------------------------------------------------------------
82  // Operators
83  // ----------------------------------------------------------------------
84 
87  const SystemResourceEnabled& 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 SystemResourceEnabled& 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
C++-compatible configuration header for fprime configuration.
forward declaration
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
bool operator!=(T e1) const
Inequality operator.
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
bool operator==(T e1) const
Equality operator.
SystemResourceEnabled & operator=(const SystemResourceEnabled &obj)
Copy assignment operator (object)
SystemResourceEnabled()
Constructor (default value of DISABLED)
I32 SerialType
The serial representation type.
SystemResourceEnabled(const T e1)
Constructor (user-provided value)
bool isValid() const
Check raw enum value for validity.
T t
For backwards compatibility.
SystemResourceEnabled(const SystemResourceEnabled &obj)
Copy constructor.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
SerializeStatus
forward declaration for string