F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FrameContextSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FrameContextSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FrameContext struct
5 // ======================================================================
6 
7 #ifndef ComCfg_FrameContextSerializableAc_HPP
8 #define ComCfg_FrameContextSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
17 
18 namespace ComCfg {
19 
21  class FrameContext :
22  public Fw::Serializable
23  {
24 
25  public:
26 
27  // ----------------------------------------------------------------------
28  // Constants
29  // ----------------------------------------------------------------------
30 
31  enum {
34  sizeof(FwIndexType) +
36  sizeof(U8) +
37  sizeof(U8) +
38  sizeof(U16) +
39  sizeof(U8) +
41  sizeof(U8) +
42  sizeof(U16)
43  };
44 
45  public:
46 
47  // ----------------------------------------------------------------------
48  // Constructors
49  // ----------------------------------------------------------------------
50 
52  FrameContext();
53 
56  FwIndexType comQueueIndex,
57  ComCfg::Apid::T apid,
58  bool hasSecHdr,
59  U8 sequenceFlags,
60  U16 sequenceCount,
61  U8 vcId,
62  ComCfg::Pvn::T pvn,
63  bool sendNow,
64  U16 saIndex
65  );
66 
69  const FrameContext& obj
70  );
71 
72  public:
73 
74  // ----------------------------------------------------------------------
75  // Operators
76  // ----------------------------------------------------------------------
77 
80  const FrameContext& obj
81  );
82 
84  bool operator==(
85  const FrameContext& obj
86  ) const;
87 
89  bool operator!=(
90  const FrameContext& obj
91  ) const;
92 
93 #ifdef BUILD_UT
94 
96  friend std::ostream& operator<<(
97  std::ostream& os,
98  const FrameContext& obj
99  );
100 
101 #endif
102 
103  public:
104 
105  // ----------------------------------------------------------------------
106  // Member functions
107  // ----------------------------------------------------------------------
108 
111  Fw::SerialBufferBase& buffer,
113  ) const;
114 
117  Fw::SerialBufferBase& buffer,
119  );
120 
122  FwSizeType serializedSize() const;
123 
124 #if FW_SERIALIZABLE_TO_STRING
125 
127  void toString(
128  Fw::StringBase& sb
129  ) const;
130 
131 #endif
132 
133  // ----------------------------------------------------------------------
134  // Getter functions
135  // ----------------------------------------------------------------------
136 
139  {
140  return this->m_comQueueIndex;
141  }
142 
145  {
146  return this->m_apid.e;
147  }
148 
150  bool get_hasSecHdr() const
151  {
152  return this->m_hasSecHdr;
153  }
154 
157  {
158  return this->m_sequenceFlags;
159  }
160 
162  U16 get_sequenceCount() const
163  {
164  return this->m_sequenceCount;
165  }
166 
168  U8 get_vcId() const
169  {
170  return this->m_vcId;
171  }
172 
175  {
176  return this->m_pvn.e;
177  }
178 
180  bool get_sendNow() const
181  {
182  return this->m_sendNow;
183  }
184 
186  U16 get_saIndex() const
187  {
188  return this->m_saIndex;
189  }
190 
191  // ----------------------------------------------------------------------
192  // Setter functions
193  // ----------------------------------------------------------------------
194 
196  void set(
197  FwIndexType comQueueIndex,
198  ComCfg::Apid::T apid,
199  bool hasSecHdr,
200  U8 sequenceFlags,
201  U16 sequenceCount,
202  U8 vcId,
203  ComCfg::Pvn::T pvn,
204  bool sendNow,
205  U16 saIndex
206  );
207 
209  void set_comQueueIndex(FwIndexType comQueueIndex);
210 
212  void set_apid(ComCfg::Apid::T apid);
213 
215  void set_hasSecHdr(bool hasSecHdr);
216 
218  void set_sequenceFlags(U8 sequenceFlags);
219 
221  void set_sequenceCount(U16 sequenceCount);
222 
224  void set_vcId(U8 vcId);
225 
227  void set_pvn(ComCfg::Pvn::T pvn);
228 
230  void set_sendNow(bool sendNow);
231 
233  void set_saIndex(U16 saIndex);
234 
235  protected:
236 
237  // ----------------------------------------------------------------------
238  // Member variables
239  // ----------------------------------------------------------------------
240 
248  bool m_sendNow;
250 
251  };
252 
253 }
254 
255 #endif
FrameContext()
Constructor (default value)
PlatformSizeType FwSizeType
ComCfg::Apid::T get_apid() const
Get member apid.
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
void set_hasSecHdr(bool hasSecHdr)
Set member hasSecHdr.
T
The raw enum type.
Definition: PvnEnumAc.hpp:32
void set_apid(ComCfg::Apid::T apid)
Set member apid.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
The size of the serial representation.
Definition: ApidEnumAc.hpp:70
void set_sendNow(bool sendNow)
Set member sendNow.
bool operator!=(const FrameContext &obj) const
Inequality operator.
FwIndexType get_comQueueIndex() const
Get member comQueueIndex.
SerializeStatus
forward declaration for string
ComCfg::Pvn::T get_pvn() const
Get member pvn.
void set_sequenceFlags(U8 sequenceFlags)
Set member sequenceFlags.
bool get_sendNow() const
Get member sendNow.
U16 get_sequenceCount() const
Get member sequenceCount.
T
The raw enum type.
Definition: ApidEnumAc.hpp:32
void set_sequenceCount(U16 sequenceCount)
Set member sequenceCount.
U8 get_vcId() const
Get member vcId.
The size of the serial representation.
Definition: PvnEnumAc.hpp:52
void set_pvn(ComCfg::Pvn::T pvn)
Set member pvn.
U8 get_sequenceFlags() const
Get member sequenceFlags.
bool get_hasSecHdr() const
Get member hasSecHdr.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
The size of the serial representation.
Packet Version Numbers are 3 bits with only 2 currently valid values.
Definition: PvnEnumAc.hpp:18
void set_vcId(U8 vcId)
Set member vcId.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
bool operator==(const FrameContext &obj) const
Equality operator.
enum T e
The raw enum value.
Definition: ApidEnumAc.hpp:223
enum T e
The raw enum value.
Definition: PvnEnumAc.hpp:205
U16 get_saIndex() const
Get member saIndex.
void set_comQueueIndex(FwIndexType comQueueIndex)
Set member comQueueIndex.
void set_saIndex(U16 saIndex)
Set member saIndex.
PlatformIndexType FwIndexType
Type used to pass context info between components during framing/deframing.
Endianness
APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.
Definition: ApidEnumAc.hpp:18
Big endian serialization.
FrameContext & operator=(const FrameContext &obj)
Copy assignment operator.