F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
BlockStateEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BlockStateEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for BlockState enum
5 // ======================================================================
6 
7 #ifndef Svc_BlockStateEnumAc_HPP
8 #define Svc_BlockStateEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
17  class BlockState :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
32  BLOCK = 0,
33  NO_BLOCK = 1,
34  };
35 
37  typedef enum T t;
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constants
43  // ----------------------------------------------------------------------
44 
45  enum {
50  };
51 
52  public:
53 
54  // ----------------------------------------------------------------------
55  // Constructors
56  // ----------------------------------------------------------------------
57 
60  {
61  this->e = BLOCK;
62  }
63 
66  const enum T e1
67  )
68  {
69  this->e = e1;
70  }
71 
74  const BlockState& obj
75  )
76  {
77  this->e = obj.e;
78  }
79 
80  public:
81 
82  // ----------------------------------------------------------------------
83  // Operators
84  // ----------------------------------------------------------------------
85 
88  const BlockState& obj
89  );
90 
93  enum T e1
94  );
95 
97  operator enum T() const
98  {
99  return this->e;
100  }
101 
103  bool operator==(enum T e1) const
104  {
105  return this->e == e1;
106  }
107 
109  bool operator!=(enum T e1) const
110  {
111  return !(*this == e1);
112  }
113 
114 #ifdef BUILD_UT
115 
117  friend std::ostream& operator<<(
118  std::ostream& os,
119  const BlockState& obj
120  );
121 
122 #endif
123 
124  public:
125 
126  // ----------------------------------------------------------------------
127  // Member functions
128  // ----------------------------------------------------------------------
129 
131  bool isValid() const;
132 
135  Fw::SerialBufferBase& buffer,
137  ) const;
138 
141  Fw::SerialBufferBase& buffer,
143  );
144 
145 #if FW_SERIALIZABLE_TO_STRING
146 
148  void toString(
149  Fw::StringBase& sb
150  ) const;
151 
152 #endif
153 
154  public:
155 
156  // ----------------------------------------------------------------------
157  // Member variables
158  // ----------------------------------------------------------------------
159 
161  enum T e;
162 
163  };
164 
165 }
166 
167 #endif
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
bool operator==(enum T e1) const
Equality operator.
BlockState(const enum T e1)
Constructor (user-provided value)
T
The raw enum type.
SerializeStatus
forward declaration for string
bool operator!=(enum T e1) const
Inequality operator.
The size of the serial representation.
enum T t
For backwards compatibility.
BlockState()
Constructor (default value of BLOCK)
Sequencer blocking state.
U8 SerialType
The serial representation type.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
BlockState & operator=(const BlockState &obj)
Copy assignment operator (object)
RateGroupDivider component implementation.
Endianness
The number of enumerated constants.
bool isValid() const
Check raw enum value for validity.
Big endian serialization.
BlockState(const BlockState &obj)
Copy constructor.
enum T e
The raw enum value.