F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TfvnEnumAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title TfvnEnumAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for Tfvn enum
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_TfvnEnumAc_HPP
8 #define Svc_Ccsds_TfvnEnumAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
12 #include "Fw/Types/String.hpp"
13 
14 namespace Svc {
15 
16  namespace Ccsds {
17 
27  class Tfvn :
28  public Fw::Serializable
29  {
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Types
35  // ----------------------------------------------------------------------
36 
38  typedef U8 SerialType;
39 
41  enum T {
43  TM_TC = 0,
45  AOS = 1,
47  PROX_ONE = 2,
49  USLP = 3,
52  };
53 
55  typedef enum T t;
56 
57  public:
58 
59  // ----------------------------------------------------------------------
60  // Constants
61  // ----------------------------------------------------------------------
62 
63  enum {
68  };
69 
70  public:
71 
72  // ----------------------------------------------------------------------
73  // Constructors
74  // ----------------------------------------------------------------------
75 
77  Tfvn()
78  {
79  this->e = INVALID_UNINITIALIZED;
80  }
81 
84  const enum T e1
85  )
86  {
87  this->e = e1;
88  }
89 
92  const Tfvn& obj
93  )
94  {
95  this->e = obj.e;
96  }
97 
98  public:
99 
100  // ----------------------------------------------------------------------
101  // Operators
102  // ----------------------------------------------------------------------
103 
105  Tfvn& operator=(
106  const Tfvn& obj
107  );
108 
110  Tfvn& operator=(
111  enum T e1
112  );
113 
115  operator enum T() const
116  {
117  return this->e;
118  }
119 
121  bool operator==(enum T e1) const
122  {
123  return this->e == e1;
124  }
125 
127  bool operator!=(enum T e1) const
128  {
129  return !(*this == e1);
130  }
131 
132 #ifdef BUILD_UT
133 
135  friend std::ostream& operator<<(
136  std::ostream& os,
137  const Tfvn& obj
138  );
139 
140 #endif
141 
142  public:
143 
144  // ----------------------------------------------------------------------
145  // Member functions
146  // ----------------------------------------------------------------------
147 
149  bool isValid() const;
150 
153  Fw::SerialBufferBase& buffer,
155  ) const;
156 
159  Fw::SerialBufferBase& buffer,
161  );
162 
163 #if FW_SERIALIZABLE_TO_STRING
164 
166  void toString(
167  Fw::StringBase& sb
168  ) const;
169 
170 #endif
171 
172  public:
173 
174  // ----------------------------------------------------------------------
175  // Member variables
176  // ----------------------------------------------------------------------
177 
179  enum T e;
180 
181  };
182 
183  }
184 
185 }
186 
187 #endif
Advanced Orbiting Systems SDL.
Definition: TfvnEnumAc.hpp:45
Proximity-1 SDL.
Definition: TfvnEnumAc.hpp:47
The number of enumerated constants.
Definition: TfvnEnumAc.hpp:67
SerializeStatus
forward declaration for string
enum T t
For backwards compatibility.
Definition: TfvnEnumAc.hpp:55
bool isValid() const
Check raw enum value for validity.
Definition: TfvnEnumAc.cpp:51
enum T e
The raw enum value.
Definition: TfvnEnumAc.hpp:179
U8 SerialType
The serial representation type.
Definition: TfvnEnumAc.hpp:38
Telemetry and Telecommand SDLs.
Definition: TfvnEnumAc.hpp:43
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.
Definition: TfvnEnumAc.cpp:57
Tfvn()
Constructor (default value of INVALID_UNINITIALIZED)
Definition: TfvnEnumAc.hpp:77
Tfvn & operator=(const Tfvn &obj)
Copy assignment operator (object)
Definition: TfvnEnumAc.cpp:22
The size of the serial representation.
Definition: TfvnEnumAc.hpp:65
bool operator!=(enum T e1) const
Inequality operator.
Definition: TfvnEnumAc.hpp:127
Tfvn(const Tfvn &obj)
Copy constructor.
Definition: TfvnEnumAc.hpp:91
RateGroupDivider component implementation.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialize raw enum value from SerialType.
Definition: TfvnEnumAc.cpp:70
bool operator==(enum T e1) const
Equality operator.
Definition: TfvnEnumAc.hpp:121
Endianness
Tfvn(const enum T e1)
Constructor (user-provided value)
Definition: TfvnEnumAc.hpp:83
Unified Space Data Link Protocol.
Definition: TfvnEnumAc.hpp:49
Anything equal or higher value is invalid and should not be used.
Definition: TfvnEnumAc.hpp:51
T
The raw enum type.
Definition: TfvnEnumAc.hpp:41
Big endian serialization.