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(U16) +
37  sizeof(U8) +
39  sizeof(U8)
40  };
41 
42  public:
43 
44  // ----------------------------------------------------------------------
45  // Constructors
46  // ----------------------------------------------------------------------
47 
49  FrameContext();
50 
53  FwIndexType comQueueIndex,
54  ComCfg::Apid::T apid,
55  U16 sequenceCount,
56  U8 vcId,
57  ComCfg::Pvn::T pvn,
58  bool sendNow
59  );
60 
63  const FrameContext& obj
64  );
65 
66  public:
67 
68  // ----------------------------------------------------------------------
69  // Operators
70  // ----------------------------------------------------------------------
71 
74  const FrameContext& obj
75  );
76 
78  bool operator==(
79  const FrameContext& obj
80  ) const;
81 
83  bool operator!=(
84  const FrameContext& obj
85  ) const;
86 
87 #ifdef BUILD_UT
88 
90  friend std::ostream& operator<<(
91  std::ostream& os,
92  const FrameContext& obj
93  );
94 
95 #endif
96 
97  public:
98 
99  // ----------------------------------------------------------------------
100  // Member functions
101  // ----------------------------------------------------------------------
102 
105  Fw::SerialBufferBase& buffer,
107  ) const;
108 
111  Fw::SerialBufferBase& buffer,
113  );
114 
116  FwSizeType serializedSize() const;
117 
118 #if FW_SERIALIZABLE_TO_STRING
119 
121  void toString(
122  Fw::StringBase& sb
123  ) const;
124 
125 #endif
126 
127  // ----------------------------------------------------------------------
128  // Getter functions
129  // ----------------------------------------------------------------------
130 
133  {
134  return this->m_comQueueIndex;
135  }
136 
139  {
140  return this->m_apid.e;
141  }
142 
144  U16 get_sequenceCount() const
145  {
146  return this->m_sequenceCount;
147  }
148 
150  U8 get_vcId() const
151  {
152  return this->m_vcId;
153  }
154 
157  {
158  return this->m_pvn.e;
159  }
160 
162  bool get_sendNow() const
163  {
164  return this->m_sendNow;
165  }
166 
167  // ----------------------------------------------------------------------
168  // Setter functions
169  // ----------------------------------------------------------------------
170 
172  void set(
173  FwIndexType comQueueIndex,
174  ComCfg::Apid::T apid,
175  U16 sequenceCount,
176  U8 vcId,
177  ComCfg::Pvn::T pvn,
178  bool sendNow
179  );
180 
182  void set_comQueueIndex(FwIndexType comQueueIndex);
183 
185  void set_apid(ComCfg::Apid::T apid);
186 
188  void set_sequenceCount(U16 sequenceCount);
189 
191  void set_vcId(U8 vcId);
192 
194  void set_pvn(ComCfg::Pvn::T pvn);
195 
197  void set_sendNow(bool sendNow);
198 
199  protected:
200 
201  // ----------------------------------------------------------------------
202  // Member variables
203  // ----------------------------------------------------------------------
204 
210  bool m_sendNow;
211 
212  };
213 
214 }
215 
216 #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.
T
The raw enum type.
Definition: PvnEnumAc.hpp:31
void set_apid(ComCfg::Apid::T apid)
Set member apid.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
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:67
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:31
void set_sequenceCount(U16 sequenceCount)
Set member sequenceCount.
U8 get_vcId() const
Get member vcId.
void set_pvn(ComCfg::Pvn::T pvn)
Set member pvn.
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:17
void set_vcId(U8 vcId)
Set member vcId.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
bool operator==(const FrameContext &obj) const
Equality operator.
enum T e
The raw enum value.
Definition: ApidEnumAc.hpp:181
The size of the serial representation.
Definition: PvnEnumAc.hpp:51
enum T e
The raw enum value.
Definition: PvnEnumAc.hpp:165
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:17
Big endian serialization.
The size of the serial representation.
FrameContext & operator=(const FrameContext &obj)
Copy assignment operator.