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
23 #if !FW_DIRECT_PORT_CALLS
25 #endif
26 #if !FW_DIRECT_PORT_CALLS
28 #endif
29 #include "Fw/Time/TimePortAc.hpp"
30 #include "Fw/Tlm/TlmPortAc.hpp"
31 #include "Fw/Tlm/TlmString.hpp"
33 #include "Svc/Ping/PingPortAc.hpp"
37 
38 namespace Svc {
39 
46  {
47 
48  // ----------------------------------------------------------------------
49  // Friend classes
50  // ----------------------------------------------------------------------
51 
53  friend class FileManagerTesterBase;
55  friend class FileManagerTester;
56 
57  protected:
58 
59  // ----------------------------------------------------------------------
60  // Constants
61  // ----------------------------------------------------------------------
62 
64  enum {
66  };
67 
69  enum {
72  };
73 
75  enum {
82  };
83 
85  enum {
87  };
88 
90  enum {
99  };
100 
102  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 #if !FW_DIRECT_PORT_CALLS
150 
151  public:
152 
153  // ----------------------------------------------------------------------
154  // Getters for special input ports
155  // ----------------------------------------------------------------------
156 
161  FwIndexType portNum
162  );
163 
164 #endif
165 
166 #if !FW_DIRECT_PORT_CALLS
167 
168  public:
169 
170  // ----------------------------------------------------------------------
171  // Getters for typed input ports
172  // ----------------------------------------------------------------------
173 
178  FwIndexType portNum
179  );
180 
185  FwIndexType portNum
186  );
187 
188 #endif
189 
190 #if !FW_DIRECT_PORT_CALLS
191 
192  public:
193 
194  // ----------------------------------------------------------------------
195  // Connect input ports to special output ports
196  // ----------------------------------------------------------------------
197 
198 #if FW_ENABLE_TEXT_LOGGING == 1
199 
201  void set_LogText_OutputPort(
202  FwIndexType portNum,
203  Fw::InputLogTextPort* port
204  );
205 
206 #endif
207 
210  FwIndexType portNum,
211  Fw::InputCmdRegPort* port
212  );
213 
216  FwIndexType portNum,
218  );
219 
222  FwIndexType portNum,
223  Fw::InputLogPort* port
224  );
225 
228  FwIndexType portNum,
229  Fw::InputTimePort* port
230  );
231 
234  FwIndexType portNum,
235  Fw::InputTlmPort* port
236  );
237 
238 #endif
239 
240 #if !FW_DIRECT_PORT_CALLS
241 
242  public:
243 
244  // ----------------------------------------------------------------------
245  // Connect typed input ports to typed output ports
246  // ----------------------------------------------------------------------
247 
250  FwIndexType portNum,
251  Svc::InputPingPort* port
252  );
253 
254 #endif
255 
256 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
257 
258  public:
259 
260  // ----------------------------------------------------------------------
261  // Connect serial input ports to special output ports
262  // ----------------------------------------------------------------------
263 
264 #if FW_ENABLE_TEXT_LOGGING == 1
265 
267  void set_LogText_OutputPort(
268  FwIndexType portNum,
269  Fw::InputSerializePort* port
270  );
271 
272 #endif
273 
276  FwIndexType portNum,
277  Fw::InputSerializePort* port
278  );
279 
282  FwIndexType portNum,
283  Fw::InputSerializePort* port
284  );
285 
288  FwIndexType portNum,
289  Fw::InputSerializePort* port
290  );
291 
294  FwIndexType portNum,
295  Fw::InputSerializePort* port
296  );
297 
300  FwIndexType portNum,
301  Fw::InputSerializePort* port
302  );
303 
304 #endif
305 
306 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
307 
308  public:
309 
310  // ----------------------------------------------------------------------
311  // Connect serial input ports to typed output ports
312  // ----------------------------------------------------------------------
313 
316  FwIndexType portNum,
317  Fw::InputSerializePort* port
318  );
319 
320 #endif
321 
322  public:
323 
324  // ----------------------------------------------------------------------
325  // Command registration
326  // ----------------------------------------------------------------------
327 
331  void regCommands();
332 
333  protected:
334 
335  // ----------------------------------------------------------------------
336  // Component construction and destruction
337  // ----------------------------------------------------------------------
338 
341  const char* compName = ""
342  );
343 
345  virtual ~FileManagerComponentBase();
346 
347  protected:
348 
349  // ----------------------------------------------------------------------
350  // Getters for numbers of special input ports
351  // ----------------------------------------------------------------------
352 
357  return NUM_CMDIN_INPUT_PORTS;
358  }
359 
360  protected:
361 
362  // ----------------------------------------------------------------------
363  // Getters for numbers of typed input ports
364  // ----------------------------------------------------------------------
365 
370  return NUM_PINGIN_INPUT_PORTS;
371  }
372 
378  }
379 
380  protected:
381 
382  // ----------------------------------------------------------------------
383  // Getters for numbers of special output ports
384  // ----------------------------------------------------------------------
385 
386 #if FW_ENABLE_TEXT_LOGGING == 1
387 
391  static constexpr FwIndexType getNum_LogText_OutputPorts() {
393  }
394 
395 #endif
396 
402  }
403 
409  }
410 
416  }
417 
423  }
424 
430  }
431 
432  protected:
433 
434  // ----------------------------------------------------------------------
435  // Getters for numbers of typed output ports
436  // ----------------------------------------------------------------------
437 
443  }
444 
445  protected:
446 
447  // ----------------------------------------------------------------------
448  // Connection status queries for special output ports
449  // ----------------------------------------------------------------------
450 
451 #if FW_ENABLE_TEXT_LOGGING == 1
452 
456  bool isConnected_LogText_OutputPort(
457  FwIndexType portNum
458  ) const;
459 
460 #endif
461 
466  FwIndexType portNum
467  ) const;
468 
473  FwIndexType portNum
474  ) const;
475 
480  FwIndexType portNum
481  ) const;
482 
487  FwIndexType portNum
488  ) const;
489 
494  FwIndexType portNum
495  ) const;
496 
497  protected:
498 
499  // ----------------------------------------------------------------------
500  // Connection status queries for typed output ports
501  // ----------------------------------------------------------------------
502 
507  FwIndexType portNum
508  ) const;
509 
510 #if FW_DIRECT_PORT_CALLS
511  public:
512 #else
513  protected:
514 #endif
515 
516  // ----------------------------------------------------------------------
517  // Port handler base-class functions for special input ports
518  //
519  // Call these functions directly to bypass the corresponding ports
520  // ----------------------------------------------------------------------
521 
523  void cmdIn_handlerBase(
524  FwIndexType portNum,
525  FwOpcodeType opCode,
526  U32 cmdSeq,
527  Fw::CmdArgBuffer& args
528  );
529 
530  protected:
531 
532  // ----------------------------------------------------------------------
533  // Handlers to implement for typed input ports
534  // ----------------------------------------------------------------------
535 
537  virtual void pingIn_handler(
538  FwIndexType portNum,
539  U32 key
540  ) = 0;
541 
543  virtual void schedIn_handler(
544  FwIndexType portNum,
545  U32 context
546  ) = 0;
547 
548 #if FW_DIRECT_PORT_CALLS
549  public:
550 #else
551  protected:
552 #endif
553 
554  // ----------------------------------------------------------------------
555  // Port handler base-class functions for typed input ports
556  //
557  // Call these functions directly to bypass the corresponding ports
558  // ----------------------------------------------------------------------
559 
561  void pingIn_handlerBase(
562  FwIndexType portNum,
563  U32 key
564  );
565 
567  void schedIn_handlerBase(
568  FwIndexType portNum,
569  U32 context
570  );
571 
572  protected:
573 
574  // ----------------------------------------------------------------------
575  // Pre-message hooks for typed async input ports
576  //
577  // Each of these functions is invoked just before processing a message
578  // on the corresponding port. By default, they do nothing. You can
579  // override them to provide specific pre-message behavior.
580  // ----------------------------------------------------------------------
581 
583  virtual void pingIn_preMsgHook(
584  FwIndexType portNum,
585  U32 key
586  );
587 
588  protected:
589 
590  // ----------------------------------------------------------------------
591  // Invocation functions for typed output ports
592  // ----------------------------------------------------------------------
593 
595  void pingOut_out(
596  FwIndexType portNum,
597  U32 key
598  ) const;
599 
600  protected:
601 
602  // ----------------------------------------------------------------------
603  // Internal interface handlers
604  // ----------------------------------------------------------------------
605 
607  virtual void run_internalInterfaceHandler() = 0;
608 
609  protected:
610 
611  // ----------------------------------------------------------------------
612  // Internal interface base-class functions
613  // ----------------------------------------------------------------------
614 
617 
618  protected:
619 
620  // ----------------------------------------------------------------------
621  // Command response
622  // ----------------------------------------------------------------------
623 
625  void cmdResponse_out(
626  FwOpcodeType opCode,
627  U32 cmdSeq,
628  Fw::CmdResponse response
629  );
630 
631  protected:
632 
633  // ----------------------------------------------------------------------
634  // Command handlers to implement
635  // ----------------------------------------------------------------------
636 
640  virtual void CreateDirectory_cmdHandler(
641  FwOpcodeType opCode,
642  U32 cmdSeq,
643  const Fw::CmdStringArg& dirName
644  ) = 0;
645 
649  virtual void MoveFile_cmdHandler(
650  FwOpcodeType opCode,
651  U32 cmdSeq,
652  const Fw::CmdStringArg& sourceFileName,
653  const Fw::CmdStringArg& destFileName
654  ) = 0;
655 
659  virtual void RemoveDirectory_cmdHandler(
660  FwOpcodeType opCode,
661  U32 cmdSeq,
662  const Fw::CmdStringArg& dirName
663  ) = 0;
664 
668  virtual void RemoveFile_cmdHandler(
669  FwOpcodeType opCode,
670  U32 cmdSeq,
671  const Fw::CmdStringArg& fileName,
672  bool ignoreErrors
673  ) = 0;
674 
678  virtual void AppendFile_cmdHandler(
679  FwOpcodeType opCode,
680  U32 cmdSeq,
681  const Fw::CmdStringArg& source,
682  const Fw::CmdStringArg& target
683  ) = 0;
684 
686  virtual void FileSize_cmdHandler(
687  FwOpcodeType opCode,
688  U32 cmdSeq,
689  const Fw::CmdStringArg& fileName
690  ) = 0;
691 
695  virtual void ListDirectory_cmdHandler(
696  FwOpcodeType opCode,
697  U32 cmdSeq,
698  const Fw::CmdStringArg& dirName
699  ) = 0;
700 
704  virtual void CalculateCrc_cmdHandler(
705  FwOpcodeType opCode,
706  U32 cmdSeq,
707  const Fw::CmdStringArg& filename
708  ) = 0;
709 
710  protected:
711 
712  // ----------------------------------------------------------------------
713  // Command handler base-class functions
714  //
715  // Call these functions directly to bypass the command input port
716  // ----------------------------------------------------------------------
717 
722  FwOpcodeType opCode,
723  U32 cmdSeq,
724  Fw::CmdArgBuffer& args
725  );
726 
731  FwOpcodeType opCode,
732  U32 cmdSeq,
733  Fw::CmdArgBuffer& args
734  );
735 
740  FwOpcodeType opCode,
741  U32 cmdSeq,
742  Fw::CmdArgBuffer& args
743  );
744 
749  FwOpcodeType opCode,
750  U32 cmdSeq,
751  Fw::CmdArgBuffer& args
752  );
753 
758  FwOpcodeType opCode,
759  U32 cmdSeq,
760  Fw::CmdArgBuffer& args
761  );
762 
765  FwOpcodeType opCode,
766  U32 cmdSeq,
767  Fw::CmdArgBuffer& args
768  );
769 
774  FwOpcodeType opCode,
775  U32 cmdSeq,
776  Fw::CmdArgBuffer& args
777  );
778 
783  FwOpcodeType opCode,
784  U32 cmdSeq,
785  Fw::CmdArgBuffer& args
786  );
787 
788  protected:
789 
790  // ----------------------------------------------------------------------
791  // Pre-message hooks for async commands
792  //
793  // Each of these functions is invoked just before processing the
794  // corresponding command. By default they do nothing. You can
795  // override them to provide specific pre-command behavior.
796  // ----------------------------------------------------------------------
797 
799  virtual void CreateDirectory_preMsgHook(
800  FwOpcodeType opCode,
801  U32 cmdSeq
802  );
803 
805  virtual void MoveFile_preMsgHook(
806  FwOpcodeType opCode,
807  U32 cmdSeq
808  );
809 
811  virtual void RemoveDirectory_preMsgHook(
812  FwOpcodeType opCode,
813  U32 cmdSeq
814  );
815 
817  virtual void RemoveFile_preMsgHook(
818  FwOpcodeType opCode,
819  U32 cmdSeq
820  );
821 
823  virtual void AppendFile_preMsgHook(
824  FwOpcodeType opCode,
825  U32 cmdSeq
826  );
827 
829  virtual void FileSize_preMsgHook(
830  FwOpcodeType opCode,
831  U32 cmdSeq
832  );
833 
835  virtual void ListDirectory_preMsgHook(
836  FwOpcodeType opCode,
837  U32 cmdSeq
838  );
839 
841  virtual void CalculateCrc_preMsgHook(
842  FwOpcodeType opCode,
843  U32 cmdSeq
844  );
845 
846  protected:
847 
848  // ----------------------------------------------------------------------
849  // Event logging functions
850  // ----------------------------------------------------------------------
851 
856  const Fw::StringBase& dirName,
857  U32 status
858  ) const;
859 
864  const Fw::StringBase& dirName,
865  U32 status
866  ) const;
867 
872  const Fw::StringBase& sourceFileName,
873  const Fw::StringBase& destFileName,
874  U32 status
875  ) const;
876 
881  const Fw::StringBase& fileName,
882  U32 status
883  ) const;
884 
889  const Fw::StringBase& source,
890  const Fw::StringBase& target,
891  U32 status
892  ) const;
893 
898  const Fw::StringBase& source,
899  const Fw::StringBase& target
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& dirName
944  ) const;
945 
950  const Fw::StringBase& dirName
951  ) const;
952 
957  const Fw::StringBase& sourceFileName,
958  const Fw::StringBase& destFileName
959  ) const;
960 
965  const Fw::StringBase& fileName
966  ) const;
967 
972  const Fw::StringBase& fileName,
973  FwSizeType size
974  ) const;
975 
980  const Fw::StringBase& fileName,
981  U32 status
982  ) const;
983 
988  const Fw::StringBase& fileName
989  ) const;
990 
995  const Fw::StringBase& dirName
996  ) const;
997 
1002  const Fw::StringBase& dirName,
1003  U32 fileCount
1004  ) const;
1005 
1010  const Fw::StringBase& dirName,
1011  U32 status
1012  ) const;
1013 
1018  const Fw::StringBase& dirName,
1019  const Fw::StringBase& fileName,
1020  FwSizeType fileSize
1021  ) const;
1022 
1027  const Fw::StringBase& dirName,
1028  const Fw::StringBase& subdirName
1029  ) const;
1030 
1035  const Fw::StringBase& fileName
1036  ) const;
1037 
1042  const Fw::StringBase& fileName,
1043  U32 status
1044  ) const;
1045 
1050  const Fw::StringBase& fileName,
1051  U32 crc
1052  ) const;
1053 
1054  protected:
1055 
1056  // ----------------------------------------------------------------------
1057  // Telemetry serialized write
1058  // ----------------------------------------------------------------------
1059 
1064  void tlmWrite(
1065  FwChanIdType id,
1066  Fw::TlmBuffer& _tlmBuff,
1067  Fw::Time _tlmTime = Fw::Time()
1068  ) const;
1069 
1070  protected:
1071 
1072  // ----------------------------------------------------------------------
1073  // Telemetry write functions
1074  // ----------------------------------------------------------------------
1075 
1080  U32 arg,
1081  Fw::Time _tlmTime = Fw::Time()
1082  ) const;
1083 
1087  void tlmWrite_Errors(
1088  U32 arg,
1089  Fw::Time _tlmTime = Fw::Time()
1090  ) const;
1091 
1092  protected:
1093 
1094  // ----------------------------------------------------------------------
1095  // Time
1096  // ----------------------------------------------------------------------
1097 
1101  Fw::Time getTime() const;
1102 
1103  private:
1104 
1105  // ----------------------------------------------------------------------
1106  // Message dispatch functions
1107  // ----------------------------------------------------------------------
1108 
1110  virtual MsgDispatchStatus doDispatch();
1111 
1112  private:
1113 
1114  // ----------------------------------------------------------------------
1115  // Calls for messages received on special input ports
1116  // ----------------------------------------------------------------------
1117 
1119  static void m_p_cmdIn_in(
1120  Fw::PassiveComponentBase* callComp,
1121  FwIndexType portNum,
1122  FwOpcodeType opCode,
1123  U32 cmdSeq,
1124  Fw::CmdArgBuffer& args
1125  );
1126 
1127  private:
1128 
1129  // ----------------------------------------------------------------------
1130  // Calls for messages received on typed input ports
1131  // ----------------------------------------------------------------------
1132 
1134  static void m_p_pingIn_in(
1135  Fw::PassiveComponentBase* callComp,
1136  FwIndexType portNum,
1137  U32 key
1138  );
1139 
1141  static void m_p_schedIn_in(
1142  Fw::PassiveComponentBase* callComp,
1143  FwIndexType portNum,
1144  U32 context
1145  );
1146 
1147  private:
1148 
1149  // ----------------------------------------------------------------------
1150  // Invocation functions for special output ports
1151  // ----------------------------------------------------------------------
1152 
1153 #if FW_ENABLE_TEXT_LOGGING
1154 
1156  void LogText_out(
1157  FwIndexType portNum,
1158  FwEventIdType id,
1159  Fw::Time& timeTag,
1160  const Fw::LogSeverity& severity,
1161  Fw::TextLogString& text
1162  ) const;
1163 
1164 #endif
1165 
1167  void cmdRegOut_out(
1168  FwIndexType portNum,
1169  FwOpcodeType opCode
1170  ) const;
1171 
1173  void cmdResponseOut_out(
1174  FwIndexType portNum,
1175  FwOpcodeType opCode,
1176  U32 cmdSeq,
1177  const Fw::CmdResponse& response
1178  ) const;
1179 
1181  void eventOut_out(
1182  FwIndexType portNum,
1183  FwEventIdType id,
1184  Fw::Time& timeTag,
1185  const Fw::LogSeverity& severity,
1186  Fw::LogBuffer& args
1187  ) const;
1188 
1190  void timeCaller_out(
1191  FwIndexType portNum,
1192  Fw::Time& time
1193  ) const;
1194 
1196  void tlmOut_out(
1197  FwIndexType portNum,
1198  FwChanIdType id,
1199  Fw::Time& timeTag,
1200  Fw::TlmBuffer& val
1201  ) const;
1202 
1203 #if !FW_DIRECT_PORT_CALLS
1204 
1205  private:
1206 
1207  // ----------------------------------------------------------------------
1208  // Special input ports
1209  // ----------------------------------------------------------------------
1210 
1212  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1213 
1214 #endif
1215 
1216 #if !FW_DIRECT_PORT_CALLS
1217 
1218  private:
1219 
1220  // ----------------------------------------------------------------------
1221  // Typed input ports
1222  // ----------------------------------------------------------------------
1223 
1225  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1226 
1228  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1229 
1230 #endif
1231 
1232 #if !FW_DIRECT_PORT_CALLS
1233 
1234  private:
1235 
1236  // ----------------------------------------------------------------------
1237  // Special output ports
1238  // ----------------------------------------------------------------------
1239 
1240 #if FW_ENABLE_TEXT_LOGGING == 1
1241 
1243  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1244 
1245 #endif
1246 
1248  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1249 
1251  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1252 
1254  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1255 
1257  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1258 
1260  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1261 
1262 #endif
1263 
1264 #if !FW_DIRECT_PORT_CALLS
1265 
1266  private:
1267 
1268  // ----------------------------------------------------------------------
1269  // Typed output ports
1270  // ----------------------------------------------------------------------
1271 
1273  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1274 
1275 #endif
1276 
1277  };
1278 
1279 }
1280 
1281 #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
The File System component appended 2 files without error.
FwIdType FwOpcodeType
The type of a command opcode.
The File System component deleted and existing directory without error.
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.
The File System component moved a file to a new location without error.
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.
The File System component created a new directory without error.
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
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Auto-generated base for FileManager component.
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
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
Enum representing a command response.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
An error occurred while attempting to move a file.
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
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_eventOut_OutputPorts()
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 ListDirectory_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
Definition: ObjBase.cpp:24
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 began moving a file to a new location.
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
An error occurred while attempting to remove a file.
The File System component began deleting an existing file.
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 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.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
The File System component deleted an existing file 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_timeCaller_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_FileSizeStarted(const Fw::StringBase &fileName) const
Enum representing event severity.
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
An error occurred while attempting to create a directory.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
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.
An error occurred while attempting to remove a directory.
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
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
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].
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
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()
Append 1 file&#39;s contents to the end of another.
RateGroupDivider component implementation.
The File System component began creating a new directory.
The File System component appended 2 files without error.
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_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)
The File System component returned status non-zero when trying to append 2 files together.
The File System component began deleting a directory.
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
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()
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0