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 
98  Fw::SerialBufferBase& buffer,
100  ) const;
101 
104  Fw::SerialBufferBase& buffer,
106  );
107 
109  FwSizeType serializedSize() const;
110 
111 #if FW_SERIALIZABLE_TO_STRING
112 
114  void toString(
115  Fw::StringBase& sb
116  ) const;
117 
118 #endif
119 
120  // ----------------------------------------------------------------------
121  // Getter functions
122  // ----------------------------------------------------------------------
123 
126  {
127  return this->m_packetIdentification;
128  }
129 
132  {
133  return this->m_packetSequenceControl;
134  }
135 
138  {
139  return this->m_packetDataLength;
140  }
141 
142  // ----------------------------------------------------------------------
143  // Setter functions
144  // ----------------------------------------------------------------------
145 
147  void set(
148  U16 packetIdentification,
149  U16 packetSequenceControl,
150  U16 packetDataLength
151  );
152 
154  void set_packetIdentification(U16 packetIdentification);
155 
157  void set_packetSequenceControl(U16 packetSequenceControl);
158 
160  void set_packetDataLength(U16 packetDataLength);
161 
162  protected:
163 
164  // ----------------------------------------------------------------------
165  // Member variables
166  // ----------------------------------------------------------------------
167 
171 
172  };
173 
174  }
175 
176 }
177 
178 #endif
U16 get_packetSequenceControl() const
Get member packetSequenceControl.
PlatformSizeType FwSizeType
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.
void set_packetDataLength(U16 packetDataLength)
Set member packetDataLength.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
void set_packetIdentification(U16 packetIdentification)
Set member packetIdentification.
SpacePacketHeader()
Constructor (default value)
void set_packetSequenceControl(U16 packetSequenceControl)
Set member packetSequenceControl.
RateGroupDivider component implementation.
Endianness
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Big endian serialization.
bool operator==(const SpacePacketHeader &obj) const
Equality operator.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.