F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileDownlink.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileDownlink.hpp
3 // \author bocchino, mstarch
4 // \brief hpp file for FileDownlink component implementation class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 // ======================================================================
11 
12 #include <Fw/Com/ComPacket.hpp>
13 #include <Fw/FPrimeBasicTypes.hpp>
14 #include <Fw/Types/Assert.hpp>
15 #include <Fw/Types/StringUtils.hpp>
16 #include <Os/QueueString.hpp>
18 #include <limits>
19 
20 namespace Svc {
21 
22 // ----------------------------------------------------------------------
23 // Construction, initialization, and destruction
24 // ----------------------------------------------------------------------
25 
26 FileDownlink ::FileDownlink(const char* const name)
28  m_configured(false),
29  m_filesSent(this),
30  m_packetsSent(this),
31  m_warnings(this),
32  m_sequenceIndex(0),
33  m_curTimer(0),
34  m_bufferSize(0),
35  m_byteOffset(0),
36  m_endOffset(0),
37  m_lastCompletedType(Fw::FilePacket::T_NONE),
38  m_lastBufferId(0),
39  m_curEntry(),
40  m_cntxId(0) {}
41 
42 void FileDownlink ::configure(U32 cooldown, U32 cycleTime, U32 fileQueueDepth) {
43  this->m_cooldown = cooldown;
44  this->m_cycleTime = cycleTime;
45  this->m_configured = true;
46 
47  Os::Queue::Status stat =
48  m_fileQueue.create(this->getInstance(), Os::QueueString("fileDownlinkQueue"),
49  static_cast<FwSizeType>(fileQueueDepth), static_cast<FwSizeType>(sizeof(struct FileEntry)));
50  FW_ASSERT(stat == Os::Queue::OP_OK, static_cast<FwAssertArgType>(stat));
51 }
52 
54  this->m_fileQueue.teardown();
56 }
57 
59  FW_ASSERT(this->m_configured == true);
60 }
61 
63 
64 // ----------------------------------------------------------------------
65 // Handler implementations for user-defined typed input ports
66 // ----------------------------------------------------------------------
67 
68 void FileDownlink ::Run_handler(const FwIndexType portNum, U32 context) {
69  switch (this->m_mode.get()) {
70  case Mode::IDLE: {
71  FwSizeType real_size = 0;
72  FwQueuePriorityType prio = 0;
73  Os::Queue::Status stat = m_fileQueue.receive(reinterpret_cast<U8*>(&this->m_curEntry),
74  static_cast<FwSizeType>(sizeof(this->m_curEntry)),
75  Os::Queue::BlockingType::NONBLOCKING, real_size, prio);
76 
77  if (stat != Os::Queue::Status::OP_OK || sizeof(this->m_curEntry) != real_size) {
78  return;
79  }
80 
81  sendFile(this->m_curEntry.srcFilename, this->m_curEntry.destFilename, this->m_curEntry.offset,
82  this->m_curEntry.length);
83  break;
84  }
85  case Mode::COOLDOWN: {
86  if (this->m_curTimer >= this->m_cooldown) {
87  this->m_curTimer = 0;
88  this->m_mode.set(Mode::IDLE);
89  } else {
90  this->m_curTimer += m_cycleTime;
91  }
92  break;
93  }
94  case Mode::WAIT: {
95  this->m_curTimer += m_cycleTime;
96  break;
97  }
98  default:
99  break;
100  }
101 }
102 
103 Svc::SendFileResponse FileDownlink ::SendFile_handler(
104  const FwIndexType portNum,
105  const Fw::StringBase& sourceFilename, // lgtm[cpp/large-parameter] dictated by command architecture
106  const Fw::StringBase& destFilename, // lgtm[cpp/large-parameter] dictated by command architecture
107  U32 offset,
108  U32 length) {
109  struct FileEntry entry;
110  entry.offset = offset;
111  entry.length = length;
112  entry.source = FileDownlink::PORT;
113  entry.opCode = 0;
114  entry.cmdSeq = 0;
115  entry.context = m_cntxId++;
116 
117  // Guard against filename overflow
118  if (sourceFilename.length() >= entry.srcFilename.getCapacity()) {
120  return SendFileResponse(SendFileStatus::STATUS_ERROR, std::numeric_limits<U32>::max());
121  } else if (destFilename.length() >= entry.destFilename.getCapacity()) {
123  return SendFileResponse(SendFileStatus::STATUS_ERROR, std::numeric_limits<U32>::max());
124  } else {
125  entry.srcFilename = sourceFilename;
126  entry.destFilename = destFilename;
127 
128  Os::Queue::Status status =
129  m_fileQueue.send(reinterpret_cast<U8*>(&entry), static_cast<FwSizeType>(sizeof(entry)), 0,
130  Os::Queue::BlockingType::NONBLOCKING);
131 
132  if (status != Os::Queue::Status::OP_OK) {
133  return SendFileResponse(SendFileStatus::STATUS_ERROR, std::numeric_limits<U32>::max());
134  }
135  return SendFileResponse(SendFileStatus::STATUS_OK, entry.context);
136  }
137 }
138 
139 void FileDownlink ::pingIn_handler(const FwIndexType portNum, U32 key) {
140  this->pingOut_out(0, key);
141 }
142 
143 void FileDownlink ::bufferReturn_handler(const FwIndexType portNum, Fw::Buffer& fwBuffer) {
144  // If this is a stale buffer (old, timed-out, or both), then ignore its return.
145  // File downlink actions only respond to the return of the most-recently-sent buffer.
146  if (this->m_lastBufferId != fwBuffer.getContext() + 1 || this->m_mode.get() == Mode::IDLE) {
147  return;
148  }
149  // Non-ignored buffers cannot be returned in "DOWNLINK" and "IDLE" state. Only in "WAIT", "CANCEL" state.
150  FW_ASSERT(this->m_mode.get() == Mode::WAIT || this->m_mode.get() == Mode::CANCEL,
151  static_cast<FwAssertArgType>(this->m_mode.get()));
152  // If the last packet has been sent (and is returning now) then finish the file
153  if (this->m_lastCompletedType == Fw::FilePacket::T_END || this->m_lastCompletedType == Fw::FilePacket::T_CANCEL) {
154  finishHelper(this->m_lastCompletedType == Fw::FilePacket::T_CANCEL);
155  return;
156  }
157  // If waiting and a buffer is in-bound, then switch to downlink mode
158  else if (this->m_mode.get() == Mode::WAIT) {
159  this->m_mode.set(Mode::DOWNLINK);
160  }
161 
162  this->downlinkPacket();
163 }
164 
165 // ----------------------------------------------------------------------
166 // Command handler implementations
167 // ----------------------------------------------------------------------
168 
169 void FileDownlink ::SendFile_cmdHandler(const FwOpcodeType opCode,
170  const U32 cmdSeq,
171  const Fw::CmdStringArg& sourceFilename,
172  const Fw::CmdStringArg& destFilename) {
173  struct FileEntry entry;
174  entry.offset = 0;
175  entry.length = 0;
176  entry.source = FileDownlink::COMMAND;
177  entry.opCode = opCode;
178  entry.cmdSeq = cmdSeq;
179  entry.context = std::numeric_limits<U32>::max();
180 
181  // Guard against filename overflow
182  if (sourceFilename.length() >= entry.srcFilename.getCapacity()) {
184  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::VALIDATION_ERROR);
185  } else if (destFilename.length() >= entry.destFilename.getCapacity()) {
187  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::VALIDATION_ERROR);
188  } else {
189  entry.srcFilename = sourceFilename;
190  entry.destFilename = destFilename;
191 
192  Os::Queue::Status status =
193  m_fileQueue.send(reinterpret_cast<U8*>(&entry), static_cast<FwSizeType>(sizeof(entry)), 0,
194  Os::Queue::BlockingType::NONBLOCKING);
195 
196  if (status != Os::Queue::Status::OP_OK) {
197  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
198  }
199  }
200 }
201 
202 void FileDownlink ::SendPartial_cmdHandler(FwOpcodeType opCode,
203  U32 cmdSeq,
204  const Fw::CmdStringArg& sourceFilename,
205  const Fw::CmdStringArg& destFilename,
206  U32 startOffset,
207  U32 length) {
208  struct FileEntry entry;
209  entry.offset = startOffset;
210  entry.length = length;
211  entry.source = FileDownlink::COMMAND;
212  entry.opCode = opCode;
213  entry.cmdSeq = cmdSeq;
214  entry.context = std::numeric_limits<U32>::max();
215 
216  // Guard against filename overflow
217  if (sourceFilename.length() >= entry.srcFilename.getCapacity()) {
219  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::VALIDATION_ERROR);
220  } else if (destFilename.length() >= entry.destFilename.getCapacity()) {
222  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::VALIDATION_ERROR);
223  } else {
224  entry.srcFilename = sourceFilename;
225  entry.destFilename = destFilename;
226 
227  Os::Queue::Status status =
228  m_fileQueue.send(reinterpret_cast<U8*>(&entry), static_cast<FwSizeType>(sizeof(entry)), 0,
229  Os::Queue::BlockingType::NONBLOCKING);
230 
231  if (status != Os::Queue::Status::OP_OK) {
232  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
233  }
234  }
235 }
236 
237 void FileDownlink ::Cancel_cmdHandler(const FwOpcodeType opCode, const U32 cmdSeq) {
238  // Must be able to cancel in both downlink and waiting states
239  if (this->m_mode.get() == Mode::DOWNLINK || this->m_mode.get() == Mode::WAIT) {
240  this->m_mode.set(Mode::CANCEL);
241  }
242  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
243 }
244 
245 // ----------------------------------------------------------------------
246 // Private helper methods
247 // ----------------------------------------------------------------------
248 
249 Fw::CmdResponse FileDownlink ::statusToCmdResp(SendFileStatus status) {
250  switch (status.e) {
252  return Fw::CmdResponse::OK;
258  return Fw::CmdResponse::BUSY;
259  default:
260  // Trigger assertion if given unknown status
261  FW_ASSERT(false);
262  }
263 
264  // It's impossible to reach this, but added to suppress gcc missing return warning
266 }
267 
268 void FileDownlink ::sendResponse(SendFileStatus resp) {
269  if (this->m_curEntry.source == FileDownlink::COMMAND) {
270  this->cmdResponse_out(this->m_curEntry.opCode, this->m_curEntry.cmdSeq, statusToCmdResp(resp));
271  } else {
272  for (FwIndexType i = 0; i < this->getNum_FileComplete_OutputPorts(); i++) {
274  this->FileComplete_out(i, Svc::SendFileResponse(resp, this->m_curEntry.context));
275  }
276  }
277  }
278 }
279 
280 void FileDownlink ::sendFile(const Fw::FileNameString& sourceFilename,
281  const Fw::FileNameString& destFilename,
282  U32 startOffset,
283  U32 length) {
284  // Open file for downlink
285  Os::File::Status status = this->m_file.open(sourceFilename, destFilename);
286 
287  // Reject command if error when opening file
288  if (status != Os::File::OP_OK) {
289  this->m_mode.set(Mode::IDLE);
290  this->m_warnings.fileOpenError();
292  return;
293  }
294  const U32 fileSize = this->m_file.getSize();
295 
296  if (fileSize == 0) {
297  this->m_mode.set(Mode::IDLE);
298  this->m_warnings.zeroSize();
301  return;
302 
303  } else if (startOffset >= fileSize) {
304  this->enterCooldown();
305  this->log_WARNING_HI_DownlinkPartialFail(this->m_file.getSourceName(), this->m_file.getDestName(), startOffset,
306  fileSize);
309  return;
310  } else if (startOffset + length > fileSize) {
311  // If the amount to downlink is greater than the file size, emit a Warning and then allow
312  // the file to be downlinked anyway
313  this->log_WARNING_LO_DownlinkPartialWarning(startOffset, length, fileSize, this->m_file.getSourceName(),
314  this->m_file.getDestName());
315  length = fileSize - startOffset;
316  }
317 
318  // Send file and switch to WAIT mode
319  this->getBuffer(this->m_buffer, FILE_PACKET);
320  this->sendStartPacket();
321  this->m_mode.set(Mode::WAIT);
322  this->m_sequenceIndex = 1;
323  this->m_curTimer = 0;
324  this->m_byteOffset = startOffset;
325  this->m_lastCompletedType = Fw::FilePacket::T_START;
326 
327  // zero length means read until end of file
328  if (length > 0) {
329  this->log_ACTIVITY_HI_SendStarted(length, this->m_file.getSourceName(), this->m_file.getDestName());
330  this->m_endOffset = startOffset + length;
331  } else {
332  this->log_ACTIVITY_HI_SendStarted(fileSize - startOffset, this->m_file.getSourceName(),
333  this->m_file.getDestName());
334  this->m_endOffset = fileSize;
335  }
336 }
337 
338 Os::File::Status FileDownlink ::sendDataPacket(U32& byteOffset) {
339  FW_ASSERT(byteOffset < this->m_endOffset);
340  const U32 maxDataSize =
342  const U32 dataSize =
343  (byteOffset + maxDataSize > this->m_endOffset) ? (this->m_endOffset - byteOffset) : maxDataSize;
344  U8 buffer[maxDataSize];
345  // This will be last data packet sent
346  if (dataSize + byteOffset == this->m_endOffset) {
347  this->m_lastCompletedType = Fw::FilePacket::T_DATA;
348  }
349 
350  const Os::File::Status status = this->m_file.read(buffer, byteOffset, dataSize);
351  if (status != Os::File::OP_OK) {
352  this->m_warnings.fileRead(status);
353  return status;
354  }
355 
356  Fw::FilePacket::DataPacket dataPacket;
357  dataPacket.initialize(this->m_sequenceIndex, byteOffset, static_cast<U16>(dataSize), buffer);
358  ++this->m_sequenceIndex;
359  Fw::FilePacket filePacket;
360  filePacket.fromDataPacket(dataPacket);
361  this->sendFilePacket(filePacket);
362 
363  byteOffset += dataSize;
364 
365  return Os::File::OP_OK;
366 }
367 
368 void FileDownlink ::sendCancelPacket() {
369  Fw::Buffer buffer;
370  Fw::FilePacket::CancelPacket cancelPacket;
371  cancelPacket.initialize(this->m_sequenceIndex);
372 
373  Fw::FilePacket filePacket;
374  filePacket.fromCancelPacket(cancelPacket);
375  this->getBuffer(buffer, CANCEL_PACKET);
376  FW_ASSERT(buffer.getSize() >= filePacket.bufferSize() + sizeof(FwPacketDescriptorType),
377  static_cast<FwAssertArgType>(buffer.getSize()),
378  static_cast<FwAssertArgType>(filePacket.bufferSize() + sizeof(FwPacketDescriptorType)));
379 
380  // Serialize the packet descriptor FW_PACKET_FILE to the buffer
381  Fw::SerializeStatus status =
382  buffer.getSerializer().serializeFrom(static_cast<FwPacketDescriptorType>(Fw::ComPacketType::FW_PACKET_FILE));
383  FW_ASSERT(status == Fw::FW_SERIALIZE_OK);
384  Fw::Buffer offsetBuffer(buffer.getData() + sizeof(FwPacketDescriptorType),
385  buffer.getSize() - static_cast<Fw::Buffer::SizeType>(sizeof(FwPacketDescriptorType)));
386  // Serialize the filePacket content into the buffer
387  status = filePacket.toBuffer(offsetBuffer);
388  FW_ASSERT(status == Fw::FW_SERIALIZE_OK);
389  this->bufferSendOut_out(0, buffer);
390  this->m_packetsSent.packetSent();
391 }
392 
393 void FileDownlink ::sendEndPacket() {
394  CFDP::Checksum checksum;
395  this->m_file.getChecksum(checksum);
396 
397  Fw::FilePacket::EndPacket endPacket;
398  endPacket.initialize(this->m_sequenceIndex, checksum);
399 
400  Fw::FilePacket filePacket;
401  filePacket.fromEndPacket(endPacket);
402  this->sendFilePacket(filePacket);
403 }
404 
405 void FileDownlink ::sendStartPacket() {
406  Fw::FilePacket::StartPacket startPacket;
407  startPacket.initialize(this->m_file.getSize(), this->m_file.getSourceName().toChar(),
408  this->m_file.getDestName().toChar());
409  Fw::FilePacket filePacket;
410  filePacket.fromStartPacket(startPacket);
411  this->sendFilePacket(filePacket);
412 }
413 
414 void FileDownlink ::sendFilePacket(const Fw::FilePacket& filePacket) {
415  const U32 bufferSize = filePacket.bufferSize() + static_cast<U32>(sizeof(FwPacketDescriptorType));
416  FW_ASSERT(this->m_buffer.getData() != nullptr);
417  FW_ASSERT(this->m_buffer.getSize() >= bufferSize, static_cast<FwAssertArgType>(bufferSize),
418  static_cast<FwAssertArgType>(this->m_buffer.getSize()));
419  // Serialize packet descriptor FW_PACKET_FILE to the buffer
420  Fw::SerializeStatus status = this->m_buffer.getSerializer().serializeFrom(
421  static_cast<FwPacketDescriptorType>(Fw::ComPacketType::FW_PACKET_FILE));
422  FW_ASSERT(status == Fw::FW_SERIALIZE_OK);
423  // Serialize the filePacket content into the buffer, offset by the size of the packet descriptor
424  Fw::Buffer offsetBuffer(
425  this->m_buffer.getData() + sizeof(FwPacketDescriptorType),
426  this->m_buffer.getSize() - static_cast<Fw::Buffer::SizeType>(sizeof(FwPacketDescriptorType)));
427  status = filePacket.toBuffer(offsetBuffer);
428  FW_ASSERT(status == Fw::FW_SERIALIZE_OK);
429  // set the buffer size to the packet size
430  this->m_buffer.setSize(bufferSize);
431  this->bufferSendOut_out(0, this->m_buffer);
432  // restore buffer size to max
434  this->m_packetsSent.packetSent();
435 }
436 
437 void FileDownlink ::enterCooldown() {
438  this->m_file.getOsFile().close();
439  this->m_mode.set(Mode::COOLDOWN);
440  this->m_lastCompletedType = Fw::FilePacket::T_NONE;
441  this->m_curTimer = 0;
442 }
443 
444 void FileDownlink ::downlinkPacket() {
445  FW_ASSERT(this->m_lastCompletedType != Fw::FilePacket::T_NONE,
446  static_cast<FwAssertArgType>(this->m_lastCompletedType));
447  FW_ASSERT(this->m_mode.get() == Mode::CANCEL || this->m_mode.get() == Mode::DOWNLINK,
448  static_cast<FwAssertArgType>(this->m_mode.get()));
449  // If canceled mode and currently downlinking data then send a cancel packet
450  if (this->m_mode.get() == Mode::CANCEL && this->m_lastCompletedType == Fw::FilePacket::T_START) {
451  this->sendCancelPacket();
452  this->m_lastCompletedType = Fw::FilePacket::T_CANCEL;
453  }
454  // If in downlink mode and currently downlinking data then continue with the next packer
455  else if (this->m_mode.get() == Mode::DOWNLINK && this->m_lastCompletedType == Fw::FilePacket::T_START) {
456  // Send the next packet, or fail doing so
457  const Os::File::Status status = this->sendDataPacket(this->m_byteOffset);
458  if (status != Os::File::OP_OK) {
459  this->log_WARNING_HI_SendDataFail(this->m_file.getSourceName(), this->m_byteOffset);
460  this->enterCooldown();
463  // Don't go to wait state
464  return;
465  }
466  }
467  // If in downlink mode or cancel and finished downlinking data then send the last packet
468  else if (this->m_lastCompletedType == Fw::FilePacket::T_DATA) {
469  this->sendEndPacket();
470  this->m_lastCompletedType = Fw::FilePacket::T_END;
471  }
472  this->m_mode.set(Mode::WAIT);
473  this->m_curTimer = 0;
474 }
475 
476 void FileDownlink ::finishHelper(bool cancel) {
477  // Complete command and switch to IDLE
478  if (not cancel) {
479  this->m_filesSent.fileSent();
480  this->log_ACTIVITY_HI_FileSent(this->m_file.getSourceName(), this->m_file.getDestName());
481  } else {
482  this->log_ACTIVITY_HI_DownlinkCanceled(this->m_file.getSourceName(), this->m_file.getDestName());
483  }
484  this->enterCooldown();
485  sendResponse(SendFileStatus::STATUS_OK);
486 }
487 
488 void FileDownlink ::getBuffer(Fw::Buffer& buffer, PacketType type) {
489  // Check type is correct
490  FW_ASSERT(type < COUNT_PACKET_TYPE && type >= 0, static_cast<FwAssertArgType>(type));
491  // Wrap the buffer around our indexed memory.
492  buffer.setData(this->m_memoryStore[type]);
494  // Set a known ID to look for later
495  buffer.setContext(m_lastBufferId);
496  m_lastBufferId++;
497 }
498 } // end namespace Svc
Serialization/Deserialization operation was successful.
void setData(U8 *data)
Definition: Buffer.cpp:68
Status create(FwEnumStoreType id, const Fw::ConstStringBase &name, FwSizeType depth, FwSizeType messageSize) override
create queue storage through delegate
Definition: Queue.cpp:22
U16 FwPacketDescriptorType
The width of packet descriptors when they are serialized by the framework.
void fromCancelPacket(const CancelPacket &cancelPacket)
Definition: FilePacket.cpp:68
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:26
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void fromDataPacket(const DataPacket &dataPacket)
Definition: FilePacket.cpp:58
PlatformSizeType FwSizeType
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Definition: Queue.cpp:71
void setContext(U32 context)
Definition: Buffer.cpp:82
void setSize(FwSizeType size)
Definition: Buffer.cpp:75
The type of a cancel packet.
Definition: FilePacket.hpp:273
Status
status returned from the queue send function
Definition: Queue.hpp:30
void fromEndPacket(const EndPacket &endPacket)
Definition: FilePacket.cpp:63
The type of a data packet.
Definition: FilePacket.hpp:171
U32 getContext() const
Definition: Buffer.cpp:64
FwEnumStoreType getInstance() const
U8 * getData() const
Definition: Buffer.cpp:56
void fromStartPacket(const StartPacket &startPacket)
Definition: FilePacket.cpp:53
Enum representing a command response.
SerializeStatus toBuffer(Buffer &buffer) const
Definition: FilePacket.cpp:91
SerializeStatus
forward declaration for string
Class representing a 32-bit checksum as mandated by the CCSDS File Delivery Protocol.
Definition: Checksum.hpp:53
U32 bufferSize() const
Definition: FilePacket.cpp:73
void deinit() override
Allows de-initialization on teardown.
The type of a start packet.
Definition: FilePacket.hpp:121
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
void teardown() override
teardown the queue
Definition: Queue.cpp:49
Command successfully executed.
void initialize(const U32 fileSize, const char *const sourcePath, const char *const destinationPath)
Initialize a StartPacket with sequence number 0.
Definition: StartPacket.cpp:18
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
FwSizeType getSize() const
Definition: Buffer.cpp:60
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Command had execution error.
Operation was successful.
Definition: File.hpp:40
PlatformIndexType FwIndexType
FwSizeType SizeType
The size type for a buffer - for backwards compatibility.
Definition: Buffer.hpp:61
Send file response struct.
Command failed validation.
RateGroupDivider component implementation.
virtual SizeType length() const
Get the length of the string.
message sent/received okay
Definition: Queue.hpp:31
A file packet.
Definition: FilePacket.hpp:33
static const U32 FILEDOWNLINK_INTERNAL_BUFFER_SIZE
void initialize(const U32 sequenceIndex, const U32 byteOffset, const U16 dataSize, const U8 *const data)
Initialize a data packet.
Definition: DataPacket.cpp:18
static const bool FILEDOWNLINK_COMMAND_FAILURES_DISABLED
Implementation of malloc based allocator.
void initialize(const U32 sequenceIndex, const CFDP::Checksum &checksum)
Initialize an end packet.
Definition: EndPacket.cpp:20
void initialize(const U32 sequenceIndex)
Initialize a cancel packet.
ExternalSerializeBufferWithMemberCopy getSerializer()
Definition: Buffer.cpp:95
#define FW_ASSERT(...)
Definition: Assert.hpp:14
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
The type of an end packet.
Definition: FilePacket.hpp:230