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"
16 
17 namespace ComCfg {
18 
20  class FrameContext :
21  public Fw::Serializable
22  {
23 
24  public:
25 
26  // ----------------------------------------------------------------------
27  // Constants
28  // ----------------------------------------------------------------------
29 
30  enum {
33  sizeof(FwIndexType) +
35  sizeof(U16) +
36  sizeof(U8) +
37  sizeof(U8)
38  };
39 
40  public:
41 
42  // ----------------------------------------------------------------------
43  // Constructors
44  // ----------------------------------------------------------------------
45 
47  FrameContext();
48 
51  FwIndexType comQueueIndex,
52  ComCfg::Apid::T apid,
53  U16 sequenceCount,
54  U8 vcId,
55  bool sendNow
56  );
57 
60  const FrameContext& obj
61  );
62 
63  public:
64 
65  // ----------------------------------------------------------------------
66  // Operators
67  // ----------------------------------------------------------------------
68 
71  const FrameContext& obj
72  );
73 
75  bool operator==(
76  const FrameContext& obj
77  ) const;
78 
80  bool operator!=(
81  const FrameContext& obj
82  ) const;
83 
84 #ifdef BUILD_UT
85 
87  friend std::ostream& operator<<(
88  std::ostream& os,
89  const FrameContext& obj
90  );
91 
92 #endif
93 
94  public:
95 
96  // ----------------------------------------------------------------------
97  // Member functions
98  // ----------------------------------------------------------------------
99 
102  Fw::SerialBufferBase& buffer,
104  ) const;
105 
108  Fw::SerialBufferBase& buffer,
110  );
111 
113  FwSizeType serializedSize() const;
114 
115 #if FW_SERIALIZABLE_TO_STRING
116 
118  void toString(
119  Fw::StringBase& sb
120  ) const;
121 
122 #endif
123 
124  // ----------------------------------------------------------------------
125  // Getter functions
126  // ----------------------------------------------------------------------
127 
130  {
131  return this->m_comQueueIndex;
132  }
133 
136  {
137  return this->m_apid.e;
138  }
139 
141  U16 get_sequenceCount() const
142  {
143  return this->m_sequenceCount;
144  }
145 
147  U8 get_vcId() const
148  {
149  return this->m_vcId;
150  }
151 
153  bool get_sendNow() const
154  {
155  return this->m_sendNow;
156  }
157 
158  // ----------------------------------------------------------------------
159  // Setter functions
160  // ----------------------------------------------------------------------
161 
163  void set(
164  FwIndexType comQueueIndex,
165  ComCfg::Apid::T apid,
166  U16 sequenceCount,
167  U8 vcId,
168  bool sendNow
169  );
170 
172  void set_comQueueIndex(FwIndexType comQueueIndex);
173 
175  void set_apid(ComCfg::Apid::T apid);
176 
178  void set_sequenceCount(U16 sequenceCount);
179 
181  void set_vcId(U8 vcId);
182 
184  void set_sendNow(bool sendNow);
185 
186  protected:
187 
188  // ----------------------------------------------------------------------
189  // Member variables
190  // ----------------------------------------------------------------------
191 
196  bool m_sendNow;
197 
198  };
199 
200 }
201 
202 #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.
The size of the serial representation.
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
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.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
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
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.
FrameContext & operator=(const FrameContext &obj)
Copy assignment operator.