F´ Flight Software - C/C++ Documentation devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 {
35 };
36
38 typedef T t;
39
40 public:
41
42 // ----------------------------------------------------------------------
43 // Constants
44 // ----------------------------------------------------------------------
45
46 enum {
51 };
52
53 public:
54
55 // ----------------------------------------------------------------------
56 // Constructors
57 // ----------------------------------------------------------------------
58
61 {
62 this->e = UNTRANSMITTED;
63 }
64
67 const T e1
68 )
69 {
70 this->e = e1;
71 }
72
75 const DpState& obj
76 )
77 {
78 this->e = obj.e;
79 }
80
81 public:
82
83 // ----------------------------------------------------------------------
84 // Operators
85 // ----------------------------------------------------------------------
86
89 const DpState& obj
90 );
91
94 T e1
95 );
96
98 operator T() const
99 {
100 return this->e;
101 }
102
104 bool operator==(T e1) const
105 {
106 return this->e == e1;
107 }
108
110 bool operator!=(T e1) const
111 {
112 return !(*this == e1);
113 }
114
115#ifdef BUILD_UT
116
118 friend std::ostream& operator<<(
119 std::ostream& os,
120 const DpState& obj
121 );
122
123#endif
124
125 public:
126
127 // ----------------------------------------------------------------------
128 // Member functions
129 // ----------------------------------------------------------------------
130
132 bool isValid() const;
133
137 ) const;
138
142 );
143
144#if FW_SERIALIZABLE_TO_STRING || FW_ENABLE_TEXT_LOGGING
145
147 void toString(
148 Fw::StringBase& sb
149 ) const;
150
151#endif
152
153 public:
154
155 // ----------------------------------------------------------------------
156 // Member variables
157 // ----------------------------------------------------------------------
158
161
162 };
163
164}
165
166#endif
uint8_t U8
8-bit unsigned integer
Definition BasicTypes.h:26
C++-compatible configuration header for fprime configuration.
@ NUM_CONSTANTS
The number of enumerated constants.
@ SERIALIZED_SIZE
The size of the serial representation.
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)
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