F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
TCHeaderSerializableAc.hpp
Go to the documentation of this file.
1
// ======================================================================
2
// \title TCHeaderSerializableAc.hpp
3
// \author Generated by fpp-to-cpp
4
// \brief hpp file for TCHeader struct
5
// ======================================================================
6
7
#ifndef Svc_CCSDS_TCHeaderSerializableAc_HPP
8
#define Svc_CCSDS_TCHeaderSerializableAc_HPP
9
10
#include "
Fw/FPrimeBasicTypes.hpp
"
11
#include "
Fw/Types/ExternalString.hpp
"
12
#include "
Fw/Types/Serializable.hpp
"
13
#include "
Fw/Types/String.hpp
"
14
15
namespace
Svc
{
16
17
namespace
CCSDS {
18
20
class
TCHeader
:
21
public
Fw::Serializable
22
{
23
24
public
:
25
26
// ----------------------------------------------------------------------
27
// Constants
28
// ----------------------------------------------------------------------
29
30
enum
{
32
SERIALIZED_SIZE
=
33
sizeof
(U16) +
34
sizeof
(U16) +
35
sizeof
(
U8
)
36
};
37
38
public
:
39
40
// ----------------------------------------------------------------------
41
// Constructors
42
// ----------------------------------------------------------------------
43
45
TCHeader
();
46
48
TCHeader
(
49
U16 flagsAndScId,
50
U16 vcIdAndLength,
51
U8
frameSequenceNum
52
);
53
55
TCHeader
(
56
const
TCHeader
& obj
57
);
58
59
public
:
60
61
// ----------------------------------------------------------------------
62
// Operators
63
// ----------------------------------------------------------------------
64
66
TCHeader
&
operator=
(
67
const
TCHeader
& obj
68
);
69
71
bool
operator==
(
72
const
TCHeader
& obj
73
)
const
;
74
76
bool
operator!=
(
77
const
TCHeader
& obj
78
)
const
;
79
80
#ifdef BUILD_UT
81
83
friend
std::ostream& operator<<(
84
std::ostream& os,
85
const
TCHeader
& obj
86
);
87
88
#endif
89
90
public
:
91
92
// ----------------------------------------------------------------------
93
// Member functions
94
// ----------------------------------------------------------------------
95
97
Fw::SerializeStatus
serialize
(
98
Fw::SerializeBufferBase
& buffer
99
)
const
;
100
102
Fw::SerializeStatus
deserialize
(
103
Fw::SerializeBufferBase
& buffer
104
);
105
106
#if FW_SERIALIZABLE_TO_STRING
107
109
void
toString(
110
Fw::StringBase
& sb
111
)
const
;
112
113
#endif
114
115
// ----------------------------------------------------------------------
116
// Getter functions
117
// ----------------------------------------------------------------------
118
120
U16
getflagsAndScId
()
const
121
{
122
return
this->
m_flagsAndScId
;
123
}
124
126
U16
getvcIdAndLength
()
const
127
{
128
return
this->
m_vcIdAndLength
;
129
}
130
132
U8
getframeSequenceNum
()
const
133
{
134
return
this->
m_frameSequenceNum
;
135
}
136
137
// ----------------------------------------------------------------------
138
// Setter functions
139
// ----------------------------------------------------------------------
140
142
void
set
(
143
U16 flagsAndScId,
144
U16 vcIdAndLength,
145
U8
frameSequenceNum
146
);
147
149
void
setflagsAndScId
(U16 flagsAndScId);
150
152
void
setvcIdAndLength
(U16 vcIdAndLength);
153
155
void
setframeSequenceNum
(
U8
frameSequenceNum);
156
157
protected
:
158
159
// ----------------------------------------------------------------------
160
// Member variables
161
// ----------------------------------------------------------------------
162
163
U16
m_flagsAndScId
;
164
U16
m_vcIdAndLength
;
165
U8
m_frameSequenceNum
;
166
167
};
168
169
}
170
171
}
172
173
#endif
Svc::CCSDS::TCHeader::m_vcIdAndLength
U16 m_vcIdAndLength
Definition:
TCHeaderSerializableAc.hpp:164
Svc::CCSDS::TCHeader::getflagsAndScId
U16 getflagsAndScId() const
Get member flagsAndScId.
Definition:
TCHeaderSerializableAc.hpp:120
Svc::CCSDS::TCHeader
Describes the frame header format for a Telecommand (TC) Transfer Frame header.
Definition:
TCHeaderSerializableAc.hpp:20
String.hpp
Svc::CCSDS::TCHeader::setframeSequenceNum
void setframeSequenceNum(U8 frameSequenceNum)
Set member frameSequenceNum.
Definition:
TCHeaderSerializableAc.cpp:192
Svc::CCSDS::TCHeader::SERIALIZED_SIZE
The size of the serial representation.
Definition:
TCHeaderSerializableAc.hpp:32
ExternalString.hpp
FPrimeBasicTypes.hpp
Svc::CCSDS::TCHeader::deserialize
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
Definition:
TCHeaderSerializableAc.cpp:121
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition:
Serializable.hpp:14
Svc::CCSDS::TCHeader::m_flagsAndScId
U16 m_flagsAndScId
Definition:
TCHeaderSerializableAc.hpp:163
Svc::CCSDS::TCHeader::TCHeader
TCHeader()
Constructor (default value)
Definition:
TCHeaderSerializableAc.cpp:19
Fw::SerializeBufferBase
Definition:
Serializable.hpp:54
Svc::CCSDS::TCHeader::m_frameSequenceNum
U8 m_frameSequenceNum
Definition:
TCHeaderSerializableAc.hpp:165
Svc::CCSDS::TCHeader::setvcIdAndLength
void setvcIdAndLength(U16 vcIdAndLength)
Set member vcIdAndLength.
Definition:
TCHeaderSerializableAc.cpp:186
Svc::CCSDS::TCHeader::serialize
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
Definition:
TCHeaderSerializableAc.cpp:100
Svc::CCSDS::TCHeader::getframeSequenceNum
U8 getframeSequenceNum() const
Get member frameSequenceNum.
Definition:
TCHeaderSerializableAc.hpp:132
Svc::CCSDS::TCHeader::getvcIdAndLength
U16 getvcIdAndLength() const
Get member vcIdAndLength.
Definition:
TCHeaderSerializableAc.hpp:126
U8
uint8_t U8
8-bit unsigned integer
Definition:
BasicTypes.h:56
Svc::CCSDS::TCHeader::operator==
bool operator==(const TCHeader &obj) const
Equality operator.
Definition:
TCHeaderSerializableAc.cpp:68
Fw::Serializable
forward declaration
Definition:
Serializable.hpp:25
Svc
RateGroupDivider component implementation.
Definition:
ActiveRateGroupCfg.hpp:18
Svc::CCSDS::TCHeader::operator!=
bool operator!=(const TCHeader &obj) const
Inequality operator.
Definition:
TCHeaderSerializableAc.cpp:79
Svc::CCSDS::TCHeader::operator=
TCHeader & operator=(const TCHeader &obj)
Copy assignment operator.
Definition:
TCHeaderSerializableAc.cpp:57
Svc::CCSDS::TCHeader::setflagsAndScId
void setflagsAndScId(U16 flagsAndScId)
Set member flagsAndScId.
Definition:
TCHeaderSerializableAc.cpp:180
Fw::StringBase
Definition:
StringBase.hpp:25
Serializable.hpp
Svc
CCSDS
Types
TCHeaderSerializableAc.hpp
Generated by
1.8.14