F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileManagerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileManagerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileManager component base class
5 // ======================================================================
6 
7 #ifndef Svc_FileManagerComponentAc_HPP
8 #define Svc_FileManagerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
15 #include "Fw/Cmd/CmdString.hpp"
17 #include "Fw/FPrimeBasicTypes.hpp"
18 #include "Fw/Log/LogPortAc.hpp"
19 #include "Fw/Log/LogString.hpp"
20 #if FW_ENABLE_TEXT_LOGGING == 1
21 #include "Fw/Log/LogTextPortAc.hpp"
22 #endif
25 #include "Fw/Time/TimePortAc.hpp"
26 #include "Fw/Tlm/TlmPortAc.hpp"
27 #include "Fw/Tlm/TlmString.hpp"
29 #include "Svc/Ping/PingPortAc.hpp"
32 
33 namespace Svc {
34 
41  {
42 
43  // ----------------------------------------------------------------------
44  // Friend classes
45  // ----------------------------------------------------------------------
46 
48  friend class FileManagerTesterBase;
50  friend class FileManagerTester;
51 
52  protected:
53 
54  // ----------------------------------------------------------------------
55  // Constants
56  // ----------------------------------------------------------------------
57 
59  enum {
61  };
62 
64  enum {
67  };
68 
70  enum {
77  };
78 
80  enum {
82  };
83 
85  enum {
95  };
96 
98  enum {
128  };
129 
131  enum {
134  };
135 
136  public:
137 
138  // ----------------------------------------------------------------------
139  // Component initialization
140  // ----------------------------------------------------------------------
141 
143  void init(
144  FwSizeType queueDepth,
145  FwEnumStoreType instance = 0
146  );
147 
148  public:
149 
150  // ----------------------------------------------------------------------
151  // Getters for special input ports
152  // ----------------------------------------------------------------------
153 
158  FwIndexType portNum
159  );
160 
161  public:
162 
163  // ----------------------------------------------------------------------
164  // Getters for typed input ports
165  // ----------------------------------------------------------------------
166 
171  FwIndexType portNum
172  );
173 
178  FwIndexType portNum
179  );
180 
181  public:
182 
183  // ----------------------------------------------------------------------
184  // Connect input ports to special output ports
185  // ----------------------------------------------------------------------
186 
187 #if FW_ENABLE_TEXT_LOGGING == 1
188 
190  void set_LogText_OutputPort(
191  FwIndexType portNum,
192  Fw::InputLogTextPort* port
193  );
194 
195 #endif
196 
199  FwIndexType portNum,
200  Fw::InputCmdRegPort* port
201  );
202 
205  FwIndexType portNum,
207  );
208 
211  FwIndexType portNum,
212  Fw::InputLogPort* port
213  );
214 
217  FwIndexType portNum,
218  Fw::InputTimePort* port
219  );
220 
223  FwIndexType portNum,
224  Fw::InputTlmPort* port
225  );
226 
227  public:
228 
229  // ----------------------------------------------------------------------
230  // Connect typed input ports to typed output ports
231  // ----------------------------------------------------------------------
232 
235  FwIndexType portNum,
236  Svc::InputPingPort* port
237  );
238 
239 #if FW_PORT_SERIALIZATION
240 
241  public:
242 
243  // ----------------------------------------------------------------------
244  // Connect serial input ports to special output ports
245  // ----------------------------------------------------------------------
246 
247 #if FW_ENABLE_TEXT_LOGGING == 1
248 
250  void set_LogText_OutputPort(
251  FwIndexType portNum,
252  Fw::InputSerializePort* port
253  );
254 
255 #endif
256 
259  FwIndexType portNum,
260  Fw::InputSerializePort* port
261  );
262 
265  FwIndexType portNum,
266  Fw::InputSerializePort* port
267  );
268 
271  FwIndexType portNum,
272  Fw::InputSerializePort* port
273  );
274 
277  FwIndexType portNum,
278  Fw::InputSerializePort* port
279  );
280 
283  FwIndexType portNum,
284  Fw::InputSerializePort* port
285  );
286 
287 #endif
288 
289 #if FW_PORT_SERIALIZATION
290 
291  public:
292 
293  // ----------------------------------------------------------------------
294  // Connect serial input ports to typed output ports
295  // ----------------------------------------------------------------------
296 
299  FwIndexType portNum,
300  Fw::InputSerializePort* port
301  );
302 
303 #endif
304 
305  public:
306 
307  // ----------------------------------------------------------------------
308  // Command registration
309  // ----------------------------------------------------------------------
310 
314  void regCommands();
315 
316  protected:
317 
318  // ----------------------------------------------------------------------
319  // Component construction and destruction
320  // ----------------------------------------------------------------------
321 
324  const char* compName = ""
325  );
326 
328  virtual ~FileManagerComponentBase();
329 
330  protected:
331 
332  // ----------------------------------------------------------------------
333  // Getters for numbers of special input ports
334  // ----------------------------------------------------------------------
335 
340  return NUM_CMDIN_INPUT_PORTS;
341  }
342 
343  protected:
344 
345  // ----------------------------------------------------------------------
346  // Getters for numbers of typed input ports
347  // ----------------------------------------------------------------------
348 
353  return NUM_PINGIN_INPUT_PORTS;
354  }
355 
361  }
362 
363  protected:
364 
365  // ----------------------------------------------------------------------
366  // Getters for numbers of special output ports
367  // ----------------------------------------------------------------------
368 
369 #if FW_ENABLE_TEXT_LOGGING == 1
370 
374  static constexpr FwIndexType getNum_LogText_OutputPorts() {
376  }
377 
378 #endif
379 
385  }
386 
392  }
393 
399  }
400 
406  }
407 
413  }
414 
415  protected:
416 
417  // ----------------------------------------------------------------------
418  // Getters for numbers of typed output ports
419  // ----------------------------------------------------------------------
420 
426  }
427 
428  protected:
429 
430  // ----------------------------------------------------------------------
431  // Connection status queries for special output ports
432  // ----------------------------------------------------------------------
433 
434 #if FW_ENABLE_TEXT_LOGGING == 1
435 
439  bool isConnected_LogText_OutputPort(
440  FwIndexType portNum
441  );
442 
443 #endif
444 
449  FwIndexType portNum
450  );
451 
456  FwIndexType portNum
457  );
458 
463  FwIndexType portNum
464  );
465 
470  FwIndexType portNum
471  );
472 
477  FwIndexType portNum
478  );
479 
480  protected:
481 
482  // ----------------------------------------------------------------------
483  // Connection status queries for typed output ports
484  // ----------------------------------------------------------------------
485 
490  FwIndexType portNum
491  );
492 
493  protected:
494 
495  // ----------------------------------------------------------------------
496  // Handlers to implement for typed input ports
497  // ----------------------------------------------------------------------
498 
500  virtual void pingIn_handler(
501  FwIndexType portNum,
502  U32 key
503  ) = 0;
504 
506  virtual void schedIn_handler(
507  FwIndexType portNum,
508  U32 context
509  ) = 0;
510 
511  protected:
512 
513  // ----------------------------------------------------------------------
514  // Port handler base-class functions for typed input ports
515  //
516  // Call these functions directly to bypass the corresponding ports
517  // ----------------------------------------------------------------------
518 
520  void pingIn_handlerBase(
521  FwIndexType portNum,
522  U32 key
523  );
524 
526  void schedIn_handlerBase(
527  FwIndexType portNum,
528  U32 context
529  );
530 
531  protected:
532 
533  // ----------------------------------------------------------------------
534  // Pre-message hooks for typed async input ports
535  //
536  // Each of these functions is invoked just before processing a message
537  // on the corresponding port. By default, they do nothing. You can
538  // override them to provide specific pre-message behavior.
539  // ----------------------------------------------------------------------
540 
542  virtual void pingIn_preMsgHook(
543  FwIndexType portNum,
544  U32 key
545  );
546 
547  protected:
548 
549  // ----------------------------------------------------------------------
550  // Invocation functions for typed output ports
551  // ----------------------------------------------------------------------
552 
554  void pingOut_out(
555  FwIndexType portNum,
556  U32 key
557  );
558 
559  protected:
560 
561  // ----------------------------------------------------------------------
562  // Internal interface handlers
563  // ----------------------------------------------------------------------
564 
566  virtual void run_internalInterfaceHandler() = 0;
567 
568  protected:
569 
570  // ----------------------------------------------------------------------
571  // Internal interface base-class functions
572  // ----------------------------------------------------------------------
573 
576 
577  protected:
578 
579  // ----------------------------------------------------------------------
580  // Command response
581  // ----------------------------------------------------------------------
582 
584  void cmdResponse_out(
585  FwOpcodeType opCode,
586  U32 cmdSeq,
587  Fw::CmdResponse response
588  );
589 
590  protected:
591 
592  // ----------------------------------------------------------------------
593  // Command handlers to implement
594  // ----------------------------------------------------------------------
595 
599  virtual void CreateDirectory_cmdHandler(
600  FwOpcodeType opCode,
601  U32 cmdSeq,
602  const Fw::CmdStringArg& dirName
603  ) = 0;
604 
608  virtual void MoveFile_cmdHandler(
609  FwOpcodeType opCode,
610  U32 cmdSeq,
611  const Fw::CmdStringArg& sourceFileName,
612  const Fw::CmdStringArg& destFileName
613  ) = 0;
614 
618  virtual void RemoveDirectory_cmdHandler(
619  FwOpcodeType opCode,
620  U32 cmdSeq,
621  const Fw::CmdStringArg& dirName
622  ) = 0;
623 
627  virtual void RemoveFile_cmdHandler(
628  FwOpcodeType opCode,
629  U32 cmdSeq,
630  const Fw::CmdStringArg& fileName,
631  bool ignoreErrors
632  ) = 0;
633 
637  virtual void ShellCommand_cmdHandler(
638  FwOpcodeType opCode,
639  U32 cmdSeq,
640  const Fw::CmdStringArg& command,
641  const Fw::CmdStringArg& logFileName
642  ) = 0;
643 
647  virtual void AppendFile_cmdHandler(
648  FwOpcodeType opCode,
649  U32 cmdSeq,
650  const Fw::CmdStringArg& source,
651  const Fw::CmdStringArg& target
652  ) = 0;
653 
655  virtual void FileSize_cmdHandler(
656  FwOpcodeType opCode,
657  U32 cmdSeq,
658  const Fw::CmdStringArg& fileName
659  ) = 0;
660 
664  virtual void ListDirectory_cmdHandler(
665  FwOpcodeType opCode,
666  U32 cmdSeq,
667  const Fw::CmdStringArg& dirName
668  ) = 0;
669 
673  virtual void CalculateCrc_cmdHandler(
674  FwOpcodeType opCode,
675  U32 cmdSeq,
676  const Fw::CmdStringArg& filename
677  ) = 0;
678 
679  protected:
680 
681  // ----------------------------------------------------------------------
682  // Command handler base-class functions
683  //
684  // Call these functions directly to bypass the command input port
685  // ----------------------------------------------------------------------
686 
691  FwOpcodeType opCode,
692  U32 cmdSeq,
693  Fw::CmdArgBuffer& args
694  );
695 
700  FwOpcodeType opCode,
701  U32 cmdSeq,
702  Fw::CmdArgBuffer& args
703  );
704 
709  FwOpcodeType opCode,
710  U32 cmdSeq,
711  Fw::CmdArgBuffer& args
712  );
713 
718  FwOpcodeType opCode,
719  U32 cmdSeq,
720  Fw::CmdArgBuffer& args
721  );
722 
727  FwOpcodeType opCode,
728  U32 cmdSeq,
729  Fw::CmdArgBuffer& args
730  );
731 
736  FwOpcodeType opCode,
737  U32 cmdSeq,
738  Fw::CmdArgBuffer& args
739  );
740 
743  FwOpcodeType opCode,
744  U32 cmdSeq,
745  Fw::CmdArgBuffer& args
746  );
747 
752  FwOpcodeType opCode,
753  U32 cmdSeq,
754  Fw::CmdArgBuffer& args
755  );
756 
761  FwOpcodeType opCode,
762  U32 cmdSeq,
763  Fw::CmdArgBuffer& args
764  );
765 
766  protected:
767 
768  // ----------------------------------------------------------------------
769  // Pre-message hooks for async commands
770  //
771  // Each of these functions is invoked just before processing the
772  // corresponding command. By default they do nothing. You can
773  // override them to provide specific pre-command behavior.
774  // ----------------------------------------------------------------------
775 
777  virtual void CreateDirectory_preMsgHook(
778  FwOpcodeType opCode,
779  U32 cmdSeq
780  );
781 
783  virtual void MoveFile_preMsgHook(
784  FwOpcodeType opCode,
785  U32 cmdSeq
786  );
787 
789  virtual void RemoveDirectory_preMsgHook(
790  FwOpcodeType opCode,
791  U32 cmdSeq
792  );
793 
795  virtual void RemoveFile_preMsgHook(
796  FwOpcodeType opCode,
797  U32 cmdSeq
798  );
799 
801  virtual void ShellCommand_preMsgHook(
802  FwOpcodeType opCode,
803  U32 cmdSeq
804  );
805 
807  virtual void AppendFile_preMsgHook(
808  FwOpcodeType opCode,
809  U32 cmdSeq
810  );
811 
813  virtual void FileSize_preMsgHook(
814  FwOpcodeType opCode,
815  U32 cmdSeq
816  );
817 
819  virtual void ListDirectory_preMsgHook(
820  FwOpcodeType opCode,
821  U32 cmdSeq
822  );
823 
825  virtual void CalculateCrc_preMsgHook(
826  FwOpcodeType opCode,
827  U32 cmdSeq
828  );
829 
830  protected:
831 
832  // ----------------------------------------------------------------------
833  // Event logging functions
834  // ----------------------------------------------------------------------
835 
840  const Fw::StringBase& dirName,
841  U32 status
842  ) const;
843 
848  const Fw::StringBase& dirName,
849  U32 status
850  ) const;
851 
856  const Fw::StringBase& sourceFileName,
857  const Fw::StringBase& destFileName,
858  U32 status
859  ) const;
860 
865  const Fw::StringBase& fileName,
866  U32 status
867  ) const;
868 
873  const Fw::StringBase& command,
874  U32 status
875  ) const;
876 
881  const Fw::StringBase& source,
882  const Fw::StringBase& target,
883  U32 status
884  ) const;
885 
890  const Fw::StringBase& source,
891  const Fw::StringBase& target
892  ) const;
893 
898  const Fw::StringBase& command
899  ) const;
900 
905  const Fw::StringBase& dirName
906  ) const;
907 
912  const Fw::StringBase& dirName
913  ) const;
914 
919  const Fw::StringBase& sourceFileName,
920  const Fw::StringBase& destFileName
921  ) const;
922 
927  const Fw::StringBase& fileName
928  ) const;
929 
934  const Fw::StringBase& source,
935  const Fw::StringBase& target
936  ) const;
937 
942  const Fw::StringBase& command
943  ) const;
944 
949  const Fw::StringBase& dirName
950  ) const;
951 
956  const Fw::StringBase& dirName
957  ) const;
958 
963  const Fw::StringBase& sourceFileName,
964  const Fw::StringBase& destFileName
965  ) const;
966 
971  const Fw::StringBase& fileName
972  ) const;
973 
978  const Fw::StringBase& fileName,
979  FwSizeType size
980  ) const;
981 
986  const Fw::StringBase& fileName,
987  U32 status
988  ) const;
989 
994  const Fw::StringBase& fileName
995  ) const;
996 
1001  const Fw::StringBase& dirName
1002  ) const;
1003 
1008  const Fw::StringBase& dirName,
1009  U32 fileCount
1010  ) const;
1011 
1016  const Fw::StringBase& dirName,
1017  U32 status
1018  ) const;
1019 
1024  const Fw::StringBase& dirName,
1025  const Fw::StringBase& fileName,
1026  FwSizeType fileSize
1027  ) const;
1028 
1033  const Fw::StringBase& dirName,
1034  const Fw::StringBase& subdirName
1035  ) const;
1036 
1041  const Fw::StringBase& fileName
1042  ) const;
1043 
1048  const Fw::StringBase& fileName,
1049  U32 status
1050  ) const;
1051 
1056  const Fw::StringBase& fileName,
1057  U32 crc
1058  ) const;
1059 
1060  protected:
1061 
1062  // ----------------------------------------------------------------------
1063  // Telemetry write functions
1064  // ----------------------------------------------------------------------
1065 
1070  U32 arg,
1071  Fw::Time _tlmTime = Fw::Time()
1072  ) const;
1073 
1077  void tlmWrite_Errors(
1078  U32 arg,
1079  Fw::Time _tlmTime = Fw::Time()
1080  ) const;
1081 
1082  protected:
1083 
1084  // ----------------------------------------------------------------------
1085  // Time
1086  // ----------------------------------------------------------------------
1087 
1091  Fw::Time getTime() const;
1092 
1093  private:
1094 
1095  // ----------------------------------------------------------------------
1096  // Message dispatch functions
1097  // ----------------------------------------------------------------------
1098 
1100  virtual MsgDispatchStatus doDispatch();
1101 
1102  private:
1103 
1104  // ----------------------------------------------------------------------
1105  // Calls for messages received on special input ports
1106  // ----------------------------------------------------------------------
1107 
1109  static void m_p_cmdIn_in(
1110  Fw::PassiveComponentBase* callComp,
1111  FwIndexType portNum,
1112  FwOpcodeType opCode,
1113  U32 cmdSeq,
1114  Fw::CmdArgBuffer& args
1115  );
1116 
1117  private:
1118 
1119  // ----------------------------------------------------------------------
1120  // Calls for messages received on typed input ports
1121  // ----------------------------------------------------------------------
1122 
1124  static void m_p_pingIn_in(
1125  Fw::PassiveComponentBase* callComp,
1126  FwIndexType portNum,
1127  U32 key
1128  );
1129 
1131  static void m_p_schedIn_in(
1132  Fw::PassiveComponentBase* callComp,
1133  FwIndexType portNum,
1134  U32 context
1135  );
1136 
1137  private:
1138 
1139  // ----------------------------------------------------------------------
1140  // Special input ports
1141  // ----------------------------------------------------------------------
1142 
1144  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1145 
1146  private:
1147 
1148  // ----------------------------------------------------------------------
1149  // Typed input ports
1150  // ----------------------------------------------------------------------
1151 
1153  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1154 
1156  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1157 
1158  private:
1159 
1160  // ----------------------------------------------------------------------
1161  // Special output ports
1162  // ----------------------------------------------------------------------
1163 
1164 #if FW_ENABLE_TEXT_LOGGING == 1
1165 
1167  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1168 
1169 #endif
1170 
1172  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1173 
1175  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1176 
1178  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1179 
1181  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1182 
1184  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1185 
1186  private:
1187 
1188  // ----------------------------------------------------------------------
1189  // Typed output ports
1190  // ----------------------------------------------------------------------
1191 
1193  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1194 
1195  };
1196 
1197 }
1198 
1199 #endif
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
virtual void run_internalInterfaceHandler()=0
Internal interface handler for run.
void log_WARNING_HI_ListDirectoryError(const Fw::StringBase &dirName, U32 status) const
void AppendFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_DirectoryListingSubdir(const Fw::StringBase &dirName, const Fw::StringBase &subdirName) const
void log_ACTIVITY_HI_CreateDirectoryStarted(const Fw::StringBase &dirName) const
FwIdType FwOpcodeType
The type of a command opcode.
virtual void ListDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ListDirectory.
void log_ACTIVITY_HI_RemoveDirectorySucceeded(const Fw::StringBase &dirName) const
void log_ACTIVITY_HI_DirectoryListing(const Fw::StringBase &dirName, const Fw::StringBase &fileName, FwSizeType fileSize) const
virtual void MoveFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &sourceFileName, const Fw::CmdStringArg &destFileName)=0
PlatformSizeType FwSizeType
virtual void MoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command MoveFile.
virtual void ShellCommand_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command ShellCommand.
Append 1 file&#39;s contents to the end of another.
void log_ACTIVITY_HI_CalculateCrcStarted(const Fw::StringBase &fileName) const
I32 FwEnumStoreType
The File System component began creating a new directory.
virtual void CalculateCrc_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &filename)=0
void log_WARNING_HI_FileSizeError(const Fw::StringBase &fileName, U32 status) const
void run_internalInterfaceInvoke()
Internal interface base-class function for run.
An error occurred while attempting to move a file.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Base-class handler function for command FileSize.
void 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
Auto-generated base for FileManager component.
An error occurred while attempting to remove a directory.
void ShellCommand_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void log_ACTIVITY_HI_CalculateCrcSucceeded(const Fw::StringBase &fileName, U32 crc) const
void CalculateCrc_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Perform a Linux shell command and write the output to a log file.
void log_ACTIVITY_HI_ListDirectoryStarted(const Fw::StringBase &dirName) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
Enum representing a command response.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_AppendFileSucceeded(const Fw::StringBase &source, const Fw::StringBase &target) const
FileManagerComponentBase(const char *compName="")
Construct FileManagerComponentBase object.
void ListDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
The File System component executed a shell command that returned status zero.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
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
void RemoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
The File System component began executing a shell command.
friend class FileManagerTester
Friend class tester implementation to support white-box testing.
The File System component moved a file to a new location without error.
void log_ACTIVITY_HI_RemoveDirectoryStarted(const Fw::StringBase &dirName) const
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void log_ACTIVITY_HI_ShellCommandSucceeded(const Fw::StringBase &command) const
void RemoveDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
An error occurred while attempting to create a directory.
static constexpr FwIndexType getNum_schedIn_InputPorts()
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
virtual void ShellCommand_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &command, const Fw::CmdStringArg &logFileName)=0
virtual void CreateDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CreateDirectory.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
The File System component deleted and existing directory without error.
void MoveFile_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void FileSize_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
Handler for command FileSize.
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status) const
The File System component began deleting a directory.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
The File System component appended 2 files without error.
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
An error occurred while attempting to remove a file.
The File System component returned status non-zero when trying to append 2 files together.
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_ACTIVITY_HI_ShellCommandStarted(const Fw::StringBase &command) const
The File System component deleted an existing file without error.
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
static constexpr FwIndexType getNum_pingIn_InputPorts()
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status) const
void regCommands()
Register commands with the Command Dispatcher.
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.
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.
virtual void RemoveDirectory_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveDirectory.
void log_WARNING_HI_ShellCommandFailed(const Fw::StringBase &command, U32 status) const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_DirectoryCreateError(const Fw::StringBase &dirName, U32 status) const
void log_ACTIVITY_HI_RemoveFileSucceeded(const Fw::StringBase &fileName) const
void log_WARNING_HI_FileMoveError(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName, U32 status) const
The File System component began deleting an existing file.
void tlmWrite_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void CreateDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
The File System component appended 2 files without error.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
friend class FileManagerTesterBase
Friend class tester to support autocoded test harness.
The File System component created a new directory without error.
The File System component began moving a file to a new location.
virtual void CalculateCrc_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CalculateCrc.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
The File System component executed a shell command that returned status non-zero. ...
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0