F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Loading...
Searching...
No Matches
DpStateEnumAc.hpp
Go to the documentation of this file.
1// ======================================================================
2// \title DpStateEnumAc.hpp
3// \author Generated by fpp-to-cpp
4// \brief hpp file for DpState enum
5// ======================================================================
6
7#ifndef Fw_DpStateEnumAc_HPP
8#define Fw_DpStateEnumAc_HPP
9
10#include "FpConfig.hpp"
12#include "Fw/Types/String.hpp"
13
14namespace Fw {
15
16 class DpState :
17 public Fw::Serializable
18 {
19
20 public:
21
22 // ----------------------------------------------------------------------
23 // Types
24 // ----------------------------------------------------------------------
25
27 typedef U8 SerialType;
28
30 enum T {
39 };
40
42 typedef T t;
43
44 public:
45
46 // ----------------------------------------------------------------------
47 // Constants
48 // ----------------------------------------------------------------------
49
50 enum {
55 };
56
57 public:
58
59 // ----------------------------------------------------------------------
60 // Constructors
61 // ----------------------------------------------------------------------
62
65 {
66 this->e = UNTRANSMITTED;
67 }
68
71 const T e1
72 )
73 {
74 this->e = e1;
75 }
76
79 const DpState& obj
80 )
81 {
82 this->e = obj.e;
83 }
84
85 public:
86
87 // ----------------------------------------------------------------------
88 // Operators
89 // ----------------------------------------------------------------------
90
93 const DpState& obj
94 );
95
98 T e1
99 );
100
102 operator T() const
103 {
104 return this->e;
105 }
106
108 bool operator==(T e1) const
109 {
110 return this->e == e1;
111 }
112
114 bool operator!=(T e1) const
115 {
116 return !(*this == e1);
117 }
118
119#ifdef BUILD_UT
120
122 friend std::ostream& operator<<(
123 std::ostream& os,
124 const DpState& obj
125 );
126
127#endif
128
129 public:
130
131 // ----------------------------------------------------------------------
132 // Member functions
133 // ----------------------------------------------------------------------
134
136 bool isValid() const;
137
141 ) const;
142
146 );
147
148#if FW_SERIALIZABLE_TO_STRING
149
151 void toString(
152 Fw::StringBase& sb
153 ) const;
154
155#endif
156
157 public:
158
159 // ----------------------------------------------------------------------
160 // Member variables
161 // ----------------------------------------------------------------------
162
165
166 };
167
168}
169
170#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:30
C++-compatible configuration header for fprime configuration.
DpState(const T e1)
Constructor (user-provided value)
T
The raw enum type.
@ UNTRANSMITTED
The untransmitted state.
@ TRANSMITTED
The transmitted state.
DpState()
Constructor (default value of UNTRANSMITTED)
bool isValid() const
Check raw enum value for validity.
bool operator==(T e1) const
Equality operator.
bool operator!=(T e1) const
Inequality operator.
T e
The raw enum value.
DpState & operator=(const DpState &obj)
Copy assignment operator (object)
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialize raw enum value from SerialType.
T t
For backwards compatibility.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialize raw enum value to SerialType.
DpState(const DpState &obj)
Copy constructor.
U8 SerialType
The serial representation type.
forward declaration
SerializeStatus
forward declaration for string