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(U16) +
38  sizeof(U8) +
40  sizeof(U8)
41  };
42 
43  public:
44 
45  // ----------------------------------------------------------------------
46  // Constructors
47  // ----------------------------------------------------------------------
48 
50  FrameContext();
51 
54  FwIndexType comQueueIndex,
55  ComCfg::Apid::T apid,
56  bool hasSecHdr,
57  U16 sequenceCount,
58  U8 vcId,
59  ComCfg::Pvn::T pvn,
60  bool sendNow
61  );
62 
65  const FrameContext& obj
66  );
67 
68  public:
69 
70  // ----------------------------------------------------------------------
71  // Operators
72  // ----------------------------------------------------------------------
73 
76  const FrameContext& obj
77  );
78 
80  bool operator==(
81  const FrameContext& obj
82  ) const;
83 
85  bool operator!=(
86  const FrameContext& obj
87  ) const;
88 
89 #ifdef BUILD_UT
90 
92  friend std::ostream& operator<<(
93  std::ostream& os,
94  const FrameContext& obj
95  );
96 
97 #endif
98 
99  public:
100 
101  // ----------------------------------------------------------------------
102  // Member functions
103  // ----------------------------------------------------------------------
104 
107  Fw::SerialBufferBase& buffer,
109  ) const;
110 
113  Fw::SerialBufferBase& buffer,
115  );
116 
118  FwSizeType serializedSize() const;
119 
120 #if FW_SERIALIZABLE_TO_STRING
121 
123  void toString(
124  Fw::StringBase& sb
125  ) const;
126 
127 #endif
128 
129  // ----------------------------------------------------------------------
130  // Getter functions
131  // ----------------------------------------------------------------------
132 
135  {
136  return this->m_comQueueIndex;
137  }
138 
141  {
142  return this->m_apid.e;
143  }
144 
146  bool get_hasSecHdr() const
147  {
148  return this->m_hasSecHdr;
149  }
150 
152  U16 get_sequenceCount() const
153  {
154  return this->m_sequenceCount;
155  }
156 
158  U8 get_vcId() const
159  {
160  return this->m_vcId;
161  }
162 
165  {
166  return this->m_pvn.e;
167  }
168 
170  bool get_sendNow() const
171  {
172  return this->m_sendNow;
173  }
174 
175  // ----------------------------------------------------------------------
176  // Setter functions
177  // ----------------------------------------------------------------------
178 
180  void set(
181  FwIndexType comQueueIndex,
182  ComCfg::Apid::T apid,
183  bool hasSecHdr,
184  U16 sequenceCount,
185  U8 vcId,
186  ComCfg::Pvn::T pvn,
187  bool sendNow
188  );
189 
191  void set_comQueueIndex(FwIndexType comQueueIndex);
192 
194  void set_apid(ComCfg::Apid::T apid);
195 
197  void set_hasSecHdr(bool hasSecHdr);
198 
200  void set_sequenceCount(U16 sequenceCount);
201 
203  void set_vcId(U8 vcId);
204 
206  void set_pvn(ComCfg::Pvn::T pvn);
207 
209  void set_sendNow(bool sendNow);
210 
211  protected:
212 
213  // ----------------------------------------------------------------------
214  // Member variables
215  // ----------------------------------------------------------------------
216 
223  bool m_sendNow;
224 
225  };
226 
227 }
228 
229 #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.
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
The size of the serial representation.
Definition: ApidEnumAc.hpp:68
ComCfg::Pvn::T get_pvn() const
Get member pvn.
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.
bool get_hasSecHdr() const
Get member hasSecHdr.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
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:207
enum T e
The raw enum value.
Definition: PvnEnumAc.hpp:191
void set_comQueueIndex(FwIndexType comQueueIndex)
Set member comQueueIndex.
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.