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 
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 
121  {
122  return this->m_packetIdentification;
123  }
124 
127  {
128  return this->m_packetSequenceControl;
129  }
130 
133  {
134  return this->m_packetDataLength;
135  }
136 
137  // ----------------------------------------------------------------------
138  // Setter functions
139  // ----------------------------------------------------------------------
140 
142  void set(
143  U16 packetIdentification,
144  U16 packetSequenceControl,
145  U16 packetDataLength
146  );
147 
149  void setpacketIdentification(U16 packetIdentification);
150 
152  void setpacketSequenceControl(U16 packetSequenceControl);
153 
155  void setpacketDataLength(U16 packetDataLength);
156 
157  protected:
158 
159  // ----------------------------------------------------------------------
160  // Member variables
161  // ----------------------------------------------------------------------
162 
166 
167  };
168 
169  }
170 
171 }
172 
173 #endif
SpacePacketHeader & operator=(const SpacePacketHeader &obj)
Copy assignment operator.
U16 getpacketIdentification() const
Get member packetIdentification.
Fw::SerializeStatus serialize(Fw::SerializeBufferBase &buffer) const
Serialization.
void setpacketIdentification(U16 packetIdentification)
Set member packetIdentification.
SerializeStatus
forward declaration for string
U16 getpacketSequenceControl() const
Get member packetSequenceControl.
void setpacketSequenceControl(U16 packetSequenceControl)
Set member packetSequenceControl.
Fw::SerializeStatus deserialize(Fw::SerializeBufferBase &buffer)
Deserialization.
bool operator!=(const SpacePacketHeader &obj) const
Inequality operator.
U16 getpacketDataLength() const
Get member packetDataLength.
SpacePacketHeader()
Constructor (default value)
Describes the frame header format for the SpacePacket communications protocol.
void setpacketDataLength(U16 packetDataLength)
Set member packetDataLength.
forward declaration
RateGroupDivider component implementation.
bool operator==(const SpacePacketHeader &obj) const
Equality operator.