F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
SeqArgsSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title SeqArgsSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for SeqArgs struct
5 // ======================================================================
6 
7 #ifndef Svc_SeqArgsSerializableAc_HPP
8 #define Svc_SeqArgsSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
13 #include "Fw/Types/String.hpp"
15 
16 namespace Svc {
17 
18  class SeqArgs :
19  public Fw::Serializable
20  {
21 
22  public:
23 
24  // ----------------------------------------------------------------------
25  // Types
26  // ----------------------------------------------------------------------
27 
29  using Type_of_buffer = U8[255];
30 
31  public:
32 
33  // ----------------------------------------------------------------------
34  // Constants
35  // ----------------------------------------------------------------------
36 
37  enum {
40  sizeof(FwSizeType) +
41  sizeof(U8) * 255
42  };
43 
44  public:
45 
46  // ----------------------------------------------------------------------
47  // Constructors
48  // ----------------------------------------------------------------------
49 
51  SeqArgs();
52 
54  SeqArgs(
55  FwSizeType size,
56  const Type_of_buffer& buffer
57  );
58 
60  SeqArgs(
61  const SeqArgs& obj
62  );
63 
65  SeqArgs(
66  FwSizeType size,
67  U8 buffer
68  );
69 
70  public:
71 
72  // ----------------------------------------------------------------------
73  // Operators
74  // ----------------------------------------------------------------------
75 
78  const SeqArgs& obj
79  );
80 
82  bool operator==(
83  const SeqArgs& obj
84  ) const;
85 
87  bool operator!=(
88  const SeqArgs& obj
89  ) const;
90 
91 #ifdef BUILD_UT
92 
94  friend std::ostream& operator<<(
95  std::ostream& os,
96  const SeqArgs& obj
97  );
98 
99 #endif
100 
101  public:
102 
103  // ----------------------------------------------------------------------
104  // Member functions
105  // ----------------------------------------------------------------------
106 
109  Fw::SerialBufferBase& buffer,
111  ) const;
112 
115  Fw::SerialBufferBase& buffer,
117  );
118 
120  FwSizeType serializedSize() const;
121 
122 #if FW_SERIALIZABLE_TO_STRING
123 
125  void toString(
126  Fw::StringBase& sb
127  ) const;
128 
129 #endif
130 
131  // ----------------------------------------------------------------------
132  // Getter functions
133  // ----------------------------------------------------------------------
134 
137  {
138  return this->m_size;
139  }
140 
143  {
144  return this->m_buffer;
145  }
146 
148  const Type_of_buffer& get_buffer() const
149  {
150  return this->m_buffer;
151  }
152 
153  // ----------------------------------------------------------------------
154  // Setter functions
155  // ----------------------------------------------------------------------
156 
158  void set(
159  FwSizeType size,
160  const Type_of_buffer& buffer
161  );
162 
164  void set_size(FwSizeType size);
165 
167  void set_buffer(const Type_of_buffer& buffer);
168 
169  protected:
170 
171  // ----------------------------------------------------------------------
172  // Member variables
173  // ----------------------------------------------------------------------
174 
176  U8 m_buffer[255];
177 
178  };
179 
180 }
181 
182 #endif
void set_buffer(const Type_of_buffer &buffer)
Set member buffer.
PlatformSizeType FwSizeType
bool operator!=(const SeqArgs &obj) const
Inequality operator.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
SerializeStatus
forward declaration for string
The size of the serial representation.
Type_of_buffer & get_buffer()
Get member buffer.
SeqArgs & operator=(const SeqArgs &obj)
Copy assignment operator.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
FwSizeType get_size() const
Get member size.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void set_size(FwSizeType size)
Set member size.
bool operator==(const SeqArgs &obj) const
Equality operator.
const Type_of_buffer & get_buffer() const
Get member buffer (const)
U8[255] Type_of_buffer
The type of buffer.
RateGroupDivider component implementation.
SeqArgs()
Constructor (default value)
Endianness
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
Big endian serialization.