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