F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ChannelParamsSerializableAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ChannelParamsSerializableAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for ChannelParams struct
5 // ======================================================================
6 
7 #ifndef Svc_Ccsds_Cfdp_ChannelParamsSerializableAc_HPP
8 #define Svc_Ccsds_Cfdp_ChannelParamsSerializableAc_HPP
9 
10 #include "Fw/FPrimeBasicTypes.hpp"
14 #include "Fw/Types/String.hpp"
16 
17 namespace Svc {
18 
19  namespace Ccsds {
20 
21  namespace Cfdp {
22 
24  class ChannelParams :
25  public Fw::Serializable
26  {
27 
28  public:
29 
30  // ----------------------------------------------------------------------
31  // Constants
32  // ----------------------------------------------------------------------
33 
34  enum {
37  sizeof(U8) +
38  sizeof(U8) +
39  sizeof(U32) +
40  sizeof(U32) +
43  sizeof(U32) +
46  };
47 
48  public:
49 
50  // ----------------------------------------------------------------------
51  // Constructors
52  // ----------------------------------------------------------------------
53 
55  ChannelParams();
56 
59  U8 ack_limit,
60  U8 nack_limit,
61  U32 ack_timer,
62  U32 inactivity_timer,
63  Fw::Enabled::T dequeue_enabled,
64  const Fw::StringBase& move_dir,
65  U32 max_outgoing_pdus_per_cycle,
66  const Fw::StringBase& tmp_dir,
67  const Fw::StringBase& fail_dir
68  );
69 
72  const ChannelParams& obj
73  );
74 
75  public:
76 
77  // ----------------------------------------------------------------------
78  // Operators
79  // ----------------------------------------------------------------------
80 
83  const ChannelParams& obj
84  );
85 
87  bool operator==(
88  const ChannelParams& obj
89  ) const;
90 
92  bool operator!=(
93  const ChannelParams& obj
94  ) const;
95 
96 #ifdef BUILD_UT
97 
99  friend std::ostream& operator<<(
100  std::ostream& os,
101  const ChannelParams& obj
102  );
103 
104 #endif
105 
106  public:
107 
108  // ----------------------------------------------------------------------
109  // Member functions
110  // ----------------------------------------------------------------------
111 
114  Fw::SerialBufferBase& buffer,
116  ) const;
117 
120  Fw::SerialBufferBase& buffer,
122  );
123 
125  FwSizeType serializedSize() const;
126 
127 #if FW_SERIALIZABLE_TO_STRING
128 
130  void toString(
131  Fw::StringBase& sb
132  ) const;
133 
134 #endif
135 
136  // ----------------------------------------------------------------------
137  // Getter functions
138  // ----------------------------------------------------------------------
139 
142  {
143  return this->m_ack_limit;
144  }
145 
148  {
149  return this->m_nack_limit;
150  }
151 
153  U32 get_ack_timer() const
154  {
155  return this->m_ack_timer;
156  }
157 
160  {
161  return this->m_inactivity_timer;
162  }
163 
166  {
167  return this->m_dequeue_enabled.e;
168  }
169 
172  {
173  return this->m_move_dir;
174  }
175 
178  {
179  return this->m_move_dir;
180  }
181 
184  {
185  return this->m_max_outgoing_pdus_per_cycle;
186  }
187 
190  {
191  return this->m_tmp_dir;
192  }
193 
196  {
197  return this->m_tmp_dir;
198  }
199 
202  {
203  return this->m_fail_dir;
204  }
205 
208  {
209  return this->m_fail_dir;
210  }
211 
212  // ----------------------------------------------------------------------
213  // Setter functions
214  // ----------------------------------------------------------------------
215 
217  void set(
218  U8 ack_limit,
219  U8 nack_limit,
220  U32 ack_timer,
221  U32 inactivity_timer,
222  Fw::Enabled::T dequeue_enabled,
223  const Fw::StringBase& move_dir,
224  U32 max_outgoing_pdus_per_cycle,
225  const Fw::StringBase& tmp_dir,
226  const Fw::StringBase& fail_dir
227  );
228 
230  void set_ack_limit(U8 ack_limit);
231 
233  void set_nack_limit(U8 nack_limit);
234 
236  void set_ack_timer(U32 ack_timer);
237 
239  void set_inactivity_timer(U32 inactivity_timer);
240 
242  void set_dequeue_enabled(Fw::Enabled::T dequeue_enabled);
243 
245  void set_move_dir(const Fw::StringBase& move_dir);
246 
248  void set_max_outgoing_pdus_per_cycle(U32 max_outgoing_pdus_per_cycle);
249 
251  void set_tmp_dir(const Fw::StringBase& tmp_dir);
252 
254  void set_fail_dir(const Fw::StringBase& fail_dir);
255 
256  protected:
257 
258  // ----------------------------------------------------------------------
259  // Member variables
260  // ----------------------------------------------------------------------
261 
274 
275  };
276 
277  }
278 
279  }
280 
281 }
282 
283 #endif
void set_ack_timer(U32 ack_timer)
Set member ack_timer.
The size of the serial representation.
bool operator!=(const ChannelParams &obj) const
Inequality operator.
PlatformSizeType FwSizeType
Fw::ExternalString & get_move_dir()
Get member move_dir.
char m___fprime_ac_fail_dir_buffer[Fw::StringBase::BUFFER_SIZE(200)]
void set_ack_limit(U8 ack_limit)
Set member ack_limit.
void set_inactivity_timer(U32 inactivity_timer)
Set member inactivity_timer.
void set_tmp_dir(const Fw::StringBase &tmp_dir)
Set member tmp_dir.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
void set_nack_limit(U8 nack_limit)
Set member nack_limit.
ChannelParams & operator=(const ChannelParams &obj)
Copy assignment operator.
enum T e
The raw enum value.
Fw::ExternalString & get_tmp_dir()
Get member tmp_dir.
const Fw::ExternalString & get_fail_dir() const
Get member fail_dir (const)
ChannelParams()
Constructor (default value)
Fw::SerializeStatus serializeTo(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG) const
Serialization.
SerializeStatus
forward declaration for string
void set_move_dir(const Fw::StringBase &move_dir)
Set member move_dir.
const Fw::ExternalString & get_move_dir() const
Get member move_dir (const)
const Fw::ExternalString & get_tmp_dir() const
Get member tmp_dir (const)
U8 get_ack_limit() const
Get member ack_limit.
void set_fail_dir(const Fw::StringBase &fail_dir)
Set member fail_dir.
void set_dequeue_enabled(Fw::Enabled::T dequeue_enabled)
Set member dequeue_enabled.
char m___fprime_ac_move_dir_buffer[Fw::StringBase::BUFFER_SIZE(200)]
A string backed by an external buffer.
Enabled and disabled states.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
Structure for the configured array of CFDP channels.
U32 get_inactivity_timer() const
Get member inactivity_timer.
U32 get_max_outgoing_pdus_per_cycle() const
Get member max_outgoing_pdus_per_cycle.
U32 get_ack_timer() const
Get member ack_timer.
Fw::Enabled::T get_dequeue_enabled() const
Get member dequeue_enabled.
bool operator==(const ChannelParams &obj) const
Equality operator.
RateGroupDivider component implementation.
static constexpr SizeType STATIC_SERIALIZED_SIZE(SizeType maxLength)
Fw::ExternalString & get_fail_dir()
Get member fail_dir.
Fw::SerializeStatus deserializeFrom(Fw::SerialBufferBase &buffer, Fw::Endianness mode=Fw::Endianness::BIG)
Deserialization.
Endianness
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
char m___fprime_ac_tmp_dir_buffer[Fw::StringBase::BUFFER_SIZE(200)]
U8 get_nack_limit() const
Get member nack_limit.
Big endian serialization.
T
The raw enum type.
void set_max_outgoing_pdus_per_cycle(U32 max_outgoing_pdus_per_cycle)
Set member max_outgoing_pdus_per_cycle.