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  };
38 
39  public:
40 
41  // ----------------------------------------------------------------------
42  // Constructors
43  // ----------------------------------------------------------------------
44 
46  FrameContext();
47 
50  FwIndexType comQueueIndex,
51  ComCfg::Apid::T apid,
52  U16 sequenceCount,
53  U8 vcId
54  );
55 
58  const FrameContext& obj
59  );
60 
61  public:
62 
63  // ----------------------------------------------------------------------
64  // Operators
65  // ----------------------------------------------------------------------
66 
69  const FrameContext& obj
70  );
71 
73  bool operator==(
74  const FrameContext& obj
75  ) const;
76 
78  bool operator!=(
79  const FrameContext& obj
80  ) const;
81 
82 #ifdef BUILD_UT
83 
85  friend std::ostream& operator<<(
86  std::ostream& os,
87  const FrameContext& obj
88  );
89 
90 #endif
91 
92  public:
93 
94  // ----------------------------------------------------------------------
95  // Member functions
96  // ----------------------------------------------------------------------
97 
100  Fw::SerializeBufferBase& buffer
101  ) const;
102 
105  Fw::SerializeBufferBase& buffer
106  );
107 
109  FwSizeType serializedSize() const;
110 
111 #if FW_SERIALIZABLE_TO_STRING
112 
114  void toString(
115  Fw::StringBase& sb
116  ) const;
117 
118 #endif
119 
120  // ----------------------------------------------------------------------
121  // Getter functions
122  // ----------------------------------------------------------------------
123 
126  {
127  return this->m_comQueueIndex;
128  }
129 
132  {
133  return this->m_apid.e;
134  }
135 
137  U16 get_sequenceCount() const
138  {
139  return this->m_sequenceCount;
140  }
141 
143  U8 get_vcId() const
144  {
145  return this->m_vcId;
146  }
147 
148  // ----------------------------------------------------------------------
149  // Setter functions
150  // ----------------------------------------------------------------------
151 
153  void set(
154  FwIndexType comQueueIndex,
155  ComCfg::Apid::T apid,
156  U16 sequenceCount,
157  U8 vcId
158  );
159 
161  void set_comQueueIndex(FwIndexType comQueueIndex);
162 
164  void set_apid(ComCfg::Apid::T apid);
165 
167  void set_sequenceCount(U16 sequenceCount);
168 
170  void set_vcId(U8 vcId);
171 
172  protected:
173 
174  // ----------------------------------------------------------------------
175  // Member variables
176  // ----------------------------------------------------------------------
177 
182 
183  };
184 
185 }
186 
187 #endif
FrameContext()
Constructor (default value)
PlatformSizeType FwSizeType
ComCfg::Apid::T get_apid() const
Get member apid.
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.
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
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_vcId(U8 vcId)
Set member vcId.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Fw::SerializeStatus serializeTo(Fw::SerializeBufferBase &buffer) const
Serialization.
bool operator==(const FrameContext &obj) const
Equality operator.
void set_comQueueIndex(FwIndexType comQueueIndex)
Set member comQueueIndex.
PlatformIndexType FwIndexType
Type used to pass context info between components during framing/deframing.
T e
The raw enum value.
Definition: ApidEnumAc.hpp:179
forward declaration
Fw::SerializeStatus deserializeFrom(Fw::SerializeBufferBase &buffer)
Deserialization.
APIDs are 11 bits in the Space Packet protocol, so we use U16. Max value 7FF.
Definition: ApidEnumAc.hpp:17
FrameContext & operator=(const FrameContext &obj)
Copy assignment operator.