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_SHELLCOMMAND,
25  CMD_APPENDFILE,
26  CMD_FILESIZE,
27  CMD_LISTDIRECTORY,
28  CMD_CALCULATECRC,
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  Fw::Serializable::SizeType getCapacity() const {
57  return sizeof(m_buff);
58  }
59 
60  U8* getBuffAddr() {
61  return m_buff;
62  }
63 
64  const U8* getBuffAddr() const {
65  return m_buff;
66  }
67 
68  private:
69  // Should be the max of all the input ports serialized sizes...
70  U8 m_buff[SERIALIZATION_SIZE];
71 
72  };
73  }
74 
75  // ----------------------------------------------------------------------
76  // Component initialization
77  // ----------------------------------------------------------------------
78 
81  FwSizeType queueDepth,
82  FwEnumStoreType instance
83  )
84  {
85  // Initialize base class
87 
88  // Connect input port cmdIn
89  for (
90  FwIndexType port = 0;
91  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
92  port++
93  ) {
94  this->m_cmdIn_InputPort[port].init();
95  this->m_cmdIn_InputPort[port].addCallComp(
96  this,
97  m_p_cmdIn_in
98  );
99  this->m_cmdIn_InputPort[port].setPortNum(port);
100 
101 #if FW_OBJECT_NAMES == 1
102  Fw::ObjectName portName;
103  portName.format(
104  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
105  this->m_objName.toChar(),
106  port
107  );
108  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
109 #endif
110  }
111 
112  // Connect input port pingIn
113  for (
114  FwIndexType port = 0;
115  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
116  port++
117  ) {
118  this->m_pingIn_InputPort[port].init();
119  this->m_pingIn_InputPort[port].addCallComp(
120  this,
121  m_p_pingIn_in
122  );
123  this->m_pingIn_InputPort[port].setPortNum(port);
124 
125 #if FW_OBJECT_NAMES == 1
126  Fw::ObjectName portName;
127  portName.format(
128  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
129  this->m_objName.toChar(),
130  port
131  );
132  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
133 #endif
134  }
135 
136  // Connect input port schedIn
137  for (
138  FwIndexType port = 0;
139  port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
140  port++
141  ) {
142  this->m_schedIn_InputPort[port].init();
143  this->m_schedIn_InputPort[port].addCallComp(
144  this,
145  m_p_schedIn_in
146  );
147  this->m_schedIn_InputPort[port].setPortNum(port);
148 
149 #if FW_OBJECT_NAMES == 1
150  Fw::ObjectName portName;
151  portName.format(
152  "%s_schedIn_InputPort[%" PRI_FwIndexType "]",
153  this->m_objName.toChar(),
154  port
155  );
156  this->m_schedIn_InputPort[port].setObjName(portName.toChar());
157 #endif
158  }
159 
160 #if FW_ENABLE_TEXT_LOGGING == 1
161  // Connect output port LogText
162  for (
163  FwIndexType port = 0;
164  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
165  port++
166  ) {
167  this->m_LogText_OutputPort[port].init();
168 
169 #if FW_OBJECT_NAMES == 1
170  Fw::ObjectName portName;
171  portName.format(
172  "%s_LogText_OutputPort[%" PRI_FwIndexType "]",
173  this->m_objName.toChar(),
174  port
175  );
176  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
177 #endif
178  }
179 #endif
180 
181  // Connect output port cmdRegOut
182  for (
183  FwIndexType port = 0;
184  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
185  port++
186  ) {
187  this->m_cmdRegOut_OutputPort[port].init();
188 
189 #if FW_OBJECT_NAMES == 1
190  Fw::ObjectName portName;
191  portName.format(
192  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
193  this->m_objName.toChar(),
194  port
195  );
196  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
197 #endif
198  }
199 
200  // Connect output port cmdResponseOut
201  for (
202  FwIndexType port = 0;
203  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
204  port++
205  ) {
206  this->m_cmdResponseOut_OutputPort[port].init();
207 
208 #if FW_OBJECT_NAMES == 1
209  Fw::ObjectName portName;
210  portName.format(
211  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
212  this->m_objName.toChar(),
213  port
214  );
215  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
216 #endif
217  }
218 
219  // Connect output port eventOut
220  for (
221  FwIndexType port = 0;
222  port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
223  port++
224  ) {
225  this->m_eventOut_OutputPort[port].init();
226 
227 #if FW_OBJECT_NAMES == 1
228  Fw::ObjectName portName;
229  portName.format(
230  "%s_eventOut_OutputPort[%" PRI_FwIndexType "]",
231  this->m_objName.toChar(),
232  port
233  );
234  this->m_eventOut_OutputPort[port].setObjName(portName.toChar());
235 #endif
236  }
237 
238  // Connect output port timeCaller
239  for (
240  FwIndexType port = 0;
241  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
242  port++
243  ) {
244  this->m_timeCaller_OutputPort[port].init();
245 
246 #if FW_OBJECT_NAMES == 1
247  Fw::ObjectName portName;
248  portName.format(
249  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
250  this->m_objName.toChar(),
251  port
252  );
253  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
254 #endif
255  }
256 
257  // Connect output port tlmOut
258  for (
259  FwIndexType port = 0;
260  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
261  port++
262  ) {
263  this->m_tlmOut_OutputPort[port].init();
264 
265 #if FW_OBJECT_NAMES == 1
266  Fw::ObjectName portName;
267  portName.format(
268  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
269  this->m_objName.toChar(),
270  port
271  );
272  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
273 #endif
274  }
275 
276  // Connect output port pingOut
277  for (
278  FwIndexType port = 0;
279  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
280  port++
281  ) {
282  this->m_pingOut_OutputPort[port].init();
283 
284 #if FW_OBJECT_NAMES == 1
285  Fw::ObjectName portName;
286  portName.format(
287  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
288  this->m_objName.toChar(),
289  port
290  );
291  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
292 #endif
293  }
294 
295  // Create the queue
296  Os::Queue::Status qStat = this->createQueue(
297  queueDepth,
298  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
299  );
300  FW_ASSERT(
301  Os::Queue::Status::OP_OK == qStat,
302  static_cast<FwAssertArgType>(qStat)
303  );
304  }
305 
306  // ----------------------------------------------------------------------
307  // Getters for special input ports
308  // ----------------------------------------------------------------------
309 
312  {
313  FW_ASSERT(
314  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
315  static_cast<FwAssertArgType>(portNum)
316  );
317 
318  return &this->m_cmdIn_InputPort[portNum];
319  }
320 
321  // ----------------------------------------------------------------------
322  // Getters for typed input ports
323  // ----------------------------------------------------------------------
324 
327  {
328  FW_ASSERT(
329  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
330  static_cast<FwAssertArgType>(portNum)
331  );
332 
333  return &this->m_pingIn_InputPort[portNum];
334  }
335 
338  {
339  FW_ASSERT(
340  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
341  static_cast<FwAssertArgType>(portNum)
342  );
343 
344  return &this->m_schedIn_InputPort[portNum];
345  }
346 
347  // ----------------------------------------------------------------------
348  // Connect input ports to special output ports
349  // ----------------------------------------------------------------------
350 
351 #if FW_ENABLE_TEXT_LOGGING == 1
352 
353  void FileManagerComponentBase ::
354  set_LogText_OutputPort(
355  FwIndexType portNum,
357  )
358  {
359  FW_ASSERT(
360  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
361  static_cast<FwAssertArgType>(portNum)
362  );
363 
364  this->m_LogText_OutputPort[portNum].addCallPort(port);
365  }
366 
367 #endif
368 
371  FwIndexType portNum,
372  Fw::InputCmdRegPort* port
373  )
374  {
375  FW_ASSERT(
376  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
377  static_cast<FwAssertArgType>(portNum)
378  );
379 
380  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
381  }
382 
385  FwIndexType portNum,
387  )
388  {
389  FW_ASSERT(
390  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
391  static_cast<FwAssertArgType>(portNum)
392  );
393 
394  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
395  }
396 
399  FwIndexType portNum,
400  Fw::InputLogPort* port
401  )
402  {
403  FW_ASSERT(
404  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
405  static_cast<FwAssertArgType>(portNum)
406  );
407 
408  this->m_eventOut_OutputPort[portNum].addCallPort(port);
409  }
410 
413  FwIndexType portNum,
414  Fw::InputTimePort* port
415  )
416  {
417  FW_ASSERT(
418  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
419  static_cast<FwAssertArgType>(portNum)
420  );
421 
422  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
423  }
424 
427  FwIndexType portNum,
428  Fw::InputTlmPort* port
429  )
430  {
431  FW_ASSERT(
432  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
433  static_cast<FwAssertArgType>(portNum)
434  );
435 
436  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
437  }
438 
439  // ----------------------------------------------------------------------
440  // Connect typed input ports to typed output ports
441  // ----------------------------------------------------------------------
442 
445  FwIndexType portNum,
446  Svc::InputPingPort* port
447  )
448  {
449  FW_ASSERT(
450  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
451  static_cast<FwAssertArgType>(portNum)
452  );
453 
454  this->m_pingOut_OutputPort[portNum].addCallPort(port);
455  }
456 
457 #if FW_PORT_SERIALIZATION
458 
459  // ----------------------------------------------------------------------
460  // Connect serial input ports to special output ports
461  // ----------------------------------------------------------------------
462 
463 #if FW_ENABLE_TEXT_LOGGING == 1
464 
465  void FileManagerComponentBase ::
466  set_LogText_OutputPort(
467  FwIndexType portNum,
468  Fw::InputSerializePort* port
469  )
470  {
471  FW_ASSERT(
472  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
473  static_cast<FwAssertArgType>(portNum)
474  );
475 
476  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
477  }
478 
479 #endif
480 
483  FwIndexType portNum,
484  Fw::InputSerializePort* port
485  )
486  {
487  FW_ASSERT(
488  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
489  static_cast<FwAssertArgType>(portNum)
490  );
491 
492  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
493  }
494 
497  FwIndexType portNum,
498  Fw::InputSerializePort* port
499  )
500  {
501  FW_ASSERT(
502  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
503  static_cast<FwAssertArgType>(portNum)
504  );
505 
506  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
507  }
508 
511  FwIndexType portNum,
512  Fw::InputSerializePort* port
513  )
514  {
515  FW_ASSERT(
516  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
517  static_cast<FwAssertArgType>(portNum)
518  );
519 
520  this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
521  }
522 
525  FwIndexType portNum,
526  Fw::InputSerializePort* port
527  )
528  {
529  FW_ASSERT(
530  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
531  static_cast<FwAssertArgType>(portNum)
532  );
533 
534  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
535  }
536 
539  FwIndexType portNum,
540  Fw::InputSerializePort* port
541  )
542  {
543  FW_ASSERT(
544  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
545  static_cast<FwAssertArgType>(portNum)
546  );
547 
548  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
549  }
550 
551 #endif
552 
553 #if FW_PORT_SERIALIZATION
554 
555  // ----------------------------------------------------------------------
556  // Connect serial input ports to typed output ports
557  // ----------------------------------------------------------------------
558 
561  FwIndexType portNum,
562  Fw::InputSerializePort* port
563  )
564  {
565  FW_ASSERT(
566  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
567  static_cast<FwAssertArgType>(portNum)
568  );
569 
570  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
571  }
572 
573 #endif
574 
575  // ----------------------------------------------------------------------
576  // Command registration
577  // ----------------------------------------------------------------------
578 
581  {
582  FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
583 
584  this->m_cmdRegOut_OutputPort[0].invoke(
586  );
587 
588  this->m_cmdRegOut_OutputPort[0].invoke(
589  this->getIdBase() + OPCODE_MOVEFILE
590  );
591 
592  this->m_cmdRegOut_OutputPort[0].invoke(
594  );
595 
596  this->m_cmdRegOut_OutputPort[0].invoke(
597  this->getIdBase() + OPCODE_REMOVEFILE
598  );
599 
600  this->m_cmdRegOut_OutputPort[0].invoke(
602  );
603 
604  this->m_cmdRegOut_OutputPort[0].invoke(
605  this->getIdBase() + OPCODE_APPENDFILE
606  );
607 
608  this->m_cmdRegOut_OutputPort[0].invoke(
609  this->getIdBase() + OPCODE_FILESIZE
610  );
611 
612  this->m_cmdRegOut_OutputPort[0].invoke(
614  );
615 
616  this->m_cmdRegOut_OutputPort[0].invoke(
618  );
619  }
620 
621  // ----------------------------------------------------------------------
622  // Component construction and destruction
623  // ----------------------------------------------------------------------
624 
626  FileManagerComponentBase(const char* compName) :
627  Fw::ActiveComponentBase(compName)
628  {
629 
630  }
631 
634  {
635 
636  }
637 
638  // ----------------------------------------------------------------------
639  // Connection status queries for special output ports
640  // ----------------------------------------------------------------------
641 
642 #if FW_ENABLE_TEXT_LOGGING == 1
643 
644  bool FileManagerComponentBase ::
645  isConnected_LogText_OutputPort(FwIndexType portNum)
646  {
647  FW_ASSERT(
648  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
649  static_cast<FwAssertArgType>(portNum)
650  );
651 
652  return this->m_LogText_OutputPort[portNum].isConnected();
653  }
654 
655 #endif
656 
659  {
660  FW_ASSERT(
661  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
662  static_cast<FwAssertArgType>(portNum)
663  );
664 
665  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
666  }
667 
670  {
671  FW_ASSERT(
672  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
673  static_cast<FwAssertArgType>(portNum)
674  );
675 
676  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
677  }
678 
681  {
682  FW_ASSERT(
683  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
684  static_cast<FwAssertArgType>(portNum)
685  );
686 
687  return this->m_eventOut_OutputPort[portNum].isConnected();
688  }
689 
692  {
693  FW_ASSERT(
694  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
695  static_cast<FwAssertArgType>(portNum)
696  );
697 
698  return this->m_timeCaller_OutputPort[portNum].isConnected();
699  }
700 
703  {
704  FW_ASSERT(
705  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
706  static_cast<FwAssertArgType>(portNum)
707  );
708 
709  return this->m_tlmOut_OutputPort[portNum].isConnected();
710  }
711 
712  // ----------------------------------------------------------------------
713  // Connection status queries for typed output ports
714  // ----------------------------------------------------------------------
715 
718  {
719  FW_ASSERT(
720  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
721  static_cast<FwAssertArgType>(portNum)
722  );
723 
724  return this->m_pingOut_OutputPort[portNum].isConnected();
725  }
726 
727  // ----------------------------------------------------------------------
728  // Port handler base-class functions for typed input ports
729  //
730  // Call these functions directly to bypass the corresponding ports
731  // ----------------------------------------------------------------------
732 
735  FwIndexType portNum,
736  U32 key
737  )
738  {
739  // Make sure port number is valid
740  FW_ASSERT(
741  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
742  static_cast<FwAssertArgType>(portNum)
743  );
744 
745  // Call pre-message hook
747  portNum,
748  key
749  );
750  ComponentIpcSerializableBuffer msg;
752 
753  // Serialize message ID
754  _status = msg.serializeFrom(
755  static_cast<FwEnumStoreType>(PINGIN_PING)
756  );
757  FW_ASSERT(
758  _status == Fw::FW_SERIALIZE_OK,
759  static_cast<FwAssertArgType>(_status)
760  );
761 
762  // Serialize port number
763  _status = msg.serializeFrom(portNum);
764  FW_ASSERT(
765  _status == Fw::FW_SERIALIZE_OK,
766  static_cast<FwAssertArgType>(_status)
767  );
768 
769  // Serialize argument key
770  _status = msg.serializeFrom(key);
771  FW_ASSERT(
772  _status == Fw::FW_SERIALIZE_OK,
773  static_cast<FwAssertArgType>(_status)
774  );
775 
776  // Send message
778  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
779 
780  FW_ASSERT(
781  qStatus == Os::Queue::OP_OK,
782  static_cast<FwAssertArgType>(qStatus)
783  );
784  }
785 
788  FwIndexType portNum,
789  U32 context
790  )
791  {
792  // Make sure port number is valid
793  FW_ASSERT(
794  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
795  static_cast<FwAssertArgType>(portNum)
796  );
797 
798  // Call handler function
799  this->schedIn_handler(
800  portNum,
801  context
802  );
803  }
804 
805  // ----------------------------------------------------------------------
806  // Pre-message hooks for typed async input ports
807  //
808  // Each of these functions is invoked just before processing a message
809  // on the corresponding port. By default, they do nothing. You can
810  // override them to provide specific pre-message behavior.
811  // ----------------------------------------------------------------------
812 
815  FwIndexType portNum,
816  U32 key
817  )
818  {
819  // Default: no-op
820  }
821 
822  // ----------------------------------------------------------------------
823  // Invocation functions for typed output ports
824  // ----------------------------------------------------------------------
825 
828  FwIndexType portNum,
829  U32 key
830  )
831  {
832  FW_ASSERT(
833  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
834  static_cast<FwAssertArgType>(portNum)
835  );
836 
837  FW_ASSERT(
838  this->m_pingOut_OutputPort[portNum].isConnected(),
839  static_cast<FwAssertArgType>(portNum)
840  );
841  this->m_pingOut_OutputPort[portNum].invoke(
842  key
843  );
844  }
845 
846  // ----------------------------------------------------------------------
847  // Internal interface base-class functions
848  // ----------------------------------------------------------------------
849 
852  {
853  ComponentIpcSerializableBuffer msg;
855 
856  // Serialize the message ID
857  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(INT_IF_RUN));
858  FW_ASSERT (
859  _status == Fw::FW_SERIALIZE_OK,
860  static_cast<FwAssertArgType>(_status)
861  );
862 
863  // Fake port number to make message dequeue work
864  _status = msg.serializeFrom(static_cast<FwIndexType>(0));
865  FW_ASSERT (
866  _status == Fw::FW_SERIALIZE_OK,
867  static_cast<FwAssertArgType>(_status)
868  );
869 
870  // Send message
872  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
873 
874  if (qStatus == Os::Queue::Status::FULL) {
875  this->incNumMsgDropped();
876  return;
877  }
878 
879  FW_ASSERT(
880  qStatus == Os::Queue::OP_OK,
881  static_cast<FwAssertArgType>(qStatus)
882  );
883  }
884 
885  // ----------------------------------------------------------------------
886  // Command response
887  // ----------------------------------------------------------------------
888 
891  FwOpcodeType opCode,
892  U32 cmdSeq,
893  Fw::CmdResponse response
894  )
895  {
896  FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
897  this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
898  }
899 
900  // ----------------------------------------------------------------------
901  // Command handler base-class functions
902  //
903  // Call these functions directly to bypass the command input port
904  // ----------------------------------------------------------------------
905 
908  FwOpcodeType opCode,
909  U32 cmdSeq,
910  Fw::CmdArgBuffer& args
911  )
912  {
913  // Call pre-message hook
914  this->CreateDirectory_preMsgHook(opCode,cmdSeq);
915 
916  // Defer deserializing arguments to the message dispatcher
917  // to avoid deserializing and reserializing just for IPC
918  ComponentIpcSerializableBuffer msg;
920 
921  // Serialize for IPC
922  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CREATEDIRECTORY));
923  FW_ASSERT (
924  _status == Fw::FW_SERIALIZE_OK,
925  static_cast<FwAssertArgType>(_status)
926  );
927 
928  // Fake port number to make message dequeue work
929  FwIndexType port = 0;
930 
931  _status = msg.serializeFrom(port);
932  FW_ASSERT (
933  _status == Fw::FW_SERIALIZE_OK,
934  static_cast<FwAssertArgType>(_status)
935  );
936 
937  _status = msg.serializeFrom(opCode);
938  FW_ASSERT (
939  _status == Fw::FW_SERIALIZE_OK,
940  static_cast<FwAssertArgType>(_status)
941  );
942 
943  _status = msg.serializeFrom(cmdSeq);
944  FW_ASSERT (
945  _status == Fw::FW_SERIALIZE_OK,
946  static_cast<FwAssertArgType>(_status)
947  );
948 
949  _status = msg.serializeFrom(args);
950  FW_ASSERT (
951  _status == Fw::FW_SERIALIZE_OK,
952  static_cast<FwAssertArgType>(_status)
953  );
954 
955  // Send message
957  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
958 
959  FW_ASSERT(
960  qStatus == Os::Queue::OP_OK,
961  static_cast<FwAssertArgType>(qStatus)
962  );
963  }
964 
967  FwOpcodeType opCode,
968  U32 cmdSeq,
969  Fw::CmdArgBuffer& args
970  )
971  {
972  // Call pre-message hook
973  this->MoveFile_preMsgHook(opCode,cmdSeq);
974 
975  // Defer deserializing arguments to the message dispatcher
976  // to avoid deserializing and reserializing just for IPC
977  ComponentIpcSerializableBuffer msg;
979 
980  // Serialize for IPC
981  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_MOVEFILE));
982  FW_ASSERT (
983  _status == Fw::FW_SERIALIZE_OK,
984  static_cast<FwAssertArgType>(_status)
985  );
986 
987  // Fake port number to make message dequeue work
988  FwIndexType port = 0;
989 
990  _status = msg.serializeFrom(port);
991  FW_ASSERT (
992  _status == Fw::FW_SERIALIZE_OK,
993  static_cast<FwAssertArgType>(_status)
994  );
995 
996  _status = msg.serializeFrom(opCode);
997  FW_ASSERT (
998  _status == Fw::FW_SERIALIZE_OK,
999  static_cast<FwAssertArgType>(_status)
1000  );
1001 
1002  _status = msg.serializeFrom(cmdSeq);
1003  FW_ASSERT (
1004  _status == Fw::FW_SERIALIZE_OK,
1005  static_cast<FwAssertArgType>(_status)
1006  );
1007 
1008  _status = msg.serializeFrom(args);
1009  FW_ASSERT (
1010  _status == Fw::FW_SERIALIZE_OK,
1011  static_cast<FwAssertArgType>(_status)
1012  );
1013 
1014  // Send message
1016  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1017 
1018  FW_ASSERT(
1019  qStatus == Os::Queue::OP_OK,
1020  static_cast<FwAssertArgType>(qStatus)
1021  );
1022  }
1023 
1026  FwOpcodeType opCode,
1027  U32 cmdSeq,
1028  Fw::CmdArgBuffer& args
1029  )
1030  {
1031  // Call pre-message hook
1032  this->RemoveDirectory_preMsgHook(opCode,cmdSeq);
1033 
1034  // Defer deserializing arguments to the message dispatcher
1035  // to avoid deserializing and reserializing just for IPC
1036  ComponentIpcSerializableBuffer msg;
1038 
1039  // Serialize for IPC
1040  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_REMOVEDIRECTORY));
1041  FW_ASSERT (
1042  _status == Fw::FW_SERIALIZE_OK,
1043  static_cast<FwAssertArgType>(_status)
1044  );
1045 
1046  // Fake port number to make message dequeue work
1047  FwIndexType port = 0;
1048 
1049  _status = msg.serializeFrom(port);
1050  FW_ASSERT (
1051  _status == Fw::FW_SERIALIZE_OK,
1052  static_cast<FwAssertArgType>(_status)
1053  );
1054 
1055  _status = msg.serializeFrom(opCode);
1056  FW_ASSERT (
1057  _status == Fw::FW_SERIALIZE_OK,
1058  static_cast<FwAssertArgType>(_status)
1059  );
1060 
1061  _status = msg.serializeFrom(cmdSeq);
1062  FW_ASSERT (
1063  _status == Fw::FW_SERIALIZE_OK,
1064  static_cast<FwAssertArgType>(_status)
1065  );
1066 
1067  _status = msg.serializeFrom(args);
1068  FW_ASSERT (
1069  _status == Fw::FW_SERIALIZE_OK,
1070  static_cast<FwAssertArgType>(_status)
1071  );
1072 
1073  // Send message
1075  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1076 
1077  FW_ASSERT(
1078  qStatus == Os::Queue::OP_OK,
1079  static_cast<FwAssertArgType>(qStatus)
1080  );
1081  }
1082 
1085  FwOpcodeType opCode,
1086  U32 cmdSeq,
1087  Fw::CmdArgBuffer& args
1088  )
1089  {
1090  // Call pre-message hook
1091  this->RemoveFile_preMsgHook(opCode,cmdSeq);
1092 
1093  // Defer deserializing arguments to the message dispatcher
1094  // to avoid deserializing and reserializing just for IPC
1095  ComponentIpcSerializableBuffer msg;
1097 
1098  // Serialize for IPC
1099  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_REMOVEFILE));
1100  FW_ASSERT (
1101  _status == Fw::FW_SERIALIZE_OK,
1102  static_cast<FwAssertArgType>(_status)
1103  );
1104 
1105  // Fake port number to make message dequeue work
1106  FwIndexType port = 0;
1107 
1108  _status = msg.serializeFrom(port);
1109  FW_ASSERT (
1110  _status == Fw::FW_SERIALIZE_OK,
1111  static_cast<FwAssertArgType>(_status)
1112  );
1113 
1114  _status = msg.serializeFrom(opCode);
1115  FW_ASSERT (
1116  _status == Fw::FW_SERIALIZE_OK,
1117  static_cast<FwAssertArgType>(_status)
1118  );
1119 
1120  _status = msg.serializeFrom(cmdSeq);
1121  FW_ASSERT (
1122  _status == Fw::FW_SERIALIZE_OK,
1123  static_cast<FwAssertArgType>(_status)
1124  );
1125 
1126  _status = msg.serializeFrom(args);
1127  FW_ASSERT (
1128  _status == Fw::FW_SERIALIZE_OK,
1129  static_cast<FwAssertArgType>(_status)
1130  );
1131 
1132  // Send message
1134  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1135 
1136  FW_ASSERT(
1137  qStatus == Os::Queue::OP_OK,
1138  static_cast<FwAssertArgType>(qStatus)
1139  );
1140  }
1141 
1144  FwOpcodeType opCode,
1145  U32 cmdSeq,
1146  Fw::CmdArgBuffer& args
1147  )
1148  {
1149  // Call pre-message hook
1150  this->ShellCommand_preMsgHook(opCode,cmdSeq);
1151 
1152  // Defer deserializing arguments to the message dispatcher
1153  // to avoid deserializing and reserializing just for IPC
1154  ComponentIpcSerializableBuffer msg;
1156 
1157  // Serialize for IPC
1158  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SHELLCOMMAND));
1159  FW_ASSERT (
1160  _status == Fw::FW_SERIALIZE_OK,
1161  static_cast<FwAssertArgType>(_status)
1162  );
1163 
1164  // Fake port number to make message dequeue work
1165  FwIndexType port = 0;
1166 
1167  _status = msg.serializeFrom(port);
1168  FW_ASSERT (
1169  _status == Fw::FW_SERIALIZE_OK,
1170  static_cast<FwAssertArgType>(_status)
1171  );
1172 
1173  _status = msg.serializeFrom(opCode);
1174  FW_ASSERT (
1175  _status == Fw::FW_SERIALIZE_OK,
1176  static_cast<FwAssertArgType>(_status)
1177  );
1178 
1179  _status = msg.serializeFrom(cmdSeq);
1180  FW_ASSERT (
1181  _status == Fw::FW_SERIALIZE_OK,
1182  static_cast<FwAssertArgType>(_status)
1183  );
1184 
1185  _status = msg.serializeFrom(args);
1186  FW_ASSERT (
1187  _status == Fw::FW_SERIALIZE_OK,
1188  static_cast<FwAssertArgType>(_status)
1189  );
1190 
1191  // Send message
1193  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1194 
1195  FW_ASSERT(
1196  qStatus == Os::Queue::OP_OK,
1197  static_cast<FwAssertArgType>(qStatus)
1198  );
1199  }
1200 
1203  FwOpcodeType opCode,
1204  U32 cmdSeq,
1205  Fw::CmdArgBuffer& args
1206  )
1207  {
1208  // Call pre-message hook
1209  this->AppendFile_preMsgHook(opCode,cmdSeq);
1210 
1211  // Defer deserializing arguments to the message dispatcher
1212  // to avoid deserializing and reserializing just for IPC
1213  ComponentIpcSerializableBuffer msg;
1215 
1216  // Serialize for IPC
1217  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_APPENDFILE));
1218  FW_ASSERT (
1219  _status == Fw::FW_SERIALIZE_OK,
1220  static_cast<FwAssertArgType>(_status)
1221  );
1222 
1223  // Fake port number to make message dequeue work
1224  FwIndexType port = 0;
1225 
1226  _status = msg.serializeFrom(port);
1227  FW_ASSERT (
1228  _status == Fw::FW_SERIALIZE_OK,
1229  static_cast<FwAssertArgType>(_status)
1230  );
1231 
1232  _status = msg.serializeFrom(opCode);
1233  FW_ASSERT (
1234  _status == Fw::FW_SERIALIZE_OK,
1235  static_cast<FwAssertArgType>(_status)
1236  );
1237 
1238  _status = msg.serializeFrom(cmdSeq);
1239  FW_ASSERT (
1240  _status == Fw::FW_SERIALIZE_OK,
1241  static_cast<FwAssertArgType>(_status)
1242  );
1243 
1244  _status = msg.serializeFrom(args);
1245  FW_ASSERT (
1246  _status == Fw::FW_SERIALIZE_OK,
1247  static_cast<FwAssertArgType>(_status)
1248  );
1249 
1250  // Send message
1252  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1253 
1254  FW_ASSERT(
1255  qStatus == Os::Queue::OP_OK,
1256  static_cast<FwAssertArgType>(qStatus)
1257  );
1258  }
1259 
1262  FwOpcodeType opCode,
1263  U32 cmdSeq,
1264  Fw::CmdArgBuffer& args
1265  )
1266  {
1267  // Call pre-message hook
1268  this->FileSize_preMsgHook(opCode,cmdSeq);
1269 
1270  // Defer deserializing arguments to the message dispatcher
1271  // to avoid deserializing and reserializing just for IPC
1272  ComponentIpcSerializableBuffer msg;
1274 
1275  // Serialize for IPC
1276  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_FILESIZE));
1277  FW_ASSERT (
1278  _status == Fw::FW_SERIALIZE_OK,
1279  static_cast<FwAssertArgType>(_status)
1280  );
1281 
1282  // Fake port number to make message dequeue work
1283  FwIndexType port = 0;
1284 
1285  _status = msg.serializeFrom(port);
1286  FW_ASSERT (
1287  _status == Fw::FW_SERIALIZE_OK,
1288  static_cast<FwAssertArgType>(_status)
1289  );
1290 
1291  _status = msg.serializeFrom(opCode);
1292  FW_ASSERT (
1293  _status == Fw::FW_SERIALIZE_OK,
1294  static_cast<FwAssertArgType>(_status)
1295  );
1296 
1297  _status = msg.serializeFrom(cmdSeq);
1298  FW_ASSERT (
1299  _status == Fw::FW_SERIALIZE_OK,
1300  static_cast<FwAssertArgType>(_status)
1301  );
1302 
1303  _status = msg.serializeFrom(args);
1304  FW_ASSERT (
1305  _status == Fw::FW_SERIALIZE_OK,
1306  static_cast<FwAssertArgType>(_status)
1307  );
1308 
1309  // Send message
1311  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1312 
1313  FW_ASSERT(
1314  qStatus == Os::Queue::OP_OK,
1315  static_cast<FwAssertArgType>(qStatus)
1316  );
1317  }
1318 
1321  FwOpcodeType opCode,
1322  U32 cmdSeq,
1323  Fw::CmdArgBuffer& args
1324  )
1325  {
1326  // Call pre-message hook
1327  this->ListDirectory_preMsgHook(opCode,cmdSeq);
1328 
1329  // Defer deserializing arguments to the message dispatcher
1330  // to avoid deserializing and reserializing just for IPC
1331  ComponentIpcSerializableBuffer msg;
1333 
1334  // Serialize for IPC
1335  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_LISTDIRECTORY));
1336  FW_ASSERT (
1337  _status == Fw::FW_SERIALIZE_OK,
1338  static_cast<FwAssertArgType>(_status)
1339  );
1340 
1341  // Fake port number to make message dequeue work
1342  FwIndexType port = 0;
1343 
1344  _status = msg.serializeFrom(port);
1345  FW_ASSERT (
1346  _status == Fw::FW_SERIALIZE_OK,
1347  static_cast<FwAssertArgType>(_status)
1348  );
1349 
1350  _status = msg.serializeFrom(opCode);
1351  FW_ASSERT (
1352  _status == Fw::FW_SERIALIZE_OK,
1353  static_cast<FwAssertArgType>(_status)
1354  );
1355 
1356  _status = msg.serializeFrom(cmdSeq);
1357  FW_ASSERT (
1358  _status == Fw::FW_SERIALIZE_OK,
1359  static_cast<FwAssertArgType>(_status)
1360  );
1361 
1362  _status = msg.serializeFrom(args);
1363  FW_ASSERT (
1364  _status == Fw::FW_SERIALIZE_OK,
1365  static_cast<FwAssertArgType>(_status)
1366  );
1367 
1368  // Send message
1370  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1371 
1372  FW_ASSERT(
1373  qStatus == Os::Queue::OP_OK,
1374  static_cast<FwAssertArgType>(qStatus)
1375  );
1376  }
1377 
1380  FwOpcodeType opCode,
1381  U32 cmdSeq,
1382  Fw::CmdArgBuffer& args
1383  )
1384  {
1385  // Call pre-message hook
1386  this->CalculateCrc_preMsgHook(opCode,cmdSeq);
1387 
1388  // Defer deserializing arguments to the message dispatcher
1389  // to avoid deserializing and reserializing just for IPC
1390  ComponentIpcSerializableBuffer msg;
1392 
1393  // Serialize for IPC
1394  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CALCULATECRC));
1395  FW_ASSERT (
1396  _status == Fw::FW_SERIALIZE_OK,
1397  static_cast<FwAssertArgType>(_status)
1398  );
1399 
1400  // Fake port number to make message dequeue work
1401  FwIndexType port = 0;
1402 
1403  _status = msg.serializeFrom(port);
1404  FW_ASSERT (
1405  _status == Fw::FW_SERIALIZE_OK,
1406  static_cast<FwAssertArgType>(_status)
1407  );
1408 
1409  _status = msg.serializeFrom(opCode);
1410  FW_ASSERT (
1411  _status == Fw::FW_SERIALIZE_OK,
1412  static_cast<FwAssertArgType>(_status)
1413  );
1414 
1415  _status = msg.serializeFrom(cmdSeq);
1416  FW_ASSERT (
1417  _status == Fw::FW_SERIALIZE_OK,
1418  static_cast<FwAssertArgType>(_status)
1419  );
1420 
1421  _status = msg.serializeFrom(args);
1422  FW_ASSERT (
1423  _status == Fw::FW_SERIALIZE_OK,
1424  static_cast<FwAssertArgType>(_status)
1425  );
1426 
1427  // Send message
1429  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1430 
1431  FW_ASSERT(
1432  qStatus == Os::Queue::OP_OK,
1433  static_cast<FwAssertArgType>(qStatus)
1434  );
1435  }
1436 
1437  // ----------------------------------------------------------------------
1438  // Pre-message hooks for async commands
1439  //
1440  // Each of these functions is invoked just before processing the
1441  // corresponding command. By default they do nothing. You can
1442  // override them to provide specific pre-command behavior.
1443  // ----------------------------------------------------------------------
1444 
1447  FwOpcodeType opCode,
1448  U32 cmdSeq
1449  )
1450  {
1451  // Defaults to no-op; can be overridden
1452  (void) opCode;
1453  (void) cmdSeq;
1454  }
1455 
1458  FwOpcodeType opCode,
1459  U32 cmdSeq
1460  )
1461  {
1462  // Defaults to no-op; can be overridden
1463  (void) opCode;
1464  (void) cmdSeq;
1465  }
1466 
1469  FwOpcodeType opCode,
1470  U32 cmdSeq
1471  )
1472  {
1473  // Defaults to no-op; can be overridden
1474  (void) opCode;
1475  (void) cmdSeq;
1476  }
1477 
1480  FwOpcodeType opCode,
1481  U32 cmdSeq
1482  )
1483  {
1484  // Defaults to no-op; can be overridden
1485  (void) opCode;
1486  (void) cmdSeq;
1487  }
1488 
1491  FwOpcodeType opCode,
1492  U32 cmdSeq
1493  )
1494  {
1495  // Defaults to no-op; can be overridden
1496  (void) opCode;
1497  (void) cmdSeq;
1498  }
1499 
1502  FwOpcodeType opCode,
1503  U32 cmdSeq
1504  )
1505  {
1506  // Defaults to no-op; can be overridden
1507  (void) opCode;
1508  (void) cmdSeq;
1509  }
1510 
1513  FwOpcodeType opCode,
1514  U32 cmdSeq
1515  )
1516  {
1517  // Defaults to no-op; can be overridden
1518  (void) opCode;
1519  (void) cmdSeq;
1520  }
1521 
1524  FwOpcodeType opCode,
1525  U32 cmdSeq
1526  )
1527  {
1528  // Defaults to no-op; can be overridden
1529  (void) opCode;
1530  (void) cmdSeq;
1531  }
1532 
1535  FwOpcodeType opCode,
1536  U32 cmdSeq
1537  )
1538  {
1539  // Defaults to no-op; can be overridden
1540  (void) opCode;
1541  (void) cmdSeq;
1542  }
1543 
1544  // ----------------------------------------------------------------------
1545  // Event logging functions
1546  // ----------------------------------------------------------------------
1547 
1550  const Fw::StringBase& dirName,
1551  U32 status
1552  ) const
1553  {
1554  // Get the time
1555  Fw::Time _logTime;
1556  if (this->m_timeCaller_OutputPort[0].isConnected()) {
1557  this->m_timeCaller_OutputPort[0].invoke(_logTime);
1558  }
1559 
1560  FwEventIdType _id = static_cast<FwEventIdType>(0);
1561 
1562  _id = this->getIdBase() + EVENTID_DIRECTORYCREATEERROR;
1563 
1564  // Emit the event on the log port
1565  if (this->m_eventOut_OutputPort[0].isConnected()) {
1566  Fw::LogBuffer _logBuff;
1568 
1569 #if FW_AMPCS_COMPATIBLE
1570  // Serialize the number of arguments
1571  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1572  FW_ASSERT(
1573  _status == Fw::FW_SERIALIZE_OK,
1574  static_cast<FwAssertArgType>(_status)
1575  );
1576 #endif
1577 
1578  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1579  FW_ASSERT(
1580  _status == Fw::FW_SERIALIZE_OK,
1581  static_cast<FwAssertArgType>(_status)
1582  );
1583 
1584 #if FW_AMPCS_COMPATIBLE
1585  // Serialize the argument size
1586  _status = _logBuff.serializeFrom(
1587  static_cast<U8>(sizeof(U32))
1588  );
1589  FW_ASSERT(
1590  _status == Fw::FW_SERIALIZE_OK,
1591  static_cast<FwAssertArgType>(_status)
1592  );
1593 #endif
1594  _status = _logBuff.serializeFrom(status);
1595  FW_ASSERT(
1596  _status == Fw::FW_SERIALIZE_OK,
1597  static_cast<FwAssertArgType>(_status)
1598  );
1599 
1600  this->m_eventOut_OutputPort[0].invoke(
1601  _id,
1602  _logTime,
1604  _logBuff
1605  );
1606  }
1607 
1608  // Emit the event on the text log port
1609 #if FW_ENABLE_TEXT_LOGGING
1610  if (this->m_LogText_OutputPort[0].isConnected()) {
1611 #if FW_OBJECT_NAMES == 1
1612  const char* _formatString =
1613  "(%s) %s: Could not create directory %s, returned status %" PRIu32 "";
1614 #else
1615  const char* _formatString =
1616  "%s: Could not create directory %s, returned status %" PRIu32 "";
1617 #endif
1618 
1619  Fw::TextLogString _logString;
1620  _logString.format(
1621  _formatString,
1622 #if FW_OBJECT_NAMES == 1
1623  this->m_objName.toChar(),
1624 #endif
1625  "DirectoryCreateError ",
1626  dirName.toChar(),
1627  status
1628  );
1629 
1630  this->m_LogText_OutputPort[0].invoke(
1631  _id,
1632  _logTime,
1634  _logString
1635  );
1636  }
1637 #endif
1638  }
1639 
1642  const Fw::StringBase& dirName,
1643  U32 status
1644  ) const
1645  {
1646  // Get the time
1647  Fw::Time _logTime;
1648  if (this->m_timeCaller_OutputPort[0].isConnected()) {
1649  this->m_timeCaller_OutputPort[0].invoke(_logTime);
1650  }
1651 
1652  FwEventIdType _id = static_cast<FwEventIdType>(0);
1653 
1654  _id = this->getIdBase() + EVENTID_DIRECTORYREMOVEERROR;
1655 
1656  // Emit the event on the log port
1657  if (this->m_eventOut_OutputPort[0].isConnected()) {
1658  Fw::LogBuffer _logBuff;
1660 
1661 #if FW_AMPCS_COMPATIBLE
1662  // Serialize the number of arguments
1663  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1664  FW_ASSERT(
1665  _status == Fw::FW_SERIALIZE_OK,
1666  static_cast<FwAssertArgType>(_status)
1667  );
1668 #endif
1669 
1670  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1671  FW_ASSERT(
1672  _status == Fw::FW_SERIALIZE_OK,
1673  static_cast<FwAssertArgType>(_status)
1674  );
1675 
1676 #if FW_AMPCS_COMPATIBLE
1677  // Serialize the argument size
1678  _status = _logBuff.serializeFrom(
1679  static_cast<U8>(sizeof(U32))
1680  );
1681  FW_ASSERT(
1682  _status == Fw::FW_SERIALIZE_OK,
1683  static_cast<FwAssertArgType>(_status)
1684  );
1685 #endif
1686  _status = _logBuff.serializeFrom(status);
1687  FW_ASSERT(
1688  _status == Fw::FW_SERIALIZE_OK,
1689  static_cast<FwAssertArgType>(_status)
1690  );
1691 
1692  this->m_eventOut_OutputPort[0].invoke(
1693  _id,
1694  _logTime,
1696  _logBuff
1697  );
1698  }
1699 
1700  // Emit the event on the text log port
1701 #if FW_ENABLE_TEXT_LOGGING
1702  if (this->m_LogText_OutputPort[0].isConnected()) {
1703 #if FW_OBJECT_NAMES == 1
1704  const char* _formatString =
1705  "(%s) %s: Could not remove directory %s, returned status %" PRIu32 "";
1706 #else
1707  const char* _formatString =
1708  "%s: Could not remove directory %s, returned status %" PRIu32 "";
1709 #endif
1710 
1711  Fw::TextLogString _logString;
1712  _logString.format(
1713  _formatString,
1714 #if FW_OBJECT_NAMES == 1
1715  this->m_objName.toChar(),
1716 #endif
1717  "DirectoryRemoveError ",
1718  dirName.toChar(),
1719  status
1720  );
1721 
1722  this->m_LogText_OutputPort[0].invoke(
1723  _id,
1724  _logTime,
1726  _logString
1727  );
1728  }
1729 #endif
1730  }
1731 
1734  const Fw::StringBase& sourceFileName,
1735  const Fw::StringBase& destFileName,
1736  U32 status
1737  ) const
1738  {
1739  // Get the time
1740  Fw::Time _logTime;
1741  if (this->m_timeCaller_OutputPort[0].isConnected()) {
1742  this->m_timeCaller_OutputPort[0].invoke(_logTime);
1743  }
1744 
1745  FwEventIdType _id = static_cast<FwEventIdType>(0);
1746 
1747  _id = this->getIdBase() + EVENTID_FILEMOVEERROR;
1748 
1749  // Emit the event on the log port
1750  if (this->m_eventOut_OutputPort[0].isConnected()) {
1751  Fw::LogBuffer _logBuff;
1753 
1754 #if FW_AMPCS_COMPATIBLE
1755  // Serialize the number of arguments
1756  _status = _logBuff.serializeFrom(static_cast<U8>(3));
1757  FW_ASSERT(
1758  _status == Fw::FW_SERIALIZE_OK,
1759  static_cast<FwAssertArgType>(_status)
1760  );
1761 #endif
1762 
1763  _status = sourceFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1764  FW_ASSERT(
1765  _status == Fw::FW_SERIALIZE_OK,
1766  static_cast<FwAssertArgType>(_status)
1767  );
1768 
1769  _status = destFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1770  FW_ASSERT(
1771  _status == Fw::FW_SERIALIZE_OK,
1772  static_cast<FwAssertArgType>(_status)
1773  );
1774 
1775 #if FW_AMPCS_COMPATIBLE
1776  // Serialize the argument size
1777  _status = _logBuff.serializeFrom(
1778  static_cast<U8>(sizeof(U32))
1779  );
1780  FW_ASSERT(
1781  _status == Fw::FW_SERIALIZE_OK,
1782  static_cast<FwAssertArgType>(_status)
1783  );
1784 #endif
1785  _status = _logBuff.serializeFrom(status);
1786  FW_ASSERT(
1787  _status == Fw::FW_SERIALIZE_OK,
1788  static_cast<FwAssertArgType>(_status)
1789  );
1790 
1791  this->m_eventOut_OutputPort[0].invoke(
1792  _id,
1793  _logTime,
1795  _logBuff
1796  );
1797  }
1798 
1799  // Emit the event on the text log port
1800 #if FW_ENABLE_TEXT_LOGGING
1801  if (this->m_LogText_OutputPort[0].isConnected()) {
1802 #if FW_OBJECT_NAMES == 1
1803  const char* _formatString =
1804  "(%s) %s: Could not move file %s to file %s, returned status %" PRIu32 "";
1805 #else
1806  const char* _formatString =
1807  "%s: Could not move file %s to file %s, returned status %" PRIu32 "";
1808 #endif
1809 
1810  Fw::TextLogString _logString;
1811  _logString.format(
1812  _formatString,
1813 #if FW_OBJECT_NAMES == 1
1814  this->m_objName.toChar(),
1815 #endif
1816  "FileMoveError ",
1817  sourceFileName.toChar(),
1818  destFileName.toChar(),
1819  status
1820  );
1821 
1822  this->m_LogText_OutputPort[0].invoke(
1823  _id,
1824  _logTime,
1826  _logString
1827  );
1828  }
1829 #endif
1830  }
1831 
1834  const Fw::StringBase& fileName,
1835  U32 status
1836  ) const
1837  {
1838  // Get the time
1839  Fw::Time _logTime;
1840  if (this->m_timeCaller_OutputPort[0].isConnected()) {
1841  this->m_timeCaller_OutputPort[0].invoke(_logTime);
1842  }
1843 
1844  FwEventIdType _id = static_cast<FwEventIdType>(0);
1845 
1846  _id = this->getIdBase() + EVENTID_FILEREMOVEERROR;
1847 
1848  // Emit the event on the log port
1849  if (this->m_eventOut_OutputPort[0].isConnected()) {
1850  Fw::LogBuffer _logBuff;
1852 
1853 #if FW_AMPCS_COMPATIBLE
1854  // Serialize the number of arguments
1855  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1856  FW_ASSERT(
1857  _status == Fw::FW_SERIALIZE_OK,
1858  static_cast<FwAssertArgType>(_status)
1859  );
1860 #endif
1861 
1862  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1863  FW_ASSERT(
1864  _status == Fw::FW_SERIALIZE_OK,
1865  static_cast<FwAssertArgType>(_status)
1866  );
1867 
1868 #if FW_AMPCS_COMPATIBLE
1869  // Serialize the argument size
1870  _status = _logBuff.serializeFrom(
1871  static_cast<U8>(sizeof(U32))
1872  );
1873  FW_ASSERT(
1874  _status == Fw::FW_SERIALIZE_OK,
1875  static_cast<FwAssertArgType>(_status)
1876  );
1877 #endif
1878  _status = _logBuff.serializeFrom(status);
1879  FW_ASSERT(
1880  _status == Fw::FW_SERIALIZE_OK,
1881  static_cast<FwAssertArgType>(_status)
1882  );
1883 
1884  this->m_eventOut_OutputPort[0].invoke(
1885  _id,
1886  _logTime,
1888  _logBuff
1889  );
1890  }
1891 
1892  // Emit the event on the text log port
1893 #if FW_ENABLE_TEXT_LOGGING
1894  if (this->m_LogText_OutputPort[0].isConnected()) {
1895 #if FW_OBJECT_NAMES == 1
1896  const char* _formatString =
1897  "(%s) %s: Could not remove file %s, returned status %" PRIu32 "";
1898 #else
1899  const char* _formatString =
1900  "%s: Could not remove file %s, returned status %" PRIu32 "";
1901 #endif
1902 
1903  Fw::TextLogString _logString;
1904  _logString.format(
1905  _formatString,
1906 #if FW_OBJECT_NAMES == 1
1907  this->m_objName.toChar(),
1908 #endif
1909  "FileRemoveError ",
1910  fileName.toChar(),
1911  status
1912  );
1913 
1914  this->m_LogText_OutputPort[0].invoke(
1915  _id,
1916  _logTime,
1918  _logString
1919  );
1920  }
1921 #endif
1922  }
1923 
1926  const Fw::StringBase& command,
1927  U32 status
1928  ) const
1929  {
1930  // Get the time
1931  Fw::Time _logTime;
1932  if (this->m_timeCaller_OutputPort[0].isConnected()) {
1933  this->m_timeCaller_OutputPort[0].invoke(_logTime);
1934  }
1935 
1936  FwEventIdType _id = static_cast<FwEventIdType>(0);
1937 
1938  _id = this->getIdBase() + EVENTID_SHELLCOMMANDFAILED;
1939 
1940  // Emit the event on the log port
1941  if (this->m_eventOut_OutputPort[0].isConnected()) {
1942  Fw::LogBuffer _logBuff;
1944 
1945 #if FW_AMPCS_COMPATIBLE
1946  // Serialize the number of arguments
1947  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1948  FW_ASSERT(
1949  _status == Fw::FW_SERIALIZE_OK,
1950  static_cast<FwAssertArgType>(_status)
1951  );
1952 #endif
1953 
1954  _status = command.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 256));
1955  FW_ASSERT(
1956  _status == Fw::FW_SERIALIZE_OK,
1957  static_cast<FwAssertArgType>(_status)
1958  );
1959 
1960 #if FW_AMPCS_COMPATIBLE
1961  // Serialize the argument size
1962  _status = _logBuff.serializeFrom(
1963  static_cast<U8>(sizeof(U32))
1964  );
1965  FW_ASSERT(
1966  _status == Fw::FW_SERIALIZE_OK,
1967  static_cast<FwAssertArgType>(_status)
1968  );
1969 #endif
1970  _status = _logBuff.serializeFrom(status);
1971  FW_ASSERT(
1972  _status == Fw::FW_SERIALIZE_OK,
1973  static_cast<FwAssertArgType>(_status)
1974  );
1975 
1976  this->m_eventOut_OutputPort[0].invoke(
1977  _id,
1978  _logTime,
1980  _logBuff
1981  );
1982  }
1983 
1984  // Emit the event on the text log port
1985 #if FW_ENABLE_TEXT_LOGGING
1986  if (this->m_LogText_OutputPort[0].isConnected()) {
1987 #if FW_OBJECT_NAMES == 1
1988  const char* _formatString =
1989  "(%s) %s: Shell command %s failed with status %" PRIu32 "";
1990 #else
1991  const char* _formatString =
1992  "%s: Shell command %s failed with status %" PRIu32 "";
1993 #endif
1994 
1995  Fw::TextLogString _logString;
1996  _logString.format(
1997  _formatString,
1998 #if FW_OBJECT_NAMES == 1
1999  this->m_objName.toChar(),
2000 #endif
2001  "ShellCommandFailed ",
2002  command.toChar(),
2003  status
2004  );
2005 
2006  this->m_LogText_OutputPort[0].invoke(
2007  _id,
2008  _logTime,
2010  _logString
2011  );
2012  }
2013 #endif
2014  }
2015 
2018  const Fw::StringBase& source,
2019  const Fw::StringBase& target,
2020  U32 status
2021  ) const
2022  {
2023  // Get the time
2024  Fw::Time _logTime;
2025  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2026  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2027  }
2028 
2029  FwEventIdType _id = static_cast<FwEventIdType>(0);
2030 
2031  _id = this->getIdBase() + EVENTID_APPENDFILEFAILED;
2032 
2033  // Emit the event on the log port
2034  if (this->m_eventOut_OutputPort[0].isConnected()) {
2035  Fw::LogBuffer _logBuff;
2037 
2038 #if FW_AMPCS_COMPATIBLE
2039  // Serialize the number of arguments
2040  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2041  FW_ASSERT(
2042  _status == Fw::FW_SERIALIZE_OK,
2043  static_cast<FwAssertArgType>(_status)
2044  );
2045 #endif
2046 
2047  _status = source.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2048  FW_ASSERT(
2049  _status == Fw::FW_SERIALIZE_OK,
2050  static_cast<FwAssertArgType>(_status)
2051  );
2052 
2053  _status = target.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2054  FW_ASSERT(
2055  _status == Fw::FW_SERIALIZE_OK,
2056  static_cast<FwAssertArgType>(_status)
2057  );
2058 
2059 #if FW_AMPCS_COMPATIBLE
2060  // Serialize the argument size
2061  _status = _logBuff.serializeFrom(
2062  static_cast<U8>(sizeof(U32))
2063  );
2064  FW_ASSERT(
2065  _status == Fw::FW_SERIALIZE_OK,
2066  static_cast<FwAssertArgType>(_status)
2067  );
2068 #endif
2069  _status = _logBuff.serializeFrom(status);
2070  FW_ASSERT(
2071  _status == Fw::FW_SERIALIZE_OK,
2072  static_cast<FwAssertArgType>(_status)
2073  );
2074 
2075  this->m_eventOut_OutputPort[0].invoke(
2076  _id,
2077  _logTime,
2079  _logBuff
2080  );
2081  }
2082 
2083  // Emit the event on the text log port
2084 #if FW_ENABLE_TEXT_LOGGING
2085  if (this->m_LogText_OutputPort[0].isConnected()) {
2086 #if FW_OBJECT_NAMES == 1
2087  const char* _formatString =
2088  "(%s) %s: Appending %s onto %s failed with status %" PRIu32 "";
2089 #else
2090  const char* _formatString =
2091  "%s: Appending %s onto %s failed with status %" PRIu32 "";
2092 #endif
2093 
2094  Fw::TextLogString _logString;
2095  _logString.format(
2096  _formatString,
2097 #if FW_OBJECT_NAMES == 1
2098  this->m_objName.toChar(),
2099 #endif
2100  "AppendFileFailed ",
2101  source.toChar(),
2102  target.toChar(),
2103  status
2104  );
2105 
2106  this->m_LogText_OutputPort[0].invoke(
2107  _id,
2108  _logTime,
2110  _logString
2111  );
2112  }
2113 #endif
2114  }
2115 
2118  const Fw::StringBase& source,
2119  const Fw::StringBase& target
2120  ) const
2121  {
2122  // Get the time
2123  Fw::Time _logTime;
2124  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2125  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2126  }
2127 
2128  FwEventIdType _id = static_cast<FwEventIdType>(0);
2129 
2130  _id = this->getIdBase() + EVENTID_APPENDFILESUCCEEDED;
2131 
2132  // Emit the event on the log port
2133  if (this->m_eventOut_OutputPort[0].isConnected()) {
2134  Fw::LogBuffer _logBuff;
2136 
2137 #if FW_AMPCS_COMPATIBLE
2138  // Serialize the number of arguments
2139  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2140  FW_ASSERT(
2141  _status == Fw::FW_SERIALIZE_OK,
2142  static_cast<FwAssertArgType>(_status)
2143  );
2144 #endif
2145 
2146  _status = source.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2147  FW_ASSERT(
2148  _status == Fw::FW_SERIALIZE_OK,
2149  static_cast<FwAssertArgType>(_status)
2150  );
2151 
2152  _status = target.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2153  FW_ASSERT(
2154  _status == Fw::FW_SERIALIZE_OK,
2155  static_cast<FwAssertArgType>(_status)
2156  );
2157 
2158  this->m_eventOut_OutputPort[0].invoke(
2159  _id,
2160  _logTime,
2162  _logBuff
2163  );
2164  }
2165 
2166  // Emit the event on the text log port
2167 #if FW_ENABLE_TEXT_LOGGING
2168  if (this->m_LogText_OutputPort[0].isConnected()) {
2169 #if FW_OBJECT_NAMES == 1
2170  const char* _formatString =
2171  "(%s) %s: Appended %s to the end of %s";
2172 #else
2173  const char* _formatString =
2174  "%s: Appended %s to the end of %s";
2175 #endif
2176 
2177  Fw::TextLogString _logString;
2178  _logString.format(
2179  _formatString,
2180 #if FW_OBJECT_NAMES == 1
2181  this->m_objName.toChar(),
2182 #endif
2183  "AppendFileSucceeded ",
2184  source.toChar(),
2185  target.toChar()
2186  );
2187 
2188  this->m_LogText_OutputPort[0].invoke(
2189  _id,
2190  _logTime,
2192  _logString
2193  );
2194  }
2195 #endif
2196  }
2197 
2200  {
2201  // Get the time
2202  Fw::Time _logTime;
2203  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2204  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2205  }
2206 
2207  FwEventIdType _id = static_cast<FwEventIdType>(0);
2208 
2209  _id = this->getIdBase() + EVENTID_SHELLCOMMANDSUCCEEDED;
2210 
2211  // Emit the event on the log port
2212  if (this->m_eventOut_OutputPort[0].isConnected()) {
2213  Fw::LogBuffer _logBuff;
2215 
2216 #if FW_AMPCS_COMPATIBLE
2217  // Serialize the number of arguments
2218  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2219  FW_ASSERT(
2220  _status == Fw::FW_SERIALIZE_OK,
2221  static_cast<FwAssertArgType>(_status)
2222  );
2223 #endif
2224 
2225  _status = command.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2226  FW_ASSERT(
2227  _status == Fw::FW_SERIALIZE_OK,
2228  static_cast<FwAssertArgType>(_status)
2229  );
2230 
2231  this->m_eventOut_OutputPort[0].invoke(
2232  _id,
2233  _logTime,
2235  _logBuff
2236  );
2237  }
2238 
2239  // Emit the event on the text log port
2240 #if FW_ENABLE_TEXT_LOGGING
2241  if (this->m_LogText_OutputPort[0].isConnected()) {
2242 #if FW_OBJECT_NAMES == 1
2243  const char* _formatString =
2244  "(%s) %s: Shell command %s succeeded";
2245 #else
2246  const char* _formatString =
2247  "%s: Shell command %s succeeded";
2248 #endif
2249 
2250  Fw::TextLogString _logString;
2251  _logString.format(
2252  _formatString,
2253 #if FW_OBJECT_NAMES == 1
2254  this->m_objName.toChar(),
2255 #endif
2256  "ShellCommandSucceeded ",
2257  command.toChar()
2258  );
2259 
2260  this->m_LogText_OutputPort[0].invoke(
2261  _id,
2262  _logTime,
2264  _logString
2265  );
2266  }
2267 #endif
2268  }
2269 
2272  {
2273  // Get the time
2274  Fw::Time _logTime;
2275  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2276  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2277  }
2278 
2279  FwEventIdType _id = static_cast<FwEventIdType>(0);
2280 
2282 
2283  // Emit the event on the log port
2284  if (this->m_eventOut_OutputPort[0].isConnected()) {
2285  Fw::LogBuffer _logBuff;
2287 
2288 #if FW_AMPCS_COMPATIBLE
2289  // Serialize the number of arguments
2290  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2291  FW_ASSERT(
2292  _status == Fw::FW_SERIALIZE_OK,
2293  static_cast<FwAssertArgType>(_status)
2294  );
2295 #endif
2296 
2297  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2298  FW_ASSERT(
2299  _status == Fw::FW_SERIALIZE_OK,
2300  static_cast<FwAssertArgType>(_status)
2301  );
2302 
2303  this->m_eventOut_OutputPort[0].invoke(
2304  _id,
2305  _logTime,
2307  _logBuff
2308  );
2309  }
2310 
2311  // Emit the event on the text log port
2312 #if FW_ENABLE_TEXT_LOGGING
2313  if (this->m_LogText_OutputPort[0].isConnected()) {
2314 #if FW_OBJECT_NAMES == 1
2315  const char* _formatString =
2316  "(%s) %s: Created directory %s successfully";
2317 #else
2318  const char* _formatString =
2319  "%s: Created directory %s successfully";
2320 #endif
2321 
2322  Fw::TextLogString _logString;
2323  _logString.format(
2324  _formatString,
2325 #if FW_OBJECT_NAMES == 1
2326  this->m_objName.toChar(),
2327 #endif
2328  "CreateDirectorySucceeded ",
2329  dirName.toChar()
2330  );
2331 
2332  this->m_LogText_OutputPort[0].invoke(
2333  _id,
2334  _logTime,
2336  _logString
2337  );
2338  }
2339 #endif
2340  }
2341 
2344  {
2345  // Get the time
2346  Fw::Time _logTime;
2347  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2348  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2349  }
2350 
2351  FwEventIdType _id = static_cast<FwEventIdType>(0);
2352 
2354 
2355  // Emit the event on the log port
2356  if (this->m_eventOut_OutputPort[0].isConnected()) {
2357  Fw::LogBuffer _logBuff;
2359 
2360 #if FW_AMPCS_COMPATIBLE
2361  // Serialize the number of arguments
2362  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2363  FW_ASSERT(
2364  _status == Fw::FW_SERIALIZE_OK,
2365  static_cast<FwAssertArgType>(_status)
2366  );
2367 #endif
2368 
2369  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2370  FW_ASSERT(
2371  _status == Fw::FW_SERIALIZE_OK,
2372  static_cast<FwAssertArgType>(_status)
2373  );
2374 
2375  this->m_eventOut_OutputPort[0].invoke(
2376  _id,
2377  _logTime,
2379  _logBuff
2380  );
2381  }
2382 
2383  // Emit the event on the text log port
2384 #if FW_ENABLE_TEXT_LOGGING
2385  if (this->m_LogText_OutputPort[0].isConnected()) {
2386 #if FW_OBJECT_NAMES == 1
2387  const char* _formatString =
2388  "(%s) %s: Removed directory %s successfully";
2389 #else
2390  const char* _formatString =
2391  "%s: Removed directory %s successfully";
2392 #endif
2393 
2394  Fw::TextLogString _logString;
2395  _logString.format(
2396  _formatString,
2397 #if FW_OBJECT_NAMES == 1
2398  this->m_objName.toChar(),
2399 #endif
2400  "RemoveDirectorySucceeded ",
2401  dirName.toChar()
2402  );
2403 
2404  this->m_LogText_OutputPort[0].invoke(
2405  _id,
2406  _logTime,
2408  _logString
2409  );
2410  }
2411 #endif
2412  }
2413 
2416  const Fw::StringBase& sourceFileName,
2417  const Fw::StringBase& destFileName
2418  ) const
2419  {
2420  // Get the time
2421  Fw::Time _logTime;
2422  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2423  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2424  }
2425 
2426  FwEventIdType _id = static_cast<FwEventIdType>(0);
2427 
2428  _id = this->getIdBase() + EVENTID_MOVEFILESUCCEEDED;
2429 
2430  // Emit the event on the log port
2431  if (this->m_eventOut_OutputPort[0].isConnected()) {
2432  Fw::LogBuffer _logBuff;
2434 
2435 #if FW_AMPCS_COMPATIBLE
2436  // Serialize the number of arguments
2437  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2438  FW_ASSERT(
2439  _status == Fw::FW_SERIALIZE_OK,
2440  static_cast<FwAssertArgType>(_status)
2441  );
2442 #endif
2443 
2444  _status = sourceFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2445  FW_ASSERT(
2446  _status == Fw::FW_SERIALIZE_OK,
2447  static_cast<FwAssertArgType>(_status)
2448  );
2449 
2450  _status = destFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2451  FW_ASSERT(
2452  _status == Fw::FW_SERIALIZE_OK,
2453  static_cast<FwAssertArgType>(_status)
2454  );
2455 
2456  this->m_eventOut_OutputPort[0].invoke(
2457  _id,
2458  _logTime,
2460  _logBuff
2461  );
2462  }
2463 
2464  // Emit the event on the text log port
2465 #if FW_ENABLE_TEXT_LOGGING
2466  if (this->m_LogText_OutputPort[0].isConnected()) {
2467 #if FW_OBJECT_NAMES == 1
2468  const char* _formatString =
2469  "(%s) %s: Moved file %s to file %s successfully";
2470 #else
2471  const char* _formatString =
2472  "%s: Moved file %s to file %s successfully";
2473 #endif
2474 
2475  Fw::TextLogString _logString;
2476  _logString.format(
2477  _formatString,
2478 #if FW_OBJECT_NAMES == 1
2479  this->m_objName.toChar(),
2480 #endif
2481  "MoveFileSucceeded ",
2482  sourceFileName.toChar(),
2483  destFileName.toChar()
2484  );
2485 
2486  this->m_LogText_OutputPort[0].invoke(
2487  _id,
2488  _logTime,
2490  _logString
2491  );
2492  }
2493 #endif
2494  }
2495 
2498  {
2499  // Get the time
2500  Fw::Time _logTime;
2501  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2502  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2503  }
2504 
2505  FwEventIdType _id = static_cast<FwEventIdType>(0);
2506 
2507  _id = this->getIdBase() + EVENTID_REMOVEFILESUCCEEDED;
2508 
2509  // Emit the event on the log port
2510  if (this->m_eventOut_OutputPort[0].isConnected()) {
2511  Fw::LogBuffer _logBuff;
2513 
2514 #if FW_AMPCS_COMPATIBLE
2515  // Serialize the number of arguments
2516  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2517  FW_ASSERT(
2518  _status == Fw::FW_SERIALIZE_OK,
2519  static_cast<FwAssertArgType>(_status)
2520  );
2521 #endif
2522 
2523  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2524  FW_ASSERT(
2525  _status == Fw::FW_SERIALIZE_OK,
2526  static_cast<FwAssertArgType>(_status)
2527  );
2528 
2529  this->m_eventOut_OutputPort[0].invoke(
2530  _id,
2531  _logTime,
2533  _logBuff
2534  );
2535  }
2536 
2537  // Emit the event on the text log port
2538 #if FW_ENABLE_TEXT_LOGGING
2539  if (this->m_LogText_OutputPort[0].isConnected()) {
2540 #if FW_OBJECT_NAMES == 1
2541  const char* _formatString =
2542  "(%s) %s: Removed file %s successfully";
2543 #else
2544  const char* _formatString =
2545  "%s: Removed file %s successfully";
2546 #endif
2547 
2548  Fw::TextLogString _logString;
2549  _logString.format(
2550  _formatString,
2551 #if FW_OBJECT_NAMES == 1
2552  this->m_objName.toChar(),
2553 #endif
2554  "RemoveFileSucceeded ",
2555  fileName.toChar()
2556  );
2557 
2558  this->m_LogText_OutputPort[0].invoke(
2559  _id,
2560  _logTime,
2562  _logString
2563  );
2564  }
2565 #endif
2566  }
2567 
2570  const Fw::StringBase& source,
2571  const Fw::StringBase& target
2572  ) const
2573  {
2574  // Get the time
2575  Fw::Time _logTime;
2576  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2577  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2578  }
2579 
2580  FwEventIdType _id = static_cast<FwEventIdType>(0);
2581 
2582  _id = this->getIdBase() + EVENTID_APPENDFILESTARTED;
2583 
2584  // Emit the event on the log port
2585  if (this->m_eventOut_OutputPort[0].isConnected()) {
2586  Fw::LogBuffer _logBuff;
2588 
2589 #if FW_AMPCS_COMPATIBLE
2590  // Serialize the number of arguments
2591  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2592  FW_ASSERT(
2593  _status == Fw::FW_SERIALIZE_OK,
2594  static_cast<FwAssertArgType>(_status)
2595  );
2596 #endif
2597 
2598  _status = source.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2599  FW_ASSERT(
2600  _status == Fw::FW_SERIALIZE_OK,
2601  static_cast<FwAssertArgType>(_status)
2602  );
2603 
2604  _status = target.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2605  FW_ASSERT(
2606  _status == Fw::FW_SERIALIZE_OK,
2607  static_cast<FwAssertArgType>(_status)
2608  );
2609 
2610  this->m_eventOut_OutputPort[0].invoke(
2611  _id,
2612  _logTime,
2614  _logBuff
2615  );
2616  }
2617 
2618  // Emit the event on the text log port
2619 #if FW_ENABLE_TEXT_LOGGING
2620  if (this->m_LogText_OutputPort[0].isConnected()) {
2621 #if FW_OBJECT_NAMES == 1
2622  const char* _formatString =
2623  "(%s) %s: Appending file %s to the end of %s...";
2624 #else
2625  const char* _formatString =
2626  "%s: Appending file %s to the end of %s...";
2627 #endif
2628 
2629  Fw::TextLogString _logString;
2630  _logString.format(
2631  _formatString,
2632 #if FW_OBJECT_NAMES == 1
2633  this->m_objName.toChar(),
2634 #endif
2635  "AppendFileStarted ",
2636  source.toChar(),
2637  target.toChar()
2638  );
2639 
2640  this->m_LogText_OutputPort[0].invoke(
2641  _id,
2642  _logTime,
2644  _logString
2645  );
2646  }
2647 #endif
2648  }
2649 
2652  {
2653  // Get the time
2654  Fw::Time _logTime;
2655  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2656  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2657  }
2658 
2659  FwEventIdType _id = static_cast<FwEventIdType>(0);
2660 
2661  _id = this->getIdBase() + EVENTID_SHELLCOMMANDSTARTED;
2662 
2663  // Emit the event on the log port
2664  if (this->m_eventOut_OutputPort[0].isConnected()) {
2665  Fw::LogBuffer _logBuff;
2667 
2668 #if FW_AMPCS_COMPATIBLE
2669  // Serialize the number of arguments
2670  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2671  FW_ASSERT(
2672  _status == Fw::FW_SERIALIZE_OK,
2673  static_cast<FwAssertArgType>(_status)
2674  );
2675 #endif
2676 
2677  _status = command.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 256));
2678  FW_ASSERT(
2679  _status == Fw::FW_SERIALIZE_OK,
2680  static_cast<FwAssertArgType>(_status)
2681  );
2682 
2683  this->m_eventOut_OutputPort[0].invoke(
2684  _id,
2685  _logTime,
2687  _logBuff
2688  );
2689  }
2690 
2691  // Emit the event on the text log port
2692 #if FW_ENABLE_TEXT_LOGGING
2693  if (this->m_LogText_OutputPort[0].isConnected()) {
2694 #if FW_OBJECT_NAMES == 1
2695  const char* _formatString =
2696  "(%s) %s: Running shell command %s...";
2697 #else
2698  const char* _formatString =
2699  "%s: Running shell command %s...";
2700 #endif
2701 
2702  Fw::TextLogString _logString;
2703  _logString.format(
2704  _formatString,
2705 #if FW_OBJECT_NAMES == 1
2706  this->m_objName.toChar(),
2707 #endif
2708  "ShellCommandStarted ",
2709  command.toChar()
2710  );
2711 
2712  this->m_LogText_OutputPort[0].invoke(
2713  _id,
2714  _logTime,
2716  _logString
2717  );
2718  }
2719 #endif
2720  }
2721 
2724  {
2725  // Get the time
2726  Fw::Time _logTime;
2727  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2728  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2729  }
2730 
2731  FwEventIdType _id = static_cast<FwEventIdType>(0);
2732 
2733  _id = this->getIdBase() + EVENTID_CREATEDIRECTORYSTARTED;
2734 
2735  // Emit the event on the log port
2736  if (this->m_eventOut_OutputPort[0].isConnected()) {
2737  Fw::LogBuffer _logBuff;
2739 
2740 #if FW_AMPCS_COMPATIBLE
2741  // Serialize the number of arguments
2742  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2743  FW_ASSERT(
2744  _status == Fw::FW_SERIALIZE_OK,
2745  static_cast<FwAssertArgType>(_status)
2746  );
2747 #endif
2748 
2749  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2750  FW_ASSERT(
2751  _status == Fw::FW_SERIALIZE_OK,
2752  static_cast<FwAssertArgType>(_status)
2753  );
2754 
2755  this->m_eventOut_OutputPort[0].invoke(
2756  _id,
2757  _logTime,
2759  _logBuff
2760  );
2761  }
2762 
2763  // Emit the event on the text log port
2764 #if FW_ENABLE_TEXT_LOGGING
2765  if (this->m_LogText_OutputPort[0].isConnected()) {
2766 #if FW_OBJECT_NAMES == 1
2767  const char* _formatString =
2768  "(%s) %s: Creating directory %s...";
2769 #else
2770  const char* _formatString =
2771  "%s: Creating directory %s...";
2772 #endif
2773 
2774  Fw::TextLogString _logString;
2775  _logString.format(
2776  _formatString,
2777 #if FW_OBJECT_NAMES == 1
2778  this->m_objName.toChar(),
2779 #endif
2780  "CreateDirectoryStarted ",
2781  dirName.toChar()
2782  );
2783 
2784  this->m_LogText_OutputPort[0].invoke(
2785  _id,
2786  _logTime,
2788  _logString
2789  );
2790  }
2791 #endif
2792  }
2793 
2796  {
2797  // Get the time
2798  Fw::Time _logTime;
2799  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2800  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2801  }
2802 
2803  FwEventIdType _id = static_cast<FwEventIdType>(0);
2804 
2805  _id = this->getIdBase() + EVENTID_REMOVEDIRECTORYSTARTED;
2806 
2807  // Emit the event on the log port
2808  if (this->m_eventOut_OutputPort[0].isConnected()) {
2809  Fw::LogBuffer _logBuff;
2811 
2812 #if FW_AMPCS_COMPATIBLE
2813  // Serialize the number of arguments
2814  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2815  FW_ASSERT(
2816  _status == Fw::FW_SERIALIZE_OK,
2817  static_cast<FwAssertArgType>(_status)
2818  );
2819 #endif
2820 
2821  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2822  FW_ASSERT(
2823  _status == Fw::FW_SERIALIZE_OK,
2824  static_cast<FwAssertArgType>(_status)
2825  );
2826 
2827  this->m_eventOut_OutputPort[0].invoke(
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->m_LogText_OutputPort[0].isConnected()) {
2838 #if FW_OBJECT_NAMES == 1
2839  const char* _formatString =
2840  "(%s) %s: Removing directory %s...";
2841 #else
2842  const char* _formatString =
2843  "%s: Removing directory %s...";
2844 #endif
2845 
2846  Fw::TextLogString _logString;
2847  _logString.format(
2848  _formatString,
2849 #if FW_OBJECT_NAMES == 1
2850  this->m_objName.toChar(),
2851 #endif
2852  "RemoveDirectoryStarted ",
2853  dirName.toChar()
2854  );
2855 
2856  this->m_LogText_OutputPort[0].invoke(
2857  _id,
2858  _logTime,
2860  _logString
2861  );
2862  }
2863 #endif
2864  }
2865 
2868  const Fw::StringBase& sourceFileName,
2869  const Fw::StringBase& destFileName
2870  ) const
2871  {
2872  // Get the time
2873  Fw::Time _logTime;
2874  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2875  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2876  }
2877 
2878  FwEventIdType _id = static_cast<FwEventIdType>(0);
2879 
2880  _id = this->getIdBase() + EVENTID_MOVEFILESTARTED;
2881 
2882  // Emit the event on the log port
2883  if (this->m_eventOut_OutputPort[0].isConnected()) {
2884  Fw::LogBuffer _logBuff;
2886 
2887 #if FW_AMPCS_COMPATIBLE
2888  // Serialize the number of arguments
2889  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2890  FW_ASSERT(
2891  _status == Fw::FW_SERIALIZE_OK,
2892  static_cast<FwAssertArgType>(_status)
2893  );
2894 #endif
2895 
2896  _status = sourceFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2897  FW_ASSERT(
2898  _status == Fw::FW_SERIALIZE_OK,
2899  static_cast<FwAssertArgType>(_status)
2900  );
2901 
2902  _status = destFileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2903  FW_ASSERT(
2904  _status == Fw::FW_SERIALIZE_OK,
2905  static_cast<FwAssertArgType>(_status)
2906  );
2907 
2908  this->m_eventOut_OutputPort[0].invoke(
2909  _id,
2910  _logTime,
2912  _logBuff
2913  );
2914  }
2915 
2916  // Emit the event on the text log port
2917 #if FW_ENABLE_TEXT_LOGGING
2918  if (this->m_LogText_OutputPort[0].isConnected()) {
2919 #if FW_OBJECT_NAMES == 1
2920  const char* _formatString =
2921  "(%s) %s: Moving file %s to file %s...";
2922 #else
2923  const char* _formatString =
2924  "%s: Moving file %s to file %s...";
2925 #endif
2926 
2927  Fw::TextLogString _logString;
2928  _logString.format(
2929  _formatString,
2930 #if FW_OBJECT_NAMES == 1
2931  this->m_objName.toChar(),
2932 #endif
2933  "MoveFileStarted ",
2934  sourceFileName.toChar(),
2935  destFileName.toChar()
2936  );
2937 
2938  this->m_LogText_OutputPort[0].invoke(
2939  _id,
2940  _logTime,
2942  _logString
2943  );
2944  }
2945 #endif
2946  }
2947 
2950  {
2951  // Get the time
2952  Fw::Time _logTime;
2953  if (this->m_timeCaller_OutputPort[0].isConnected()) {
2954  this->m_timeCaller_OutputPort[0].invoke(_logTime);
2955  }
2956 
2957  FwEventIdType _id = static_cast<FwEventIdType>(0);
2958 
2959  _id = this->getIdBase() + EVENTID_REMOVEFILESTARTED;
2960 
2961  // Emit the event on the log port
2962  if (this->m_eventOut_OutputPort[0].isConnected()) {
2963  Fw::LogBuffer _logBuff;
2965 
2966 #if FW_AMPCS_COMPATIBLE
2967  // Serialize the number of arguments
2968  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2969  FW_ASSERT(
2970  _status == Fw::FW_SERIALIZE_OK,
2971  static_cast<FwAssertArgType>(_status)
2972  );
2973 #endif
2974 
2975  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
2976  FW_ASSERT(
2977  _status == Fw::FW_SERIALIZE_OK,
2978  static_cast<FwAssertArgType>(_status)
2979  );
2980 
2981  this->m_eventOut_OutputPort[0].invoke(
2982  _id,
2983  _logTime,
2985  _logBuff
2986  );
2987  }
2988 
2989  // Emit the event on the text log port
2990 #if FW_ENABLE_TEXT_LOGGING
2991  if (this->m_LogText_OutputPort[0].isConnected()) {
2992 #if FW_OBJECT_NAMES == 1
2993  const char* _formatString =
2994  "(%s) %s: Removing file %s...";
2995 #else
2996  const char* _formatString =
2997  "%s: Removing file %s...";
2998 #endif
2999 
3000  Fw::TextLogString _logString;
3001  _logString.format(
3002  _formatString,
3003 #if FW_OBJECT_NAMES == 1
3004  this->m_objName.toChar(),
3005 #endif
3006  "RemoveFileStarted ",
3007  fileName.toChar()
3008  );
3009 
3010  this->m_LogText_OutputPort[0].invoke(
3011  _id,
3012  _logTime,
3014  _logString
3015  );
3016  }
3017 #endif
3018  }
3019 
3022  const Fw::StringBase& fileName,
3023  FwSizeType size
3024  ) const
3025  {
3026  // Get the time
3027  Fw::Time _logTime;
3028  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3029  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3030  }
3031 
3032  FwEventIdType _id = static_cast<FwEventIdType>(0);
3033 
3034  _id = this->getIdBase() + EVENTID_FILESIZESUCCEEDED;
3035 
3036  // Emit the event on the log port
3037  if (this->m_eventOut_OutputPort[0].isConnected()) {
3038  Fw::LogBuffer _logBuff;
3040 
3041 #if FW_AMPCS_COMPATIBLE
3042  // Serialize the number of arguments
3043  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3044  FW_ASSERT(
3045  _status == Fw::FW_SERIALIZE_OK,
3046  static_cast<FwAssertArgType>(_status)
3047  );
3048 #endif
3049 
3050  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3051  FW_ASSERT(
3052  _status == Fw::FW_SERIALIZE_OK,
3053  static_cast<FwAssertArgType>(_status)
3054  );
3055 
3056 #if FW_AMPCS_COMPATIBLE
3057  // Serialize the argument size
3058  _status = _logBuff.serializeFrom(
3059  static_cast<U8>(sizeof(FwSizeType))
3060  );
3061  FW_ASSERT(
3062  _status == Fw::FW_SERIALIZE_OK,
3063  static_cast<FwAssertArgType>(_status)
3064  );
3065 #endif
3066  _status = _logBuff.serializeFrom(size);
3067  FW_ASSERT(
3068  _status == Fw::FW_SERIALIZE_OK,
3069  static_cast<FwAssertArgType>(_status)
3070  );
3071 
3072  this->m_eventOut_OutputPort[0].invoke(
3073  _id,
3074  _logTime,
3076  _logBuff
3077  );
3078  }
3079 
3080  // Emit the event on the text log port
3081 #if FW_ENABLE_TEXT_LOGGING
3082  if (this->m_LogText_OutputPort[0].isConnected()) {
3083 #if FW_OBJECT_NAMES == 1
3084  const char* _formatString =
3085  "(%s) %s: The size of file %s is %" PRIu64 " B";
3086 #else
3087  const char* _formatString =
3088  "%s: The size of file %s is %" PRIu64 " B";
3089 #endif
3090 
3091  Fw::TextLogString _logString;
3092  _logString.format(
3093  _formatString,
3094 #if FW_OBJECT_NAMES == 1
3095  this->m_objName.toChar(),
3096 #endif
3097  "FileSizeSucceeded ",
3098  fileName.toChar(),
3099  size
3100  );
3101 
3102  this->m_LogText_OutputPort[0].invoke(
3103  _id,
3104  _logTime,
3106  _logString
3107  );
3108  }
3109 #endif
3110  }
3111 
3114  const Fw::StringBase& fileName,
3115  U32 status
3116  ) const
3117  {
3118  // Get the time
3119  Fw::Time _logTime;
3120  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3121  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3122  }
3123 
3124  FwEventIdType _id = static_cast<FwEventIdType>(0);
3125 
3126  _id = this->getIdBase() + EVENTID_FILESIZEERROR;
3127 
3128  // Emit the event on the log port
3129  if (this->m_eventOut_OutputPort[0].isConnected()) {
3130  Fw::LogBuffer _logBuff;
3132 
3133 #if FW_AMPCS_COMPATIBLE
3134  // Serialize the number of arguments
3135  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3136  FW_ASSERT(
3137  _status == Fw::FW_SERIALIZE_OK,
3138  static_cast<FwAssertArgType>(_status)
3139  );
3140 #endif
3141 
3142  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3143  FW_ASSERT(
3144  _status == Fw::FW_SERIALIZE_OK,
3145  static_cast<FwAssertArgType>(_status)
3146  );
3147 
3148 #if FW_AMPCS_COMPATIBLE
3149  // Serialize the argument size
3150  _status = _logBuff.serializeFrom(
3151  static_cast<U8>(sizeof(U32))
3152  );
3153  FW_ASSERT(
3154  _status == Fw::FW_SERIALIZE_OK,
3155  static_cast<FwAssertArgType>(_status)
3156  );
3157 #endif
3158  _status = _logBuff.serializeFrom(status);
3159  FW_ASSERT(
3160  _status == Fw::FW_SERIALIZE_OK,
3161  static_cast<FwAssertArgType>(_status)
3162  );
3163 
3164  this->m_eventOut_OutputPort[0].invoke(
3165  _id,
3166  _logTime,
3168  _logBuff
3169  );
3170  }
3171 
3172  // Emit the event on the text log port
3173 #if FW_ENABLE_TEXT_LOGGING
3174  if (this->m_LogText_OutputPort[0].isConnected()) {
3175 #if FW_OBJECT_NAMES == 1
3176  const char* _formatString =
3177  "(%s) %s: Failed to get the size of file %s, returned status %" PRIu32 "";
3178 #else
3179  const char* _formatString =
3180  "%s: Failed to get the size of file %s, returned status %" PRIu32 "";
3181 #endif
3182 
3183  Fw::TextLogString _logString;
3184  _logString.format(
3185  _formatString,
3186 #if FW_OBJECT_NAMES == 1
3187  this->m_objName.toChar(),
3188 #endif
3189  "FileSizeError ",
3190  fileName.toChar(),
3191  status
3192  );
3193 
3194  this->m_LogText_OutputPort[0].invoke(
3195  _id,
3196  _logTime,
3198  _logString
3199  );
3200  }
3201 #endif
3202  }
3203 
3206  {
3207  // Get the time
3208  Fw::Time _logTime;
3209  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3210  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3211  }
3212 
3213  FwEventIdType _id = static_cast<FwEventIdType>(0);
3214 
3215  _id = this->getIdBase() + EVENTID_FILESIZESTARTED;
3216 
3217  // Emit the event on the log port
3218  if (this->m_eventOut_OutputPort[0].isConnected()) {
3219  Fw::LogBuffer _logBuff;
3221 
3222 #if FW_AMPCS_COMPATIBLE
3223  // Serialize the number of arguments
3224  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3225  FW_ASSERT(
3226  _status == Fw::FW_SERIALIZE_OK,
3227  static_cast<FwAssertArgType>(_status)
3228  );
3229 #endif
3230 
3231  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3232  FW_ASSERT(
3233  _status == Fw::FW_SERIALIZE_OK,
3234  static_cast<FwAssertArgType>(_status)
3235  );
3236 
3237  this->m_eventOut_OutputPort[0].invoke(
3238  _id,
3239  _logTime,
3241  _logBuff
3242  );
3243  }
3244 
3245  // Emit the event on the text log port
3246 #if FW_ENABLE_TEXT_LOGGING
3247  if (this->m_LogText_OutputPort[0].isConnected()) {
3248 #if FW_OBJECT_NAMES == 1
3249  const char* _formatString =
3250  "(%s) %s: Checking size of file %s...";
3251 #else
3252  const char* _formatString =
3253  "%s: Checking size of file %s...";
3254 #endif
3255 
3256  Fw::TextLogString _logString;
3257  _logString.format(
3258  _formatString,
3259 #if FW_OBJECT_NAMES == 1
3260  this->m_objName.toChar(),
3261 #endif
3262  "FileSizeStarted ",
3263  fileName.toChar()
3264  );
3265 
3266  this->m_LogText_OutputPort[0].invoke(
3267  _id,
3268  _logTime,
3270  _logString
3271  );
3272  }
3273 #endif
3274  }
3275 
3278  {
3279  // Get the time
3280  Fw::Time _logTime;
3281  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3282  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3283  }
3284 
3285  FwEventIdType _id = static_cast<FwEventIdType>(0);
3286 
3287  _id = this->getIdBase() + EVENTID_LISTDIRECTORYSTARTED;
3288 
3289  // Emit the event on the log port
3290  if (this->m_eventOut_OutputPort[0].isConnected()) {
3291  Fw::LogBuffer _logBuff;
3293 
3294 #if FW_AMPCS_COMPATIBLE
3295  // Serialize the number of arguments
3296  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3297  FW_ASSERT(
3298  _status == Fw::FW_SERIALIZE_OK,
3299  static_cast<FwAssertArgType>(_status)
3300  );
3301 #endif
3302 
3303  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3304  FW_ASSERT(
3305  _status == Fw::FW_SERIALIZE_OK,
3306  static_cast<FwAssertArgType>(_status)
3307  );
3308 
3309  this->m_eventOut_OutputPort[0].invoke(
3310  _id,
3311  _logTime,
3313  _logBuff
3314  );
3315  }
3316 
3317  // Emit the event on the text log port
3318 #if FW_ENABLE_TEXT_LOGGING
3319  if (this->m_LogText_OutputPort[0].isConnected()) {
3320 #if FW_OBJECT_NAMES == 1
3321  const char* _formatString =
3322  "(%s) %s: Listing contents of directory %s...";
3323 #else
3324  const char* _formatString =
3325  "%s: Listing contents of directory %s...";
3326 #endif
3327 
3328  Fw::TextLogString _logString;
3329  _logString.format(
3330  _formatString,
3331 #if FW_OBJECT_NAMES == 1
3332  this->m_objName.toChar(),
3333 #endif
3334  "ListDirectoryStarted ",
3335  dirName.toChar()
3336  );
3337 
3338  this->m_LogText_OutputPort[0].invoke(
3339  _id,
3340  _logTime,
3342  _logString
3343  );
3344  }
3345 #endif
3346  }
3347 
3350  const Fw::StringBase& dirName,
3351  U32 fileCount
3352  ) const
3353  {
3354  // Get the time
3355  Fw::Time _logTime;
3356  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3357  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3358  }
3359 
3360  FwEventIdType _id = static_cast<FwEventIdType>(0);
3361 
3362  _id = this->getIdBase() + EVENTID_LISTDIRECTORYSUCCEEDED;
3363 
3364  // Emit the event on the log port
3365  if (this->m_eventOut_OutputPort[0].isConnected()) {
3366  Fw::LogBuffer _logBuff;
3368 
3369 #if FW_AMPCS_COMPATIBLE
3370  // Serialize the number of arguments
3371  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3372  FW_ASSERT(
3373  _status == Fw::FW_SERIALIZE_OK,
3374  static_cast<FwAssertArgType>(_status)
3375  );
3376 #endif
3377 
3378  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3379  FW_ASSERT(
3380  _status == Fw::FW_SERIALIZE_OK,
3381  static_cast<FwAssertArgType>(_status)
3382  );
3383 
3384 #if FW_AMPCS_COMPATIBLE
3385  // Serialize the argument size
3386  _status = _logBuff.serializeFrom(
3387  static_cast<U8>(sizeof(U32))
3388  );
3389  FW_ASSERT(
3390  _status == Fw::FW_SERIALIZE_OK,
3391  static_cast<FwAssertArgType>(_status)
3392  );
3393 #endif
3394  _status = _logBuff.serializeFrom(fileCount);
3395  FW_ASSERT(
3396  _status == Fw::FW_SERIALIZE_OK,
3397  static_cast<FwAssertArgType>(_status)
3398  );
3399 
3400  this->m_eventOut_OutputPort[0].invoke(
3401  _id,
3402  _logTime,
3404  _logBuff
3405  );
3406  }
3407 
3408  // Emit the event on the text log port
3409 #if FW_ENABLE_TEXT_LOGGING
3410  if (this->m_LogText_OutputPort[0].isConnected()) {
3411 #if FW_OBJECT_NAMES == 1
3412  const char* _formatString =
3413  "(%s) %s: Directory %s contains %" PRIu32 " files";
3414 #else
3415  const char* _formatString =
3416  "%s: Directory %s contains %" PRIu32 " files";
3417 #endif
3418 
3419  Fw::TextLogString _logString;
3420  _logString.format(
3421  _formatString,
3422 #if FW_OBJECT_NAMES == 1
3423  this->m_objName.toChar(),
3424 #endif
3425  "ListDirectorySucceeded ",
3426  dirName.toChar(),
3427  fileCount
3428  );
3429 
3430  this->m_LogText_OutputPort[0].invoke(
3431  _id,
3432  _logTime,
3434  _logString
3435  );
3436  }
3437 #endif
3438  }
3439 
3442  const Fw::StringBase& dirName,
3443  U32 status
3444  ) const
3445  {
3446  // Get the time
3447  Fw::Time _logTime;
3448  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3449  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3450  }
3451 
3452  FwEventIdType _id = static_cast<FwEventIdType>(0);
3453 
3454  _id = this->getIdBase() + EVENTID_LISTDIRECTORYERROR;
3455 
3456  // Emit the event on the log port
3457  if (this->m_eventOut_OutputPort[0].isConnected()) {
3458  Fw::LogBuffer _logBuff;
3460 
3461 #if FW_AMPCS_COMPATIBLE
3462  // Serialize the number of arguments
3463  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3464  FW_ASSERT(
3465  _status == Fw::FW_SERIALIZE_OK,
3466  static_cast<FwAssertArgType>(_status)
3467  );
3468 #endif
3469 
3470  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3471  FW_ASSERT(
3472  _status == Fw::FW_SERIALIZE_OK,
3473  static_cast<FwAssertArgType>(_status)
3474  );
3475 
3476 #if FW_AMPCS_COMPATIBLE
3477  // Serialize the argument size
3478  _status = _logBuff.serializeFrom(
3479  static_cast<U8>(sizeof(U32))
3480  );
3481  FW_ASSERT(
3482  _status == Fw::FW_SERIALIZE_OK,
3483  static_cast<FwAssertArgType>(_status)
3484  );
3485 #endif
3486  _status = _logBuff.serializeFrom(status);
3487  FW_ASSERT(
3488  _status == Fw::FW_SERIALIZE_OK,
3489  static_cast<FwAssertArgType>(_status)
3490  );
3491 
3492  this->m_eventOut_OutputPort[0].invoke(
3493  _id,
3494  _logTime,
3496  _logBuff
3497  );
3498  }
3499 
3500  // Emit the event on the text log port
3501 #if FW_ENABLE_TEXT_LOGGING
3502  if (this->m_LogText_OutputPort[0].isConnected()) {
3503 #if FW_OBJECT_NAMES == 1
3504  const char* _formatString =
3505  "(%s) %s: Failed to list directory %s, returned status %" PRIu32 "";
3506 #else
3507  const char* _formatString =
3508  "%s: Failed to list directory %s, returned status %" PRIu32 "";
3509 #endif
3510 
3511  Fw::TextLogString _logString;
3512  _logString.format(
3513  _formatString,
3514 #if FW_OBJECT_NAMES == 1
3515  this->m_objName.toChar(),
3516 #endif
3517  "ListDirectoryError ",
3518  dirName.toChar(),
3519  status
3520  );
3521 
3522  this->m_LogText_OutputPort[0].invoke(
3523  _id,
3524  _logTime,
3526  _logString
3527  );
3528  }
3529 #endif
3530  }
3531 
3534  const Fw::StringBase& dirName,
3535  const Fw::StringBase& fileName,
3536  FwSizeType fileSize
3537  ) const
3538  {
3539  // Get the time
3540  Fw::Time _logTime;
3541  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3542  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3543  }
3544 
3545  FwEventIdType _id = static_cast<FwEventIdType>(0);
3546 
3547  _id = this->getIdBase() + EVENTID_DIRECTORYLISTING;
3548 
3549  // Emit the event on the log port
3550  if (this->m_eventOut_OutputPort[0].isConnected()) {
3551  Fw::LogBuffer _logBuff;
3553 
3554 #if FW_AMPCS_COMPATIBLE
3555  // Serialize the number of arguments
3556  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3557  FW_ASSERT(
3558  _status == Fw::FW_SERIALIZE_OK,
3559  static_cast<FwAssertArgType>(_status)
3560  );
3561 #endif
3562 
3563  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3564  FW_ASSERT(
3565  _status == Fw::FW_SERIALIZE_OK,
3566  static_cast<FwAssertArgType>(_status)
3567  );
3568 
3569  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3570  FW_ASSERT(
3571  _status == Fw::FW_SERIALIZE_OK,
3572  static_cast<FwAssertArgType>(_status)
3573  );
3574 
3575 #if FW_AMPCS_COMPATIBLE
3576  // Serialize the argument size
3577  _status = _logBuff.serializeFrom(
3578  static_cast<U8>(sizeof(FwSizeType))
3579  );
3580  FW_ASSERT(
3581  _status == Fw::FW_SERIALIZE_OK,
3582  static_cast<FwAssertArgType>(_status)
3583  );
3584 #endif
3585  _status = _logBuff.serializeFrom(fileSize);
3586  FW_ASSERT(
3587  _status == Fw::FW_SERIALIZE_OK,
3588  static_cast<FwAssertArgType>(_status)
3589  );
3590 
3591  this->m_eventOut_OutputPort[0].invoke(
3592  _id,
3593  _logTime,
3595  _logBuff
3596  );
3597  }
3598 
3599  // Emit the event on the text log port
3600 #if FW_ENABLE_TEXT_LOGGING
3601  if (this->m_LogText_OutputPort[0].isConnected()) {
3602 #if FW_OBJECT_NAMES == 1
3603  const char* _formatString =
3604  "(%s) %s: Directory %s: %s (%" PRIu64 " bytes)";
3605 #else
3606  const char* _formatString =
3607  "%s: Directory %s: %s (%" PRIu64 " bytes)";
3608 #endif
3609 
3610  Fw::TextLogString _logString;
3611  _logString.format(
3612  _formatString,
3613 #if FW_OBJECT_NAMES == 1
3614  this->m_objName.toChar(),
3615 #endif
3616  "DirectoryListing ",
3617  dirName.toChar(),
3618  fileName.toChar(),
3619  fileSize
3620  );
3621 
3622  this->m_LogText_OutputPort[0].invoke(
3623  _id,
3624  _logTime,
3626  _logString
3627  );
3628  }
3629 #endif
3630  }
3631 
3634  const Fw::StringBase& dirName,
3635  const Fw::StringBase& subdirName
3636  ) const
3637  {
3638  // Get the time
3639  Fw::Time _logTime;
3640  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3641  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3642  }
3643 
3644  FwEventIdType _id = static_cast<FwEventIdType>(0);
3645 
3646  _id = this->getIdBase() + EVENTID_DIRECTORYLISTINGSUBDIR;
3647 
3648  // Emit the event on the log port
3649  if (this->m_eventOut_OutputPort[0].isConnected()) {
3650  Fw::LogBuffer _logBuff;
3652 
3653 #if FW_AMPCS_COMPATIBLE
3654  // Serialize the number of arguments
3655  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3656  FW_ASSERT(
3657  _status == Fw::FW_SERIALIZE_OK,
3658  static_cast<FwAssertArgType>(_status)
3659  );
3660 #endif
3661 
3662  _status = dirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3663  FW_ASSERT(
3664  _status == Fw::FW_SERIALIZE_OK,
3665  static_cast<FwAssertArgType>(_status)
3666  );
3667 
3668  _status = subdirName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3669  FW_ASSERT(
3670  _status == Fw::FW_SERIALIZE_OK,
3671  static_cast<FwAssertArgType>(_status)
3672  );
3673 
3674  this->m_eventOut_OutputPort[0].invoke(
3675  _id,
3676  _logTime,
3678  _logBuff
3679  );
3680  }
3681 
3682  // Emit the event on the text log port
3683 #if FW_ENABLE_TEXT_LOGGING
3684  if (this->m_LogText_OutputPort[0].isConnected()) {
3685 #if FW_OBJECT_NAMES == 1
3686  const char* _formatString =
3687  "(%s) %s: Directory %s: %s";
3688 #else
3689  const char* _formatString =
3690  "%s: Directory %s: %s";
3691 #endif
3692 
3693  Fw::TextLogString _logString;
3694  _logString.format(
3695  _formatString,
3696 #if FW_OBJECT_NAMES == 1
3697  this->m_objName.toChar(),
3698 #endif
3699  "DirectoryListingSubdir ",
3700  dirName.toChar(),
3701  subdirName.toChar()
3702  );
3703 
3704  this->m_LogText_OutputPort[0].invoke(
3705  _id,
3706  _logTime,
3708  _logString
3709  );
3710  }
3711 #endif
3712  }
3713 
3716  {
3717  // Get the time
3718  Fw::Time _logTime;
3719  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3720  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3721  }
3722 
3723  FwEventIdType _id = static_cast<FwEventIdType>(0);
3724 
3725  _id = this->getIdBase() + EVENTID_CALCULATECRCSTARTED;
3726 
3727  // Emit the event on the log port
3728  if (this->m_eventOut_OutputPort[0].isConnected()) {
3729  Fw::LogBuffer _logBuff;
3731 
3732 #if FW_AMPCS_COMPATIBLE
3733  // Serialize the number of arguments
3734  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3735  FW_ASSERT(
3736  _status == Fw::FW_SERIALIZE_OK,
3737  static_cast<FwAssertArgType>(_status)
3738  );
3739 #endif
3740 
3741  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3742  FW_ASSERT(
3743  _status == Fw::FW_SERIALIZE_OK,
3744  static_cast<FwAssertArgType>(_status)
3745  );
3746 
3747  this->m_eventOut_OutputPort[0].invoke(
3748  _id,
3749  _logTime,
3751  _logBuff
3752  );
3753  }
3754 
3755  // Emit the event on the text log port
3756 #if FW_ENABLE_TEXT_LOGGING
3757  if (this->m_LogText_OutputPort[0].isConnected()) {
3758 #if FW_OBJECT_NAMES == 1
3759  const char* _formatString =
3760  "(%s) %s: Started CRC calculation for file %s";
3761 #else
3762  const char* _formatString =
3763  "%s: Started CRC calculation for file %s";
3764 #endif
3765 
3766  Fw::TextLogString _logString;
3767  _logString.format(
3768  _formatString,
3769 #if FW_OBJECT_NAMES == 1
3770  this->m_objName.toChar(),
3771 #endif
3772  "CalculateCrcStarted ",
3773  fileName.toChar()
3774  );
3775 
3776  this->m_LogText_OutputPort[0].invoke(
3777  _id,
3778  _logTime,
3780  _logString
3781  );
3782  }
3783 #endif
3784  }
3785 
3788  const Fw::StringBase& fileName,
3789  U32 status
3790  ) const
3791  {
3792  // Get the time
3793  Fw::Time _logTime;
3794  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3795  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3796  }
3797 
3798  FwEventIdType _id = static_cast<FwEventIdType>(0);
3799 
3800  _id = this->getIdBase() + EVENTID_CALCULATECRCFAILED;
3801 
3802  // Emit the event on the log port
3803  if (this->m_eventOut_OutputPort[0].isConnected()) {
3804  Fw::LogBuffer _logBuff;
3806 
3807 #if FW_AMPCS_COMPATIBLE
3808  // Serialize the number of arguments
3809  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3810  FW_ASSERT(
3811  _status == Fw::FW_SERIALIZE_OK,
3812  static_cast<FwAssertArgType>(_status)
3813  );
3814 #endif
3815 
3816  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3817  FW_ASSERT(
3818  _status == Fw::FW_SERIALIZE_OK,
3819  static_cast<FwAssertArgType>(_status)
3820  );
3821 
3822 #if FW_AMPCS_COMPATIBLE
3823  // Serialize the argument size
3824  _status = _logBuff.serializeFrom(
3825  static_cast<U8>(sizeof(U32))
3826  );
3827  FW_ASSERT(
3828  _status == Fw::FW_SERIALIZE_OK,
3829  static_cast<FwAssertArgType>(_status)
3830  );
3831 #endif
3832  _status = _logBuff.serializeFrom(status);
3833  FW_ASSERT(
3834  _status == Fw::FW_SERIALIZE_OK,
3835  static_cast<FwAssertArgType>(_status)
3836  );
3837 
3838  this->m_eventOut_OutputPort[0].invoke(
3839  _id,
3840  _logTime,
3842  _logBuff
3843  );
3844  }
3845 
3846  // Emit the event on the text log port
3847 #if FW_ENABLE_TEXT_LOGGING
3848  if (this->m_LogText_OutputPort[0].isConnected()) {
3849 #if FW_OBJECT_NAMES == 1
3850  const char* _formatString =
3851  "(%s) %s: Failed CRC calculation for file %s, returned status %" PRIu32 "";
3852 #else
3853  const char* _formatString =
3854  "%s: Failed CRC calculation for file %s, returned status %" PRIu32 "";
3855 #endif
3856 
3857  Fw::TextLogString _logString;
3858  _logString.format(
3859  _formatString,
3860 #if FW_OBJECT_NAMES == 1
3861  this->m_objName.toChar(),
3862 #endif
3863  "CalculateCrcFailed ",
3864  fileName.toChar(),
3865  status
3866  );
3867 
3868  this->m_LogText_OutputPort[0].invoke(
3869  _id,
3870  _logTime,
3872  _logString
3873  );
3874  }
3875 #endif
3876  }
3877 
3880  const Fw::StringBase& fileName,
3881  U32 crc
3882  ) const
3883  {
3884  // Get the time
3885  Fw::Time _logTime;
3886  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3887  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3888  }
3889 
3890  FwEventIdType _id = static_cast<FwEventIdType>(0);
3891 
3892  _id = this->getIdBase() + EVENTID_CALCULATECRCSUCCEEDED;
3893 
3894  // Emit the event on the log port
3895  if (this->m_eventOut_OutputPort[0].isConnected()) {
3896  Fw::LogBuffer _logBuff;
3898 
3899 #if FW_AMPCS_COMPATIBLE
3900  // Serialize the number of arguments
3901  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3902  FW_ASSERT(
3903  _status == Fw::FW_SERIALIZE_OK,
3904  static_cast<FwAssertArgType>(_status)
3905  );
3906 #endif
3907 
3908  _status = fileName.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
3909  FW_ASSERT(
3910  _status == Fw::FW_SERIALIZE_OK,
3911  static_cast<FwAssertArgType>(_status)
3912  );
3913 
3914 #if FW_AMPCS_COMPATIBLE
3915  // Serialize the argument size
3916  _status = _logBuff.serializeFrom(
3917  static_cast<U8>(sizeof(U32))
3918  );
3919  FW_ASSERT(
3920  _status == Fw::FW_SERIALIZE_OK,
3921  static_cast<FwAssertArgType>(_status)
3922  );
3923 #endif
3924  _status = _logBuff.serializeFrom(crc);
3925  FW_ASSERT(
3926  _status == Fw::FW_SERIALIZE_OK,
3927  static_cast<FwAssertArgType>(_status)
3928  );
3929 
3930  this->m_eventOut_OutputPort[0].invoke(
3931  _id,
3932  _logTime,
3934  _logBuff
3935  );
3936  }
3937 
3938  // Emit the event on the text log port
3939 #if FW_ENABLE_TEXT_LOGGING
3940  if (this->m_LogText_OutputPort[0].isConnected()) {
3941 #if FW_OBJECT_NAMES == 1
3942  const char* _formatString =
3943  "(%s) %s: %s has CRC value 0x%" PRIx32 "";
3944 #else
3945  const char* _formatString =
3946  "%s: %s has CRC value 0x%" PRIx32 "";
3947 #endif
3948 
3949  Fw::TextLogString _logString;
3950  _logString.format(
3951  _formatString,
3952 #if FW_OBJECT_NAMES == 1
3953  this->m_objName.toChar(),
3954 #endif
3955  "CalculateCrcSucceeded ",
3956  fileName.toChar(),
3957  crc
3958  );
3959 
3960  this->m_LogText_OutputPort[0].invoke(
3961  _id,
3962  _logTime,
3964  _logString
3965  );
3966  }
3967 #endif
3968  }
3969 
3970  // ----------------------------------------------------------------------
3971  // Telemetry write functions
3972  // ----------------------------------------------------------------------
3973 
3976  U32 arg,
3977  Fw::Time _tlmTime
3978  ) const
3979  {
3980  if (this->m_tlmOut_OutputPort[0].isConnected()) {
3981  if (
3982  this->m_timeCaller_OutputPort[0].isConnected() &&
3983  (_tlmTime == Fw::ZERO_TIME)
3984  ) {
3985  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
3986  }
3987 
3988  Fw::TlmBuffer _tlmBuff;
3989  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
3990  FW_ASSERT(
3991  _stat == Fw::FW_SERIALIZE_OK,
3992  static_cast<FwAssertArgType>(_stat)
3993  );
3994 
3995  FwChanIdType _id;
3996 
3997  _id = this->getIdBase() + CHANNELID_COMMANDSEXECUTED;
3998 
3999  this->m_tlmOut_OutputPort[0].invoke(
4000  _id,
4001  _tlmTime,
4002  _tlmBuff
4003  );
4004  }
4005  }
4006 
4009  U32 arg,
4010  Fw::Time _tlmTime
4011  ) const
4012  {
4013  if (this->m_tlmOut_OutputPort[0].isConnected()) {
4014  if (
4015  this->m_timeCaller_OutputPort[0].isConnected() &&
4016  (_tlmTime == Fw::ZERO_TIME)
4017  ) {
4018  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
4019  }
4020 
4021  Fw::TlmBuffer _tlmBuff;
4022  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4023  FW_ASSERT(
4024  _stat == Fw::FW_SERIALIZE_OK,
4025  static_cast<FwAssertArgType>(_stat)
4026  );
4027 
4028  FwChanIdType _id;
4029 
4030  _id = this->getIdBase() + CHANNELID_ERRORS;
4031 
4032  this->m_tlmOut_OutputPort[0].invoke(
4033  _id,
4034  _tlmTime,
4035  _tlmBuff
4036  );
4037  }
4038  }
4039 
4040  // ----------------------------------------------------------------------
4041  // Time
4042  // ----------------------------------------------------------------------
4043 
4045  getTime() const
4046  {
4047  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4048  Fw::Time _time;
4049  this->m_timeCaller_OutputPort[0].invoke(_time);
4050  return _time;
4051  }
4052  else {
4053  return Fw::Time(TimeBase::TB_NONE, 0, 0);
4054  }
4055  }
4056 
4057  // ----------------------------------------------------------------------
4058  // Message dispatch functions
4059  // ----------------------------------------------------------------------
4060 
4061  Fw::QueuedComponentBase::MsgDispatchStatus FileManagerComponentBase ::
4062  doDispatch()
4063  {
4064  ComponentIpcSerializableBuffer _msg;
4065  FwQueuePriorityType _priority = 0;
4066 
4067  Os::Queue::Status _msgStatus = this->m_queue.receive(
4068  _msg,
4070  _priority
4071  );
4072  FW_ASSERT(
4073  _msgStatus == Os::Queue::OP_OK,
4074  static_cast<FwAssertArgType>(_msgStatus)
4075  );
4076 
4077  // Reset to beginning of buffer
4078  _msg.resetDeser();
4079 
4080  FwEnumStoreType _desMsg = 0;
4081  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
4082  FW_ASSERT(
4083  _deserStatus == Fw::FW_SERIALIZE_OK,
4084  static_cast<FwAssertArgType>(_deserStatus)
4085  );
4086 
4087  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
4088 
4089  if (_msgType == FILEMANAGER_COMPONENT_EXIT) {
4090  return MSG_DISPATCH_EXIT;
4091  }
4092 
4093  FwIndexType portNum = 0;
4094  _deserStatus = _msg.deserializeTo(portNum);
4095  FW_ASSERT(
4096  _deserStatus == Fw::FW_SERIALIZE_OK,
4097  static_cast<FwAssertArgType>(_deserStatus)
4098  );
4099 
4100  switch (_msgType) {
4101  // Handle async input port pingIn
4102  case PINGIN_PING: {
4103  // Deserialize argument key
4104  U32 key;
4105  _deserStatus = _msg.deserializeTo(key);
4106  FW_ASSERT(
4107  _deserStatus == Fw::FW_SERIALIZE_OK,
4108  static_cast<FwAssertArgType>(_deserStatus)
4109  );
4110  // Call handler function
4111  this->pingIn_handler(
4112  portNum,
4113  key
4114  );
4115 
4116  break;
4117  }
4118 
4119  // Handle command CreateDirectory
4120  case CMD_CREATEDIRECTORY: {
4121  // Deserialize opcode
4122  FwOpcodeType _opCode = 0;
4123  _deserStatus = _msg.deserializeTo(_opCode);
4124  FW_ASSERT (
4125  _deserStatus == Fw::FW_SERIALIZE_OK,
4126  static_cast<FwAssertArgType>(_deserStatus)
4127  );
4128 
4129  // Deserialize command sequence
4130  U32 _cmdSeq = 0;
4131  _deserStatus = _msg.deserializeTo(_cmdSeq);
4132  FW_ASSERT (
4133  _deserStatus == Fw::FW_SERIALIZE_OK,
4134  static_cast<FwAssertArgType>(_deserStatus)
4135  );
4136 
4137  // Deserialize command argument buffer
4138  Fw::CmdArgBuffer args;
4139  _deserStatus = _msg.deserializeTo(args);
4140  FW_ASSERT (
4141  _deserStatus == Fw::FW_SERIALIZE_OK,
4142  static_cast<FwAssertArgType>(_deserStatus)
4143  );
4144 
4145  // Reset buffer
4146  args.resetDeser();
4147 
4148  // Deserialize argument dirName
4149  Fw::CmdStringArg dirName;
4150  _deserStatus = args.deserializeTo(dirName);
4151  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4152  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4153  this->cmdResponse_out(
4154  _opCode,
4155  _cmdSeq,
4157  );
4158  }
4159  // Don't crash the task if bad arguments were passed from the ground
4160  break;
4161  }
4162 
4163  // Make sure there was no data left over.
4164  // That means the argument buffer size was incorrect.
4165 #if FW_CMD_CHECK_RESIDUAL
4166  if (args.getDeserializeSizeLeft() != 0) {
4167  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4168  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4169  }
4170  // Don't crash the task if bad arguments were passed from the ground
4171  break;
4172  }
4173 #endif
4174 
4175  // Call handler function
4177  _opCode, _cmdSeq,
4178  dirName
4179  );
4180 
4181  break;
4182  }
4183 
4184  // Handle command MoveFile
4185  case CMD_MOVEFILE: {
4186  // Deserialize opcode
4187  FwOpcodeType _opCode = 0;
4188  _deserStatus = _msg.deserializeTo(_opCode);
4189  FW_ASSERT (
4190  _deserStatus == Fw::FW_SERIALIZE_OK,
4191  static_cast<FwAssertArgType>(_deserStatus)
4192  );
4193 
4194  // Deserialize command sequence
4195  U32 _cmdSeq = 0;
4196  _deserStatus = _msg.deserializeTo(_cmdSeq);
4197  FW_ASSERT (
4198  _deserStatus == Fw::FW_SERIALIZE_OK,
4199  static_cast<FwAssertArgType>(_deserStatus)
4200  );
4201 
4202  // Deserialize command argument buffer
4203  Fw::CmdArgBuffer args;
4204  _deserStatus = _msg.deserializeTo(args);
4205  FW_ASSERT (
4206  _deserStatus == Fw::FW_SERIALIZE_OK,
4207  static_cast<FwAssertArgType>(_deserStatus)
4208  );
4209 
4210  // Reset buffer
4211  args.resetDeser();
4212 
4213  // Deserialize argument sourceFileName
4214  Fw::CmdStringArg sourceFileName;
4215  _deserStatus = args.deserializeTo(sourceFileName);
4216  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4217  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4218  this->cmdResponse_out(
4219  _opCode,
4220  _cmdSeq,
4222  );
4223  }
4224  // Don't crash the task if bad arguments were passed from the ground
4225  break;
4226  }
4227 
4228  // Deserialize argument destFileName
4229  Fw::CmdStringArg destFileName;
4230  _deserStatus = args.deserializeTo(destFileName);
4231  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4232  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4233  this->cmdResponse_out(
4234  _opCode,
4235  _cmdSeq,
4237  );
4238  }
4239  // Don't crash the task if bad arguments were passed from the ground
4240  break;
4241  }
4242 
4243  // Make sure there was no data left over.
4244  // That means the argument buffer size was incorrect.
4245 #if FW_CMD_CHECK_RESIDUAL
4246  if (args.getDeserializeSizeLeft() != 0) {
4247  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4248  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4249  }
4250  // Don't crash the task if bad arguments were passed from the ground
4251  break;
4252  }
4253 #endif
4254 
4255  // Call handler function
4256  this->MoveFile_cmdHandler(
4257  _opCode, _cmdSeq,
4258  sourceFileName,
4259  destFileName
4260  );
4261 
4262  break;
4263  }
4264 
4265  // Handle command RemoveDirectory
4266  case CMD_REMOVEDIRECTORY: {
4267  // Deserialize opcode
4268  FwOpcodeType _opCode = 0;
4269  _deserStatus = _msg.deserializeTo(_opCode);
4270  FW_ASSERT (
4271  _deserStatus == Fw::FW_SERIALIZE_OK,
4272  static_cast<FwAssertArgType>(_deserStatus)
4273  );
4274 
4275  // Deserialize command sequence
4276  U32 _cmdSeq = 0;
4277  _deserStatus = _msg.deserializeTo(_cmdSeq);
4278  FW_ASSERT (
4279  _deserStatus == Fw::FW_SERIALIZE_OK,
4280  static_cast<FwAssertArgType>(_deserStatus)
4281  );
4282 
4283  // Deserialize command argument buffer
4284  Fw::CmdArgBuffer args;
4285  _deserStatus = _msg.deserializeTo(args);
4286  FW_ASSERT (
4287  _deserStatus == Fw::FW_SERIALIZE_OK,
4288  static_cast<FwAssertArgType>(_deserStatus)
4289  );
4290 
4291  // Reset buffer
4292  args.resetDeser();
4293 
4294  // Deserialize argument dirName
4295  Fw::CmdStringArg dirName;
4296  _deserStatus = args.deserializeTo(dirName);
4297  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4298  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4299  this->cmdResponse_out(
4300  _opCode,
4301  _cmdSeq,
4303  );
4304  }
4305  // Don't crash the task if bad arguments were passed from the ground
4306  break;
4307  }
4308 
4309  // Make sure there was no data left over.
4310  // That means the argument buffer size was incorrect.
4311 #if FW_CMD_CHECK_RESIDUAL
4312  if (args.getDeserializeSizeLeft() != 0) {
4313  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4314  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4315  }
4316  // Don't crash the task if bad arguments were passed from the ground
4317  break;
4318  }
4319 #endif
4320 
4321  // Call handler function
4323  _opCode, _cmdSeq,
4324  dirName
4325  );
4326 
4327  break;
4328  }
4329 
4330  // Handle command RemoveFile
4331  case CMD_REMOVEFILE: {
4332  // Deserialize opcode
4333  FwOpcodeType _opCode = 0;
4334  _deserStatus = _msg.deserializeTo(_opCode);
4335  FW_ASSERT (
4336  _deserStatus == Fw::FW_SERIALIZE_OK,
4337  static_cast<FwAssertArgType>(_deserStatus)
4338  );
4339 
4340  // Deserialize command sequence
4341  U32 _cmdSeq = 0;
4342  _deserStatus = _msg.deserializeTo(_cmdSeq);
4343  FW_ASSERT (
4344  _deserStatus == Fw::FW_SERIALIZE_OK,
4345  static_cast<FwAssertArgType>(_deserStatus)
4346  );
4347 
4348  // Deserialize command argument buffer
4349  Fw::CmdArgBuffer args;
4350  _deserStatus = _msg.deserializeTo(args);
4351  FW_ASSERT (
4352  _deserStatus == Fw::FW_SERIALIZE_OK,
4353  static_cast<FwAssertArgType>(_deserStatus)
4354  );
4355 
4356  // Reset buffer
4357  args.resetDeser();
4358 
4359  // Deserialize argument fileName
4360  Fw::CmdStringArg fileName;
4361  _deserStatus = args.deserializeTo(fileName);
4362  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4363  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4364  this->cmdResponse_out(
4365  _opCode,
4366  _cmdSeq,
4368  );
4369  }
4370  // Don't crash the task if bad arguments were passed from the ground
4371  break;
4372  }
4373 
4374  // Deserialize argument ignoreErrors
4375  bool ignoreErrors;
4376  _deserStatus = args.deserializeTo(ignoreErrors);
4377  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4378  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4379  this->cmdResponse_out(
4380  _opCode,
4381  _cmdSeq,
4383  );
4384  }
4385  // Don't crash the task if bad arguments were passed from the ground
4386  break;
4387  }
4388 
4389  // Make sure there was no data left over.
4390  // That means the argument buffer size was incorrect.
4391 #if FW_CMD_CHECK_RESIDUAL
4392  if (args.getDeserializeSizeLeft() != 0) {
4393  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4394  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4395  }
4396  // Don't crash the task if bad arguments were passed from the ground
4397  break;
4398  }
4399 #endif
4400 
4401  // Call handler function
4402  this->RemoveFile_cmdHandler(
4403  _opCode, _cmdSeq,
4404  fileName,
4405  ignoreErrors
4406  );
4407 
4408  break;
4409  }
4410 
4411  // Handle command ShellCommand
4412  case CMD_SHELLCOMMAND: {
4413  // Deserialize opcode
4414  FwOpcodeType _opCode = 0;
4415  _deserStatus = _msg.deserializeTo(_opCode);
4416  FW_ASSERT (
4417  _deserStatus == Fw::FW_SERIALIZE_OK,
4418  static_cast<FwAssertArgType>(_deserStatus)
4419  );
4420 
4421  // Deserialize command sequence
4422  U32 _cmdSeq = 0;
4423  _deserStatus = _msg.deserializeTo(_cmdSeq);
4424  FW_ASSERT (
4425  _deserStatus == Fw::FW_SERIALIZE_OK,
4426  static_cast<FwAssertArgType>(_deserStatus)
4427  );
4428 
4429  // Deserialize command argument buffer
4430  Fw::CmdArgBuffer args;
4431  _deserStatus = _msg.deserializeTo(args);
4432  FW_ASSERT (
4433  _deserStatus == Fw::FW_SERIALIZE_OK,
4434  static_cast<FwAssertArgType>(_deserStatus)
4435  );
4436 
4437  // Reset buffer
4438  args.resetDeser();
4439 
4440  // Deserialize argument command
4441  Fw::CmdStringArg command;
4442  _deserStatus = args.deserializeTo(command);
4443  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4444  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4445  this->cmdResponse_out(
4446  _opCode,
4447  _cmdSeq,
4449  );
4450  }
4451  // Don't crash the task if bad arguments were passed from the ground
4452  break;
4453  }
4454 
4455  // Deserialize argument logFileName
4456  Fw::CmdStringArg logFileName;
4457  _deserStatus = args.deserializeTo(logFileName);
4458  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4459  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4460  this->cmdResponse_out(
4461  _opCode,
4462  _cmdSeq,
4464  );
4465  }
4466  // Don't crash the task if bad arguments were passed from the ground
4467  break;
4468  }
4469 
4470  // Make sure there was no data left over.
4471  // That means the argument buffer size was incorrect.
4472 #if FW_CMD_CHECK_RESIDUAL
4473  if (args.getDeserializeSizeLeft() != 0) {
4474  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4475  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4476  }
4477  // Don't crash the task if bad arguments were passed from the ground
4478  break;
4479  }
4480 #endif
4481 
4482  // Call handler function
4484  _opCode, _cmdSeq,
4485  command,
4486  logFileName
4487  );
4488 
4489  break;
4490  }
4491 
4492  // Handle command AppendFile
4493  case CMD_APPENDFILE: {
4494  // Deserialize opcode
4495  FwOpcodeType _opCode = 0;
4496  _deserStatus = _msg.deserializeTo(_opCode);
4497  FW_ASSERT (
4498  _deserStatus == Fw::FW_SERIALIZE_OK,
4499  static_cast<FwAssertArgType>(_deserStatus)
4500  );
4501 
4502  // Deserialize command sequence
4503  U32 _cmdSeq = 0;
4504  _deserStatus = _msg.deserializeTo(_cmdSeq);
4505  FW_ASSERT (
4506  _deserStatus == Fw::FW_SERIALIZE_OK,
4507  static_cast<FwAssertArgType>(_deserStatus)
4508  );
4509 
4510  // Deserialize command argument buffer
4511  Fw::CmdArgBuffer args;
4512  _deserStatus = _msg.deserializeTo(args);
4513  FW_ASSERT (
4514  _deserStatus == Fw::FW_SERIALIZE_OK,
4515  static_cast<FwAssertArgType>(_deserStatus)
4516  );
4517 
4518  // Reset buffer
4519  args.resetDeser();
4520 
4521  // Deserialize argument source
4522  Fw::CmdStringArg source;
4523  _deserStatus = args.deserializeTo(source);
4524  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4525  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4526  this->cmdResponse_out(
4527  _opCode,
4528  _cmdSeq,
4530  );
4531  }
4532  // Don't crash the task if bad arguments were passed from the ground
4533  break;
4534  }
4535 
4536  // Deserialize argument target
4537  Fw::CmdStringArg target;
4538  _deserStatus = args.deserializeTo(target);
4539  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4540  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4541  this->cmdResponse_out(
4542  _opCode,
4543  _cmdSeq,
4545  );
4546  }
4547  // Don't crash the task if bad arguments were passed from the ground
4548  break;
4549  }
4550 
4551  // Make sure there was no data left over.
4552  // That means the argument buffer size was incorrect.
4553 #if FW_CMD_CHECK_RESIDUAL
4554  if (args.getDeserializeSizeLeft() != 0) {
4555  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4556  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4557  }
4558  // Don't crash the task if bad arguments were passed from the ground
4559  break;
4560  }
4561 #endif
4562 
4563  // Call handler function
4564  this->AppendFile_cmdHandler(
4565  _opCode, _cmdSeq,
4566  source,
4567  target
4568  );
4569 
4570  break;
4571  }
4572 
4573  // Handle command FileSize
4574  case CMD_FILESIZE: {
4575  // Deserialize opcode
4576  FwOpcodeType _opCode = 0;
4577  _deserStatus = _msg.deserializeTo(_opCode);
4578  FW_ASSERT (
4579  _deserStatus == Fw::FW_SERIALIZE_OK,
4580  static_cast<FwAssertArgType>(_deserStatus)
4581  );
4582 
4583  // Deserialize command sequence
4584  U32 _cmdSeq = 0;
4585  _deserStatus = _msg.deserializeTo(_cmdSeq);
4586  FW_ASSERT (
4587  _deserStatus == Fw::FW_SERIALIZE_OK,
4588  static_cast<FwAssertArgType>(_deserStatus)
4589  );
4590 
4591  // Deserialize command argument buffer
4592  Fw::CmdArgBuffer args;
4593  _deserStatus = _msg.deserializeTo(args);
4594  FW_ASSERT (
4595  _deserStatus == Fw::FW_SERIALIZE_OK,
4596  static_cast<FwAssertArgType>(_deserStatus)
4597  );
4598 
4599  // Reset buffer
4600  args.resetDeser();
4601 
4602  // Deserialize argument fileName
4603  Fw::CmdStringArg fileName;
4604  _deserStatus = args.deserializeTo(fileName);
4605  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4606  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4607  this->cmdResponse_out(
4608  _opCode,
4609  _cmdSeq,
4611  );
4612  }
4613  // Don't crash the task if bad arguments were passed from the ground
4614  break;
4615  }
4616 
4617  // Make sure there was no data left over.
4618  // That means the argument buffer size was incorrect.
4619 #if FW_CMD_CHECK_RESIDUAL
4620  if (args.getDeserializeSizeLeft() != 0) {
4621  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4622  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4623  }
4624  // Don't crash the task if bad arguments were passed from the ground
4625  break;
4626  }
4627 #endif
4628 
4629  // Call handler function
4630  this->FileSize_cmdHandler(
4631  _opCode, _cmdSeq,
4632  fileName
4633  );
4634 
4635  break;
4636  }
4637 
4638  // Handle command ListDirectory
4639  case CMD_LISTDIRECTORY: {
4640  // Deserialize opcode
4641  FwOpcodeType _opCode = 0;
4642  _deserStatus = _msg.deserializeTo(_opCode);
4643  FW_ASSERT (
4644  _deserStatus == Fw::FW_SERIALIZE_OK,
4645  static_cast<FwAssertArgType>(_deserStatus)
4646  );
4647 
4648  // Deserialize command sequence
4649  U32 _cmdSeq = 0;
4650  _deserStatus = _msg.deserializeTo(_cmdSeq);
4651  FW_ASSERT (
4652  _deserStatus == Fw::FW_SERIALIZE_OK,
4653  static_cast<FwAssertArgType>(_deserStatus)
4654  );
4655 
4656  // Deserialize command argument buffer
4657  Fw::CmdArgBuffer args;
4658  _deserStatus = _msg.deserializeTo(args);
4659  FW_ASSERT (
4660  _deserStatus == Fw::FW_SERIALIZE_OK,
4661  static_cast<FwAssertArgType>(_deserStatus)
4662  );
4663 
4664  // Reset buffer
4665  args.resetDeser();
4666 
4667  // Deserialize argument dirName
4668  Fw::CmdStringArg dirName;
4669  _deserStatus = args.deserializeTo(dirName);
4670  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4671  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4672  this->cmdResponse_out(
4673  _opCode,
4674  _cmdSeq,
4676  );
4677  }
4678  // Don't crash the task if bad arguments were passed from the ground
4679  break;
4680  }
4681 
4682  // Make sure there was no data left over.
4683  // That means the argument buffer size was incorrect.
4684 #if FW_CMD_CHECK_RESIDUAL
4685  if (args.getDeserializeSizeLeft() != 0) {
4686  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4687  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4688  }
4689  // Don't crash the task if bad arguments were passed from the ground
4690  break;
4691  }
4692 #endif
4693 
4694  // Call handler function
4696  _opCode, _cmdSeq,
4697  dirName
4698  );
4699 
4700  break;
4701  }
4702 
4703  // Handle command CalculateCrc
4704  case CMD_CALCULATECRC: {
4705  // Deserialize opcode
4706  FwOpcodeType _opCode = 0;
4707  _deserStatus = _msg.deserializeTo(_opCode);
4708  FW_ASSERT (
4709  _deserStatus == Fw::FW_SERIALIZE_OK,
4710  static_cast<FwAssertArgType>(_deserStatus)
4711  );
4712 
4713  // Deserialize command sequence
4714  U32 _cmdSeq = 0;
4715  _deserStatus = _msg.deserializeTo(_cmdSeq);
4716  FW_ASSERT (
4717  _deserStatus == Fw::FW_SERIALIZE_OK,
4718  static_cast<FwAssertArgType>(_deserStatus)
4719  );
4720 
4721  // Deserialize command argument buffer
4722  Fw::CmdArgBuffer args;
4723  _deserStatus = _msg.deserializeTo(args);
4724  FW_ASSERT (
4725  _deserStatus == Fw::FW_SERIALIZE_OK,
4726  static_cast<FwAssertArgType>(_deserStatus)
4727  );
4728 
4729  // Reset buffer
4730  args.resetDeser();
4731 
4732  // Deserialize argument filename
4733  Fw::CmdStringArg filename;
4734  _deserStatus = args.deserializeTo(filename);
4735  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
4736  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4737  this->cmdResponse_out(
4738  _opCode,
4739  _cmdSeq,
4741  );
4742  }
4743  // Don't crash the task if bad arguments were passed from the ground
4744  break;
4745  }
4746 
4747  // Make sure there was no data left over.
4748  // That means the argument buffer size was incorrect.
4749 #if FW_CMD_CHECK_RESIDUAL
4750  if (args.getDeserializeSizeLeft() != 0) {
4751  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
4752  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
4753  }
4754  // Don't crash the task if bad arguments were passed from the ground
4755  break;
4756  }
4757 #endif
4758 
4759  // Call handler function
4761  _opCode, _cmdSeq,
4762  filename
4763  );
4764 
4765  break;
4766  }
4767 
4768  // Handle internal interface run
4769  case INT_IF_RUN: {
4770  // Make sure there was no data left over.
4771  // That means the buffer size was incorrect.
4772  FW_ASSERT(
4773  _msg.getDeserializeSizeLeft() == 0,
4774  static_cast<FwAssertArgType>(_msg.getDeserializeSizeLeft())
4775  );
4776 
4777  // Call handler function
4779 
4780  break;
4781  }
4782 
4783  default:
4784  return MSG_DISPATCH_ERROR;
4785  }
4786 
4787  return MSG_DISPATCH_OK;
4788  }
4789 
4790  // ----------------------------------------------------------------------
4791  // Calls for messages received on special input ports
4792  // ----------------------------------------------------------------------
4793 
4794  void FileManagerComponentBase ::
4795  m_p_cmdIn_in(
4796  Fw::PassiveComponentBase* callComp,
4797  FwIndexType portNum,
4798  FwOpcodeType opCode,
4799  U32 cmdSeq,
4800  Fw::CmdArgBuffer& args
4801  )
4802  {
4803  FW_ASSERT(callComp);
4804  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
4805 
4806  const U32 idBase = callComp->getIdBase();
4807  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
4808 
4809  // Select base class function based on opcode
4810  switch (opCode - idBase) {
4811  case OPCODE_CREATEDIRECTORY: {
4812  compPtr->CreateDirectory_cmdHandlerBase(
4813  opCode,
4814  cmdSeq,
4815  args
4816  );
4817  break;
4818  }
4819 
4820  case OPCODE_MOVEFILE: {
4821  compPtr->MoveFile_cmdHandlerBase(
4822  opCode,
4823  cmdSeq,
4824  args
4825  );
4826  break;
4827  }
4828 
4829  case OPCODE_REMOVEDIRECTORY: {
4830  compPtr->RemoveDirectory_cmdHandlerBase(
4831  opCode,
4832  cmdSeq,
4833  args
4834  );
4835  break;
4836  }
4837 
4838  case OPCODE_REMOVEFILE: {
4839  compPtr->RemoveFile_cmdHandlerBase(
4840  opCode,
4841  cmdSeq,
4842  args
4843  );
4844  break;
4845  }
4846 
4847  case OPCODE_SHELLCOMMAND: {
4848  compPtr->ShellCommand_cmdHandlerBase(
4849  opCode,
4850  cmdSeq,
4851  args
4852  );
4853  break;
4854  }
4855 
4856  case OPCODE_APPENDFILE: {
4857  compPtr->AppendFile_cmdHandlerBase(
4858  opCode,
4859  cmdSeq,
4860  args
4861  );
4862  break;
4863  }
4864 
4865  case OPCODE_FILESIZE: {
4866  compPtr->FileSize_cmdHandlerBase(
4867  opCode,
4868  cmdSeq,
4869  args
4870  );
4871  break;
4872  }
4873 
4874  case OPCODE_LISTDIRECTORY: {
4875  compPtr->ListDirectory_cmdHandlerBase(
4876  opCode,
4877  cmdSeq,
4878  args
4879  );
4880  break;
4881  }
4882 
4883  case OPCODE_CALCULATECRC: {
4884  compPtr->CalculateCrc_cmdHandlerBase(
4885  opCode,
4886  cmdSeq,
4887  args
4888  );
4889  break;
4890  }
4891  }
4892  }
4893 
4894  // ----------------------------------------------------------------------
4895  // Calls for messages received on typed input ports
4896  // ----------------------------------------------------------------------
4897 
4898  void FileManagerComponentBase ::
4899  m_p_pingIn_in(
4900  Fw::PassiveComponentBase* callComp,
4901  FwIndexType portNum,
4902  U32 key
4903  )
4904  {
4905  FW_ASSERT(callComp);
4906  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
4907  compPtr->pingIn_handlerBase(
4908  portNum,
4909  key
4910  );
4911  }
4912 
4913  void FileManagerComponentBase ::
4914  m_p_schedIn_in(
4915  Fw::PassiveComponentBase* callComp,
4916  FwIndexType portNum,
4917  U32 context
4918  )
4919  {
4920  FW_ASSERT(callComp);
4921  FileManagerComponentBase* compPtr = static_cast<FileManagerComponentBase*>(callComp);
4922  compPtr->schedIn_handlerBase(
4923  portNum,
4924  context
4925  );
4926  }
4927 
4928 }
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:134
virtual void run_internalInterfaceHandler()=0
Internal interface handler for run.
void log_WARNING_HI_ListDirectoryError(const Fw::StringBase &dirName, U32 status) const
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 log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName) const
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:26
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
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 log_ACTIVITY_HI_DirectoryListing(const Fw::StringBase &dirName, const Fw::StringBase &fileName, FwSizeType fileSize) const
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.
virtual void ShellCommand_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ShellCommand.
Append 1 file&#39;s contents to the end of another.
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 began creating a new directory.
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.
An error occurred while attempting to move a file.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void init()
Initialization function.
Definition: SchedPortAc.cpp:56
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command FileSize.
void init()
Initialization function.
Definition: CmdPortAc.cpp:56
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
An error occurred while attempting to remove a directory.
void ShellCommand_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void invoke(U32 key) const
Invoke a port interface.
Definition: PingPortAc.cpp:147
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
Perform a Linux shell command and write the output to a log file.
void log_ACTIVITY_HI_ListDirectoryStarted(const Fw::StringBase &dirName) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void init()
Initialization function.
Definition: TlmPortAc.cpp:144
Enum representing a command response.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
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
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Os::Queue m_queue
queue object for active component
The size of the serial representations of the port arguments.
Definition: PingPortAc.hpp:36
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
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:150
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:62
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
Message will block until space is available.
Definition: Queue.hpp:47
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 executed a shell command that returned status zero.
FwIdType FwEventIdType
The type of an event identifier.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
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:26
void RemoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
The File System component began executing a shell command.
void init()
Initialization function.
Definition: TimePortAc.cpp:128
The File System component moved a file to a new location without error.
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 log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::StringBase &command) const
void RemoveDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
#define FW_MIN(a, b)
MIN macro.
Definition: BasicTypes.h:92
void init()
Initialization function.
Definition: PingPortAc.cpp:128
An error occurred while attempting to create a directory.
static constexpr FwIndexType getNum_schedIn_InputPorts()
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
message to exit active component task
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
const char * toChar() const
Convert to a C-style char*.
Definition: ObjectName.hpp:50
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
FwSizeType SizeType
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:134
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
virtual void ShellCommand_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &command, const Fw::CmdStringArg &logFileName)=0
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_eventOut_OutputPort(FwIndexType portNum)
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
Definition: TlmPortAc.cpp:163
bool isConnected() const
Definition: PortBase.cpp:38
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
#define PRI_FwIndexType
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
void init()
Initialization function.
Definition: LogPortAc.cpp:151
The File System component deleted and existing directory without error.
void MoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void setPortNum(FwIndexType portNum)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
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
Handler for command FileSize.
The size of the serial representations of the port arguments.
Definition: CmdPortAc.hpp:38
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
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.
The File System component began deleting a directory.
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:62
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Definition: LogPortAc.cpp:170
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
The File System component appended 2 files without error.
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
A message was sent requesting an exit of the loop.
An error occurred while attempting to remove a file.
The File System component returned status non-zero when trying to append 2 files together.
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::StringBase &command) const
The File System component deleted an existing file without error.
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
static constexpr FwIndexType getNum_pingIn_InputPorts()
void init()
Initialization function.
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:56
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
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
U8 BYTE
byte type
Definition: BasicTypes.h:56
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.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:62
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
Implementation of malloc based allocator.
virtual void RemoveDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveDirectory.
void log_WARNING_HI_ShellCommandFailed(const Fw::StringBase &command, U32 status) const
void init()
Initialization function.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status) const
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
The File System component began deleting an existing file.
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
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
The File System component appended 2 files without error.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
The File System component created a new directory without error.
The File System component began moving a file to a new location.
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
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.
The File System component executed a shell command that returned status non-zero. ...
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0