F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
BufferAccumulator_OpStateEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BufferAccumulator_OpStateEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for BufferAccumulator_OpState enum
5 // ======================================================================
6 
7 #ifndef Svc_BufferAccumulator_BufferAccumulator_OpStateEnumAc_HPP
8 #define Svc_BufferAccumulator_BufferAccumulator_OpStateEnumAc_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 {
32  DRAIN = 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 = ACCUMULATE;
61  }
62 
65  const T e1
66  )
67  {
68  this->e = e1;
69  }
70 
73  const BufferAccumulator_OpState& obj
74  )
75  {
76  this->e = obj.e;
77  }
78 
79  public:
80 
81  // ----------------------------------------------------------------------
82  // Operators
83  // ----------------------------------------------------------------------
84 
87  const BufferAccumulator_OpState& 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 BufferAccumulator_OpState& 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
BufferAccumulator_OpState & operator=(const BufferAccumulator_OpState &obj)
Copy assignment operator (object)
@ SERIALIZED_SIZE
The size of the serial representation.
@ NUM_CONSTANTS
The number of enumerated constants.
bool isValid() const
Check raw enum value for validity.
bool operator!=(T e1) const
Inequality operator.
I32 SerialType
The serial representation type.
BufferAccumulator_OpState()
Constructor (default value of ACCUMULATE)
BufferAccumulator_OpState(const BufferAccumulator_OpState &obj)
Copy constructor.
bool operator==(T e1) const
Equality operator.
BufferAccumulator_OpState(const T e1)
Constructor (user-provided value)
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
SerializeStatus
forward declaration for string