F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileManagerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileManagerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for FileManager component base class
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 #if FW_ENABLE_TEXT_LOGGING
10 #include "Fw/Types/String.hpp"
11 #endif
13 
14 namespace Svc {
15 
16  namespace {
17  enum MsgTypeEnum {
18  FILEMANAGER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
19  PINGIN_PING,
20  CMD_CREATEDIRECTORY,
21  CMD_MOVEFILE,
22  CMD_REMOVEDIRECTORY,
23  CMD_REMOVEFILE,
24  CMD_APPENDFILE,
25  CMD_FILESIZE,
26  CMD_LISTDIRECTORY,
27  CMD_CALCULATECRC,
28  CMD_GENERATEDP,
29  INT_IF_RUN,
30  };
31 
32  // Get the max size by constructing a union of the async input, command, and
33  // internal port serialization sizes
34  union BuffUnion {
37  };
38 
39  // Define a message buffer class large enough to handle all the
40  // asynchronous inputs to the component
41  class ComponentIpcSerializableBuffer :
43  {
44 
45  public:
46 
47  enum {
48  // Offset into data in buffer: Size of message ID and port number
49  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
50  // Max data size
51  MAX_DATA_SIZE = sizeof(BuffUnion),
52  // Max message size: Size of message id + size of port + max data size
53  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
54  };
55 
56  ComponentIpcSerializableBuffer() : Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
57 
58  }
59 
60  private:
61  // Should be the max of all the input ports serialized sizes...
62  U8 m_buff[SERIALIZATION_SIZE];
63 
64  };
65  }
66 
67  // ----------------------------------------------------------------------
68  // Types for data products
69  // ----------------------------------------------------------------------
70 
73  FwDpIdType id,
74  const Fw::Buffer& buffer,
75  FwDpIdType baseId
76  ) :
77  Fw::DpContainer(id, buffer),
78  m_baseId(baseId)
79  {
80 
81  }
82 
85  Fw::DpContainer(),
86  m_baseId(0)
87  {
88 
89  }
90 
93  const U8* array,
94  FwSizeType size
95  )
96  {
97  FW_ASSERT(array != nullptr);
98  // Compute the size delta
99  const FwSizeType sizeDelta =
100  sizeof(FwDpIdType) +
101  sizeof(FwSizeStoreType) +
102  size * sizeof(U8);
103  // Serialize the elements if they will fit
105  if ((this->m_dataBuffer.getSize() + sizeDelta) <= this->m_dataBuffer.getCapacity()) {
106  const FwDpIdType id = this->m_baseId + RecordId::FileChunkDataRecord;
107  status = this->m_dataBuffer.serializeFrom(id);
108  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
109  status = this->m_dataBuffer.serializeSize(size);
110  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
111  status = this->m_dataBuffer.serializeFrom(array, size, Fw::Serialization::OMIT_LENGTH);
112  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
113  this->m_dataSize += sizeDelta;
114  }
115  else {
117  }
118  return status;
119  }
120 
123  {
124  const FwSizeType sizeDelta =
125  sizeof(FwDpIdType) +
126  elt.serializedSize();
128  if (this->m_dataBuffer.getSize() + sizeDelta <= this->m_dataBuffer.getCapacity()) {
129  const FwDpIdType id = this->m_baseId + RecordId::FileChunkHeaderRecord;
130  status = this->m_dataBuffer.serializeFrom(id);
131  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
132  status = this->m_dataBuffer.serializeFrom(elt);
133  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
134  this->m_dataSize += sizeDelta;
135  }
136  else {
138  }
139  return status;
140  }
141 
142  // ----------------------------------------------------------------------
143  // Component initialization
144  // ----------------------------------------------------------------------
145 
148  FwSizeType queueDepth,
149  FwEnumStoreType instance
150  )
151  {
152  // Initialize base class
154 
155 #if !FW_DIRECT_PORT_CALLS
156  // Connect input port cmdIn
157  for (
158  FwIndexType port = 0;
159  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
160  port++
161  ) {
162  this->m_cmdIn_InputPort[port].init();
163  this->m_cmdIn_InputPort[port].addCallComp(
164  this,
165  m_p_cmdIn_in
166  );
167  this->m_cmdIn_InputPort[port].setPortNum(port);
168 
169 #if FW_OBJECT_NAMES == 1
170  Fw::ObjectName portName;
171  portName.format(
172  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
173  this->m_objName.toChar(),
174  port
175  );
176  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
177 #endif
178  }
179 #endif
180 
181 #if !FW_DIRECT_PORT_CALLS
182  // Connect input port pingIn
183  for (
184  FwIndexType port = 0;
185  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
186  port++
187  ) {
188  this->m_pingIn_InputPort[port].init();
189  this->m_pingIn_InputPort[port].addCallComp(
190  this,
191  m_p_pingIn_in
192  );
193  this->m_pingIn_InputPort[port].setPortNum(port);
194 
195 #if FW_OBJECT_NAMES == 1
196  Fw::ObjectName portName;
197  portName.format(
198  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
199  this->m_objName.toChar(),
200  port
201  );
202  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
203 #endif
204  }
205 #endif
206 
207 #if !FW_DIRECT_PORT_CALLS
208  // Connect input port schedIn
209  for (
210  FwIndexType port = 0;
211  port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
212  port++
213  ) {
214  this->m_schedIn_InputPort[port].init();
215  this->m_schedIn_InputPort[port].addCallComp(
216  this,
217  m_p_schedIn_in
218  );
219  this->m_schedIn_InputPort[port].setPortNum(port);
220 
221 #if FW_OBJECT_NAMES == 1
222  Fw::ObjectName portName;
223  portName.format(
224  "%s_schedIn_InputPort[%" PRI_FwIndexType "]",
225  this->m_objName.toChar(),
226  port
227  );
228  this->m_schedIn_InputPort[port].setObjName(portName.toChar());
229 #endif
230  }
231 #endif
232 
233 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
234  // Connect output port LogText
235  for (
236  FwIndexType port = 0;
237  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
238  port++
239  ) {
240  this->m_LogText_OutputPort[port].init();
241 
242 #if FW_OBJECT_NAMES == 1
243  Fw::ObjectName portName;
244  portName.format(
245  "%s_LogText_OutputPort[%" PRI_FwIndexType "]",
246  this->m_objName.toChar(),
247  port
248  );
249  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
250 #endif
251  }
252 #endif
253 
254 #if !FW_DIRECT_PORT_CALLS
255  // Connect output port cmdRegOut
256  for (
257  FwIndexType port = 0;
258  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
259  port++
260  ) {
261  this->m_cmdRegOut_OutputPort[port].init();
262 
263 #if FW_OBJECT_NAMES == 1
264  Fw::ObjectName portName;
265  portName.format(
266  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
267  this->m_objName.toChar(),
268  port
269  );
270  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
271 #endif
272  }
273 #endif
274 
275 #if !FW_DIRECT_PORT_CALLS
276  // Connect output port cmdResponseOut
277  for (
278  FwIndexType port = 0;
279  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
280  port++
281  ) {
282  this->m_cmdResponseOut_OutputPort[port].init();
283 
284 #if FW_OBJECT_NAMES == 1
285  Fw::ObjectName portName;
286  portName.format(
287  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
288  this->m_objName.toChar(),
289  port
290  );
291  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
292 #endif
293  }
294 #endif
295 
296 #if !FW_DIRECT_PORT_CALLS
297  // Connect output port eventOut
298  for (
299  FwIndexType port = 0;
300  port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
301  port++
302  ) {
303  this->m_eventOut_OutputPort[port].init();
304 
305 #if FW_OBJECT_NAMES == 1
306  Fw::ObjectName portName;
307  portName.format(
308  "%s_eventOut_OutputPort[%" PRI_FwIndexType "]",
309  this->m_objName.toChar(),
310  port
311  );
312  this->m_eventOut_OutputPort[port].setObjName(portName.toChar());
313 #endif
314  }
315 #endif
316 
317 #if !FW_DIRECT_PORT_CALLS
318  // Connect output port productGetOut
319  for (
320  FwIndexType port = 0;
321  port < static_cast<FwIndexType>(this->getNum_productGetOut_OutputPorts());
322  port++
323  ) {
324  this->m_productGetOut_OutputPort[port].init();
325 
326 #if FW_OBJECT_NAMES == 1
327  Fw::ObjectName portName;
328  portName.format(
329  "%s_productGetOut_OutputPort[%" PRI_FwIndexType "]",
330  this->m_objName.toChar(),
331  port
332  );
333  this->m_productGetOut_OutputPort[port].setObjName(portName.toChar());
334 #endif
335  }
336 #endif
337 
338 #if !FW_DIRECT_PORT_CALLS
339  // Connect output port productSendOut
340  for (
341  FwIndexType port = 0;
342  port < static_cast<FwIndexType>(this->getNum_productSendOut_OutputPorts());
343  port++
344  ) {
345  this->m_productSendOut_OutputPort[port].init();
346 
347 #if FW_OBJECT_NAMES == 1
348  Fw::ObjectName portName;
349  portName.format(
350  "%s_productSendOut_OutputPort[%" PRI_FwIndexType "]",
351  this->m_objName.toChar(),
352  port
353  );
354  this->m_productSendOut_OutputPort[port].setObjName(portName.toChar());
355 #endif
356  }
357 #endif
358 
359 #if !FW_DIRECT_PORT_CALLS
360  // Connect output port timeCaller
361  for (
362  FwIndexType port = 0;
363  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
364  port++
365  ) {
366  this->m_timeCaller_OutputPort[port].init();
367 
368 #if FW_OBJECT_NAMES == 1
369  Fw::ObjectName portName;
370  portName.format(
371  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
372  this->m_objName.toChar(),
373  port
374  );
375  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
376 #endif
377  }
378 #endif
379 
380 #if !FW_DIRECT_PORT_CALLS
381  // Connect output port tlmOut
382  for (
383  FwIndexType port = 0;
384  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
385  port++
386  ) {
387  this->m_tlmOut_OutputPort[port].init();
388 
389 #if FW_OBJECT_NAMES == 1
390  Fw::ObjectName portName;
391  portName.format(
392  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
393  this->m_objName.toChar(),
394  port
395  );
396  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
397 #endif
398  }
399 #endif
400 
401 #if !FW_DIRECT_PORT_CALLS
402  // Connect output port pingOut
403  for (
404  FwIndexType port = 0;
405  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
406  port++
407  ) {
408  this->m_pingOut_OutputPort[port].init();
409 
410 #if FW_OBJECT_NAMES == 1
411  Fw::ObjectName portName;
412  portName.format(
413  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
414  this->m_objName.toChar(),
415  port
416  );
417  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
418 #endif
419  }
420 #endif
421 
422  // Create the queue
423  Os::Queue::Status qStat = this->createQueue(
424  queueDepth,
425  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
426  );
427  FW_ASSERT(
428  Os::Queue::Status::OP_OK == qStat,
429  static_cast<FwAssertArgType>(qStat)
430  );
431  }
432 
433 #if !FW_DIRECT_PORT_CALLS
434 
435  // ----------------------------------------------------------------------
436  // Getters for special input ports
437  // ----------------------------------------------------------------------
438 
441  {
442  FW_ASSERT(
443  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
444  static_cast<FwAssertArgType>(portNum)
445  );
446 
447  return &this->m_cmdIn_InputPort[portNum];
448  }
449 
450 #endif
451 
452 #if !FW_DIRECT_PORT_CALLS
453 
454  // ----------------------------------------------------------------------
455  // Getters for typed input ports
456  // ----------------------------------------------------------------------
457 
460  {
461  FW_ASSERT(
462  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
463  static_cast<FwAssertArgType>(portNum)
464  );
465 
466  return &this->m_pingIn_InputPort[portNum];
467  }
468 
471  {
472  FW_ASSERT(
473  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
474  static_cast<FwAssertArgType>(portNum)
475  );
476 
477  return &this->m_schedIn_InputPort[portNum];
478  }
479 
480 #endif
481 
482 #if !FW_DIRECT_PORT_CALLS
483 
484  // ----------------------------------------------------------------------
485  // Connect input ports to special output ports
486  // ----------------------------------------------------------------------
487 
488 #if FW_ENABLE_TEXT_LOGGING == 1
489 
490  void FileManagerComponentBase ::
491  set_LogText_OutputPort(
492  FwIndexType portNum,
494  )
495  {
496  FW_ASSERT(
497  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
498  static_cast<FwAssertArgType>(portNum)
499  );
500 
501  this->m_LogText_OutputPort[portNum].addCallPort(port);
502  }
503 
504 #endif
505 
508  FwIndexType portNum,
509  Fw::InputCmdRegPort* port
510  )
511  {
512  FW_ASSERT(
513  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
514  static_cast<FwAssertArgType>(portNum)
515  );
516 
517  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
518  }
519 
522  FwIndexType portNum,
524  )
525  {
526  FW_ASSERT(
527  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
528  static_cast<FwAssertArgType>(portNum)
529  );
530 
531  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
532  }
533 
536  FwIndexType portNum,
537  Fw::InputLogPort* port
538  )
539  {
540  FW_ASSERT(
541  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
542  static_cast<FwAssertArgType>(portNum)
543  );
544 
545  this->m_eventOut_OutputPort[portNum].addCallPort(port);
546  }
547 
550  FwIndexType portNum,
551  Fw::InputDpGetPort* port
552  )
553  {
554  FW_ASSERT(
555  (0 <= portNum) && (portNum < this->getNum_productGetOut_OutputPorts()),
556  static_cast<FwAssertArgType>(portNum)
557  );
558 
559  this->m_productGetOut_OutputPort[portNum].addCallPort(port);
560  }
561 
564  FwIndexType portNum,
565  Fw::InputDpSendPort* port
566  )
567  {
568  FW_ASSERT(
569  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
570  static_cast<FwAssertArgType>(portNum)
571  );
572 
573  this->m_productSendOut_OutputPort[portNum].addCallPort(port);
574  }
575 
578  FwIndexType portNum,
579  Fw::InputTimePort* port
580  )
581  {
582  FW_ASSERT(
583  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
584  static_cast<FwAssertArgType>(portNum)
585  );
586 
587  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
588  }
589 
592  FwIndexType portNum,
593  Fw::InputTlmPort* port
594  )
595  {
596  FW_ASSERT(
597  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
598  static_cast<FwAssertArgType>(portNum)
599  );
600 
601  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
602  }
603 
604 #endif
605 
606 #if !FW_DIRECT_PORT_CALLS
607 
608  // ----------------------------------------------------------------------
609  // Connect typed input ports to typed output ports
610  // ----------------------------------------------------------------------
611 
614  FwIndexType portNum,
615  Svc::InputPingPort* port
616  )
617  {
618  FW_ASSERT(
619  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
620  static_cast<FwAssertArgType>(portNum)
621  );
622 
623  this->m_pingOut_OutputPort[portNum].addCallPort(port);
624  }
625 
626 #endif
627 
628 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
629 
630  // ----------------------------------------------------------------------
631  // Connect serial input ports to special output ports
632  // ----------------------------------------------------------------------
633 
634 #if FW_ENABLE_TEXT_LOGGING == 1
635 
636  void FileManagerComponentBase ::
637  set_LogText_OutputPort(
638  FwIndexType portNum,
639  Fw::InputSerializePort* port
640  )
641  {
642  FW_ASSERT(
643  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
644  static_cast<FwAssertArgType>(portNum)
645  );
646 
647  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
648  }
649 
650 #endif
651 
654  FwIndexType portNum,
655  Fw::InputSerializePort* port
656  )
657  {
658  FW_ASSERT(
659  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
660  static_cast<FwAssertArgType>(portNum)
661  );
662 
663  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
664  }
665 
668  FwIndexType portNum,
669  Fw::InputSerializePort* port
670  )
671  {
672  FW_ASSERT(
673  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
674  static_cast<FwAssertArgType>(portNum)
675  );
676 
677  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
678  }
679 
682  FwIndexType portNum,
683  Fw::InputSerializePort* port
684  )
685  {
686  FW_ASSERT(
687  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
688  static_cast<FwAssertArgType>(portNum)
689  );
690 
691  this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
692  }
693 
696  FwIndexType portNum,
697  Fw::InputSerializePort* port
698  )
699  {
700  FW_ASSERT(
701  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
702  static_cast<FwAssertArgType>(portNum)
703  );
704 
705  this->m_productSendOut_OutputPort[portNum].registerSerialPort(port);
706  }
707 
710  FwIndexType portNum,
711  Fw::InputSerializePort* port
712  )
713  {
714  FW_ASSERT(
715  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
716  static_cast<FwAssertArgType>(portNum)
717  );
718 
719  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
720  }
721 
724  FwIndexType portNum,
725  Fw::InputSerializePort* port
726  )
727  {
728  FW_ASSERT(
729  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
730  static_cast<FwAssertArgType>(portNum)
731  );
732 
733  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
734  }
735 
736 #endif
737 
738 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
739 
740  // ----------------------------------------------------------------------
741  // Connect serial input ports to typed output ports
742  // ----------------------------------------------------------------------
743 
746  FwIndexType portNum,
747  Fw::InputSerializePort* port
748  )
749  {
750  FW_ASSERT(
751  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
752  static_cast<FwAssertArgType>(portNum)
753  );
754 
755  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
756  }
757 
758 #endif
759 
760  // ----------------------------------------------------------------------
761  // Command registration
762  // ----------------------------------------------------------------------
763 
766  {
768 
769  this->cmdRegOut_out(
770  0,
772  );
773 
774  this->cmdRegOut_out(
775  0,
776  this->getIdBase() + OPCODE_MOVEFILE
777  );
778 
779  this->cmdRegOut_out(
780  0,
782  );
783 
784  this->cmdRegOut_out(
785  0,
786  this->getIdBase() + OPCODE_REMOVEFILE
787  );
788 
789  this->cmdRegOut_out(
790  0,
791  this->getIdBase() + OPCODE_APPENDFILE
792  );
793 
794  this->cmdRegOut_out(
795  0,
796  this->getIdBase() + OPCODE_FILESIZE
797  );
798 
799  this->cmdRegOut_out(
800  0,
802  );
803 
804  this->cmdRegOut_out(
805  0,
807  );
808 
809  this->cmdRegOut_out(
810  0,
811  this->getIdBase() + OPCODE_GENERATEDP
812  );
813  }
814 
815  // ----------------------------------------------------------------------
816  // Component construction and destruction
817  // ----------------------------------------------------------------------
818 
820  FileManagerComponentBase(const char* compName) :
821  Fw::ActiveComponentBase(compName)
822  {
823 
824  }
825 
828  {
829 
830  }
831 
832 #if !FW_DIRECT_PORT_CALLS
833 
834  // ----------------------------------------------------------------------
835  // Connection status queries for special output ports
836  // ----------------------------------------------------------------------
837 
838 #if FW_ENABLE_TEXT_LOGGING == 1
839 
840  bool FileManagerComponentBase ::
841  isConnected_LogText_OutputPort(FwIndexType portNum) const
842  {
843  FW_ASSERT(
844  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
845  static_cast<FwAssertArgType>(portNum)
846  );
847 
848  return this->m_LogText_OutputPort[portNum].isConnected();
849  }
850 
851 #endif
852 
855  {
856  FW_ASSERT(
857  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
858  static_cast<FwAssertArgType>(portNum)
859  );
860 
861  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
862  }
863 
866  {
867  FW_ASSERT(
868  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
869  static_cast<FwAssertArgType>(portNum)
870  );
871 
872  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
873  }
874 
877  {
878  FW_ASSERT(
879  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
880  static_cast<FwAssertArgType>(portNum)
881  );
882 
883  return this->m_eventOut_OutputPort[portNum].isConnected();
884  }
885 
888  {
889  FW_ASSERT(
890  (0 <= portNum) && (portNum < this->getNum_productGetOut_OutputPorts()),
891  static_cast<FwAssertArgType>(portNum)
892  );
893 
894  return this->m_productGetOut_OutputPort[portNum].isConnected();
895  }
896 
899  {
900  FW_ASSERT(
901  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
902  static_cast<FwAssertArgType>(portNum)
903  );
904 
905  return this->m_productSendOut_OutputPort[portNum].isConnected();
906  }
907 
910  {
911  FW_ASSERT(
912  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
913  static_cast<FwAssertArgType>(portNum)
914  );
915 
916  return this->m_timeCaller_OutputPort[portNum].isConnected();
917  }
918 
921  {
922  FW_ASSERT(
923  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
924  static_cast<FwAssertArgType>(portNum)
925  );
926 
927  return this->m_tlmOut_OutputPort[portNum].isConnected();
928  }
929 
930 #endif
931 
932 #if !FW_DIRECT_PORT_CALLS
933 
934  // ----------------------------------------------------------------------
935  // Connection status queries for typed output ports
936  // ----------------------------------------------------------------------
937 
940  {
941  FW_ASSERT(
942  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
943  static_cast<FwAssertArgType>(portNum)
944  );
945 
946  return this->m_pingOut_OutputPort[portNum].isConnected();
947  }
948 
949 #endif
950 
951  // ----------------------------------------------------------------------
952  // Port handler base-class functions for special input ports
953  //
954  // Call these functions directly to bypass the corresponding ports
955  // ----------------------------------------------------------------------
956 
959  FwIndexType portNum,
960  FwOpcodeType opCode,
961  U32 cmdSeq,
962  Fw::CmdArgBuffer& args
963  )
964  {
965 
966  const U32 idBase = this->getIdBase();
967  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
968 
969  // Select base class function based on opcode
970  switch (opCode - idBase) {
971  case OPCODE_CREATEDIRECTORY: {
973  opCode,
974  cmdSeq,
975  args
976  );
977  break;
978  }
979 
980  case OPCODE_MOVEFILE: {
982  opCode,
983  cmdSeq,
984  args
985  );
986  break;
987  }
988 
989  case OPCODE_REMOVEDIRECTORY: {
991  opCode,
992  cmdSeq,
993  args
994  );
995  break;
996  }
997 
998  case OPCODE_REMOVEFILE: {
1000  opCode,
1001  cmdSeq,
1002  args
1003  );
1004  break;
1005  }
1006 
1007  case OPCODE_APPENDFILE: {
1009  opCode,
1010  cmdSeq,
1011  args
1012  );
1013  break;
1014  }
1015 
1016  case OPCODE_FILESIZE: {
1018  opCode,
1019  cmdSeq,
1020  args
1021  );
1022  break;
1023  }
1024 
1025  case OPCODE_LISTDIRECTORY: {
1027  opCode,
1028  cmdSeq,
1029  args
1030  );
1031  break;
1032  }
1033 
1034  case OPCODE_CALCULATECRC: {
1036  opCode,
1037  cmdSeq,
1038  args
1039  );
1040  break;
1041  }
1042 
1043  case OPCODE_GENERATEDP: {
1045  opCode,
1046  cmdSeq,
1047  args
1048  );
1049  break;
1050  }
1051  default:
1052  // Unknown opcode: ignore it
1053  break;
1054  }
1055  }
1056 
1057  // ----------------------------------------------------------------------
1058  // Port handler base-class functions for typed input ports
1059  //
1060  // Call these functions directly to bypass the corresponding ports
1061  // ----------------------------------------------------------------------
1062 
1065  FwIndexType portNum,
1066  U32 key
1067  )
1068  {
1069  // Make sure port number is valid
1070  FW_ASSERT(
1071  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
1072  static_cast<FwAssertArgType>(portNum)
1073  );
1074 
1075  // Call pre-message hook
1077  portNum,
1078  key
1079  );
1080  ComponentIpcSerializableBuffer msg;
1082 
1083  // Serialize message ID
1084  _status = msg.serializeFrom(
1085  static_cast<FwEnumStoreType>(PINGIN_PING)
1086  );
1087  FW_ASSERT(
1088  _status == Fw::FW_SERIALIZE_OK,
1089  static_cast<FwAssertArgType>(_status)
1090  );
1091 
1092  // Serialize port number
1093  _status = msg.serializeFrom(portNum);
1094  FW_ASSERT(
1095  _status == Fw::FW_SERIALIZE_OK,
1096  static_cast<FwAssertArgType>(_status)
1097  );
1098 
1099  // Serialize argument key
1100  _status = msg.serializeFrom(key);
1101  FW_ASSERT(
1102  _status == Fw::FW_SERIALIZE_OK,
1103  static_cast<FwAssertArgType>(_status)
1104  );
1105 
1106  // Send message
1108  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1109 
1110  FW_ASSERT(
1111  qStatus == Os::Queue::OP_OK,
1112  static_cast<FwAssertArgType>(qStatus)
1113  );
1114  }
1115 
1118  FwIndexType portNum,
1119  U32 context
1120  )
1121  {
1122  // Make sure port number is valid
1123  FW_ASSERT(
1124  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
1125  static_cast<FwAssertArgType>(portNum)
1126  );
1127 
1128  // Call handler function
1129  this->schedIn_handler(
1130  portNum,
1131  context
1132  );
1133  }
1134 
1135  // ----------------------------------------------------------------------
1136  // Pre-message hooks for typed async input ports
1137  //
1138  // Each of these functions is invoked just before processing a message
1139  // on the corresponding port. By default, they do nothing. You can
1140  // override them to provide specific pre-message behavior.
1141  // ----------------------------------------------------------------------
1142 
1145  FwIndexType portNum,
1146  U32 key
1147  )
1148  {
1149  // Default: no-op
1150  }
1151 
1152 #if !FW_DIRECT_PORT_CALLS
1153 
1154  // ----------------------------------------------------------------------
1155  // Invocation functions for typed output ports
1156  // ----------------------------------------------------------------------
1157 
1160  FwIndexType portNum,
1161  U32 key
1162  ) const
1163  {
1164  FW_ASSERT(
1165  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1166  static_cast<FwAssertArgType>(portNum)
1167  );
1168 
1169  FW_ASSERT(
1170  this->m_pingOut_OutputPort[portNum].isConnected(),
1171  static_cast<FwAssertArgType>(portNum)
1172  );
1173  this->m_pingOut_OutputPort[portNum].invoke(
1174  key
1175  );
1176  }
1177 
1178 #endif
1179 
1180  // ----------------------------------------------------------------------
1181  // Internal interface base-class functions
1182  // ----------------------------------------------------------------------
1183 
1186  {
1187  ComponentIpcSerializableBuffer msg;
1189 
1190  // Serialize the message ID
1191  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(INT_IF_RUN));
1192  FW_ASSERT (
1193  _status == Fw::FW_SERIALIZE_OK,
1194  static_cast<FwAssertArgType>(_status)
1195  );
1196 
1197  // Fake port number to make message dequeue work
1198  _status = msg.serializeFrom(static_cast<FwIndexType>(0));
1199  FW_ASSERT (
1200  _status == Fw::FW_SERIALIZE_OK,
1201  static_cast<FwAssertArgType>(_status)
1202  );
1203 
1204  // Send message
1206  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1207 
1208  if (qStatus == Os::Queue::Status::FULL) {
1209  this->incNumMsgDropped();
1210  return;
1211  }
1212 
1213  FW_ASSERT(
1214  qStatus == Os::Queue::OP_OK,
1215  static_cast<FwAssertArgType>(qStatus)
1216  );
1217  }
1218 
1219  // ----------------------------------------------------------------------
1220  // Command response
1221  // ----------------------------------------------------------------------
1222 
1225  FwOpcodeType opCode,
1226  U32 cmdSeq,
1227  Fw::CmdResponse response
1228  )
1229  {
1231  this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1232  }
1233 
1234  // ----------------------------------------------------------------------
1235  // Command handler base-class functions
1236  //
1237  // Call these functions directly to bypass the command input port
1238  // ----------------------------------------------------------------------
1239 
1242  FwOpcodeType opCode,
1243  U32 cmdSeq,
1244  Fw::CmdArgBuffer& args
1245  )
1246  {
1247  // Call pre-message hook
1248  this->CreateDirectory_preMsgHook(opCode,cmdSeq);
1249 
1250  // Defer deserializing arguments to the message dispatcher
1251  // to avoid deserializing and reserializing just for IPC
1252  ComponentIpcSerializableBuffer msg;
1254 
1255  // Serialize for IPC
1256  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CREATEDIRECTORY));
1257  FW_ASSERT (
1258  _status == Fw::FW_SERIALIZE_OK,
1259  static_cast<FwAssertArgType>(_status)
1260  );
1261 
1262  // Fake port number to make message dequeue work
1263  FwIndexType port = 0;
1264 
1265  _status = msg.serializeFrom(port);
1266  FW_ASSERT (
1267  _status == Fw::FW_SERIALIZE_OK,
1268  static_cast<FwAssertArgType>(_status)
1269  );
1270 
1271  _status = msg.serializeFrom(opCode);
1272  FW_ASSERT (
1273  _status == Fw::FW_SERIALIZE_OK,
1274  static_cast<FwAssertArgType>(_status)
1275  );
1276 
1277  _status = msg.serializeFrom(cmdSeq);
1278  FW_ASSERT (
1279  _status == Fw::FW_SERIALIZE_OK,
1280  static_cast<FwAssertArgType>(_status)
1281  );
1282 
1283  _status = msg.serializeFrom(args);
1284  FW_ASSERT (
1285  _status == Fw::FW_SERIALIZE_OK,
1286  static_cast<FwAssertArgType>(_status)
1287  );
1288 
1289  // Send message
1291  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1292 
1293  FW_ASSERT(
1294  qStatus == Os::Queue::OP_OK,
1295  static_cast<FwAssertArgType>(qStatus)
1296  );
1297  }
1298 
1301  FwOpcodeType opCode,
1302  U32 cmdSeq,
1303  Fw::CmdArgBuffer& args
1304  )
1305  {
1306  // Call pre-message hook
1307  this->MoveFile_preMsgHook(opCode,cmdSeq);
1308 
1309  // Defer deserializing arguments to the message dispatcher
1310  // to avoid deserializing and reserializing just for IPC
1311  ComponentIpcSerializableBuffer msg;
1313 
1314  // Serialize for IPC
1315  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_MOVEFILE));
1316  FW_ASSERT (
1317  _status == Fw::FW_SERIALIZE_OK,
1318  static_cast<FwAssertArgType>(_status)
1319  );
1320 
1321  // Fake port number to make message dequeue work
1322  FwIndexType port = 0;
1323 
1324  _status = msg.serializeFrom(port);
1325  FW_ASSERT (
1326  _status == Fw::FW_SERIALIZE_OK,
1327  static_cast<FwAssertArgType>(_status)
1328  );
1329 
1330  _status = msg.serializeFrom(opCode);
1331  FW_ASSERT (
1332  _status == Fw::FW_SERIALIZE_OK,
1333  static_cast<FwAssertArgType>(_status)
1334  );
1335 
1336  _status = msg.serializeFrom(cmdSeq);
1337  FW_ASSERT (
1338  _status == Fw::FW_SERIALIZE_OK,
1339  static_cast<FwAssertArgType>(_status)
1340  );
1341 
1342  _status = msg.serializeFrom(args);
1343  FW_ASSERT (
1344  _status == Fw::FW_SERIALIZE_OK,
1345  static_cast<FwAssertArgType>(_status)
1346  );
1347 
1348  // Send message
1350  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1351 
1352  FW_ASSERT(
1353  qStatus == Os::Queue::OP_OK,
1354  static_cast<FwAssertArgType>(qStatus)
1355  );
1356  }
1357 
1360  FwOpcodeType opCode,
1361  U32 cmdSeq,
1362  Fw::CmdArgBuffer& args
1363  )
1364  {
1365  // Call pre-message hook
1366  this->RemoveDirectory_preMsgHook(opCode,cmdSeq);
1367 
1368  // Defer deserializing arguments to the message dispatcher
1369  // to avoid deserializing and reserializing just for IPC
1370  ComponentIpcSerializableBuffer msg;
1372 
1373  // Serialize for IPC
1374  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_REMOVEDIRECTORY));
1375  FW_ASSERT (
1376  _status == Fw::FW_SERIALIZE_OK,
1377  static_cast<FwAssertArgType>(_status)
1378  );
1379 
1380  // Fake port number to make message dequeue work
1381  FwIndexType port = 0;
1382 
1383  _status = msg.serializeFrom(port);
1384  FW_ASSERT (
1385  _status == Fw::FW_SERIALIZE_OK,
1386  static_cast<FwAssertArgType>(_status)
1387  );
1388 
1389  _status = msg.serializeFrom(opCode);
1390  FW_ASSERT (
1391  _status == Fw::FW_SERIALIZE_OK,
1392  static_cast<FwAssertArgType>(_status)
1393  );
1394 
1395  _status = msg.serializeFrom(cmdSeq);
1396  FW_ASSERT (
1397  _status == Fw::FW_SERIALIZE_OK,
1398  static_cast<FwAssertArgType>(_status)
1399  );
1400 
1401  _status = msg.serializeFrom(args);
1402  FW_ASSERT (
1403  _status == Fw::FW_SERIALIZE_OK,
1404  static_cast<FwAssertArgType>(_status)
1405  );
1406 
1407  // Send message
1409  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1410 
1411  FW_ASSERT(
1412  qStatus == Os::Queue::OP_OK,
1413  static_cast<FwAssertArgType>(qStatus)
1414  );
1415  }
1416 
1419  FwOpcodeType opCode,
1420  U32 cmdSeq,
1421  Fw::CmdArgBuffer& args
1422  )
1423  {
1424  // Call pre-message hook
1425  this->RemoveFile_preMsgHook(opCode,cmdSeq);
1426 
1427  // Defer deserializing arguments to the message dispatcher
1428  // to avoid deserializing and reserializing just for IPC
1429  ComponentIpcSerializableBuffer msg;
1431 
1432  // Serialize for IPC
1433  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_REMOVEFILE));
1434  FW_ASSERT (
1435  _status == Fw::FW_SERIALIZE_OK,
1436  static_cast<FwAssertArgType>(_status)
1437  );
1438 
1439  // Fake port number to make message dequeue work
1440  FwIndexType port = 0;
1441 
1442  _status = msg.serializeFrom(port);
1443  FW_ASSERT (
1444  _status == Fw::FW_SERIALIZE_OK,
1445  static_cast<FwAssertArgType>(_status)
1446  );
1447 
1448  _status = msg.serializeFrom(opCode);
1449  FW_ASSERT (
1450  _status == Fw::FW_SERIALIZE_OK,
1451  static_cast<FwAssertArgType>(_status)
1452  );
1453 
1454  _status = msg.serializeFrom(cmdSeq);
1455  FW_ASSERT (
1456  _status == Fw::FW_SERIALIZE_OK,
1457  static_cast<FwAssertArgType>(_status)
1458  );
1459 
1460  _status = msg.serializeFrom(args);
1461  FW_ASSERT (
1462  _status == Fw::FW_SERIALIZE_OK,
1463  static_cast<FwAssertArgType>(_status)
1464  );
1465 
1466  // Send message
1468  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1469 
1470  FW_ASSERT(
1471  qStatus == Os::Queue::OP_OK,
1472  static_cast<FwAssertArgType>(qStatus)
1473  );
1474  }
1475 
1478  FwOpcodeType opCode,
1479  U32 cmdSeq,
1480  Fw::CmdArgBuffer& args
1481  )
1482  {
1483  // Call pre-message hook
1484  this->AppendFile_preMsgHook(opCode,cmdSeq);
1485 
1486  // Defer deserializing arguments to the message dispatcher
1487  // to avoid deserializing and reserializing just for IPC
1488  ComponentIpcSerializableBuffer msg;
1490 
1491  // Serialize for IPC
1492  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_APPENDFILE));
1493  FW_ASSERT (
1494  _status == Fw::FW_SERIALIZE_OK,
1495  static_cast<FwAssertArgType>(_status)
1496  );
1497 
1498  // Fake port number to make message dequeue work
1499  FwIndexType port = 0;
1500 
1501  _status = msg.serializeFrom(port);
1502  FW_ASSERT (
1503  _status == Fw::FW_SERIALIZE_OK,
1504  static_cast<FwAssertArgType>(_status)
1505  );
1506 
1507  _status = msg.serializeFrom(opCode);
1508  FW_ASSERT (
1509  _status == Fw::FW_SERIALIZE_OK,
1510  static_cast<FwAssertArgType>(_status)
1511  );
1512 
1513  _status = msg.serializeFrom(cmdSeq);
1514  FW_ASSERT (
1515  _status == Fw::FW_SERIALIZE_OK,
1516  static_cast<FwAssertArgType>(_status)
1517  );
1518 
1519  _status = msg.serializeFrom(args);
1520  FW_ASSERT (
1521  _status == Fw::FW_SERIALIZE_OK,
1522  static_cast<FwAssertArgType>(_status)
1523  );
1524 
1525  // Send message
1527  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1528 
1529  FW_ASSERT(
1530  qStatus == Os::Queue::OP_OK,
1531  static_cast<FwAssertArgType>(qStatus)
1532  );
1533  }
1534 
1537  FwOpcodeType opCode,
1538  U32 cmdSeq,
1539  Fw::CmdArgBuffer& args
1540  )
1541  {
1542  // Call pre-message hook
1543  this->FileSize_preMsgHook(opCode,cmdSeq);
1544 
1545  // Defer deserializing arguments to the message dispatcher
1546  // to avoid deserializing and reserializing just for IPC
1547  ComponentIpcSerializableBuffer msg;
1549 
1550  // Serialize for IPC
1551  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_FILESIZE));
1552  FW_ASSERT (
1553  _status == Fw::FW_SERIALIZE_OK,
1554  static_cast<FwAssertArgType>(_status)
1555  );
1556 
1557  // Fake port number to make message dequeue work
1558  FwIndexType port = 0;
1559 
1560  _status = msg.serializeFrom(port);
1561  FW_ASSERT (
1562  _status == Fw::FW_SERIALIZE_OK,
1563  static_cast<FwAssertArgType>(_status)
1564  );
1565 
1566  _status = msg.serializeFrom(opCode);
1567  FW_ASSERT (
1568  _status == Fw::FW_SERIALIZE_OK,
1569  static_cast<FwAssertArgType>(_status)
1570  );
1571 
1572  _status = msg.serializeFrom(cmdSeq);
1573  FW_ASSERT (
1574  _status == Fw::FW_SERIALIZE_OK,
1575  static_cast<FwAssertArgType>(_status)
1576  );
1577 
1578  _status = msg.serializeFrom(args);
1579  FW_ASSERT (
1580  _status == Fw::FW_SERIALIZE_OK,
1581  static_cast<FwAssertArgType>(_status)
1582  );
1583 
1584  // Send message
1586  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1587 
1588  FW_ASSERT(
1589  qStatus == Os::Queue::OP_OK,
1590  static_cast<FwAssertArgType>(qStatus)
1591  );
1592  }
1593 
1596  FwOpcodeType opCode,
1597  U32 cmdSeq,
1598  Fw::CmdArgBuffer& args
1599  )
1600  {
1601  // Call pre-message hook
1602  this->ListDirectory_preMsgHook(opCode,cmdSeq);
1603 
1604  // Defer deserializing arguments to the message dispatcher
1605  // to avoid deserializing and reserializing just for IPC
1606  ComponentIpcSerializableBuffer msg;
1608 
1609  // Serialize for IPC
1610  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_LISTDIRECTORY));
1611  FW_ASSERT (
1612  _status == Fw::FW_SERIALIZE_OK,
1613  static_cast<FwAssertArgType>(_status)
1614  );
1615 
1616  // Fake port number to make message dequeue work
1617  FwIndexType port = 0;
1618 
1619  _status = msg.serializeFrom(port);
1620  FW_ASSERT (
1621  _status == Fw::FW_SERIALIZE_OK,
1622  static_cast<FwAssertArgType>(_status)
1623  );
1624 
1625  _status = msg.serializeFrom(opCode);
1626  FW_ASSERT (
1627  _status == Fw::FW_SERIALIZE_OK,
1628  static_cast<FwAssertArgType>(_status)
1629  );
1630 
1631  _status = msg.serializeFrom(cmdSeq);
1632  FW_ASSERT (
1633  _status == Fw::FW_SERIALIZE_OK,
1634  static_cast<FwAssertArgType>(_status)
1635  );
1636 
1637  _status = msg.serializeFrom(args);
1638  FW_ASSERT (
1639  _status == Fw::FW_SERIALIZE_OK,
1640  static_cast<FwAssertArgType>(_status)
1641  );
1642 
1643  // Send message
1645  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1646 
1647  FW_ASSERT(
1648  qStatus == Os::Queue::OP_OK,
1649  static_cast<FwAssertArgType>(qStatus)
1650  );
1651  }
1652 
1655  FwOpcodeType opCode,
1656  U32 cmdSeq,
1657  Fw::CmdArgBuffer& args
1658  )
1659  {
1660  // Call pre-message hook
1661  this->CalculateCrc_preMsgHook(opCode,cmdSeq);
1662 
1663  // Defer deserializing arguments to the message dispatcher
1664  // to avoid deserializing and reserializing just for IPC
1665  ComponentIpcSerializableBuffer msg;
1667 
1668  // Serialize for IPC
1669  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CALCULATECRC));
1670  FW_ASSERT (
1671  _status == Fw::FW_SERIALIZE_OK,
1672  static_cast<FwAssertArgType>(_status)
1673  );
1674 
1675  // Fake port number to make message dequeue work
1676  FwIndexType port = 0;
1677 
1678  _status = msg.serializeFrom(port);
1679  FW_ASSERT (
1680  _status == Fw::FW_SERIALIZE_OK,
1681  static_cast<FwAssertArgType>(_status)
1682  );
1683 
1684  _status = msg.serializeFrom(opCode);
1685  FW_ASSERT (
1686  _status == Fw::FW_SERIALIZE_OK,
1687  static_cast<FwAssertArgType>(_status)
1688  );
1689 
1690  _status = msg.serializeFrom(cmdSeq);
1691  FW_ASSERT (
1692  _status == Fw::FW_SERIALIZE_OK,
1693  static_cast<FwAssertArgType>(_status)
1694  );
1695 
1696  _status = msg.serializeFrom(args);
1697  FW_ASSERT (
1698  _status == Fw::FW_SERIALIZE_OK,
1699  static_cast<FwAssertArgType>(_status)
1700  );
1701 
1702  // Send message
1704  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1705 
1706  FW_ASSERT(
1707  qStatus == Os::Queue::OP_OK,
1708  static_cast<FwAssertArgType>(qStatus)
1709  );
1710  }
1711 
1714  FwOpcodeType opCode,
1715  U32 cmdSeq,
1716  Fw::CmdArgBuffer& args
1717  )
1718  {
1719  // Call pre-message hook
1720  this->GenerateDp_preMsgHook(opCode,cmdSeq);
1721 
1722  // Defer deserializing arguments to the message dispatcher
1723  // to avoid deserializing and reserializing just for IPC
1724  ComponentIpcSerializableBuffer msg;
1726 
1727  // Serialize for IPC
1728  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_GENERATEDP));
1729  FW_ASSERT (
1730  _status == Fw::FW_SERIALIZE_OK,
1731  static_cast<FwAssertArgType>(_status)
1732  );
1733 
1734  // Fake port number to make message dequeue work
1735  FwIndexType port = 0;
1736 
1737  _status = msg.serializeFrom(port);
1738  FW_ASSERT (
1739  _status == Fw::FW_SERIALIZE_OK,
1740  static_cast<FwAssertArgType>(_status)
1741  );
1742 
1743  _status = msg.serializeFrom(opCode);
1744  FW_ASSERT (
1745  _status == Fw::FW_SERIALIZE_OK,
1746  static_cast<FwAssertArgType>(_status)
1747  );
1748 
1749  _status = msg.serializeFrom(cmdSeq);
1750  FW_ASSERT (
1751  _status == Fw::FW_SERIALIZE_OK,
1752  static_cast<FwAssertArgType>(_status)
1753  );
1754 
1755  _status = msg.serializeFrom(args);
1756  FW_ASSERT (
1757  _status == Fw::FW_SERIALIZE_OK,
1758  static_cast<FwAssertArgType>(_status)
1759  );
1760 
1761  // Send message
1763  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1764 
1765  FW_ASSERT(
1766  qStatus == Os::Queue::OP_OK,
1767  static_cast<FwAssertArgType>(qStatus)
1768  );
1769  }
1770 
1771  // ----------------------------------------------------------------------
1772  // Pre-message hooks for async commands
1773  //
1774  // Each of these functions is invoked just before processing the
1775  // corresponding command. By default they do nothing. You can
1776  // override them to provide specific pre-command behavior.
1777  // ----------------------------------------------------------------------
1778 
1781  FwOpcodeType opCode,
1782  U32 cmdSeq
1783  )
1784  {
1785  // Defaults to no-op; can be overridden
1786  (void) opCode;
1787  (void) cmdSeq;
1788  }
1789 
1792  FwOpcodeType opCode,
1793  U32 cmdSeq
1794  )
1795  {
1796  // Defaults to no-op; can be overridden
1797  (void) opCode;
1798  (void) cmdSeq;
1799  }
1800 
1803  FwOpcodeType opCode,
1804  U32 cmdSeq
1805  )
1806  {
1807  // Defaults to no-op; can be overridden
1808  (void) opCode;
1809  (void) cmdSeq;
1810  }
1811 
1814  FwOpcodeType opCode,
1815  U32 cmdSeq
1816  )
1817  {
1818  // Defaults to no-op; can be overridden
1819  (void) opCode;
1820  (void) cmdSeq;
1821  }
1822 
1825  FwOpcodeType opCode,
1826  U32 cmdSeq
1827  )
1828  {
1829  // Defaults to no-op; can be overridden
1830  (void) opCode;
1831  (void) cmdSeq;
1832  }
1833 
1836  FwOpcodeType opCode,
1837  U32 cmdSeq
1838  )
1839  {
1840  // Defaults to no-op; can be overridden
1841  (void) opCode;
1842  (void) cmdSeq;
1843  }
1844 
1847  FwOpcodeType opCode,
1848  U32 cmdSeq
1849  )
1850  {
1851  // Defaults to no-op; can be overridden
1852  (void) opCode;
1853  (void) cmdSeq;
1854  }
1855 
1858  FwOpcodeType opCode,
1859  U32 cmdSeq
1860  )
1861  {
1862  // Defaults to no-op; can be overridden
1863  (void) opCode;
1864  (void) cmdSeq;
1865  }
1866 
1869  FwOpcodeType opCode,
1870  U32 cmdSeq
1871  )
1872  {
1873  // Defaults to no-op; can be overridden
1874  (void) opCode;
1875  (void) cmdSeq;
1876  }
1877 
1878  // ----------------------------------------------------------------------
1879  // Event logging functions
1880  // ----------------------------------------------------------------------
1881 
1884  const Fw::StringBase& dirName,
1885  U32 status
1886  ) const
1887  {
1888  // Get the time
1889  Fw::Time _logTime;
1890  if (this->isConnected_timeCaller_OutputPort(0)) {
1891  this->timeCaller_out(0, _logTime);
1892  }
1893 
1895 
1896  // Emit the event on the log port
1897  if (this->isConnected_eventOut_OutputPort(0)) {
1898  Fw::LogBuffer _logBuff;
1900 
1901 #if FW_AMPCS_COMPATIBLE
1902  // Serialize the number of arguments
1903  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1904  FW_ASSERT(
1905  _status == Fw::FW_SERIALIZE_OK,
1906  static_cast<FwAssertArgType>(_status)
1907  );
1908 #endif
1909 
1910  _status = dirName.serializeTo(
1911  _logBuff,
1912  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
1913  );
1914  FW_ASSERT(
1915  _status == Fw::FW_SERIALIZE_OK,
1916  static_cast<FwAssertArgType>(_status)
1917  );
1918 
1919 #if FW_AMPCS_COMPATIBLE
1920  // Serialize the argument size
1921  _status = _logBuff.serializeFrom(
1922  static_cast<U8>(sizeof(U32))
1923  );
1924  FW_ASSERT(
1925  _status == Fw::FW_SERIALIZE_OK,
1926  static_cast<FwAssertArgType>(_status)
1927  );
1928 #endif
1929  _status = _logBuff.serializeFrom(status);
1930  FW_ASSERT(
1931  _status == Fw::FW_SERIALIZE_OK,
1932  static_cast<FwAssertArgType>(_status)
1933  );
1934 
1935  this->eventOut_out(
1936  0,
1937  _id,
1938  _logTime,
1940  _logBuff
1941  );
1942  }
1943 
1944  // Emit the event on the text log port
1945 #if FW_ENABLE_TEXT_LOGGING
1946  if (this->isConnected_LogText_OutputPort(0)) {
1947 #if FW_OBJECT_NAMES == 1
1948  const char* _formatString =
1949  "(%s) %s: Could not create directory %s, returned status %" PRIu32 "";
1950 #else
1951  const char* _formatString =
1952  "%s: Could not create directory %s, returned status %" PRIu32 "";
1953 #endif
1954 
1955  Fw::TextLogString _logString;
1956  (void) _logString.format(
1957  _formatString,
1958 #if FW_OBJECT_NAMES == 1
1959  this->m_objName.toChar(),
1960 #endif
1961  "DirectoryCreateError ",
1962  dirName.toChar(),
1963  status
1964  );
1965 
1966  this->LogText_out(
1967  0,
1968  _id,
1969  _logTime,
1971  _logString
1972  );
1973  }
1974 #endif
1975  }
1976 
1979  const Fw::StringBase& dirName,
1980  U32 status
1981  ) const
1982  {
1983  // Get the time
1984  Fw::Time _logTime;
1985  if (this->isConnected_timeCaller_OutputPort(0)) {
1986  this->timeCaller_out(0, _logTime);
1987  }
1988 
1990 
1991  // Emit the event on the log port
1992  if (this->isConnected_eventOut_OutputPort(0)) {
1993  Fw::LogBuffer _logBuff;
1995 
1996 #if FW_AMPCS_COMPATIBLE
1997  // Serialize the number of arguments
1998  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1999  FW_ASSERT(
2000  _status == Fw::FW_SERIALIZE_OK,
2001  static_cast<FwAssertArgType>(_status)
2002  );
2003 #endif
2004 
2005  _status = dirName.serializeTo(
2006  _logBuff,
2007  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2008  );
2009  FW_ASSERT(
2010  _status == Fw::FW_SERIALIZE_OK,
2011  static_cast<FwAssertArgType>(_status)
2012  );
2013 
2014 #if FW_AMPCS_COMPATIBLE
2015  // Serialize the argument size
2016  _status = _logBuff.serializeFrom(
2017  static_cast<U8>(sizeof(U32))
2018  );
2019  FW_ASSERT(
2020  _status == Fw::FW_SERIALIZE_OK,
2021  static_cast<FwAssertArgType>(_status)
2022  );
2023 #endif
2024  _status = _logBuff.serializeFrom(status);
2025  FW_ASSERT(
2026  _status == Fw::FW_SERIALIZE_OK,
2027  static_cast<FwAssertArgType>(_status)
2028  );
2029 
2030  this->eventOut_out(
2031  0,
2032  _id,
2033  _logTime,
2035  _logBuff
2036  );
2037  }
2038 
2039  // Emit the event on the text log port
2040 #if FW_ENABLE_TEXT_LOGGING
2041  if (this->isConnected_LogText_OutputPort(0)) {
2042 #if FW_OBJECT_NAMES == 1
2043  const char* _formatString =
2044  "(%s) %s: Could not remove directory %s, returned status %" PRIu32 "";
2045 #else
2046  const char* _formatString =
2047  "%s: Could not remove directory %s, returned status %" PRIu32 "";
2048 #endif
2049 
2050  Fw::TextLogString _logString;
2051  (void) _logString.format(
2052  _formatString,
2053 #if FW_OBJECT_NAMES == 1
2054  this->m_objName.toChar(),
2055 #endif
2056  "DirectoryRemoveError ",
2057  dirName.toChar(),
2058  status
2059  );
2060 
2061  this->LogText_out(
2062  0,
2063  _id,
2064  _logTime,
2066  _logString
2067  );
2068  }
2069 #endif
2070  }
2071 
2074  const Fw::StringBase& sourceFileName,
2075  const Fw::StringBase& destFileName,
2076  U32 status
2077  ) const
2078  {
2079  // Get the time
2080  Fw::Time _logTime;
2081  if (this->isConnected_timeCaller_OutputPort(0)) {
2082  this->timeCaller_out(0, _logTime);
2083  }
2084 
2085  const FwEventIdType _id = this->getIdBase() + EVENTID_FILEMOVEERROR;
2086 
2087  // Emit the event on the log port
2088  if (this->isConnected_eventOut_OutputPort(0)) {
2089  Fw::LogBuffer _logBuff;
2091 
2092 #if FW_AMPCS_COMPATIBLE
2093  // Serialize the number of arguments
2094  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2095  FW_ASSERT(
2096  _status == Fw::FW_SERIALIZE_OK,
2097  static_cast<FwAssertArgType>(_status)
2098  );
2099 #endif
2100 
2101  _status = sourceFileName.serializeTo(
2102  _logBuff,
2103  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2104  );
2105  FW_ASSERT(
2106  _status == Fw::FW_SERIALIZE_OK,
2107  static_cast<FwAssertArgType>(_status)
2108  );
2109 
2110  _status = destFileName.serializeTo(
2111  _logBuff,
2112  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2113  );
2114  FW_ASSERT(
2115  _status == Fw::FW_SERIALIZE_OK,
2116  static_cast<FwAssertArgType>(_status)
2117  );
2118 
2119 #if FW_AMPCS_COMPATIBLE
2120  // Serialize the argument size
2121  _status = _logBuff.serializeFrom(
2122  static_cast<U8>(sizeof(U32))
2123  );
2124  FW_ASSERT(
2125  _status == Fw::FW_SERIALIZE_OK,
2126  static_cast<FwAssertArgType>(_status)
2127  );
2128 #endif
2129  _status = _logBuff.serializeFrom(status);
2130  FW_ASSERT(
2131  _status == Fw::FW_SERIALIZE_OK,
2132  static_cast<FwAssertArgType>(_status)
2133  );
2134 
2135  this->eventOut_out(
2136  0,
2137  _id,
2138  _logTime,
2140  _logBuff
2141  );
2142  }
2143 
2144  // Emit the event on the text log port
2145 #if FW_ENABLE_TEXT_LOGGING
2146  if (this->isConnected_LogText_OutputPort(0)) {
2147 #if FW_OBJECT_NAMES == 1
2148  const char* _formatString =
2149  "(%s) %s: Could not move file %s to file %s, returned status %" PRIu32 "";
2150 #else
2151  const char* _formatString =
2152  "%s: Could not move file %s to file %s, returned status %" PRIu32 "";
2153 #endif
2154 
2155  Fw::TextLogString _logString;
2156  (void) _logString.format(
2157  _formatString,
2158 #if FW_OBJECT_NAMES == 1
2159  this->m_objName.toChar(),
2160 #endif
2161  "FileMoveError ",
2162  sourceFileName.toChar(),
2163  destFileName.toChar(),
2164  status
2165  );
2166 
2167  this->LogText_out(
2168  0,
2169  _id,
2170  _logTime,
2172  _logString
2173  );
2174  }
2175 #endif
2176  }
2177 
2180  const Fw::StringBase& fileName,
2181  U32 status
2182  ) const
2183  {
2184  // Get the time
2185  Fw::Time _logTime;
2186  if (this->isConnected_timeCaller_OutputPort(0)) {
2187  this->timeCaller_out(0, _logTime);
2188  }
2189 
2190  const FwEventIdType _id = this->getIdBase() + EVENTID_FILEREMOVEERROR;
2191 
2192  // Emit the event on the log port
2193  if (this->isConnected_eventOut_OutputPort(0)) {
2194  Fw::LogBuffer _logBuff;
2196 
2197 #if FW_AMPCS_COMPATIBLE
2198  // Serialize the number of arguments
2199  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2200  FW_ASSERT(
2201  _status == Fw::FW_SERIALIZE_OK,
2202  static_cast<FwAssertArgType>(_status)
2203  );
2204 #endif
2205 
2206  _status = fileName.serializeTo(
2207  _logBuff,
2208  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2209  );
2210  FW_ASSERT(
2211  _status == Fw::FW_SERIALIZE_OK,
2212  static_cast<FwAssertArgType>(_status)
2213  );
2214 
2215 #if FW_AMPCS_COMPATIBLE
2216  // Serialize the argument size
2217  _status = _logBuff.serializeFrom(
2218  static_cast<U8>(sizeof(U32))
2219  );
2220  FW_ASSERT(
2221  _status == Fw::FW_SERIALIZE_OK,
2222  static_cast<FwAssertArgType>(_status)
2223  );
2224 #endif
2225  _status = _logBuff.serializeFrom(status);
2226  FW_ASSERT(
2227  _status == Fw::FW_SERIALIZE_OK,
2228  static_cast<FwAssertArgType>(_status)
2229  );
2230 
2231  this->eventOut_out(
2232  0,
2233  _id,
2234  _logTime,
2236  _logBuff
2237  );
2238  }
2239 
2240  // Emit the event on the text log port
2241 #if FW_ENABLE_TEXT_LOGGING
2242  if (this->isConnected_LogText_OutputPort(0)) {
2243 #if FW_OBJECT_NAMES == 1
2244  const char* _formatString =
2245  "(%s) %s: Could not remove file %s, returned status %" PRIu32 "";
2246 #else
2247  const char* _formatString =
2248  "%s: Could not remove file %s, returned status %" PRIu32 "";
2249 #endif
2250 
2251  Fw::TextLogString _logString;
2252  (void) _logString.format(
2253  _formatString,
2254 #if FW_OBJECT_NAMES == 1
2255  this->m_objName.toChar(),
2256 #endif
2257  "FileRemoveError ",
2258  fileName.toChar(),
2259  status
2260  );
2261 
2262  this->LogText_out(
2263  0,
2264  _id,
2265  _logTime,
2267  _logString
2268  );
2269  }
2270 #endif
2271  }
2272 
2275  const Fw::StringBase& source,
2276  const Fw::StringBase& target,
2277  U32 status
2278  ) const
2279  {
2280  // Get the time
2281  Fw::Time _logTime;
2282  if (this->isConnected_timeCaller_OutputPort(0)) {
2283  this->timeCaller_out(0, _logTime);
2284  }
2285 
2286  const FwEventIdType _id = this->getIdBase() + EVENTID_APPENDFILEFAILED;
2287 
2288  // Emit the event on the log port
2289  if (this->isConnected_eventOut_OutputPort(0)) {
2290  Fw::LogBuffer _logBuff;
2292 
2293 #if FW_AMPCS_COMPATIBLE
2294  // Serialize the number of arguments
2295  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2296  FW_ASSERT(
2297  _status == Fw::FW_SERIALIZE_OK,
2298  static_cast<FwAssertArgType>(_status)
2299  );
2300 #endif
2301 
2302  _status = source.serializeTo(
2303  _logBuff,
2304  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2305  );
2306  FW_ASSERT(
2307  _status == Fw::FW_SERIALIZE_OK,
2308  static_cast<FwAssertArgType>(_status)
2309  );
2310 
2311  _status = target.serializeTo(
2312  _logBuff,
2313  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2314  );
2315  FW_ASSERT(
2316  _status == Fw::FW_SERIALIZE_OK,
2317  static_cast<FwAssertArgType>(_status)
2318  );
2319 
2320 #if FW_AMPCS_COMPATIBLE
2321  // Serialize the argument size
2322  _status = _logBuff.serializeFrom(
2323  static_cast<U8>(sizeof(U32))
2324  );
2325  FW_ASSERT(
2326  _status == Fw::FW_SERIALIZE_OK,
2327  static_cast<FwAssertArgType>(_status)
2328  );
2329 #endif
2330  _status = _logBuff.serializeFrom(status);
2331  FW_ASSERT(
2332  _status == Fw::FW_SERIALIZE_OK,
2333  static_cast<FwAssertArgType>(_status)
2334  );
2335 
2336  this->eventOut_out(
2337  0,
2338  _id,
2339  _logTime,
2341  _logBuff
2342  );
2343  }
2344 
2345  // Emit the event on the text log port
2346 #if FW_ENABLE_TEXT_LOGGING
2347  if (this->isConnected_LogText_OutputPort(0)) {
2348 #if FW_OBJECT_NAMES == 1
2349  const char* _formatString =
2350  "(%s) %s: Appending %s onto %s failed with status %" PRIu32 "";
2351 #else
2352  const char* _formatString =
2353  "%s: Appending %s onto %s failed with status %" PRIu32 "";
2354 #endif
2355 
2356  Fw::TextLogString _logString;
2357  (void) _logString.format(
2358  _formatString,
2359 #if FW_OBJECT_NAMES == 1
2360  this->m_objName.toChar(),
2361 #endif
2362  "AppendFileFailed ",
2363  source.toChar(),
2364  target.toChar(),
2365  status
2366  );
2367 
2368  this->LogText_out(
2369  0,
2370  _id,
2371  _logTime,
2373  _logString
2374  );
2375  }
2376 #endif
2377  }
2378 
2381  const Fw::StringBase& source,
2382  const Fw::StringBase& target
2383  ) const
2384  {
2385  // Get the time
2386  Fw::Time _logTime;
2387  if (this->isConnected_timeCaller_OutputPort(0)) {
2388  this->timeCaller_out(0, _logTime);
2389  }
2390 
2391  const FwEventIdType _id = this->getIdBase() + EVENTID_APPENDFILESUCCEEDED;
2392 
2393  // Emit the event on the log port
2394  if (this->isConnected_eventOut_OutputPort(0)) {
2395  Fw::LogBuffer _logBuff;
2397 
2398 #if FW_AMPCS_COMPATIBLE
2399  // Serialize the number of arguments
2400  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2401  FW_ASSERT(
2402  _status == Fw::FW_SERIALIZE_OK,
2403  static_cast<FwAssertArgType>(_status)
2404  );
2405 #endif
2406 
2407  _status = source.serializeTo(
2408  _logBuff,
2409  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2410  );
2411  FW_ASSERT(
2412  _status == Fw::FW_SERIALIZE_OK,
2413  static_cast<FwAssertArgType>(_status)
2414  );
2415 
2416  _status = target.serializeTo(
2417  _logBuff,
2418  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2419  );
2420  FW_ASSERT(
2421  _status == Fw::FW_SERIALIZE_OK,
2422  static_cast<FwAssertArgType>(_status)
2423  );
2424 
2425  this->eventOut_out(
2426  0,
2427  _id,
2428  _logTime,
2430  _logBuff
2431  );
2432  }
2433 
2434  // Emit the event on the text log port
2435 #if FW_ENABLE_TEXT_LOGGING
2436  if (this->isConnected_LogText_OutputPort(0)) {
2437 #if FW_OBJECT_NAMES == 1
2438  const char* _formatString =
2439  "(%s) %s: Appended %s to the end of %s";
2440 #else
2441  const char* _formatString =
2442  "%s: Appended %s to the end of %s";
2443 #endif
2444 
2445  Fw::TextLogString _logString;
2446  (void) _logString.format(
2447  _formatString,
2448 #if FW_OBJECT_NAMES == 1
2449  this->m_objName.toChar(),
2450 #endif
2451  "AppendFileSucceeded ",
2452  source.toChar(),
2453  target.toChar()
2454  );
2455 
2456  this->LogText_out(
2457  0,
2458  _id,
2459  _logTime,
2461  _logString
2462  );
2463  }
2464 #endif
2465  }
2466 
2469  {
2470  // Get the time
2471  Fw::Time _logTime;
2472  if (this->isConnected_timeCaller_OutputPort(0)) {
2473  this->timeCaller_out(0, _logTime);
2474  }
2475 
2477 
2478  // Emit the event on the log port
2479  if (this->isConnected_eventOut_OutputPort(0)) {
2480  Fw::LogBuffer _logBuff;
2482 
2483 #if FW_AMPCS_COMPATIBLE
2484  // Serialize the number of arguments
2485  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2486  FW_ASSERT(
2487  _status == Fw::FW_SERIALIZE_OK,
2488  static_cast<FwAssertArgType>(_status)
2489  );
2490 #endif
2491 
2492  _status = dirName.serializeTo(
2493  _logBuff,
2494  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2495  );
2496  FW_ASSERT(
2497  _status == Fw::FW_SERIALIZE_OK,
2498  static_cast<FwAssertArgType>(_status)
2499  );
2500 
2501  this->eventOut_out(
2502  0,
2503  _id,
2504  _logTime,
2506  _logBuff
2507  );
2508  }
2509 
2510  // Emit the event on the text log port
2511 #if FW_ENABLE_TEXT_LOGGING
2512  if (this->isConnected_LogText_OutputPort(0)) {
2513 #if FW_OBJECT_NAMES == 1
2514  const char* _formatString =
2515  "(%s) %s: Created directory %s successfully";
2516 #else
2517  const char* _formatString =
2518  "%s: Created directory %s successfully";
2519 #endif
2520 
2521  Fw::TextLogString _logString;
2522  (void) _logString.format(
2523  _formatString,
2524 #if FW_OBJECT_NAMES == 1
2525  this->m_objName.toChar(),
2526 #endif
2527  "CreateDirectorySucceeded ",
2528  dirName.toChar()
2529  );
2530 
2531  this->LogText_out(
2532  0,
2533  _id,
2534  _logTime,
2536  _logString
2537  );
2538  }
2539 #endif
2540  }
2541 
2544  {
2545  // Get the time
2546  Fw::Time _logTime;
2547  if (this->isConnected_timeCaller_OutputPort(0)) {
2548  this->timeCaller_out(0, _logTime);
2549  }
2550 
2552 
2553  // Emit the event on the log port
2554  if (this->isConnected_eventOut_OutputPort(0)) {
2555  Fw::LogBuffer _logBuff;
2557 
2558 #if FW_AMPCS_COMPATIBLE
2559  // Serialize the number of arguments
2560  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2561  FW_ASSERT(
2562  _status == Fw::FW_SERIALIZE_OK,
2563  static_cast<FwAssertArgType>(_status)
2564  );
2565 #endif
2566 
2567  _status = dirName.serializeTo(
2568  _logBuff,
2569  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2570  );
2571  FW_ASSERT(
2572  _status == Fw::FW_SERIALIZE_OK,
2573  static_cast<FwAssertArgType>(_status)
2574  );
2575 
2576  this->eventOut_out(
2577  0,
2578  _id,
2579  _logTime,
2581  _logBuff
2582  );
2583  }
2584 
2585  // Emit the event on the text log port
2586 #if FW_ENABLE_TEXT_LOGGING
2587  if (this->isConnected_LogText_OutputPort(0)) {
2588 #if FW_OBJECT_NAMES == 1
2589  const char* _formatString =
2590  "(%s) %s: Removed directory %s successfully";
2591 #else
2592  const char* _formatString =
2593  "%s: Removed directory %s successfully";
2594 #endif
2595 
2596  Fw::TextLogString _logString;
2597  (void) _logString.format(
2598  _formatString,
2599 #if FW_OBJECT_NAMES == 1
2600  this->m_objName.toChar(),
2601 #endif
2602  "RemoveDirectorySucceeded ",
2603  dirName.toChar()
2604  );
2605 
2606  this->LogText_out(
2607  0,
2608  _id,
2609  _logTime,
2611  _logString
2612  );
2613  }
2614 #endif
2615  }
2616 
2619  const Fw::StringBase& sourceFileName,
2620  const Fw::StringBase& destFileName
2621  ) const
2622  {
2623  // Get the time
2624  Fw::Time _logTime;
2625  if (this->isConnected_timeCaller_OutputPort(0)) {
2626  this->timeCaller_out(0, _logTime);
2627  }
2628 
2629  const FwEventIdType _id = this->getIdBase() + EVENTID_MOVEFILESUCCEEDED;
2630 
2631  // Emit the event on the log port
2632  if (this->isConnected_eventOut_OutputPort(0)) {
2633  Fw::LogBuffer _logBuff;
2635 
2636 #if FW_AMPCS_COMPATIBLE
2637  // Serialize the number of arguments
2638  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2639  FW_ASSERT(
2640  _status == Fw::FW_SERIALIZE_OK,
2641  static_cast<FwAssertArgType>(_status)
2642  );
2643 #endif
2644 
2645  _status = sourceFileName.serializeTo(
2646  _logBuff,
2647  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2648  );
2649  FW_ASSERT(
2650  _status == Fw::FW_SERIALIZE_OK,
2651  static_cast<FwAssertArgType>(_status)
2652  );
2653 
2654  _status = destFileName.serializeTo(
2655  _logBuff,
2656  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2657  );
2658  FW_ASSERT(
2659  _status == Fw::FW_SERIALIZE_OK,
2660  static_cast<FwAssertArgType>(_status)
2661  );
2662 
2663  this->eventOut_out(
2664  0,
2665  _id,
2666  _logTime,
2668  _logBuff
2669  );
2670  }
2671 
2672  // Emit the event on the text log port
2673 #if FW_ENABLE_TEXT_LOGGING
2674  if (this->isConnected_LogText_OutputPort(0)) {
2675 #if FW_OBJECT_NAMES == 1
2676  const char* _formatString =
2677  "(%s) %s: Moved file %s to file %s successfully";
2678 #else
2679  const char* _formatString =
2680  "%s: Moved file %s to file %s successfully";
2681 #endif
2682 
2683  Fw::TextLogString _logString;
2684  (void) _logString.format(
2685  _formatString,
2686 #if FW_OBJECT_NAMES == 1
2687  this->m_objName.toChar(),
2688 #endif
2689  "MoveFileSucceeded ",
2690  sourceFileName.toChar(),
2691  destFileName.toChar()
2692  );
2693 
2694  this->LogText_out(
2695  0,
2696  _id,
2697  _logTime,
2699  _logString
2700  );
2701  }
2702 #endif
2703  }
2704 
2707  {
2708  // Get the time
2709  Fw::Time _logTime;
2710  if (this->isConnected_timeCaller_OutputPort(0)) {
2711  this->timeCaller_out(0, _logTime);
2712  }
2713 
2714  const FwEventIdType _id = this->getIdBase() + EVENTID_REMOVEFILESUCCEEDED;
2715 
2716  // Emit the event on the log port
2717  if (this->isConnected_eventOut_OutputPort(0)) {
2718  Fw::LogBuffer _logBuff;
2720 
2721 #if FW_AMPCS_COMPATIBLE
2722  // Serialize the number of arguments
2723  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2724  FW_ASSERT(
2725  _status == Fw::FW_SERIALIZE_OK,
2726  static_cast<FwAssertArgType>(_status)
2727  );
2728 #endif
2729 
2730  _status = fileName.serializeTo(
2731  _logBuff,
2732  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2733  );
2734  FW_ASSERT(
2735  _status == Fw::FW_SERIALIZE_OK,
2736  static_cast<FwAssertArgType>(_status)
2737  );
2738 
2739  this->eventOut_out(
2740  0,
2741  _id,
2742  _logTime,
2744  _logBuff
2745  );
2746  }
2747 
2748  // Emit the event on the text log port
2749 #if FW_ENABLE_TEXT_LOGGING
2750  if (this->isConnected_LogText_OutputPort(0)) {
2751 #if FW_OBJECT_NAMES == 1
2752  const char* _formatString =
2753  "(%s) %s: Removed file %s successfully";
2754 #else
2755  const char* _formatString =
2756  "%s: Removed file %s successfully";
2757 #endif
2758 
2759  Fw::TextLogString _logString;
2760  (void) _logString.format(
2761  _formatString,
2762 #if FW_OBJECT_NAMES == 1
2763  this->m_objName.toChar(),
2764 #endif
2765  "RemoveFileSucceeded ",
2766  fileName.toChar()
2767  );
2768 
2769  this->LogText_out(
2770  0,
2771  _id,
2772  _logTime,
2774  _logString
2775  );
2776  }
2777 #endif
2778  }
2779 
2782  const Fw::StringBase& source,
2783  const Fw::StringBase& target
2784  ) const
2785  {
2786  // Get the time
2787  Fw::Time _logTime;
2788  if (this->isConnected_timeCaller_OutputPort(0)) {
2789  this->timeCaller_out(0, _logTime);
2790  }
2791 
2792  const FwEventIdType _id = this->getIdBase() + EVENTID_APPENDFILESTARTED;
2793 
2794  // Emit the event on the log port
2795  if (this->isConnected_eventOut_OutputPort(0)) {
2796  Fw::LogBuffer _logBuff;
2798 
2799 #if FW_AMPCS_COMPATIBLE
2800  // Serialize the number of arguments
2801  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2802  FW_ASSERT(
2803  _status == Fw::FW_SERIALIZE_OK,
2804  static_cast<FwAssertArgType>(_status)
2805  );
2806 #endif
2807 
2808  _status = source.serializeTo(
2809  _logBuff,
2810  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2811  );
2812  FW_ASSERT(
2813  _status == Fw::FW_SERIALIZE_OK,
2814  static_cast<FwAssertArgType>(_status)
2815  );
2816 
2817  _status = target.serializeTo(
2818  _logBuff,
2819  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2820  );
2821  FW_ASSERT(
2822  _status == Fw::FW_SERIALIZE_OK,
2823  static_cast<FwAssertArgType>(_status)
2824  );
2825 
2826  this->eventOut_out(
2827  0,
2828  _id,
2829  _logTime,
2831  _logBuff
2832  );
2833  }
2834 
2835  // Emit the event on the text log port
2836 #if FW_ENABLE_TEXT_LOGGING
2837  if (this->isConnected_LogText_OutputPort(0)) {
2838 #if FW_OBJECT_NAMES == 1
2839  const char* _formatString =
2840  "(%s) %s: Appending file %s to the end of %s...";
2841 #else
2842  const char* _formatString =
2843  "%s: Appending file %s to the end of %s...";
2844 #endif
2845 
2846  Fw::TextLogString _logString;
2847  (void) _logString.format(
2848  _formatString,
2849 #if FW_OBJECT_NAMES == 1
2850  this->m_objName.toChar(),
2851 #endif
2852  "AppendFileStarted ",
2853  source.toChar(),
2854  target.toChar()
2855  );
2856 
2857  this->LogText_out(
2858  0,
2859  _id,
2860  _logTime,
2862  _logString
2863  );
2864  }
2865 #endif
2866  }
2867 
2870  {
2871  // Get the time
2872  Fw::Time _logTime;
2873  if (this->isConnected_timeCaller_OutputPort(0)) {
2874  this->timeCaller_out(0, _logTime);
2875  }
2876 
2878 
2879  // Emit the event on the log port
2880  if (this->isConnected_eventOut_OutputPort(0)) {
2881  Fw::LogBuffer _logBuff;
2883 
2884 #if FW_AMPCS_COMPATIBLE
2885  // Serialize the number of arguments
2886  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2887  FW_ASSERT(
2888  _status == Fw::FW_SERIALIZE_OK,
2889  static_cast<FwAssertArgType>(_status)
2890  );
2891 #endif
2892 
2893  _status = dirName.serializeTo(
2894  _logBuff,
2895  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2896  );
2897  FW_ASSERT(
2898  _status == Fw::FW_SERIALIZE_OK,
2899  static_cast<FwAssertArgType>(_status)
2900  );
2901 
2902  this->eventOut_out(
2903  0,
2904  _id,
2905  _logTime,
2907  _logBuff
2908  );
2909  }
2910 
2911  // Emit the event on the text log port
2912 #if FW_ENABLE_TEXT_LOGGING
2913  if (this->isConnected_LogText_OutputPort(0)) {
2914 #if FW_OBJECT_NAMES == 1
2915  const char* _formatString =
2916  "(%s) %s: Creating directory %s...";
2917 #else
2918  const char* _formatString =
2919  "%s: Creating directory %s...";
2920 #endif
2921 
2922  Fw::TextLogString _logString;
2923  (void) _logString.format(
2924  _formatString,
2925 #if FW_OBJECT_NAMES == 1
2926  this->m_objName.toChar(),
2927 #endif
2928  "CreateDirectoryStarted ",
2929  dirName.toChar()
2930  );
2931 
2932  this->LogText_out(
2933  0,
2934  _id,
2935  _logTime,
2937  _logString
2938  );
2939  }
2940 #endif
2941  }
2942 
2945  {
2946  // Get the time
2947  Fw::Time _logTime;
2948  if (this->isConnected_timeCaller_OutputPort(0)) {
2949  this->timeCaller_out(0, _logTime);
2950  }
2951 
2953 
2954  // Emit the event on the log port
2955  if (this->isConnected_eventOut_OutputPort(0)) {
2956  Fw::LogBuffer _logBuff;
2958 
2959 #if FW_AMPCS_COMPATIBLE
2960  // Serialize the number of arguments
2961  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2962  FW_ASSERT(
2963  _status == Fw::FW_SERIALIZE_OK,
2964  static_cast<FwAssertArgType>(_status)
2965  );
2966 #endif
2967 
2968  _status = dirName.serializeTo(
2969  _logBuff,
2970  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
2971  );
2972  FW_ASSERT(
2973  _status == Fw::FW_SERIALIZE_OK,
2974  static_cast<FwAssertArgType>(_status)
2975  );
2976 
2977  this->eventOut_out(
2978  0,
2979  _id,
2980  _logTime,
2982  _logBuff
2983  );
2984  }
2985 
2986  // Emit the event on the text log port
2987 #if FW_ENABLE_TEXT_LOGGING
2988  if (this->isConnected_LogText_OutputPort(0)) {
2989 #if FW_OBJECT_NAMES == 1
2990  const char* _formatString =
2991  "(%s) %s: Removing directory %s...";
2992 #else
2993  const char* _formatString =
2994  "%s: Removing directory %s...";
2995 #endif
2996 
2997  Fw::TextLogString _logString;
2998  (void) _logString.format(
2999  _formatString,
3000 #if FW_OBJECT_NAMES == 1
3001  this->m_objName.toChar(),
3002 #endif
3003  "RemoveDirectoryStarted ",
3004  dirName.toChar()
3005  );
3006 
3007  this->LogText_out(
3008  0,
3009  _id,
3010  _logTime,
3012  _logString
3013  );
3014  }
3015 #endif
3016  }
3017 
3020  const Fw::StringBase& sourceFileName,
3021  const Fw::StringBase& destFileName
3022  ) const
3023  {
3024  // Get the time
3025  Fw::Time _logTime;
3026  if (this->isConnected_timeCaller_OutputPort(0)) {
3027  this->timeCaller_out(0, _logTime);
3028  }
3029 
3030  const FwEventIdType _id = this->getIdBase() + EVENTID_MOVEFILESTARTED;
3031 
3032  // Emit the event on the log port
3033  if (this->isConnected_eventOut_OutputPort(0)) {
3034  Fw::LogBuffer _logBuff;
3036 
3037 #if FW_AMPCS_COMPATIBLE
3038  // Serialize the number of arguments
3039  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3040  FW_ASSERT(
3041  _status == Fw::FW_SERIALIZE_OK,
3042  static_cast<FwAssertArgType>(_status)
3043  );
3044 #endif
3045 
3046  _status = sourceFileName.serializeTo(
3047  _logBuff,
3048  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3049  );
3050  FW_ASSERT(
3051  _status == Fw::FW_SERIALIZE_OK,
3052  static_cast<FwAssertArgType>(_status)
3053  );
3054 
3055  _status = destFileName.serializeTo(
3056  _logBuff,
3057  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3058  );
3059  FW_ASSERT(
3060  _status == Fw::FW_SERIALIZE_OK,
3061  static_cast<FwAssertArgType>(_status)
3062  );
3063 
3064  this->eventOut_out(
3065  0,
3066  _id,
3067  _logTime,
3069  _logBuff
3070  );
3071  }
3072 
3073  // Emit the event on the text log port
3074 #if FW_ENABLE_TEXT_LOGGING
3075  if (this->isConnected_LogText_OutputPort(0)) {
3076 #if FW_OBJECT_NAMES == 1
3077  const char* _formatString =
3078  "(%s) %s: Moving file %s to file %s...";
3079 #else
3080  const char* _formatString =
3081  "%s: Moving file %s to file %s...";
3082 #endif
3083 
3084  Fw::TextLogString _logString;
3085  (void) _logString.format(
3086  _formatString,
3087 #if FW_OBJECT_NAMES == 1
3088  this->m_objName.toChar(),
3089 #endif
3090  "MoveFileStarted ",
3091  sourceFileName.toChar(),
3092  destFileName.toChar()
3093  );
3094 
3095  this->LogText_out(
3096  0,
3097  _id,
3098  _logTime,
3100  _logString
3101  );
3102  }
3103 #endif
3104  }
3105 
3108  {
3109  // Get the time
3110  Fw::Time _logTime;
3111  if (this->isConnected_timeCaller_OutputPort(0)) {
3112  this->timeCaller_out(0, _logTime);
3113  }
3114 
3115  const FwEventIdType _id = this->getIdBase() + EVENTID_REMOVEFILESTARTED;
3116 
3117  // Emit the event on the log port
3118  if (this->isConnected_eventOut_OutputPort(0)) {
3119  Fw::LogBuffer _logBuff;
3121 
3122 #if FW_AMPCS_COMPATIBLE
3123  // Serialize the number of arguments
3124  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3125  FW_ASSERT(
3126  _status == Fw::FW_SERIALIZE_OK,
3127  static_cast<FwAssertArgType>(_status)
3128  );
3129 #endif
3130 
3131  _status = fileName.serializeTo(
3132  _logBuff,
3133  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3134  );
3135  FW_ASSERT(
3136  _status == Fw::FW_SERIALIZE_OK,
3137  static_cast<FwAssertArgType>(_status)
3138  );
3139 
3140  this->eventOut_out(
3141  0,
3142  _id,
3143  _logTime,
3145  _logBuff
3146  );
3147  }
3148 
3149  // Emit the event on the text log port
3150 #if FW_ENABLE_TEXT_LOGGING
3151  if (this->isConnected_LogText_OutputPort(0)) {
3152 #if FW_OBJECT_NAMES == 1
3153  const char* _formatString =
3154  "(%s) %s: Removing file %s...";
3155 #else
3156  const char* _formatString =
3157  "%s: Removing file %s...";
3158 #endif
3159 
3160  Fw::TextLogString _logString;
3161  (void) _logString.format(
3162  _formatString,
3163 #if FW_OBJECT_NAMES == 1
3164  this->m_objName.toChar(),
3165 #endif
3166  "RemoveFileStarted ",
3167  fileName.toChar()
3168  );
3169 
3170  this->LogText_out(
3171  0,
3172  _id,
3173  _logTime,
3175  _logString
3176  );
3177  }
3178 #endif
3179  }
3180 
3183  const Fw::StringBase& fileName,
3184  FwSizeType size
3185  ) const
3186  {
3187  // Get the time
3188  Fw::Time _logTime;
3189  if (this->isConnected_timeCaller_OutputPort(0)) {
3190  this->timeCaller_out(0, _logTime);
3191  }
3192 
3193  const FwEventIdType _id = this->getIdBase() + EVENTID_FILESIZESUCCEEDED;
3194 
3195  // Emit the event on the log port
3196  if (this->isConnected_eventOut_OutputPort(0)) {
3197  Fw::LogBuffer _logBuff;
3199 
3200 #if FW_AMPCS_COMPATIBLE
3201  // Serialize the number of arguments
3202  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3203  FW_ASSERT(
3204  _status == Fw::FW_SERIALIZE_OK,
3205  static_cast<FwAssertArgType>(_status)
3206  );
3207 #endif
3208 
3209  _status = fileName.serializeTo(
3210  _logBuff,
3211  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3212  );
3213  FW_ASSERT(
3214  _status == Fw::FW_SERIALIZE_OK,
3215  static_cast<FwAssertArgType>(_status)
3216  );
3217 
3218 #if FW_AMPCS_COMPATIBLE
3219  // Serialize the argument size
3220  _status = _logBuff.serializeFrom(
3221  static_cast<U8>(sizeof(FwSizeType))
3222  );
3223  FW_ASSERT(
3224  _status == Fw::FW_SERIALIZE_OK,
3225  static_cast<FwAssertArgType>(_status)
3226  );
3227 #endif
3228  _status = _logBuff.serializeFrom(size);
3229  FW_ASSERT(
3230  _status == Fw::FW_SERIALIZE_OK,
3231  static_cast<FwAssertArgType>(_status)
3232  );
3233 
3234  this->eventOut_out(
3235  0,
3236  _id,
3237  _logTime,
3239  _logBuff
3240  );
3241  }
3242 
3243  // Emit the event on the text log port
3244 #if FW_ENABLE_TEXT_LOGGING
3245  if (this->isConnected_LogText_OutputPort(0)) {
3246 #if FW_OBJECT_NAMES == 1
3247  const char* _formatString =
3248  "(%s) %s: The size of file %s is %" PRIu64 " B";
3249 #else
3250  const char* _formatString =
3251  "%s: The size of file %s is %" PRIu64 " B";
3252 #endif
3253 
3254  Fw::TextLogString _logString;
3255  (void) _logString.format(
3256  _formatString,
3257 #if FW_OBJECT_NAMES == 1
3258  this->m_objName.toChar(),
3259 #endif
3260  "FileSizeSucceeded ",
3261  fileName.toChar(),
3262  size
3263  );
3264 
3265  this->LogText_out(
3266  0,
3267  _id,
3268  _logTime,
3270  _logString
3271  );
3272  }
3273 #endif
3274  }
3275 
3278  const Fw::StringBase& fileName,
3279  U32 status
3280  ) const
3281  {
3282  // Get the time
3283  Fw::Time _logTime;
3284  if (this->isConnected_timeCaller_OutputPort(0)) {
3285  this->timeCaller_out(0, _logTime);
3286  }
3287 
3288  const FwEventIdType _id = this->getIdBase() + EVENTID_FILESIZEERROR;
3289 
3290  // Emit the event on the log port
3291  if (this->isConnected_eventOut_OutputPort(0)) {
3292  Fw::LogBuffer _logBuff;
3294 
3295 #if FW_AMPCS_COMPATIBLE
3296  // Serialize the number of arguments
3297  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3298  FW_ASSERT(
3299  _status == Fw::FW_SERIALIZE_OK,
3300  static_cast<FwAssertArgType>(_status)
3301  );
3302 #endif
3303 
3304  _status = fileName.serializeTo(
3305  _logBuff,
3306  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3307  );
3308  FW_ASSERT(
3309  _status == Fw::FW_SERIALIZE_OK,
3310  static_cast<FwAssertArgType>(_status)
3311  );
3312 
3313 #if FW_AMPCS_COMPATIBLE
3314  // Serialize the argument size
3315  _status = _logBuff.serializeFrom(
3316  static_cast<U8>(sizeof(U32))
3317  );
3318  FW_ASSERT(
3319  _status == Fw::FW_SERIALIZE_OK,
3320  static_cast<FwAssertArgType>(_status)
3321  );
3322 #endif
3323  _status = _logBuff.serializeFrom(status);
3324  FW_ASSERT(
3325  _status == Fw::FW_SERIALIZE_OK,
3326  static_cast<FwAssertArgType>(_status)
3327  );
3328 
3329  this->eventOut_out(
3330  0,
3331  _id,
3332  _logTime,
3334  _logBuff
3335  );
3336  }
3337 
3338  // Emit the event on the text log port
3339 #if FW_ENABLE_TEXT_LOGGING
3340  if (this->isConnected_LogText_OutputPort(0)) {
3341 #if FW_OBJECT_NAMES == 1
3342  const char* _formatString =
3343  "(%s) %s: Failed to get the size of file %s, returned status %" PRIu32 "";
3344 #else
3345  const char* _formatString =
3346  "%s: Failed to get the size of file %s, returned status %" PRIu32 "";
3347 #endif
3348 
3349  Fw::TextLogString _logString;
3350  (void) _logString.format(
3351  _formatString,
3352 #if FW_OBJECT_NAMES == 1
3353  this->m_objName.toChar(),
3354 #endif
3355  "FileSizeError ",
3356  fileName.toChar(),
3357  status
3358  );
3359 
3360  this->LogText_out(
3361  0,
3362  _id,
3363  _logTime,
3365  _logString
3366  );
3367  }
3368 #endif
3369  }
3370 
3373  {
3374  // Get the time
3375  Fw::Time _logTime;
3376  if (this->isConnected_timeCaller_OutputPort(0)) {
3377  this->timeCaller_out(0, _logTime);
3378  }
3379 
3380  const FwEventIdType _id = this->getIdBase() + EVENTID_FILESIZESTARTED;
3381 
3382  // Emit the event on the log port
3383  if (this->isConnected_eventOut_OutputPort(0)) {
3384  Fw::LogBuffer _logBuff;
3386 
3387 #if FW_AMPCS_COMPATIBLE
3388  // Serialize the number of arguments
3389  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3390  FW_ASSERT(
3391  _status == Fw::FW_SERIALIZE_OK,
3392  static_cast<FwAssertArgType>(_status)
3393  );
3394 #endif
3395 
3396  _status = fileName.serializeTo(
3397  _logBuff,
3398  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3399  );
3400  FW_ASSERT(
3401  _status == Fw::FW_SERIALIZE_OK,
3402  static_cast<FwAssertArgType>(_status)
3403  );
3404 
3405  this->eventOut_out(
3406  0,
3407  _id,
3408  _logTime,
3410  _logBuff
3411  );
3412  }
3413 
3414  // Emit the event on the text log port
3415 #if FW_ENABLE_TEXT_LOGGING
3416  if (this->isConnected_LogText_OutputPort(0)) {
3417 #if FW_OBJECT_NAMES == 1
3418  const char* _formatString =
3419  "(%s) %s: Checking size of file %s...";
3420 #else
3421  const char* _formatString =
3422  "%s: Checking size of file %s...";
3423 #endif
3424 
3425  Fw::TextLogString _logString;
3426  (void) _logString.format(
3427  _formatString,
3428 #if FW_OBJECT_NAMES == 1
3429  this->m_objName.toChar(),
3430 #endif
3431  "FileSizeStarted ",
3432  fileName.toChar()
3433  );
3434 
3435  this->LogText_out(
3436  0,
3437  _id,
3438  _logTime,
3440  _logString
3441  );
3442  }
3443 #endif
3444  }
3445 
3448  {
3449  // Get the time
3450  Fw::Time _logTime;
3451  if (this->isConnected_timeCaller_OutputPort(0)) {
3452  this->timeCaller_out(0, _logTime);
3453  }
3454 
3456 
3457  // Emit the event on the log port
3458  if (this->isConnected_eventOut_OutputPort(0)) {
3459  Fw::LogBuffer _logBuff;
3461 
3462 #if FW_AMPCS_COMPATIBLE
3463  // Serialize the number of arguments
3464  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3465  FW_ASSERT(
3466  _status == Fw::FW_SERIALIZE_OK,
3467  static_cast<FwAssertArgType>(_status)
3468  );
3469 #endif
3470 
3471  _status = dirName.serializeTo(
3472  _logBuff,
3473  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3474  );
3475  FW_ASSERT(
3476  _status == Fw::FW_SERIALIZE_OK,
3477  static_cast<FwAssertArgType>(_status)
3478  );
3479 
3480  this->eventOut_out(
3481  0,
3482  _id,
3483  _logTime,
3485  _logBuff
3486  );
3487  }
3488 
3489  // Emit the event on the text log port
3490 #if FW_ENABLE_TEXT_LOGGING
3491  if (this->isConnected_LogText_OutputPort(0)) {
3492 #if FW_OBJECT_NAMES == 1
3493  const char* _formatString =
3494  "(%s) %s: Listing contents of directory %s...";
3495 #else
3496  const char* _formatString =
3497  "%s: Listing contents of directory %s...";
3498 #endif
3499 
3500  Fw::TextLogString _logString;
3501  (void) _logString.format(
3502  _formatString,
3503 #if FW_OBJECT_NAMES == 1
3504  this->m_objName.toChar(),
3505 #endif
3506  "ListDirectoryStarted ",
3507  dirName.toChar()
3508  );
3509 
3510  this->LogText_out(
3511  0,
3512  _id,
3513  _logTime,
3515  _logString
3516  );
3517  }
3518 #endif
3519  }
3520 
3523  const Fw::StringBase& dirName,
3524  U32 fileCount
3525  ) const
3526  {
3527  // Get the time
3528  Fw::Time _logTime;
3529  if (this->isConnected_timeCaller_OutputPort(0)) {
3530  this->timeCaller_out(0, _logTime);
3531  }
3532 
3534 
3535  // Emit the event on the log port
3536  if (this->isConnected_eventOut_OutputPort(0)) {
3537  Fw::LogBuffer _logBuff;
3539 
3540 #if FW_AMPCS_COMPATIBLE
3541  // Serialize the number of arguments
3542  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3543  FW_ASSERT(
3544  _status == Fw::FW_SERIALIZE_OK,
3545  static_cast<FwAssertArgType>(_status)
3546  );
3547 #endif
3548 
3549  _status = dirName.serializeTo(
3550  _logBuff,
3551  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3552  );
3553  FW_ASSERT(
3554  _status == Fw::FW_SERIALIZE_OK,
3555  static_cast<FwAssertArgType>(_status)
3556  );
3557 
3558 #if FW_AMPCS_COMPATIBLE
3559  // Serialize the argument size
3560  _status = _logBuff.serializeFrom(
3561  static_cast<U8>(sizeof(U32))
3562  );
3563  FW_ASSERT(
3564  _status == Fw::FW_SERIALIZE_OK,
3565  static_cast<FwAssertArgType>(_status)
3566  );
3567 #endif
3568  _status = _logBuff.serializeFrom(fileCount);
3569  FW_ASSERT(
3570  _status == Fw::FW_SERIALIZE_OK,
3571  static_cast<FwAssertArgType>(_status)
3572  );
3573 
3574  this->eventOut_out(
3575  0,
3576  _id,
3577  _logTime,
3579  _logBuff
3580  );
3581  }
3582 
3583  // Emit the event on the text log port
3584 #if FW_ENABLE_TEXT_LOGGING
3585  if (this->isConnected_LogText_OutputPort(0)) {
3586 #if FW_OBJECT_NAMES == 1
3587  const char* _formatString =
3588  "(%s) %s: Directory %s contains %" PRIu32 " files";
3589 #else
3590  const char* _formatString =
3591  "%s: Directory %s contains %" PRIu32 " files";
3592 #endif
3593 
3594  Fw::TextLogString _logString;
3595  (void) _logString.format(
3596  _formatString,
3597 #if FW_OBJECT_NAMES == 1
3598  this->m_objName.toChar(),
3599 #endif
3600  "ListDirectorySucceeded ",
3601  dirName.toChar(),
3602  fileCount
3603  );
3604 
3605  this->LogText_out(
3606  0,
3607  _id,
3608  _logTime,
3610  _logString
3611  );
3612  }
3613 #endif
3614  }
3615 
3618  const Fw::StringBase& dirName,
3619  U32 status
3620  ) const
3621  {
3622  // Get the time
3623  Fw::Time _logTime;
3624  if (this->isConnected_timeCaller_OutputPort(0)) {
3625  this->timeCaller_out(0, _logTime);
3626  }
3627 
3628  const FwEventIdType _id = this->getIdBase() + EVENTID_LISTDIRECTORYERROR;
3629 
3630  // Emit the event on the log port
3631  if (this->isConnected_eventOut_OutputPort(0)) {
3632  Fw::LogBuffer _logBuff;
3634 
3635 #if FW_AMPCS_COMPATIBLE
3636  // Serialize the number of arguments
3637  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3638  FW_ASSERT(
3639  _status == Fw::FW_SERIALIZE_OK,
3640  static_cast<FwAssertArgType>(_status)
3641  );
3642 #endif
3643 
3644  _status = dirName.serializeTo(
3645  _logBuff,
3646  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3647  );
3648  FW_ASSERT(
3649  _status == Fw::FW_SERIALIZE_OK,
3650  static_cast<FwAssertArgType>(_status)
3651  );
3652 
3653 #if FW_AMPCS_COMPATIBLE
3654  // Serialize the argument size
3655  _status = _logBuff.serializeFrom(
3656  static_cast<U8>(sizeof(U32))
3657  );
3658  FW_ASSERT(
3659  _status == Fw::FW_SERIALIZE_OK,
3660  static_cast<FwAssertArgType>(_status)
3661  );
3662 #endif
3663  _status = _logBuff.serializeFrom(status);
3664  FW_ASSERT(
3665  _status == Fw::FW_SERIALIZE_OK,
3666  static_cast<FwAssertArgType>(_status)
3667  );
3668 
3669  this->eventOut_out(
3670  0,
3671  _id,
3672  _logTime,
3674  _logBuff
3675  );
3676  }
3677 
3678  // Emit the event on the text log port
3679 #if FW_ENABLE_TEXT_LOGGING
3680  if (this->isConnected_LogText_OutputPort(0)) {
3681 #if FW_OBJECT_NAMES == 1
3682  const char* _formatString =
3683  "(%s) %s: Failed to list directory %s, returned status %" PRIu32 "";
3684 #else
3685  const char* _formatString =
3686  "%s: Failed to list directory %s, returned status %" PRIu32 "";
3687 #endif
3688 
3689  Fw::TextLogString _logString;
3690  (void) _logString.format(
3691  _formatString,
3692 #if FW_OBJECT_NAMES == 1
3693  this->m_objName.toChar(),
3694 #endif
3695  "ListDirectoryError ",
3696  dirName.toChar(),
3697  status
3698  );
3699 
3700  this->LogText_out(
3701  0,
3702  _id,
3703  _logTime,
3705  _logString
3706  );
3707  }
3708 #endif
3709  }
3710 
3713  const Fw::StringBase& dirName,
3714  const Fw::StringBase& fileName,
3715  FwSizeType fileSize
3716  ) const
3717  {
3718  // Get the time
3719  Fw::Time _logTime;
3720  if (this->isConnected_timeCaller_OutputPort(0)) {
3721  this->timeCaller_out(0, _logTime);
3722  }
3723 
3724  const FwEventIdType _id = this->getIdBase() + EVENTID_DIRECTORYLISTING;
3725 
3726  // Emit the event on the log port
3727  if (this->isConnected_eventOut_OutputPort(0)) {
3728  Fw::LogBuffer _logBuff;
3730 
3731 #if FW_AMPCS_COMPATIBLE
3732  // Serialize the number of arguments
3733  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3734  FW_ASSERT(
3735  _status == Fw::FW_SERIALIZE_OK,
3736  static_cast<FwAssertArgType>(_status)
3737  );
3738 #endif
3739 
3740  _status = dirName.serializeTo(
3741  _logBuff,
3742  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3743  );
3744  FW_ASSERT(
3745  _status == Fw::FW_SERIALIZE_OK,
3746  static_cast<FwAssertArgType>(_status)
3747  );
3748 
3749  _status = fileName.serializeTo(
3750  _logBuff,
3751  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3752  );
3753  FW_ASSERT(
3754  _status == Fw::FW_SERIALIZE_OK,
3755  static_cast<FwAssertArgType>(_status)
3756  );
3757 
3758 #if FW_AMPCS_COMPATIBLE
3759  // Serialize the argument size
3760  _status = _logBuff.serializeFrom(
3761  static_cast<U8>(sizeof(FwSizeType))
3762  );
3763  FW_ASSERT(
3764  _status == Fw::FW_SERIALIZE_OK,
3765  static_cast<FwAssertArgType>(_status)
3766  );
3767 #endif
3768  _status = _logBuff.serializeFrom(fileSize);
3769  FW_ASSERT(
3770  _status == Fw::FW_SERIALIZE_OK,
3771  static_cast<FwAssertArgType>(_status)
3772  );
3773 
3774  this->eventOut_out(
3775  0,
3776  _id,
3777  _logTime,
3779  _logBuff
3780  );
3781  }
3782 
3783  // Emit the event on the text log port
3784 #if FW_ENABLE_TEXT_LOGGING
3785  if (this->isConnected_LogText_OutputPort(0)) {
3786 #if FW_OBJECT_NAMES == 1
3787  const char* _formatString =
3788  "(%s) %s: Directory %s: %s (%" PRIu64 " bytes)";
3789 #else
3790  const char* _formatString =
3791  "%s: Directory %s: %s (%" PRIu64 " bytes)";
3792 #endif
3793 
3794  Fw::TextLogString _logString;
3795  (void) _logString.format(
3796  _formatString,
3797 #if FW_OBJECT_NAMES == 1
3798  this->m_objName.toChar(),
3799 #endif
3800  "DirectoryListing ",
3801  dirName.toChar(),
3802  fileName.toChar(),
3803  fileSize
3804  );
3805 
3806  this->LogText_out(
3807  0,
3808  _id,
3809  _logTime,
3811  _logString
3812  );
3813  }
3814 #endif
3815  }
3816 
3819  const Fw::StringBase& dirName,
3820  const Fw::StringBase& subdirName
3821  ) const
3822  {
3823  // Get the time
3824  Fw::Time _logTime;
3825  if (this->isConnected_timeCaller_OutputPort(0)) {
3826  this->timeCaller_out(0, _logTime);
3827  }
3828 
3830 
3831  // Emit the event on the log port
3832  if (this->isConnected_eventOut_OutputPort(0)) {
3833  Fw::LogBuffer _logBuff;
3835 
3836 #if FW_AMPCS_COMPATIBLE
3837  // Serialize the number of arguments
3838  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3839  FW_ASSERT(
3840  _status == Fw::FW_SERIALIZE_OK,
3841  static_cast<FwAssertArgType>(_status)
3842  );
3843 #endif
3844 
3845  _status = dirName.serializeTo(
3846  _logBuff,
3847  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3848  );
3849  FW_ASSERT(
3850  _status == Fw::FW_SERIALIZE_OK,
3851  static_cast<FwAssertArgType>(_status)
3852  );
3853 
3854  _status = subdirName.serializeTo(
3855  _logBuff,
3856  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3857  );
3858  FW_ASSERT(
3859  _status == Fw::FW_SERIALIZE_OK,
3860  static_cast<FwAssertArgType>(_status)
3861  );
3862 
3863  this->eventOut_out(
3864  0,
3865  _id,
3866  _logTime,
3868  _logBuff
3869  );
3870  }
3871 
3872  // Emit the event on the text log port
3873 #if FW_ENABLE_TEXT_LOGGING
3874  if (this->isConnected_LogText_OutputPort(0)) {
3875 #if FW_OBJECT_NAMES == 1
3876  const char* _formatString =
3877  "(%s) %s: Directory %s: %s";
3878 #else
3879  const char* _formatString =
3880  "%s: Directory %s: %s";
3881 #endif
3882 
3883  Fw::TextLogString _logString;
3884  (void) _logString.format(
3885  _formatString,
3886 #if FW_OBJECT_NAMES == 1
3887  this->m_objName.toChar(),
3888 #endif
3889  "DirectoryListingSubdir ",
3890  dirName.toChar(),
3891  subdirName.toChar()
3892  );
3893 
3894  this->LogText_out(
3895  0,
3896  _id,
3897  _logTime,
3899  _logString
3900  );
3901  }
3902 #endif
3903  }
3904 
3907  {
3908  // Get the time
3909  Fw::Time _logTime;
3910  if (this->isConnected_timeCaller_OutputPort(0)) {
3911  this->timeCaller_out(0, _logTime);
3912  }
3913 
3914  const FwEventIdType _id = this->getIdBase() + EVENTID_CALCULATECRCSTARTED;
3915 
3916  // Emit the event on the log port
3917  if (this->isConnected_eventOut_OutputPort(0)) {
3918  Fw::LogBuffer _logBuff;
3920 
3921 #if FW_AMPCS_COMPATIBLE
3922  // Serialize the number of arguments
3923  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3924  FW_ASSERT(
3925  _status == Fw::FW_SERIALIZE_OK,
3926  static_cast<FwAssertArgType>(_status)
3927  );
3928 #endif
3929 
3930  _status = fileName.serializeTo(
3931  _logBuff,
3932  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
3933  );
3934  FW_ASSERT(
3935  _status == Fw::FW_SERIALIZE_OK,
3936  static_cast<FwAssertArgType>(_status)
3937  );
3938 
3939  this->eventOut_out(
3940  0,
3941  _id,
3942  _logTime,
3944  _logBuff
3945  );
3946  }
3947 
3948  // Emit the event on the text log port
3949 #if FW_ENABLE_TEXT_LOGGING
3950  if (this->isConnected_LogText_OutputPort(0)) {
3951 #if FW_OBJECT_NAMES == 1
3952  const char* _formatString =
3953  "(%s) %s: Started CRC calculation for file %s";
3954 #else
3955  const char* _formatString =
3956  "%s: Started CRC calculation for file %s";
3957 #endif
3958 
3959  Fw::TextLogString _logString;
3960  (void) _logString.format(
3961  _formatString,
3962 #if FW_OBJECT_NAMES == 1
3963  this->m_objName.toChar(),
3964 #endif
3965  "CalculateCrcStarted ",
3966  fileName.toChar()
3967  );
3968 
3969  this->LogText_out(
3970  0,
3971  _id,
3972  _logTime,
3974  _logString
3975  );
3976  }
3977 #endif
3978  }
3979 
3982  const Fw::StringBase& fileName,
3983  U32 status
3984  ) const
3985  {
3986  // Get the time
3987  Fw::Time _logTime;
3988  if (this->isConnected_timeCaller_OutputPort(0)) {
3989  this->timeCaller_out(0, _logTime);
3990  }
3991 
3992  const FwEventIdType _id = this->getIdBase() + EVENTID_CALCULATECRCFAILED;
3993 
3994  // Emit the event on the log port
3995  if (this->isConnected_eventOut_OutputPort(0)) {
3996  Fw::LogBuffer _logBuff;
3998 
3999 #if FW_AMPCS_COMPATIBLE
4000  // Serialize the number of arguments
4001  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4002  FW_ASSERT(
4003  _status == Fw::FW_SERIALIZE_OK,
4004  static_cast<FwAssertArgType>(_status)
4005  );
4006 #endif
4007 
4008  _status = fileName.serializeTo(
4009  _logBuff,
4010  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4011  );
4012  FW_ASSERT(
4013  _status == Fw::FW_SERIALIZE_OK,
4014  static_cast<FwAssertArgType>(_status)
4015  );
4016 
4017 #if FW_AMPCS_COMPATIBLE
4018  // Serialize the argument size
4019  _status = _logBuff.serializeFrom(
4020  static_cast<U8>(sizeof(U32))
4021  );
4022  FW_ASSERT(
4023  _status == Fw::FW_SERIALIZE_OK,
4024  static_cast<FwAssertArgType>(_status)
4025  );
4026 #endif
4027  _status = _logBuff.serializeFrom(status);
4028  FW_ASSERT(
4029  _status == Fw::FW_SERIALIZE_OK,
4030  static_cast<FwAssertArgType>(_status)
4031  );
4032 
4033  this->eventOut_out(
4034  0,
4035  _id,
4036  _logTime,
4038  _logBuff
4039  );
4040  }
4041 
4042  // Emit the event on the text log port
4043 #if FW_ENABLE_TEXT_LOGGING
4044  if (this->isConnected_LogText_OutputPort(0)) {
4045 #if FW_OBJECT_NAMES == 1
4046  const char* _formatString =
4047  "(%s) %s: Failed CRC calculation for file %s, returned status %" PRIu32 "";
4048 #else
4049  const char* _formatString =
4050  "%s: Failed CRC calculation for file %s, returned status %" PRIu32 "";
4051 #endif
4052 
4053  Fw::TextLogString _logString;
4054  (void) _logString.format(
4055  _formatString,
4056 #if FW_OBJECT_NAMES == 1
4057  this->m_objName.toChar(),
4058 #endif
4059  "CalculateCrcFailed ",
4060  fileName.toChar(),
4061  status
4062  );
4063 
4064  this->LogText_out(
4065  0,
4066  _id,
4067  _logTime,
4069  _logString
4070  );
4071  }
4072 #endif
4073  }
4074 
4077  const Fw::StringBase& fileName,
4078  U32 crc
4079  ) const
4080  {
4081  // Get the time
4082  Fw::Time _logTime;
4083  if (this->isConnected_timeCaller_OutputPort(0)) {
4084  this->timeCaller_out(0, _logTime);
4085  }
4086 
4088 
4089  // Emit the event on the log port
4090  if (this->isConnected_eventOut_OutputPort(0)) {
4091  Fw::LogBuffer _logBuff;
4093 
4094 #if FW_AMPCS_COMPATIBLE
4095  // Serialize the number of arguments
4096  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4097  FW_ASSERT(
4098  _status == Fw::FW_SERIALIZE_OK,
4099  static_cast<FwAssertArgType>(_status)
4100  );
4101 #endif
4102 
4103  _status = fileName.serializeTo(
4104  _logBuff,
4105  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4106  );
4107  FW_ASSERT(
4108  _status == Fw::FW_SERIALIZE_OK,
4109  static_cast<FwAssertArgType>(_status)
4110  );
4111 
4112 #if FW_AMPCS_COMPATIBLE
4113  // Serialize the argument size
4114  _status = _logBuff.serializeFrom(
4115  static_cast<U8>(sizeof(U32))
4116  );
4117  FW_ASSERT(
4118  _status == Fw::FW_SERIALIZE_OK,
4119  static_cast<FwAssertArgType>(_status)
4120  );
4121 #endif
4122  _status = _logBuff.serializeFrom(crc);
4123  FW_ASSERT(
4124  _status == Fw::FW_SERIALIZE_OK,
4125  static_cast<FwAssertArgType>(_status)
4126  );
4127 
4128  this->eventOut_out(
4129  0,
4130  _id,
4131  _logTime,
4133  _logBuff
4134  );
4135  }
4136 
4137  // Emit the event on the text log port
4138 #if FW_ENABLE_TEXT_LOGGING
4139  if (this->isConnected_LogText_OutputPort(0)) {
4140 #if FW_OBJECT_NAMES == 1
4141  const char* _formatString =
4142  "(%s) %s: %s has CRC value 0x%" PRIx32 "";
4143 #else
4144  const char* _formatString =
4145  "%s: %s has CRC value 0x%" PRIx32 "";
4146 #endif
4147 
4148  Fw::TextLogString _logString;
4149  (void) _logString.format(
4150  _formatString,
4151 #if FW_OBJECT_NAMES == 1
4152  this->m_objName.toChar(),
4153 #endif
4154  "CalculateCrcSucceeded ",
4155  fileName.toChar(),
4156  crc
4157  );
4158 
4159  this->LogText_out(
4160  0,
4161  _id,
4162  _logTime,
4164  _logString
4165  );
4166  }
4167 #endif
4168  }
4169 
4172  const Fw::StringBase& fileName,
4173  const Fw::StringFormatStatus& status
4174  ) const
4175  {
4176  // Get the time
4177  Fw::Time _logTime;
4178  if (this->isConnected_timeCaller_OutputPort(0)) {
4179  this->timeCaller_out(0, _logTime);
4180  }
4181 
4182  const FwEventIdType _id = this->getIdBase() + EVENTID_FILENAMEFORMATERROR;
4183 
4184  // Emit the event on the log port
4185  if (this->isConnected_eventOut_OutputPort(0)) {
4186  Fw::LogBuffer _logBuff;
4188 
4189 #if FW_AMPCS_COMPATIBLE
4190  // Serialize the number of arguments
4191  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4192  FW_ASSERT(
4193  _status == Fw::FW_SERIALIZE_OK,
4194  static_cast<FwAssertArgType>(_status)
4195  );
4196 #endif
4197 
4198  _status = fileName.serializeTo(
4199  _logBuff,
4200  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4201  );
4202  FW_ASSERT(
4203  _status == Fw::FW_SERIALIZE_OK,
4204  static_cast<FwAssertArgType>(_status)
4205  );
4206 
4207 #if FW_AMPCS_COMPATIBLE
4208  // Serialize the argument size
4209  _status = _logBuff.serializeFrom(
4211  );
4212  FW_ASSERT(
4213  _status == Fw::FW_SERIALIZE_OK,
4214  static_cast<FwAssertArgType>(_status)
4215  );
4216 #endif
4217  _status = _logBuff.serializeFrom(status);
4218  FW_ASSERT(
4219  _status == Fw::FW_SERIALIZE_OK,
4220  static_cast<FwAssertArgType>(_status)
4221  );
4222 
4223  this->eventOut_out(
4224  0,
4225  _id,
4226  _logTime,
4228  _logBuff
4229  );
4230  }
4231 
4232  // Emit the event on the text log port
4233 #if FW_ENABLE_TEXT_LOGGING
4234  if (this->isConnected_LogText_OutputPort(0)) {
4235 #if FW_OBJECT_NAMES == 1
4236  const char* _formatString =
4237  "(%s) %s: Failed to format full path for file %s with status %s";
4238 #else
4239  const char* _formatString =
4240  "%s: Failed to format full path for file %s with status %s";
4241 #endif
4242 
4243  Fw::String statusStr;
4244  status.toString(statusStr);
4245 
4246  Fw::TextLogString _logString;
4247  (void) _logString.format(
4248  _formatString,
4249 #if FW_OBJECT_NAMES == 1
4250  this->m_objName.toChar(),
4251 #endif
4252  "FileNameFormatError ",
4253  fileName.toChar(),
4254  statusStr.toChar()
4255  );
4256 
4257  this->LogText_out(
4258  0,
4259  _id,
4260  _logTime,
4262  _logString
4263  );
4264  }
4265 #endif
4266  }
4267 
4270  const Fw::StringBase& fileName,
4271  U64 bytesToWrite
4272  ) const
4273  {
4274  // Get the time
4275  Fw::Time _logTime;
4276  if (this->isConnected_timeCaller_OutputPort(0)) {
4277  this->timeCaller_out(0, _logTime);
4278  }
4279 
4280  const FwEventIdType _id = this->getIdBase() + EVENTID_GENERATEDPSTARTED;
4281 
4282  // Emit the event on the log port
4283  if (this->isConnected_eventOut_OutputPort(0)) {
4284  Fw::LogBuffer _logBuff;
4286 
4287 #if FW_AMPCS_COMPATIBLE
4288  // Serialize the number of arguments
4289  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4290  FW_ASSERT(
4291  _status == Fw::FW_SERIALIZE_OK,
4292  static_cast<FwAssertArgType>(_status)
4293  );
4294 #endif
4295 
4296  _status = fileName.serializeTo(
4297  _logBuff,
4298  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4299  );
4300  FW_ASSERT(
4301  _status == Fw::FW_SERIALIZE_OK,
4302  static_cast<FwAssertArgType>(_status)
4303  );
4304 
4305 #if FW_AMPCS_COMPATIBLE
4306  // Serialize the argument size
4307  _status = _logBuff.serializeFrom(
4308  static_cast<U8>(sizeof(U64))
4309  );
4310  FW_ASSERT(
4311  _status == Fw::FW_SERIALIZE_OK,
4312  static_cast<FwAssertArgType>(_status)
4313  );
4314 #endif
4315  _status = _logBuff.serializeFrom(bytesToWrite);
4316  FW_ASSERT(
4317  _status == Fw::FW_SERIALIZE_OK,
4318  static_cast<FwAssertArgType>(_status)
4319  );
4320 
4321  this->eventOut_out(
4322  0,
4323  _id,
4324  _logTime,
4326  _logBuff
4327  );
4328  }
4329 
4330  // Emit the event on the text log port
4331 #if FW_ENABLE_TEXT_LOGGING
4332  if (this->isConnected_LogText_OutputPort(0)) {
4333 #if FW_OBJECT_NAMES == 1
4334  const char* _formatString =
4335  "(%s) %s: Started data product generation for file %s (%" PRIu64 " bytes)";
4336 #else
4337  const char* _formatString =
4338  "%s: Started data product generation for file %s (%" PRIu64 " bytes)";
4339 #endif
4340 
4341  Fw::TextLogString _logString;
4342  (void) _logString.format(
4343  _formatString,
4344 #if FW_OBJECT_NAMES == 1
4345  this->m_objName.toChar(),
4346 #endif
4347  "GenerateDpStarted ",
4348  fileName.toChar(),
4349  bytesToWrite
4350  );
4351 
4352  this->LogText_out(
4353  0,
4354  _id,
4355  _logTime,
4357  _logString
4358  );
4359  }
4360 #endif
4361  }
4362 
4365  const Fw::StringBase& fileName,
4366  U32 chunks
4367  ) const
4368  {
4369  // Get the time
4370  Fw::Time _logTime;
4371  if (this->isConnected_timeCaller_OutputPort(0)) {
4372  this->timeCaller_out(0, _logTime);
4373  }
4374 
4375  const FwEventIdType _id = this->getIdBase() + EVENTID_GENERATEDPCOMPLETE;
4376 
4377  // Emit the event on the log port
4378  if (this->isConnected_eventOut_OutputPort(0)) {
4379  Fw::LogBuffer _logBuff;
4381 
4382 #if FW_AMPCS_COMPATIBLE
4383  // Serialize the number of arguments
4384  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4385  FW_ASSERT(
4386  _status == Fw::FW_SERIALIZE_OK,
4387  static_cast<FwAssertArgType>(_status)
4388  );
4389 #endif
4390 
4391  _status = fileName.serializeTo(
4392  _logBuff,
4393  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4394  );
4395  FW_ASSERT(
4396  _status == Fw::FW_SERIALIZE_OK,
4397  static_cast<FwAssertArgType>(_status)
4398  );
4399 
4400 #if FW_AMPCS_COMPATIBLE
4401  // Serialize the argument size
4402  _status = _logBuff.serializeFrom(
4403  static_cast<U8>(sizeof(U32))
4404  );
4405  FW_ASSERT(
4406  _status == Fw::FW_SERIALIZE_OK,
4407  static_cast<FwAssertArgType>(_status)
4408  );
4409 #endif
4410  _status = _logBuff.serializeFrom(chunks);
4411  FW_ASSERT(
4412  _status == Fw::FW_SERIALIZE_OK,
4413  static_cast<FwAssertArgType>(_status)
4414  );
4415 
4416  this->eventOut_out(
4417  0,
4418  _id,
4419  _logTime,
4421  _logBuff
4422  );
4423  }
4424 
4425  // Emit the event on the text log port
4426 #if FW_ENABLE_TEXT_LOGGING
4427  if (this->isConnected_LogText_OutputPort(0)) {
4428 #if FW_OBJECT_NAMES == 1
4429  const char* _formatString =
4430  "(%s) %s: Completed data product generation for file %s in %" PRIu32 " chunks";
4431 #else
4432  const char* _formatString =
4433  "%s: Completed data product generation for file %s in %" PRIu32 " chunks";
4434 #endif
4435 
4436  Fw::TextLogString _logString;
4437  (void) _logString.format(
4438  _formatString,
4439 #if FW_OBJECT_NAMES == 1
4440  this->m_objName.toChar(),
4441 #endif
4442  "GenerateDpComplete ",
4443  fileName.toChar(),
4444  chunks
4445  );
4446 
4447  this->LogText_out(
4448  0,
4449  _id,
4450  _logTime,
4452  _logString
4453  );
4454  }
4455 #endif
4456  }
4457 
4460  const Fw::StringBase& fileName,
4461  const Svc::FileManager_GenerateDpStage& stage,
4462  U32 status
4463  ) const
4464  {
4465  // Get the time
4466  Fw::Time _logTime;
4467  if (this->isConnected_timeCaller_OutputPort(0)) {
4468  this->timeCaller_out(0, _logTime);
4469  }
4470 
4471  const FwEventIdType _id = this->getIdBase() + EVENTID_GENERATEDPFAILED;
4472 
4473  // Emit the event on the log port
4474  if (this->isConnected_eventOut_OutputPort(0)) {
4475  Fw::LogBuffer _logBuff;
4477 
4478 #if FW_AMPCS_COMPATIBLE
4479  // Serialize the number of arguments
4480  _status = _logBuff.serializeFrom(static_cast<U8>(3));
4481  FW_ASSERT(
4482  _status == Fw::FW_SERIALIZE_OK,
4483  static_cast<FwAssertArgType>(_status)
4484  );
4485 #endif
4486 
4487  _status = fileName.serializeTo(
4488  _logBuff,
4489  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4490  );
4491  FW_ASSERT(
4492  _status == Fw::FW_SERIALIZE_OK,
4493  static_cast<FwAssertArgType>(_status)
4494  );
4495 
4496 #if FW_AMPCS_COMPATIBLE
4497  // Serialize the argument size
4498  _status = _logBuff.serializeFrom(
4500  );
4501  FW_ASSERT(
4502  _status == Fw::FW_SERIALIZE_OK,
4503  static_cast<FwAssertArgType>(_status)
4504  );
4505 #endif
4506  _status = _logBuff.serializeFrom(stage);
4507  FW_ASSERT(
4508  _status == Fw::FW_SERIALIZE_OK,
4509  static_cast<FwAssertArgType>(_status)
4510  );
4511 
4512 #if FW_AMPCS_COMPATIBLE
4513  // Serialize the argument size
4514  _status = _logBuff.serializeFrom(
4515  static_cast<U8>(sizeof(U32))
4516  );
4517  FW_ASSERT(
4518  _status == Fw::FW_SERIALIZE_OK,
4519  static_cast<FwAssertArgType>(_status)
4520  );
4521 #endif
4522  _status = _logBuff.serializeFrom(status);
4523  FW_ASSERT(
4524  _status == Fw::FW_SERIALIZE_OK,
4525  static_cast<FwAssertArgType>(_status)
4526  );
4527 
4528  this->eventOut_out(
4529  0,
4530  _id,
4531  _logTime,
4533  _logBuff
4534  );
4535  }
4536 
4537  // Emit the event on the text log port
4538 #if FW_ENABLE_TEXT_LOGGING
4539  if (this->isConnected_LogText_OutputPort(0)) {
4540 #if FW_OBJECT_NAMES == 1
4541  const char* _formatString =
4542  "(%s) %s: Data product generation failed for file %s at stage %s, status %" PRIu32 "";
4543 #else
4544  const char* _formatString =
4545  "%s: Data product generation failed for file %s at stage %s, status %" PRIu32 "";
4546 #endif
4547 
4548  Fw::String stageStr;
4549  stage.toString(stageStr);
4550 
4551  Fw::TextLogString _logString;
4552  (void) _logString.format(
4553  _formatString,
4554 #if FW_OBJECT_NAMES == 1
4555  this->m_objName.toChar(),
4556 #endif
4557  "GenerateDpFailed ",
4558  fileName.toChar(),
4559  stageStr.toChar(),
4560  status
4561  );
4562 
4563  this->LogText_out(
4564  0,
4565  _id,
4566  _logTime,
4568  _logString
4569  );
4570  }
4571 #endif
4572  }
4573 
4576  {
4577  // Get the time
4578  Fw::Time _logTime;
4579  if (this->isConnected_timeCaller_OutputPort(0)) {
4580  this->timeCaller_out(0, _logTime);
4581  }
4582 
4584 
4585  // Emit the event on the log port
4586  if (this->isConnected_eventOut_OutputPort(0)) {
4587  Fw::LogBuffer _logBuff;
4589 
4590 #if FW_AMPCS_COMPATIBLE
4591  // Serialize the number of arguments
4592  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4593  FW_ASSERT(
4594  _status == Fw::FW_SERIALIZE_OK,
4595  static_cast<FwAssertArgType>(_status)
4596  );
4597 #endif
4598 
4599  _status = fileName.serializeTo(
4600  _logBuff,
4601  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4602  );
4603  FW_ASSERT(
4604  _status == Fw::FW_SERIALIZE_OK,
4605  static_cast<FwAssertArgType>(_status)
4606  );
4607 
4608  this->eventOut_out(
4609  0,
4610  _id,
4611  _logTime,
4613  _logBuff
4614  );
4615  }
4616 
4617  // Emit the event on the text log port
4618 #if FW_ENABLE_TEXT_LOGGING
4619  if (this->isConnected_LogText_OutputPort(0)) {
4620 #if FW_OBJECT_NAMES == 1
4621  const char* _formatString =
4622  "(%s) %s: Failed to allocate data product buffer for file %s";
4623 #else
4624  const char* _formatString =
4625  "%s: Failed to allocate data product buffer for file %s";
4626 #endif
4627 
4628  Fw::TextLogString _logString;
4629  (void) _logString.format(
4630  _formatString,
4631 #if FW_OBJECT_NAMES == 1
4632  this->m_objName.toChar(),
4633 #endif
4634  "GenerateDpBufferFailed ",
4635  fileName.toChar()
4636  );
4637 
4638  this->LogText_out(
4639  0,
4640  _id,
4641  _logTime,
4643  _logString
4644  );
4645  }
4646 #endif
4647  }
4648 
4651  const Fw::StringBase& fileName,
4652  U64 beginOffset,
4653  U64 endOffset,
4654  U64 fileSize
4655  ) const
4656  {
4657  // Get the time
4658  Fw::Time _logTime;
4659  if (this->isConnected_timeCaller_OutputPort(0)) {
4660  this->timeCaller_out(0, _logTime);
4661  }
4662 
4664 
4665  // Emit the event on the log port
4666  if (this->isConnected_eventOut_OutputPort(0)) {
4667  Fw::LogBuffer _logBuff;
4669 
4670 #if FW_AMPCS_COMPATIBLE
4671  // Serialize the number of arguments
4672  _status = _logBuff.serializeFrom(static_cast<U8>(4));
4673  FW_ASSERT(
4674  _status == Fw::FW_SERIALIZE_OK,
4675  static_cast<FwAssertArgType>(_status)
4676  );
4677 #endif
4678 
4679  _status = fileName.serializeTo(
4680  _logBuff,
4681  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 240)
4682  );
4683  FW_ASSERT(
4684  _status == Fw::FW_SERIALIZE_OK,
4685  static_cast<FwAssertArgType>(_status)
4686  );
4687 
4688 #if FW_AMPCS_COMPATIBLE
4689  // Serialize the argument size
4690  _status = _logBuff.serializeFrom(
4691  static_cast<U8>(sizeof(U64))
4692  );
4693  FW_ASSERT(
4694  _status == Fw::FW_SERIALIZE_OK,
4695  static_cast<FwAssertArgType>(_status)
4696  );
4697 #endif
4698  _status = _logBuff.serializeFrom(beginOffset);
4699  FW_ASSERT(
4700  _status == Fw::FW_SERIALIZE_OK,
4701  static_cast<FwAssertArgType>(_status)
4702  );
4703 
4704 #if FW_AMPCS_COMPATIBLE
4705  // Serialize the argument size
4706  _status = _logBuff.serializeFrom(
4707  static_cast<U8>(sizeof(U64))
4708  );
4709  FW_ASSERT(
4710  _status == Fw::FW_SERIALIZE_OK,
4711  static_cast<FwAssertArgType>(_status)
4712  );
4713 #endif
4714  _status = _logBuff.serializeFrom(endOffset);
4715  FW_ASSERT(
4716  _status == Fw::FW_SERIALIZE_OK,
4717  static_cast<FwAssertArgType>(_status)
4718  );
4719 
4720 #if FW_AMPCS_COMPATIBLE
4721  // Serialize the argument size
4722  _status = _logBuff.serializeFrom(
4723  static_cast<U8>(sizeof(U64))
4724  );
4725  FW_ASSERT(
4726  _status == Fw::FW_SERIALIZE_OK,
4727  static_cast<FwAssertArgType>(_status)
4728  );
4729 #endif
4730  _status = _logBuff.serializeFrom(fileSize);
4731  FW_ASSERT(
4732  _status == Fw::FW_SERIALIZE_OK,
4733  static_cast<FwAssertArgType>(_status)
4734  );
4735 
4736  this->eventOut_out(
4737  0,
4738  _id,
4739  _logTime,
4741  _logBuff
4742  );
4743  }
4744 
4745  // Emit the event on the text log port
4746 #if FW_ENABLE_TEXT_LOGGING
4747  if (this->isConnected_LogText_OutputPort(0)) {
4748 #if FW_OBJECT_NAMES == 1
4749  const char* _formatString =
4750  "(%s) %s: Invalid offset range requested for file %s: [%" PRIu64 ", %" PRIu64 ") with file size %" PRIu64 "";
4751 #else
4752  const char* _formatString =
4753  "%s: Invalid offset range requested for file %s: [%" PRIu64 ", %" PRIu64 ") with file size %" PRIu64 "";
4754 #endif
4755 
4756  Fw::TextLogString _logString;
4757  (void) _logString.format(
4758  _formatString,
4759 #if FW_OBJECT_NAMES == 1
4760  this->m_objName.toChar(),
4761 #endif
4762  "GenerateDpInvalidRange ",
4763  fileName.toChar(),
4764  beginOffset,
4765  endOffset,
4766  fileSize
4767  );
4768 
4769  this->LogText_out(
4770  0,
4771  _id,
4772  _logTime,
4774  _logString
4775  );
4776  }
4777 #endif
4778  }
4779 
4780  // ----------------------------------------------------------------------
4781  // Telemetry serialized write
4782  // ----------------------------------------------------------------------
4783 
4786  FwChanIdType id,
4787  Fw::TlmBuffer& _tlmBuff,
4788  Fw::Time _tlmTime
4789  ) const
4790  {
4791  if (this->isConnected_tlmOut_OutputPort(0)) {
4792  if (
4794  (_tlmTime == Fw::ZERO_TIME)
4795  ) {
4796  this->timeCaller_out(0, _tlmTime);
4797  }
4798 
4799  FwChanIdType _id;
4800  _id = this->getIdBase() + id;
4801 
4802  this->tlmOut_out(
4803  0,
4804  _id,
4805  _tlmTime,
4806  _tlmBuff
4807  );
4808  }
4809  }
4810 
4811  // ----------------------------------------------------------------------
4812  // Telemetry write functions
4813  // ----------------------------------------------------------------------
4814 
4817  U32 arg,
4818  Fw::Time _tlmTime
4819  ) const
4820  {
4821  if (this->isConnected_tlmOut_OutputPort(0)) {
4822  Fw::TlmBuffer _tlmBuff;
4823  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4824  FW_ASSERT(
4825  _stat == Fw::FW_SERIALIZE_OK,
4826  static_cast<FwAssertArgType>(_stat)
4827  );
4828 
4829  this->tlmWrite(
4831  _tlmBuff,
4832  _tlmTime
4833  );
4834  }
4835  }
4836 
4839  U32 arg,
4840  Fw::Time _tlmTime
4841  ) const
4842  {
4843  if (this->isConnected_tlmOut_OutputPort(0)) {
4844  Fw::TlmBuffer _tlmBuff;
4845  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4846  FW_ASSERT(
4847  _stat == Fw::FW_SERIALIZE_OK,
4848  static_cast<FwAssertArgType>(_stat)
4849  );
4850 
4851  this->tlmWrite(
4853  _tlmBuff,
4854  _tlmTime
4855  );
4856  }
4857  }
4858 
4859  // ----------------------------------------------------------------------
4860  // Functions for managing data products
4861  // ----------------------------------------------------------------------
4862 
4865  DpContainer& container,
4866  Fw::Time timeTag
4867  )
4868  {
4869  // Update the time tag
4870  if (timeTag == Fw::ZERO_TIME) {
4871  // Get the time from the time port
4872  timeTag = this->getTime();
4873  }
4874  container.setTimeTag(timeTag);
4875  // Serialize the header into the packet
4876  container.serializeHeader();
4877  // Update the size of the buffer according to the data size
4878  const FwSizeType packetSize = container.getPacketSize();
4879  Fw::Buffer buffer = container.getBuffer();
4880  FW_ASSERT(packetSize <= buffer.getSize(), static_cast<FwAssertArgType>(packetSize),
4881  static_cast<FwAssertArgType>(buffer.getSize()));
4882  buffer.setSize(static_cast<U32>(packetSize));
4883  // Invalidate the buffer in the container, so it can't be reused
4884  container.invalidateBuffer();
4885  // Send the buffer
4886  this->productSendOut_out(0, container.getId(), buffer);
4887  }
4888 
4889  // ----------------------------------------------------------------------
4890  // Time
4891  // ----------------------------------------------------------------------
4892 
4894  getTime() const
4895  {
4896  if (this->isConnected_timeCaller_OutputPort(0)) {
4897  Fw::Time _time;
4898  this->timeCaller_out(0, _time);
4899  return _time;
4900  }
4901  else {
4902  return Fw::Time(TimeBase::TB_NONE, 0, 0);
4903  }
4904  }
4905 
4906  // ----------------------------------------------------------------------
4907  // Message dispatch functions
4908  // ----------------------------------------------------------------------
4909 
4910  Fw::QueuedComponentBase::MsgDispatchStatus FileManagerComponentBase ::
4911  doDispatch()
4912  {
4913  ComponentIpcSerializableBuffer _msg;
4914  FwQueuePriorityType _priority = 0;
4915 
4916  Os::Queue::Status _msgStatus = this->m_queue.receive(
4917  _msg,
4919  _priority
4920  );
4921  FW_ASSERT(
4922  _msgStatus == Os::Queue::OP_OK,
4923  static_cast<FwAssertArgType>(_msgStatus)
4924  );
4925 
4926  // Reset to beginning of buffer
4927  _msg.resetDeser();
4928 
4929  FwEnumStoreType _desMsg = 0;
4930  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
4931  FW_ASSERT(
4932  _deserStatus == Fw::FW_SERIALIZE_OK,
4933  static_cast<FwAssertArgType>(_deserStatus)
4934  );
4935 
4936  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
4937 
4938  if (_msgType == FILEMANAGER_COMPONENT_EXIT) {
4939  return MSG_DISPATCH_EXIT;
4940  }
4941 
4942  FwIndexType portNum = 0;
4943  _deserStatus = _msg.deserializeTo(portNum);
4944  FW_ASSERT(
4945  _deserStatus == Fw::FW_SERIALIZE_OK,
4946  static_cast<FwAssertArgType>(_deserStatus)
4947  );
4948 
4949  switch (_msgType) {
4950  // Handle async input port pingIn
4951  case PINGIN_PING: {
4952  // Deserialize argument key
4953  U32 key;
4954  _deserStatus = _msg.deserializeTo(key);
4955  FW_ASSERT(
4956  _deserStatus == Fw::FW_SERIALIZE_OK,
4957  static_cast<FwAssertArgType>(_deserStatus)
4958  );
4959  // Call handler function
4960  this->pingIn_handler(
4961  portNum,
4962  key
4963  );
4964 
4965  break;
4966  }
4967 
4968  // Handle command CreateDirectory
4969  case CMD_CREATEDIRECTORY: {
4970  // Deserialize opcode
4971  FwOpcodeType _opCode = 0;
4972  _deserStatus = _msg.deserializeTo(_opCode);
4973  FW_ASSERT (
4974  _deserStatus == Fw::FW_SERIALIZE_OK,
4975  static_cast<FwAssertArgType>(_deserStatus)
4976  );
4977 
4978  // Deserialize command sequence
4979  U32 _cmdSeq = 0;
4980  _deserStatus = _msg.deserializeTo(_cmdSeq);
4981  FW_ASSERT (
4982  _deserStatus == Fw::FW_SERIALIZE_OK,
4983  static_cast<FwAssertArgType>(_deserStatus)
4984  );
4985 
4986  // Deserialize command argument buffer
4987  Fw::CmdArgBuffer args;
4988  _deserStatus = _msg.deserializeTo(args);
4989  FW_ASSERT (
4990  _deserStatus == Fw::FW_SERIALIZE_OK,
4991  static_cast<FwAssertArgType>(_deserStatus)
4992  );
4993 
4994  // Reset buffer
4995  args.resetDeser();
4996 
4997  // Deserialize argument dirName
4998  Fw::CmdStringArg dirName;
4999  _deserStatus = args.deserializeTo(dirName);
5000  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5002  this->cmdResponse_out(
5003  _opCode,
5004  _cmdSeq,
5006  );
5007  }
5008  // Don't crash the task if bad arguments were passed from the ground
5009  break;
5010  }
5011 
5012  // Make sure there was no data left over.
5013  // That means the argument buffer size was incorrect.
5014 #if FW_CMD_CHECK_RESIDUAL
5015  if (args.getDeserializeSizeLeft() != 0) {
5017  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5018  }
5019  // Don't crash the task if bad arguments were passed from the ground
5020  break;
5021  }
5022 #endif
5023 
5024  // Call handler function
5026  _opCode, _cmdSeq,
5027  dirName
5028  );
5029 
5030  break;
5031  }
5032 
5033  // Handle command MoveFile
5034  case CMD_MOVEFILE: {
5035  // Deserialize opcode
5036  FwOpcodeType _opCode = 0;
5037  _deserStatus = _msg.deserializeTo(_opCode);
5038  FW_ASSERT (
5039  _deserStatus == Fw::FW_SERIALIZE_OK,
5040  static_cast<FwAssertArgType>(_deserStatus)
5041  );
5042 
5043  // Deserialize command sequence
5044  U32 _cmdSeq = 0;
5045  _deserStatus = _msg.deserializeTo(_cmdSeq);
5046  FW_ASSERT (
5047  _deserStatus == Fw::FW_SERIALIZE_OK,
5048  static_cast<FwAssertArgType>(_deserStatus)
5049  );
5050 
5051  // Deserialize command argument buffer
5052  Fw::CmdArgBuffer args;
5053  _deserStatus = _msg.deserializeTo(args);
5054  FW_ASSERT (
5055  _deserStatus == Fw::FW_SERIALIZE_OK,
5056  static_cast<FwAssertArgType>(_deserStatus)
5057  );
5058 
5059  // Reset buffer
5060  args.resetDeser();
5061 
5062  // Deserialize argument sourceFileName
5063  Fw::CmdStringArg sourceFileName;
5064  _deserStatus = args.deserializeTo(sourceFileName);
5065  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5067  this->cmdResponse_out(
5068  _opCode,
5069  _cmdSeq,
5071  );
5072  }
5073  // Don't crash the task if bad arguments were passed from the ground
5074  break;
5075  }
5076 
5077  // Deserialize argument destFileName
5078  Fw::CmdStringArg destFileName;
5079  _deserStatus = args.deserializeTo(destFileName);
5080  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5082  this->cmdResponse_out(
5083  _opCode,
5084  _cmdSeq,
5086  );
5087  }
5088  // Don't crash the task if bad arguments were passed from the ground
5089  break;
5090  }
5091 
5092  // Make sure there was no data left over.
5093  // That means the argument buffer size was incorrect.
5094 #if FW_CMD_CHECK_RESIDUAL
5095  if (args.getDeserializeSizeLeft() != 0) {
5097  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5098  }
5099  // Don't crash the task if bad arguments were passed from the ground
5100  break;
5101  }
5102 #endif
5103 
5104  // Call handler function
5105  this->MoveFile_cmdHandler(
5106  _opCode, _cmdSeq,
5107  sourceFileName,
5108  destFileName
5109  );
5110 
5111  break;
5112  }
5113 
5114  // Handle command RemoveDirectory
5115  case CMD_REMOVEDIRECTORY: {
5116  // Deserialize opcode
5117  FwOpcodeType _opCode = 0;
5118  _deserStatus = _msg.deserializeTo(_opCode);
5119  FW_ASSERT (
5120  _deserStatus == Fw::FW_SERIALIZE_OK,
5121  static_cast<FwAssertArgType>(_deserStatus)
5122  );
5123 
5124  // Deserialize command sequence
5125  U32 _cmdSeq = 0;
5126  _deserStatus = _msg.deserializeTo(_cmdSeq);
5127  FW_ASSERT (
5128  _deserStatus == Fw::FW_SERIALIZE_OK,
5129  static_cast<FwAssertArgType>(_deserStatus)
5130  );
5131 
5132  // Deserialize command argument buffer
5133  Fw::CmdArgBuffer args;
5134  _deserStatus = _msg.deserializeTo(args);
5135  FW_ASSERT (
5136  _deserStatus == Fw::FW_SERIALIZE_OK,
5137  static_cast<FwAssertArgType>(_deserStatus)
5138  );
5139 
5140  // Reset buffer
5141  args.resetDeser();
5142 
5143  // Deserialize argument dirName
5144  Fw::CmdStringArg dirName;
5145  _deserStatus = args.deserializeTo(dirName);
5146  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5148  this->cmdResponse_out(
5149  _opCode,
5150  _cmdSeq,
5152  );
5153  }
5154  // Don't crash the task if bad arguments were passed from the ground
5155  break;
5156  }
5157 
5158  // Make sure there was no data left over.
5159  // That means the argument buffer size was incorrect.
5160 #if FW_CMD_CHECK_RESIDUAL
5161  if (args.getDeserializeSizeLeft() != 0) {
5163  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5164  }
5165  // Don't crash the task if bad arguments were passed from the ground
5166  break;
5167  }
5168 #endif
5169 
5170  // Call handler function
5172  _opCode, _cmdSeq,
5173  dirName
5174  );
5175 
5176  break;
5177  }
5178 
5179  // Handle command RemoveFile
5180  case CMD_REMOVEFILE: {
5181  // Deserialize opcode
5182  FwOpcodeType _opCode = 0;
5183  _deserStatus = _msg.deserializeTo(_opCode);
5184  FW_ASSERT (
5185  _deserStatus == Fw::FW_SERIALIZE_OK,
5186  static_cast<FwAssertArgType>(_deserStatus)
5187  );
5188 
5189  // Deserialize command sequence
5190  U32 _cmdSeq = 0;
5191  _deserStatus = _msg.deserializeTo(_cmdSeq);
5192  FW_ASSERT (
5193  _deserStatus == Fw::FW_SERIALIZE_OK,
5194  static_cast<FwAssertArgType>(_deserStatus)
5195  );
5196 
5197  // Deserialize command argument buffer
5198  Fw::CmdArgBuffer args;
5199  _deserStatus = _msg.deserializeTo(args);
5200  FW_ASSERT (
5201  _deserStatus == Fw::FW_SERIALIZE_OK,
5202  static_cast<FwAssertArgType>(_deserStatus)
5203  );
5204 
5205  // Reset buffer
5206  args.resetDeser();
5207 
5208  // Deserialize argument fileName
5209  Fw::CmdStringArg fileName;
5210  _deserStatus = args.deserializeTo(fileName);
5211  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5213  this->cmdResponse_out(
5214  _opCode,
5215  _cmdSeq,
5217  );
5218  }
5219  // Don't crash the task if bad arguments were passed from the ground
5220  break;
5221  }
5222 
5223  // Deserialize argument ignoreErrors
5224  bool ignoreErrors;
5225  _deserStatus = args.deserializeTo(ignoreErrors);
5226  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5228  this->cmdResponse_out(
5229  _opCode,
5230  _cmdSeq,
5232  );
5233  }
5234  // Don't crash the task if bad arguments were passed from the ground
5235  break;
5236  }
5237 
5238  // Make sure there was no data left over.
5239  // That means the argument buffer size was incorrect.
5240 #if FW_CMD_CHECK_RESIDUAL
5241  if (args.getDeserializeSizeLeft() != 0) {
5243  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5244  }
5245  // Don't crash the task if bad arguments were passed from the ground
5246  break;
5247  }
5248 #endif
5249 
5250  // Call handler function
5251  this->RemoveFile_cmdHandler(
5252  _opCode, _cmdSeq,
5253  fileName,
5254  ignoreErrors
5255  );
5256 
5257  break;
5258  }
5259 
5260  // Handle command AppendFile
5261  case CMD_APPENDFILE: {
5262  // Deserialize opcode
5263  FwOpcodeType _opCode = 0;
5264  _deserStatus = _msg.deserializeTo(_opCode);
5265  FW_ASSERT (
5266  _deserStatus == Fw::FW_SERIALIZE_OK,
5267  static_cast<FwAssertArgType>(_deserStatus)
5268  );
5269 
5270  // Deserialize command sequence
5271  U32 _cmdSeq = 0;
5272  _deserStatus = _msg.deserializeTo(_cmdSeq);
5273  FW_ASSERT (
5274  _deserStatus == Fw::FW_SERIALIZE_OK,
5275  static_cast<FwAssertArgType>(_deserStatus)
5276  );
5277 
5278  // Deserialize command argument buffer
5279  Fw::CmdArgBuffer args;
5280  _deserStatus = _msg.deserializeTo(args);
5281  FW_ASSERT (
5282  _deserStatus == Fw::FW_SERIALIZE_OK,
5283  static_cast<FwAssertArgType>(_deserStatus)
5284  );
5285 
5286  // Reset buffer
5287  args.resetDeser();
5288 
5289  // Deserialize argument source
5290  Fw::CmdStringArg source;
5291  _deserStatus = args.deserializeTo(source);
5292  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5294  this->cmdResponse_out(
5295  _opCode,
5296  _cmdSeq,
5298  );
5299  }
5300  // Don't crash the task if bad arguments were passed from the ground
5301  break;
5302  }
5303 
5304  // Deserialize argument target
5305  Fw::CmdStringArg target;
5306  _deserStatus = args.deserializeTo(target);
5307  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5309  this->cmdResponse_out(
5310  _opCode,
5311  _cmdSeq,
5313  );
5314  }
5315  // Don't crash the task if bad arguments were passed from the ground
5316  break;
5317  }
5318 
5319  // Make sure there was no data left over.
5320  // That means the argument buffer size was incorrect.
5321 #if FW_CMD_CHECK_RESIDUAL
5322  if (args.getDeserializeSizeLeft() != 0) {
5324  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5325  }
5326  // Don't crash the task if bad arguments were passed from the ground
5327  break;
5328  }
5329 #endif
5330 
5331  // Call handler function
5332  this->AppendFile_cmdHandler(
5333  _opCode, _cmdSeq,
5334  source,
5335  target
5336  );
5337 
5338  break;
5339  }
5340 
5341  // Handle command FileSize
5342  case CMD_FILESIZE: {
5343  // Deserialize opcode
5344  FwOpcodeType _opCode = 0;
5345  _deserStatus = _msg.deserializeTo(_opCode);
5346  FW_ASSERT (
5347  _deserStatus == Fw::FW_SERIALIZE_OK,
5348  static_cast<FwAssertArgType>(_deserStatus)
5349  );
5350 
5351  // Deserialize command sequence
5352  U32 _cmdSeq = 0;
5353  _deserStatus = _msg.deserializeTo(_cmdSeq);
5354  FW_ASSERT (
5355  _deserStatus == Fw::FW_SERIALIZE_OK,
5356  static_cast<FwAssertArgType>(_deserStatus)
5357  );
5358 
5359  // Deserialize command argument buffer
5360  Fw::CmdArgBuffer args;
5361  _deserStatus = _msg.deserializeTo(args);
5362  FW_ASSERT (
5363  _deserStatus == Fw::FW_SERIALIZE_OK,
5364  static_cast<FwAssertArgType>(_deserStatus)
5365  );
5366 
5367  // Reset buffer
5368  args.resetDeser();
5369 
5370  // Deserialize argument fileName
5371  Fw::CmdStringArg fileName;
5372  _deserStatus = args.deserializeTo(fileName);
5373  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5375  this->cmdResponse_out(
5376  _opCode,
5377  _cmdSeq,
5379  );
5380  }
5381  // Don't crash the task if bad arguments were passed from the ground
5382  break;
5383  }
5384 
5385  // Make sure there was no data left over.
5386  // That means the argument buffer size was incorrect.
5387 #if FW_CMD_CHECK_RESIDUAL
5388  if (args.getDeserializeSizeLeft() != 0) {
5390  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5391  }
5392  // Don't crash the task if bad arguments were passed from the ground
5393  break;
5394  }
5395 #endif
5396 
5397  // Call handler function
5398  this->FileSize_cmdHandler(
5399  _opCode, _cmdSeq,
5400  fileName
5401  );
5402 
5403  break;
5404  }
5405 
5406  // Handle command ListDirectory
5407  case CMD_LISTDIRECTORY: {
5408  // Deserialize opcode
5409  FwOpcodeType _opCode = 0;
5410  _deserStatus = _msg.deserializeTo(_opCode);
5411  FW_ASSERT (
5412  _deserStatus == Fw::FW_SERIALIZE_OK,
5413  static_cast<FwAssertArgType>(_deserStatus)
5414  );
5415 
5416  // Deserialize command sequence
5417  U32 _cmdSeq = 0;
5418  _deserStatus = _msg.deserializeTo(_cmdSeq);
5419  FW_ASSERT (
5420  _deserStatus == Fw::FW_SERIALIZE_OK,
5421  static_cast<FwAssertArgType>(_deserStatus)
5422  );
5423 
5424  // Deserialize command argument buffer
5425  Fw::CmdArgBuffer args;
5426  _deserStatus = _msg.deserializeTo(args);
5427  FW_ASSERT (
5428  _deserStatus == Fw::FW_SERIALIZE_OK,
5429  static_cast<FwAssertArgType>(_deserStatus)
5430  );
5431 
5432  // Reset buffer
5433  args.resetDeser();
5434 
5435  // Deserialize argument dirName
5436  Fw::CmdStringArg dirName;
5437  _deserStatus = args.deserializeTo(dirName);
5438  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5440  this->cmdResponse_out(
5441  _opCode,
5442  _cmdSeq,
5444  );
5445  }
5446  // Don't crash the task if bad arguments were passed from the ground
5447  break;
5448  }
5449 
5450  // Make sure there was no data left over.
5451  // That means the argument buffer size was incorrect.
5452 #if FW_CMD_CHECK_RESIDUAL
5453  if (args.getDeserializeSizeLeft() != 0) {
5455  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5456  }
5457  // Don't crash the task if bad arguments were passed from the ground
5458  break;
5459  }
5460 #endif
5461 
5462  // Call handler function
5464  _opCode, _cmdSeq,
5465  dirName
5466  );
5467 
5468  break;
5469  }
5470 
5471  // Handle command CalculateCrc
5472  case CMD_CALCULATECRC: {
5473  // Deserialize opcode
5474  FwOpcodeType _opCode = 0;
5475  _deserStatus = _msg.deserializeTo(_opCode);
5476  FW_ASSERT (
5477  _deserStatus == Fw::FW_SERIALIZE_OK,
5478  static_cast<FwAssertArgType>(_deserStatus)
5479  );
5480 
5481  // Deserialize command sequence
5482  U32 _cmdSeq = 0;
5483  _deserStatus = _msg.deserializeTo(_cmdSeq);
5484  FW_ASSERT (
5485  _deserStatus == Fw::FW_SERIALIZE_OK,
5486  static_cast<FwAssertArgType>(_deserStatus)
5487  );
5488 
5489  // Deserialize command argument buffer
5490  Fw::CmdArgBuffer args;
5491  _deserStatus = _msg.deserializeTo(args);
5492  FW_ASSERT (
5493  _deserStatus == Fw::FW_SERIALIZE_OK,
5494  static_cast<FwAssertArgType>(_deserStatus)
5495  );
5496 
5497  // Reset buffer
5498  args.resetDeser();
5499 
5500  // Deserialize argument filename
5501  Fw::CmdStringArg filename;
5502  _deserStatus = args.deserializeTo(filename);
5503  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5505  this->cmdResponse_out(
5506  _opCode,
5507  _cmdSeq,
5509  );
5510  }
5511  // Don't crash the task if bad arguments were passed from the ground
5512  break;
5513  }
5514 
5515  // Make sure there was no data left over.
5516  // That means the argument buffer size was incorrect.
5517 #if FW_CMD_CHECK_RESIDUAL
5518  if (args.getDeserializeSizeLeft() != 0) {
5520  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5521  }
5522  // Don't crash the task if bad arguments were passed from the ground
5523  break;
5524  }
5525 #endif
5526 
5527  // Call handler function
5529  _opCode, _cmdSeq,
5530  filename
5531  );
5532 
5533  break;
5534  }
5535 
5536  // Handle command GenerateDp
5537  case CMD_GENERATEDP: {
5538  // Deserialize opcode
5539  FwOpcodeType _opCode = 0;
5540  _deserStatus = _msg.deserializeTo(_opCode);
5541  FW_ASSERT (
5542  _deserStatus == Fw::FW_SERIALIZE_OK,
5543  static_cast<FwAssertArgType>(_deserStatus)
5544  );
5545 
5546  // Deserialize command sequence
5547  U32 _cmdSeq = 0;
5548  _deserStatus = _msg.deserializeTo(_cmdSeq);
5549  FW_ASSERT (
5550  _deserStatus == Fw::FW_SERIALIZE_OK,
5551  static_cast<FwAssertArgType>(_deserStatus)
5552  );
5553 
5554  // Deserialize command argument buffer
5555  Fw::CmdArgBuffer args;
5556  _deserStatus = _msg.deserializeTo(args);
5557  FW_ASSERT (
5558  _deserStatus == Fw::FW_SERIALIZE_OK,
5559  static_cast<FwAssertArgType>(_deserStatus)
5560  );
5561 
5562  // Reset buffer
5563  args.resetDeser();
5564 
5565  // Deserialize argument fileName
5566  Fw::CmdStringArg fileName;
5567  _deserStatus = args.deserializeTo(fileName);
5568  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5570  this->cmdResponse_out(
5571  _opCode,
5572  _cmdSeq,
5574  );
5575  }
5576  // Don't crash the task if bad arguments were passed from the ground
5577  break;
5578  }
5579 
5580  // Deserialize argument chunkSize
5581  U32 chunkSize;
5582  _deserStatus = args.deserializeTo(chunkSize);
5583  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5585  this->cmdResponse_out(
5586  _opCode,
5587  _cmdSeq,
5589  );
5590  }
5591  // Don't crash the task if bad arguments were passed from the ground
5592  break;
5593  }
5594 
5595  // Deserialize argument beginOffset
5596  U64 beginOffset;
5597  _deserStatus = args.deserializeTo(beginOffset);
5598  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5600  this->cmdResponse_out(
5601  _opCode,
5602  _cmdSeq,
5604  );
5605  }
5606  // Don't crash the task if bad arguments were passed from the ground
5607  break;
5608  }
5609 
5610  // Deserialize argument endOffset
5611  U64 endOffset;
5612  _deserStatus = args.deserializeTo(endOffset);
5613  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5615  this->cmdResponse_out(
5616  _opCode,
5617  _cmdSeq,
5619  );
5620  }
5621  // Don't crash the task if bad arguments were passed from the ground
5622  break;
5623  }
5624 
5625  // Deserialize argument priority
5626  U32 priority;
5627  _deserStatus = args.deserializeTo(priority);
5628  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5630  this->cmdResponse_out(
5631  _opCode,
5632  _cmdSeq,
5634  );
5635  }
5636  // Don't crash the task if bad arguments were passed from the ground
5637  break;
5638  }
5639 
5640  // Deserialize argument mode
5642  _deserStatus = args.deserializeTo(mode);
5643  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5645  this->cmdResponse_out(
5646  _opCode,
5647  _cmdSeq,
5649  );
5650  }
5651  // Don't crash the task if bad arguments were passed from the ground
5652  break;
5653  }
5654 
5655  // Make sure there was no data left over.
5656  // That means the argument buffer size was incorrect.
5657 #if FW_CMD_CHECK_RESIDUAL
5658  if (args.getDeserializeSizeLeft() != 0) {
5660  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5661  }
5662  // Don't crash the task if bad arguments were passed from the ground
5663  break;
5664  }
5665 #endif
5666 
5667  // Call handler function
5668  this->GenerateDp_cmdHandler(
5669  _opCode, _cmdSeq,
5670  fileName,
5671  chunkSize,
5672  beginOffset,
5673  endOffset,
5674  priority,
5675  mode
5676  );
5677 
5678  break;
5679  }
5680 
5681  // Handle internal interface run
5682  case INT_IF_RUN: {
5683  // Make sure there was no data left over.
5684  // That means the buffer size was incorrect.
5685  FW_ASSERT(
5686  _msg.getDeserializeSizeLeft() == 0,
5687  static_cast<FwAssertArgType>(_msg.getDeserializeSizeLeft())
5688  );
5689 
5690  // Call handler function
5692 
5693  break;
5694  }
5695 
5696  default:
5697  return MSG_DISPATCH_ERROR;
5698  }
5699 
5700  return MSG_DISPATCH_OK;
5701  }
5702 
5703  // ----------------------------------------------------------------------
5704  // Calls for messages received on special input ports
5705  // ----------------------------------------------------------------------
5706 
5707  void FileManagerComponentBase ::
5708  m_p_cmdIn_in(
5709  Fw::PassiveComponentBase* callComp,
5710  FwIndexType portNum,
5711  FwOpcodeType opCode,
5712  U32 cmdSeq,
5713  Fw::CmdArgBuffer& args
5714  )
5715  {
5716  FW_ASSERT(callComp != nullptr);
5717  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
5718  compPtr->cmdIn_handlerBase(
5719  portNum,
5720  opCode,
5721  cmdSeq,
5722  args
5723  );
5724  }
5725 
5726  // ----------------------------------------------------------------------
5727  // Calls for messages received on typed input ports
5728  // ----------------------------------------------------------------------
5729 
5730  void FileManagerComponentBase ::
5731  m_p_pingIn_in(
5732  Fw::PassiveComponentBase* callComp,
5733  FwIndexType portNum,
5734  U32 key
5735  )
5736  {
5737  FW_ASSERT(callComp != nullptr);
5738  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
5739  compPtr->pingIn_handlerBase(
5740  portNum,
5741  key
5742  );
5743  }
5744 
5745  void FileManagerComponentBase ::
5746  m_p_schedIn_in(
5747  Fw::PassiveComponentBase* callComp,
5748  FwIndexType portNum,
5749  U32 context
5750  )
5751  {
5752  FW_ASSERT(callComp != nullptr);
5753  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
5754  compPtr->schedIn_handlerBase(
5755  portNum,
5756  context
5757  );
5758  }
5759 
5760 #if !FW_DIRECT_PORT_CALLS
5761 
5762  // ----------------------------------------------------------------------
5763  // Invocation functions for special output ports
5764  // ----------------------------------------------------------------------
5765 
5766 #if FW_ENABLE_TEXT_LOGGING
5767 
5768  void FileManagerComponentBase ::
5769  LogText_out(
5770  FwIndexType portNum,
5771  FwEventIdType id,
5772  Fw::Time& timeTag,
5773  const Fw::LogSeverity& severity,
5774  Fw::TextLogString& text
5775  ) const
5776  {
5777  FW_ASSERT(
5778  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
5779  static_cast<FwAssertArgType>(portNum)
5780  );
5781 
5782  FW_ASSERT(
5783  this->m_LogText_OutputPort[portNum].isConnected(),
5784  static_cast<FwAssertArgType>(portNum)
5785  );
5786  this->m_LogText_OutputPort[portNum].invoke(
5787  id,
5788  timeTag,
5789  severity,
5790  text
5791  );
5792  }
5793 
5794 #endif
5795 
5796  void FileManagerComponentBase ::
5797  cmdRegOut_out(
5798  FwIndexType portNum,
5799  FwOpcodeType opCode
5800  ) const
5801  {
5802  FW_ASSERT(
5803  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
5804  static_cast<FwAssertArgType>(portNum)
5805  );
5806 
5807  FW_ASSERT(
5808  this->m_cmdRegOut_OutputPort[portNum].isConnected(),
5809  static_cast<FwAssertArgType>(portNum)
5810  );
5811  this->m_cmdRegOut_OutputPort[portNum].invoke(
5812  opCode
5813  );
5814  }
5815 
5816  void FileManagerComponentBase ::
5817  cmdResponseOut_out(
5818  FwIndexType portNum,
5819  FwOpcodeType opCode,
5820  U32 cmdSeq,
5821  const Fw::CmdResponse& response
5822  ) const
5823  {
5824  FW_ASSERT(
5825  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
5826  static_cast<FwAssertArgType>(portNum)
5827  );
5828 
5829  FW_ASSERT(
5830  this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
5831  static_cast<FwAssertArgType>(portNum)
5832  );
5833  this->m_cmdResponseOut_OutputPort[portNum].invoke(
5834  opCode,
5835  cmdSeq,
5836  response
5837  );
5838  }
5839 
5840  void FileManagerComponentBase ::
5841  eventOut_out(
5842  FwIndexType portNum,
5843  FwEventIdType id,
5844  Fw::Time& timeTag,
5845  const Fw::LogSeverity& severity,
5846  Fw::LogBuffer& args
5847  ) const
5848  {
5849  FW_ASSERT(
5850  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
5851  static_cast<FwAssertArgType>(portNum)
5852  );
5853 
5854  FW_ASSERT(
5855  this->m_eventOut_OutputPort[portNum].isConnected(),
5856  static_cast<FwAssertArgType>(portNum)
5857  );
5858  this->m_eventOut_OutputPort[portNum].invoke(
5859  id,
5860  timeTag,
5861  severity,
5862  args
5863  );
5864  }
5865 
5866  Fw::Success FileManagerComponentBase ::
5867  productGetOut_out(
5868  FwIndexType portNum,
5869  FwDpIdType id,
5870  FwSizeType dataSize,
5871  Fw::Buffer& buffer
5872  ) const
5873  {
5874  FW_ASSERT(
5875  (0 <= portNum) && (portNum < this->getNum_productGetOut_OutputPorts()),
5876  static_cast<FwAssertArgType>(portNum)
5877  );
5878 
5879  FW_ASSERT(
5880  this->m_productGetOut_OutputPort[portNum].isConnected(),
5881  static_cast<FwAssertArgType>(portNum)
5882  );
5883  return this->m_productGetOut_OutputPort[portNum].invoke(
5884  id,
5885  dataSize,
5886  buffer
5887  );
5888  }
5889 
5890  void FileManagerComponentBase ::
5891  productSendOut_out(
5892  FwIndexType portNum,
5893  FwDpIdType id,
5894  const Fw::Buffer& buffer
5895  ) const
5896  {
5897  FW_ASSERT(
5898  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
5899  static_cast<FwAssertArgType>(portNum)
5900  );
5901 
5902  FW_ASSERT(
5903  this->m_productSendOut_OutputPort[portNum].isConnected(),
5904  static_cast<FwAssertArgType>(portNum)
5905  );
5906  this->m_productSendOut_OutputPort[portNum].invoke(
5907  id,
5908  buffer
5909  );
5910  }
5911 
5912  void FileManagerComponentBase ::
5913  timeCaller_out(
5914  FwIndexType portNum,
5915  Fw::Time& time
5916  ) const
5917  {
5918  FW_ASSERT(
5919  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
5920  static_cast<FwAssertArgType>(portNum)
5921  );
5922 
5923  FW_ASSERT(
5924  this->m_timeCaller_OutputPort[portNum].isConnected(),
5925  static_cast<FwAssertArgType>(portNum)
5926  );
5927  this->m_timeCaller_OutputPort[portNum].invoke(
5928  time
5929  );
5930  }
5931 
5932  void FileManagerComponentBase ::
5933  tlmOut_out(
5934  FwIndexType portNum,
5935  FwChanIdType id,
5936  Fw::Time& timeTag,
5937  Fw::TlmBuffer& val
5938  ) const
5939  {
5940  FW_ASSERT(
5941  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
5942  static_cast<FwAssertArgType>(portNum)
5943  );
5944 
5945  FW_ASSERT(
5946  this->m_tlmOut_OutputPort[portNum].isConnected(),
5947  static_cast<FwAssertArgType>(portNum)
5948  );
5949  this->m_tlmOut_OutputPort[portNum].invoke(
5950  id,
5951  timeTag,
5952  val
5953  );
5954  }
5955 
5956 #endif
5957 
5958  // ----------------------------------------------------------------------
5959  // Private data product handling functions
5960  // ----------------------------------------------------------------------
5961 
5962  Fw::Success::T FileManagerComponentBase ::
5963  dpGet(
5964  ContainerId::T containerId,
5965  FwSizeType dataSize,
5966  FwDpPriorityType priority,
5967  DpContainer& container
5968  )
5969  {
5970  const FwDpIdType baseId = this->getIdBase();
5971  const FwDpIdType globalId = baseId + containerId;
5972  const FwSizeType size = DpContainer::getPacketSizeForDataSize(dataSize);
5973  Fw::Buffer buffer;
5974  const Fw::Success::T status = this->productGetOut_out(0, globalId, size, buffer);
5975  if (status == Fw::Success::SUCCESS) {
5976  // Assign a fresh DpContainer into container
5977  // This action clears out all the container state
5978  container = DpContainer(globalId, buffer, baseId);
5979  container.setPriority(priority);
5980  }
5981  return status;
5982  }
5983 
5984 }
bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
virtual void run_internalInterfaceHandler()=0
Internal interface handler for run.
Append 1 file&#39;s contents to the end of another.
static constexpr FwSizeType CAPACITY
Definition: CmdPortAc.hpp:36
void log_WARNING_HI_ListDirectoryError(const Fw::StringBase &dirName, U32 status) const
The File System component deleted and existing directory without error.
void AppendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_DirectoryListingSubdir(const Fw::StringBase &dirName, const Fw::StringBase &subdirName) const
void setTimeTag(Fw::Time timeTag)
Set the time tag.
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName) const
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:27
The size of the serial representation.
virtual void ListDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ListDirectory.
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName) const
void init()
Initialization function.
void log_ACTIVITY_HI_DirectoryListing(const Fw::StringBase &dirName, const Fw::StringBase &fileName, FwSizeType fileSize) const
Representing success.
virtual void MoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
PlatformSizeType FwSizeType
virtual void MoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command MoveFile.
U32 FwDpPriorityType
The type of a data product priority.
void log_ACTIVITY_HI_CalculateCrcStarted(const Fw::StringBase &fileName) const
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
I32 FwEnumStoreType
The File System component moved a file to a new location without error.
void addCallPort(InputDpSendPort *callPort)
Register an input port.
Metadata for one chunk of a file data product.
void setSize(FwSizeType size)
Definition: Buffer.cpp:131
virtual void CalculateCrc_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &filename)=0
Status
status returned from the queue send function
Definition: Queue.hpp:30
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status) const
void run_internalInterfaceInvoke()
Internal interface base-class function for run.
FwSizeType serializedSize() const
Get the dynamic serialized size of the struct.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void init()
Initialization function.
Definition: SchedPortAc.cpp:73
void log_ACTIVITY_HI_GenerateDpStarted(const Fw::StringBase &fileName, U64 bytesToWrite) const
message to exit active component task
The File System component began deleting a directory.
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Initialization function.
Definition: CmdPortAc.cpp:89
static constexpr FwIndexType getNum_productGetOut_OutputPorts()
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
void log_ACTIVITY_HI_FileSizeSucceeded(const Fw::StringBase &fileName, FwSizeType size) const
virtual void RemoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, bool ignoreErrors)=0
void log_ACTIVITY_HI_ListDirectorySucceeded(const Fw::StringBase &dirName, U32 fileCount) const
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
No room left in the buffer to serialize data.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void invoke(U32 key) const
Invoke a port connection.
Definition: PingPortAc.cpp:170
bool isConnected_productGetOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_CalculateCrcSucceeded(const Fw::StringBase &fileName, U32 crc) const
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
void CalculateCrc_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
const Time ZERO_TIME
Definition: Time.cpp:5
void log_ACTIVITY_HI_ListDirectoryStarted(const Fw::StringBase &dirName) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
Enum representing a command response.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
No time base has been established (Required)
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void log_WARNING_HI_GenerateDpInvalidRange(const Fw::StringBase &fileName, U64 beginOffset, U64 endOffset, U64 fileSize) const
FPP shadow-enum representing Fw::FormatStatus.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
The File System component began moving a file to a new location.
DpContainer()
Constructor with default initialization.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Os::Queue m_queue
queue object for active component
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target) const
FileManagerComponentBase(const char *compName="")
Construct FileManagerComponentBase object.
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:177
void ListDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
Definition: ObjBase.cpp:24
SerializeStatus
forward declaration for string
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:95
Message will block until space is available.
Definition: Queue.hpp:47
void log_WARNING_HI_GenerateDpBufferFailed(const Fw::StringBase &fileName) const
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
The File System component returned status non-zero when trying to append 2 files together.
U16 FwSizeStoreType
The type used to serialize a size value.
FwIdType FwEventIdType
The type of an event identifier.
An error occurred while attempting to remove a directory.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
static constexpr FwSizeType CAPACITY
Definition: PingPortAc.hpp:34
void log_WARNING_HI_GenerateDpFailed(const Fw::StringBase &fileName, const Svc::FileManager_GenerateDpStage &stage, U32 status) const
virtual void CreateDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
virtual void ListDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
void RemoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Initialization function.
Definition: TimePortAc.cpp:151
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName) const
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void RemoveDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
Definition: BasicTypes.h:99
Omit length from serialization.
ActiveComponentBase(const char *name)
Constructor.
void init()
Initialization function.
Definition: PingPortAc.cpp:151
static constexpr FwIndexType getNum_schedIn_InputPorts()
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
An error occurred while attempting to create a directory.
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
void invalidateBuffer()
Invalidate the packet buffer.
T
The raw enum type.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:157
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
An error occurred while attempting to move a file.
An error occurred while attempting to remove a file.
virtual void CreateDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CreateDirectory.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
A serious but recoverable event.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType getPacketSizeForDataSize(FwSizeType dataSize)
Get the packet size for a given data size.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
Definition: TlmPortAc.cpp:190
const char * toChar() const
Convert to a C-style char*.
bool isConnected() const
Definition: PortBase.cpp:38
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileNameFormatError(const Fw::StringBase &fileName, const Fw::StringFormatStatus &status) const
Enum representing event severity.
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
FwSizeType getPacketSize() const
Get the packet size corresponding to the data size.
Fw::Buffer getBuffer() const
The File System component appended 2 files without error.
#define PRI_FwIndexType
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:58
void init()
Initialization function.
Definition: LogPortAc.cpp:180
void MoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Fw::SerializeStatus serializeRecord_FileChunkHeaderRecord(const Svc::FileManager_FileChunkHeader &elt)
void log_ACTIVITY_HI_GenerateDpComplete(const Fw::StringBase &fileName, U32 chunks) const
void setPortNum(FwIndexType portNum)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
BlockingType
message type
Definition: Queue.hpp:46
virtual void FileSize_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
FwSizeType getSize() const
Definition: Buffer.cpp:90
Command failed to deserialize.
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status) const
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Important informational events.
FwIdType FwDpIdType
The type of a data product identifier.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: SchedPortAc.cpp:79
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
void GenerateDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
A message was sent requesting an exit of the loop.
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
Fw::Success invoke(FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer) const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void GenerateDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, U32 chunkSize, U64 beginOffset, U64 endOffset, U32 priority, const Svc::FileManager_GenerateDpMode &mode)=0
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
How the chunks of a file are emitted.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void serializeHeader()
Definition: DpContainer.cpp:89
The File System component began deleting an existing file.
void addCallPort(InputDpGetPort *callPort)
Register an input port.
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
Where a data product generation failure occurred.
static constexpr FwIndexType getNum_pingIn_InputPorts()
The File System component began creating a new directory.
void init()
Initialization function.
Invalid offset range requested for data product generation.
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status) const
void incNumMsgDropped()
increment the number of messages dropped
void regCommands()
Register commands with the Command Dispatcher.
void init()
Initialization function.
Definition: PingPortAc.cpp:73
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to productSendOut[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
message sent/received okay
Definition: Queue.hpp:31
The File System component created a new directory without error.
U8 BYTE
byte type
Definition: BasicTypes.h:57
void log_WARNING_HI_CalculateCrcFailed(const Fw::StringBase &fileName, U32 status) const
virtual void AppendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command AppendFile.
Fw::SerializeStatus serializeRecord_FileChunkDataRecord(const U8 *array, FwSizeType size)
virtual void GenerateDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GenerateDp.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:79
FwDpIdType getId() const
The File System component deleted an existing file without error.
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
The File System component appended 2 files without error.
Implementation of malloc based allocator.
virtual void RemoveDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveDirectory.
void init()
Initialization function.
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status) const
void set_productGetOut_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to productGetOut[portNum].
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status) const
void invoke(FwDpIdType id, const Fw::Buffer &buffer) const
Invoke a port connection.
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void CreateDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void init()
Initialization function.
Success/Failure.
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
virtual void CalculateCrc_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CalculateCrc.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0