F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SpacePacketHeaderSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SpacePacketHeaderSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SpacePacketHeader struct
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_SpacePacketHeaderSerializableAc_HPP
8 #define Svc_Ccsds_SpacePacketHeaderSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
14 
15 namespace Svc {
16 
17  namespace Ccsds {
18 
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Constants
28  // ----------------------------------------------------------------------
29 
30  enum {
33  sizeof(U16) +
34  sizeof(U16) +
35  sizeof(U16)
36  };
37 
38  public:
39 
40  // ----------------------------------------------------------------------
41  // Constructors
42  // ----------------------------------------------------------------------
43 
46 
49  U16 packetIdentification,
50  U16 packetSequenceControl,
51  U16 packetDataLength
52  );
53 
56  const SpacePacketHeader& obj
57  );
58 
59  public:
60 
61  // ----------------------------------------------------------------------
62  // Operators
63  // ----------------------------------------------------------------------
64 
67  const SpacePacketHeader& obj
68  );
69 
71  bool operator==(
72  const SpacePacketHeader& obj
73  ) const;
74 
76  bool operator!=(
77  const SpacePacketHeader& obj
78  ) const;
79 
80 #ifdef BUILD_UT
81 
83  friend std::ostream& operator<<(
84  std::ostream& os,
85  const SpacePacketHeader& obj
86  );
87 
88 #endif
89 
90  public:
91 
92  // ----------------------------------------------------------------------
93  // Member functions
94  // ----------------------------------------------------------------------
95 
99  ) const;
100 
103  Fw::SerializeBufferBase& buffer
104  );
105 
107  FwSizeType serializedSize() const;
108 
109 #if FW_SERIALIZABLE_TO_STRING
110 
112  void toString(
113  Fw::StringBase& sb
114  ) const;
115 
116 #endif
117 
118  // ----------------------------------------------------------------------
119  // Getter functions
120  // ----------------------------------------------------------------------
121 
124  {
125  return this->m_packetIdentification;
126  }
127 
130  {
131  return this->m_packetSequenceControl;
132  }
133 
136  {
137  return this->m_packetDataLength;
138  }
139 
140  // ----------------------------------------------------------------------
141  // Setter functions
142  // ----------------------------------------------------------------------
143 
145  void set(
146  U16 packetIdentification,
147  U16 packetSequenceControl,
148  U16 packetDataLength
149  );
150 
152  void set_packetIdentification(U16 packetIdentification);
153 
155  void set_packetSequenceControl(U16 packetSequenceControl);
156 
158  void set_packetDataLength(U16 packetDataLength);
159 
160  protected:
161 
162  // ----------------------------------------------------------------------
163  // Member variables
164  // ----------------------------------------------------------------------
165 
169 
170  };
171 
172  }
173 
174 }
175 
176 #endif
U16 get_packetSequenceControl() const
Get member packetSequenceControl.
PlatformSizeType FwSizeType
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
SerializeStatus
forward declaration for string
bool operator!=(const SpacePacketHeader &obj) const
Inequality operator.
Describes the frame header format for the SpacePacket communications protocol.
U16 get_packetDataLength() const
Get member packetDataLength.
SpacePacketHeader & operator=(const SpacePacketHeader &obj)
Copy assignment operator.
U16 get_packetIdentification() const
Get member packetIdentification.
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.
void set_packetDataLength(U16 packetDataLength)
Set member packetDataLength.
void set_packetIdentification(U16 packetIdentification)
Set member packetIdentification.
SpacePacketHeader()
Constructor (default value)
void set_packetSequenceControl(U16 packetSequenceControl)
Set member packetSequenceControl.
forward declaration
RateGroupDivider component implementation.
bool operator==(const SpacePacketHeader &obj) const
Equality operator.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.