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"
33 
34 namespace Svc {
35 
42  {
43 
44  // ----------------------------------------------------------------------
45  // Friend classes
46  // ----------------------------------------------------------------------
47 
49  friend class FileManagerTesterBase;
51  friend class FileManagerTester;
52 
53  protected:
54 
55  // ----------------------------------------------------------------------
56  // Constants
57  // ----------------------------------------------------------------------
58 
60  enum {
62  };
63 
65  enum {
68  };
69 
71  enum {
78  };
79 
81  enum {
83  };
84 
86  enum {
96  };
97 
99  enum {
129  };
130 
132  enum {
135  };
136 
137  public:
138 
139  // ----------------------------------------------------------------------
140  // Component initialization
141  // ----------------------------------------------------------------------
142 
144  void init(
145  FwSizeType queueDepth,
146  FwEnumStoreType instance = 0
147  );
148 
149  public:
150 
151  // ----------------------------------------------------------------------
152  // Getters for special input ports
153  // ----------------------------------------------------------------------
154 
159  FwIndexType portNum
160  );
161 
162  public:
163 
164  // ----------------------------------------------------------------------
165  // Getters for typed input ports
166  // ----------------------------------------------------------------------
167 
172  FwIndexType portNum
173  );
174 
179  FwIndexType portNum
180  );
181 
182  public:
183 
184  // ----------------------------------------------------------------------
185  // Connect input ports to special output ports
186  // ----------------------------------------------------------------------
187 
188 #if FW_ENABLE_TEXT_LOGGING == 1
189 
191  void set_LogText_OutputPort(
192  FwIndexType portNum,
193  Fw::InputLogTextPort* port
194  );
195 
196 #endif
197 
200  FwIndexType portNum,
201  Fw::InputCmdRegPort* port
202  );
203 
206  FwIndexType portNum,
208  );
209 
212  FwIndexType portNum,
213  Fw::InputLogPort* port
214  );
215 
218  FwIndexType portNum,
219  Fw::InputTimePort* port
220  );
221 
224  FwIndexType portNum,
225  Fw::InputTlmPort* port
226  );
227 
228  public:
229 
230  // ----------------------------------------------------------------------
231  // Connect typed input ports to typed output ports
232  // ----------------------------------------------------------------------
233 
236  FwIndexType portNum,
237  Svc::InputPingPort* port
238  );
239 
240 #if FW_PORT_SERIALIZATION
241 
242  public:
243 
244  // ----------------------------------------------------------------------
245  // Connect serial input ports to special output ports
246  // ----------------------------------------------------------------------
247 
248 #if FW_ENABLE_TEXT_LOGGING == 1
249 
251  void set_LogText_OutputPort(
252  FwIndexType portNum,
253  Fw::InputSerializePort* port
254  );
255 
256 #endif
257 
260  FwIndexType portNum,
261  Fw::InputSerializePort* port
262  );
263 
266  FwIndexType portNum,
267  Fw::InputSerializePort* port
268  );
269 
272  FwIndexType portNum,
273  Fw::InputSerializePort* port
274  );
275 
278  FwIndexType portNum,
279  Fw::InputSerializePort* port
280  );
281 
284  FwIndexType portNum,
285  Fw::InputSerializePort* port
286  );
287 
288 #endif
289 
290 #if FW_PORT_SERIALIZATION
291 
292  public:
293 
294  // ----------------------------------------------------------------------
295  // Connect serial input ports to typed output ports
296  // ----------------------------------------------------------------------
297 
300  FwIndexType portNum,
301  Fw::InputSerializePort* port
302  );
303 
304 #endif
305 
306  public:
307 
308  // ----------------------------------------------------------------------
309  // Command registration
310  // ----------------------------------------------------------------------
311 
315  void regCommands();
316 
317  protected:
318 
319  // ----------------------------------------------------------------------
320  // Component construction and destruction
321  // ----------------------------------------------------------------------
322 
325  const char* compName = ""
326  );
327 
329  virtual ~FileManagerComponentBase();
330 
331  protected:
332 
333  // ----------------------------------------------------------------------
334  // Getters for numbers of special input ports
335  // ----------------------------------------------------------------------
336 
341  return NUM_CMDIN_INPUT_PORTS;
342  }
343 
344  protected:
345 
346  // ----------------------------------------------------------------------
347  // Getters for numbers of typed input ports
348  // ----------------------------------------------------------------------
349 
354  return NUM_PINGIN_INPUT_PORTS;
355  }
356 
362  }
363 
364  protected:
365 
366  // ----------------------------------------------------------------------
367  // Getters for numbers of special output ports
368  // ----------------------------------------------------------------------
369 
370 #if FW_ENABLE_TEXT_LOGGING == 1
371 
375  static constexpr FwIndexType getNum_LogText_OutputPorts() {
377  }
378 
379 #endif
380 
386  }
387 
393  }
394 
400  }
401 
407  }
408 
414  }
415 
416  protected:
417 
418  // ----------------------------------------------------------------------
419  // Getters for numbers of typed output ports
420  // ----------------------------------------------------------------------
421 
427  }
428 
429  protected:
430 
431  // ----------------------------------------------------------------------
432  // Connection status queries for special output ports
433  // ----------------------------------------------------------------------
434 
435 #if FW_ENABLE_TEXT_LOGGING == 1
436 
440  bool isConnected_LogText_OutputPort(
441  FwIndexType portNum
442  );
443 
444 #endif
445 
450  FwIndexType portNum
451  );
452 
457  FwIndexType portNum
458  );
459 
464  FwIndexType portNum
465  );
466 
471  FwIndexType portNum
472  );
473 
478  FwIndexType portNum
479  );
480 
481  protected:
482 
483  // ----------------------------------------------------------------------
484  // Connection status queries for typed output ports
485  // ----------------------------------------------------------------------
486 
491  FwIndexType portNum
492  );
493 
494  protected:
495 
496  // ----------------------------------------------------------------------
497  // Handlers to implement for typed input ports
498  // ----------------------------------------------------------------------
499 
501  virtual void pingIn_handler(
502  FwIndexType portNum,
503  U32 key
504  ) = 0;
505 
507  virtual void schedIn_handler(
508  FwIndexType portNum,
509  U32 context
510  ) = 0;
511 
512  protected:
513 
514  // ----------------------------------------------------------------------
515  // Port handler base-class functions for typed input ports
516  //
517  // Call these functions directly to bypass the corresponding ports
518  // ----------------------------------------------------------------------
519 
521  void pingIn_handlerBase(
522  FwIndexType portNum,
523  U32 key
524  );
525 
527  void schedIn_handlerBase(
528  FwIndexType portNum,
529  U32 context
530  );
531 
532  protected:
533 
534  // ----------------------------------------------------------------------
535  // Pre-message hooks for typed async input ports
536  //
537  // Each of these functions is invoked just before processing a message
538  // on the corresponding port. By default, they do nothing. You can
539  // override them to provide specific pre-message behavior.
540  // ----------------------------------------------------------------------
541 
543  virtual void pingIn_preMsgHook(
544  FwIndexType portNum,
545  U32 key
546  );
547 
548  protected:
549 
550  // ----------------------------------------------------------------------
551  // Invocation functions for typed output ports
552  // ----------------------------------------------------------------------
553 
555  void pingOut_out(
556  FwIndexType portNum,
557  U32 key
558  );
559 
560  protected:
561 
562  // ----------------------------------------------------------------------
563  // Internal interface handlers
564  // ----------------------------------------------------------------------
565 
567  virtual void run_internalInterfaceHandler() = 0;
568 
569  protected:
570 
571  // ----------------------------------------------------------------------
572  // Internal interface base-class functions
573  // ----------------------------------------------------------------------
574 
577 
578  protected:
579 
580  // ----------------------------------------------------------------------
581  // Command response
582  // ----------------------------------------------------------------------
583 
585  void cmdResponse_out(
586  FwOpcodeType opCode,
587  U32 cmdSeq,
588  Fw::CmdResponse response
589  );
590 
591  protected:
592 
593  // ----------------------------------------------------------------------
594  // Command handlers to implement
595  // ----------------------------------------------------------------------
596 
600  virtual void CreateDirectory_cmdHandler(
601  FwOpcodeType opCode,
602  U32 cmdSeq,
603  const Fw::CmdStringArg& dirName
604  ) = 0;
605 
609  virtual void MoveFile_cmdHandler(
610  FwOpcodeType opCode,
611  U32 cmdSeq,
612  const Fw::CmdStringArg& sourceFileName,
613  const Fw::CmdStringArg& destFileName
614  ) = 0;
615 
619  virtual void RemoveDirectory_cmdHandler(
620  FwOpcodeType opCode,
621  U32 cmdSeq,
622  const Fw::CmdStringArg& dirName
623  ) = 0;
624 
628  virtual void RemoveFile_cmdHandler(
629  FwOpcodeType opCode,
630  U32 cmdSeq,
631  const Fw::CmdStringArg& fileName,
632  bool ignoreErrors
633  ) = 0;
634 
638  virtual void ShellCommand_cmdHandler(
639  FwOpcodeType opCode,
640  U32 cmdSeq,
641  const Fw::CmdStringArg& command,
642  const Fw::CmdStringArg& logFileName
643  ) = 0;
644 
648  virtual void AppendFile_cmdHandler(
649  FwOpcodeType opCode,
650  U32 cmdSeq,
651  const Fw::CmdStringArg& source,
652  const Fw::CmdStringArg& target
653  ) = 0;
654 
656  virtual void FileSize_cmdHandler(
657  FwOpcodeType opCode,
658  U32 cmdSeq,
659  const Fw::CmdStringArg& fileName
660  ) = 0;
661 
665  virtual void ListDirectory_cmdHandler(
666  FwOpcodeType opCode,
667  U32 cmdSeq,
668  const Fw::CmdStringArg& dirName
669  ) = 0;
670 
674  virtual void CalculateCrc_cmdHandler(
675  FwOpcodeType opCode,
676  U32 cmdSeq,
677  const Fw::CmdStringArg& filename
678  ) = 0;
679 
680  protected:
681 
682  // ----------------------------------------------------------------------
683  // Command handler base-class functions
684  //
685  // Call these functions directly to bypass the command input port
686  // ----------------------------------------------------------------------
687 
692  FwOpcodeType opCode,
693  U32 cmdSeq,
694  Fw::CmdArgBuffer& args
695  );
696 
701  FwOpcodeType opCode,
702  U32 cmdSeq,
703  Fw::CmdArgBuffer& args
704  );
705 
710  FwOpcodeType opCode,
711  U32 cmdSeq,
712  Fw::CmdArgBuffer& args
713  );
714 
719  FwOpcodeType opCode,
720  U32 cmdSeq,
721  Fw::CmdArgBuffer& args
722  );
723 
728  FwOpcodeType opCode,
729  U32 cmdSeq,
730  Fw::CmdArgBuffer& args
731  );
732 
737  FwOpcodeType opCode,
738  U32 cmdSeq,
739  Fw::CmdArgBuffer& args
740  );
741 
744  FwOpcodeType opCode,
745  U32 cmdSeq,
746  Fw::CmdArgBuffer& args
747  );
748 
753  FwOpcodeType opCode,
754  U32 cmdSeq,
755  Fw::CmdArgBuffer& args
756  );
757 
762  FwOpcodeType opCode,
763  U32 cmdSeq,
764  Fw::CmdArgBuffer& args
765  );
766 
767  protected:
768 
769  // ----------------------------------------------------------------------
770  // Pre-message hooks for async commands
771  //
772  // Each of these functions is invoked just before processing the
773  // corresponding command. By default they do nothing. You can
774  // override them to provide specific pre-command behavior.
775  // ----------------------------------------------------------------------
776 
778  virtual void CreateDirectory_preMsgHook(
779  FwOpcodeType opCode,
780  U32 cmdSeq
781  );
782 
784  virtual void MoveFile_preMsgHook(
785  FwOpcodeType opCode,
786  U32 cmdSeq
787  );
788 
790  virtual void RemoveDirectory_preMsgHook(
791  FwOpcodeType opCode,
792  U32 cmdSeq
793  );
794 
796  virtual void RemoveFile_preMsgHook(
797  FwOpcodeType opCode,
798  U32 cmdSeq
799  );
800 
802  virtual void ShellCommand_preMsgHook(
803  FwOpcodeType opCode,
804  U32 cmdSeq
805  );
806 
808  virtual void AppendFile_preMsgHook(
809  FwOpcodeType opCode,
810  U32 cmdSeq
811  );
812 
814  virtual void FileSize_preMsgHook(
815  FwOpcodeType opCode,
816  U32 cmdSeq
817  );
818 
820  virtual void ListDirectory_preMsgHook(
821  FwOpcodeType opCode,
822  U32 cmdSeq
823  );
824 
826  virtual void CalculateCrc_preMsgHook(
827  FwOpcodeType opCode,
828  U32 cmdSeq
829  );
830 
831  protected:
832 
833  // ----------------------------------------------------------------------
834  // Event logging functions
835  // ----------------------------------------------------------------------
836 
841  const Fw::StringBase& dirName,
842  U32 status
843  ) const;
844 
849  const Fw::StringBase& dirName,
850  U32 status
851  ) const;
852 
857  const Fw::StringBase& sourceFileName,
858  const Fw::StringBase& destFileName,
859  U32 status
860  ) const;
861 
866  const Fw::StringBase& fileName,
867  U32 status
868  ) const;
869 
874  const Fw::StringBase& command,
875  U32 status
876  ) const;
877 
882  const Fw::StringBase& source,
883  const Fw::StringBase& target,
884  U32 status
885  ) const;
886 
891  const Fw::StringBase& source,
892  const Fw::StringBase& target
893  ) const;
894 
899  const Fw::StringBase& command
900  ) const;
901 
906  const Fw::StringBase& dirName
907  ) const;
908 
913  const Fw::StringBase& dirName
914  ) const;
915 
920  const Fw::StringBase& sourceFileName,
921  const Fw::StringBase& destFileName
922  ) const;
923 
928  const Fw::StringBase& fileName
929  ) const;
930 
935  const Fw::StringBase& source,
936  const Fw::StringBase& target
937  ) const;
938 
943  const Fw::StringBase& command
944  ) const;
945 
950  const Fw::StringBase& dirName
951  ) const;
952 
957  const Fw::StringBase& dirName
958  ) const;
959 
964  const Fw::StringBase& sourceFileName,
965  const Fw::StringBase& destFileName
966  ) const;
967 
972  const Fw::StringBase& fileName
973  ) const;
974 
979  const Fw::StringBase& fileName,
980  FwSizeType size
981  ) const;
982 
987  const Fw::StringBase& fileName,
988  U32 status
989  ) const;
990 
995  const Fw::StringBase& fileName
996  ) const;
997 
1002  const Fw::StringBase& dirName
1003  ) const;
1004 
1009  const Fw::StringBase& dirName,
1010  U32 fileCount
1011  ) const;
1012 
1017  const Fw::StringBase& dirName,
1018  U32 status
1019  ) const;
1020 
1025  const Fw::StringBase& dirName,
1026  const Fw::StringBase& fileName,
1027  FwSizeType fileSize
1028  ) const;
1029 
1034  const Fw::StringBase& dirName,
1035  const Fw::StringBase& subdirName
1036  ) const;
1037 
1042  const Fw::StringBase& fileName
1043  ) const;
1044 
1049  const Fw::StringBase& fileName,
1050  U32 status
1051  ) const;
1052 
1057  const Fw::StringBase& fileName,
1058  U32 crc
1059  ) const;
1060 
1061  protected:
1062 
1063  // ----------------------------------------------------------------------
1064  // Telemetry write functions
1065  // ----------------------------------------------------------------------
1066 
1071  U32 arg,
1072  Fw::Time _tlmTime = Fw::Time()
1073  ) const;
1074 
1078  void tlmWrite_Errors(
1079  U32 arg,
1080  Fw::Time _tlmTime = Fw::Time()
1081  ) const;
1082 
1083  protected:
1084 
1085  // ----------------------------------------------------------------------
1086  // Time
1087  // ----------------------------------------------------------------------
1088 
1092  Fw::Time getTime() const;
1093 
1094  private:
1095 
1096  // ----------------------------------------------------------------------
1097  // Message dispatch functions
1098  // ----------------------------------------------------------------------
1099 
1101  virtual MsgDispatchStatus doDispatch();
1102 
1103  private:
1104 
1105  // ----------------------------------------------------------------------
1106  // Calls for messages received on special input ports
1107  // ----------------------------------------------------------------------
1108 
1110  static void m_p_cmdIn_in(
1111  Fw::PassiveComponentBase* callComp,
1112  FwIndexType portNum,
1113  FwOpcodeType opCode,
1114  U32 cmdSeq,
1115  Fw::CmdArgBuffer& args
1116  );
1117 
1118  private:
1119 
1120  // ----------------------------------------------------------------------
1121  // Calls for messages received on typed input ports
1122  // ----------------------------------------------------------------------
1123 
1125  static void m_p_pingIn_in(
1126  Fw::PassiveComponentBase* callComp,
1127  FwIndexType portNum,
1128  U32 key
1129  );
1130 
1132  static void m_p_schedIn_in(
1133  Fw::PassiveComponentBase* callComp,
1134  FwIndexType portNum,
1135  U32 context
1136  );
1137 
1138  private:
1139 
1140  // ----------------------------------------------------------------------
1141  // Special input ports
1142  // ----------------------------------------------------------------------
1143 
1145  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1146 
1147  private:
1148 
1149  // ----------------------------------------------------------------------
1150  // Typed input ports
1151  // ----------------------------------------------------------------------
1152 
1154  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1155 
1157  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1158 
1159  private:
1160 
1161  // ----------------------------------------------------------------------
1162  // Special output ports
1163  // ----------------------------------------------------------------------
1164 
1165 #if FW_ENABLE_TEXT_LOGGING == 1
1166 
1168  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1169 
1170 #endif
1171 
1173  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1174 
1176  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1177 
1179  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1180 
1182  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1183 
1185  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1186 
1187  private:
1188 
1189  // ----------------------------------------------------------------------
1190  // Typed output ports
1191  // ----------------------------------------------------------------------
1192 
1194  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1195 
1196  };
1197 
1198 }
1199 
1200 #endif
An error occurred while attempting to create a directory.
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
An error occurred while attempting to move a file.
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
The File System component began moving a file to a new location.
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.
void log_ACTIVITY_HI_CalculateCrcStarted(const Fw::StringBase &fileName) const
I32 FwEnumStoreType
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.
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
An error occurred while attempting to remove a directory.
Auto-generated base for FileManager component.
An error occurred while attempting to remove a file.
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)
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.
Append 1 file&#39;s contents to the end of another.
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
The File System component moved a file to a new location without error.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
The File System component executed a shell command that returned status zero.
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
The File System component executed a shell command that returned status non-zero. ...
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
The File System component appended 2 files without error.
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
The File System component returned status non-zero when trying to append 2 files together.
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)
friend class FileManagerTester
Friend class tester implementation to support white-box testing.
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)
static constexpr FwIndexType getNum_schedIn_InputPorts()
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
The File System component deleted an existing file without error.
virtual void ShellCommand_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &command, const Fw::CmdStringArg &logFileName)=0
The File System component deleted and existing directory without error.
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)
The File System component began creating a new directory.
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
The File System component appended 2 files without error.
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
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
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 began executing a shell command.
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
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
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
The File System component began deleting a directory.
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.
Perform a Linux shell command and write the output to a log file.
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
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
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.
virtual void CalculateCrc_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CalculateCrc.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
The File System component created a new directory without error.
The File System component began deleting an existing file.
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0