F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
LogSeverityEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title LogSeverityEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for LogSeverity enum
5 // ======================================================================
6 
7 #ifndef Fw_LogSeverityEnumAc_HPP
8 #define Fw_LogSeverityEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Fw {
15 
17  class LogSeverity :
18  public Fw::Serializable
19  {
20 
21  public:
22 
23  // ----------------------------------------------------------------------
24  // Types
25  // ----------------------------------------------------------------------
26 
28  typedef U8 SerialType;
29 
31  enum T {
33  FATAL = 1,
39  COMMAND = 4,
46  };
47 
49  typedef T t;
50 
51  public:
52 
53  // ----------------------------------------------------------------------
54  // Constants
55  // ----------------------------------------------------------------------
56 
57  enum {
62  };
63 
64  public:
65 
66  // ----------------------------------------------------------------------
67  // Constructors
68  // ----------------------------------------------------------------------
69 
72  {
73  this->e = FATAL;
74  }
75 
78  const T e1
79  )
80  {
81  this->e = e1;
82  }
83 
86  const LogSeverity& obj
87  )
88  {
89  this->e = obj.e;
90  }
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Operators
96  // ----------------------------------------------------------------------
97 
100  const LogSeverity& obj
101  );
102 
105  T e1
106  );
107 
109  operator T() const
110  {
111  return this->e;
112  }
113 
115  bool operator==(T e1) const
116  {
117  return this->e == e1;
118  }
119 
121  bool operator!=(T e1) const
122  {
123  return !(*this == e1);
124  }
125 
126 #ifdef BUILD_UT
127 
129  friend std::ostream& operator<<(
130  std::ostream& os,
131  const LogSeverity& obj
132  );
133 
134 #endif
135 
136  public:
137 
138  // ----------------------------------------------------------------------
139  // Member functions
140  // ----------------------------------------------------------------------
141 
143  bool isValid() const;
144 
147  Fw::SerialBufferBase& buffer,
149  ) const;
150 
153  Fw::SerialBufferBase& buffer,
155  );
156 
157 #if FW_SERIALIZABLE_TO_STRING
158 
160  void toString(
161  Fw::StringBase& sb
162  ) const;
163 
164 #endif
165 
166  public:
167 
168  // ----------------------------------------------------------------------
169  // Member variables
170  // ----------------------------------------------------------------------
171 
173  T e;
174 
175  };
176 
177 }
178 
179 #endif
The number of enumerated constants.
T
The raw enum type.
LogSeverity()
Constructor (default value of FATAL)
T e
The raw enum value.
Software diagnostic events.
SerializeStatus
forward declaration for string
Less important informational events.
LogSeverity(const LogSeverity &obj)
Copy constructor.
An activity related to commanding.
A less serious but recoverable event.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialize raw enum value to SerialType.
A serious but recoverable event.
Enum representing event severity.
LogSeverity & operator=(const LogSeverity &obj)
Copy assignment operator (object)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
T t
For backwards compatibility.
The size of the serial representation.
Important informational events.
bool operator!=(T e1) const
Inequality operator.
LogSeverity(const T e1)
Constructor (user-provided value)
A fatal non-recoverable event.
bool operator==(T e1) const
Equality operator.
Implementation of malloc based allocator.
Endianness
bool isValid() const
Check raw enum value for validity.
U8 SerialType
The serial representation type.
Big endian serialization.