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::SerialBufferBase& buffer,
102  ) const;
103 
106  Fw::SerialBufferBase& buffer,
108  );
109 
111  FwSizeType serializedSize() const;
112 
113 #if FW_SERIALIZABLE_TO_STRING
114 
116  void toString(
117  Fw::StringBase& sb
118  ) const;
119 
120 #endif
121 
122  // ----------------------------------------------------------------------
123  // Getter functions
124  // ----------------------------------------------------------------------
125 
128  {
129  return this->m_comQueueIndex;
130  }
131 
134  {
135  return this->m_apid.e;
136  }
137 
139  U16 get_sequenceCount() const
140  {
141  return this->m_sequenceCount;
142  }
143 
145  U8 get_vcId() const
146  {
147  return this->m_vcId;
148  }
149 
150  // ----------------------------------------------------------------------
151  // Setter functions
152  // ----------------------------------------------------------------------
153 
155  void set(
156  FwIndexType comQueueIndex,
157  ComCfg::Apid::T apid,
158  U16 sequenceCount,
159  U8 vcId
160  );
161 
163  void set_comQueueIndex(FwIndexType comQueueIndex);
164 
166  void set_apid(ComCfg::Apid::T apid);
167 
169  void set_sequenceCount(U16 sequenceCount);
170 
172  void set_vcId(U8 vcId);
173 
174  protected:
175 
176  // ----------------------------------------------------------------------
177  // Member variables
178  // ----------------------------------------------------------------------
179 
184 
185  };
186 
187 }
188 
189 #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_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.
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.
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:181
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.