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/Dp/DpContainer.hpp"
18 #include "Fw/Dp/DpGetPortAc.hpp"
19 #include "Fw/Dp/DpSendPortAc.hpp"
20 #include "Fw/FPrimeBasicTypes.hpp"
21 #include "Fw/Log/LogPortAc.hpp"
22 #include "Fw/Log/LogString.hpp"
23 #include "Fw/Log/LogTextPortAc.hpp"
24 #if !FW_DIRECT_PORT_CALLS
26 #endif
27 #if !FW_DIRECT_PORT_CALLS
29 #endif
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmPortAc.hpp"
32 #include "Fw/Tlm/TlmString.hpp"
38 #include "Svc/Ping/PingPortAc.hpp"
42 
43 namespace Svc {
44 
51  {
52 
53  // ----------------------------------------------------------------------
54  // Friend classes
55  // ----------------------------------------------------------------------
56 
58  friend class FileManagerTesterBase;
60  friend class FileManagerTester;
61 
62  protected:
63 
64  // ----------------------------------------------------------------------
65  // Constants
66  // ----------------------------------------------------------------------
67 
69  enum {
71  };
72 
74  enum {
77  };
78 
80  enum {
89  };
90 
92  enum {
94  };
95 
97  enum {
107  };
111 
113  enum {
146  };
147 
149  enum {
152  };
153 
156  return sizeof(FwDpIdType) + sizeof(FwSizeStoreType) + arraySize * sizeof(U8);
157  }
160 
161  protected:
162 
163  // ----------------------------------------------------------------------
164  // Types for data products
165  // ----------------------------------------------------------------------
166 
168  struct ContainerId {
169  enum T : FwDpIdType {
171  };
172  };
173 
178  };
179  };
180 
182  struct RecordId {
183  enum T : FwDpIdType {
186  };
187  };
188 
190  class DpContainer :
191  public Fw::DpContainer
192  {
193 
194  public:
195 
197  DpContainer(
198  FwDpIdType id,
199  const Fw::Buffer& buffer,
200  FwDpIdType baseId
201  );
202 
204  DpContainer();
205 
206  public:
207 
211  const U8* array,
212  FwSizeType size
213  );
214 
219  );
220 
221  FwDpIdType getBaseId() const { return this->m_baseId; }
222 
223  void setBaseId(FwDpIdType baseId) { this->m_baseId = baseId; }
224 
225  private:
226 
228  FwDpIdType m_baseId;
229 
230  };
231 
232  public:
233 
234  // ----------------------------------------------------------------------
235  // Component initialization
236  // ----------------------------------------------------------------------
237 
239  void init(
240  FwSizeType queueDepth,
241  FwEnumStoreType instance = 0
242  );
243 
244 #if !FW_DIRECT_PORT_CALLS
245 
246  public:
247 
248  // ----------------------------------------------------------------------
249  // Getters for special input ports
250  // ----------------------------------------------------------------------
251 
256  FwIndexType portNum
257  );
258 
259 #endif
260 
261 #if !FW_DIRECT_PORT_CALLS
262 
263  public:
264 
265  // ----------------------------------------------------------------------
266  // Getters for typed input ports
267  // ----------------------------------------------------------------------
268 
273  FwIndexType portNum
274  );
275 
280  FwIndexType portNum
281  );
282 
283 #endif
284 
285 #if !FW_DIRECT_PORT_CALLS
286 
287  public:
288 
289  // ----------------------------------------------------------------------
290  // Connect input ports to special output ports
291  // ----------------------------------------------------------------------
292 
293 #if FW_ENABLE_TEXT_LOGGING == 1
294 
296  void set_LogText_OutputPort(
297  FwIndexType portNum,
298  Fw::InputLogTextPort* port
299  );
300 
301 #endif
302 
305  FwIndexType portNum,
306  Fw::InputCmdRegPort* port
307  );
308 
311  FwIndexType portNum,
313  );
314 
317  FwIndexType portNum,
318  Fw::InputLogPort* port
319  );
320 
323  FwIndexType portNum,
324  Fw::InputDpGetPort* port
325  );
326 
329  FwIndexType portNum,
330  Fw::InputDpSendPort* port
331  );
332 
335  FwIndexType portNum,
336  Fw::InputTimePort* port
337  );
338 
341  FwIndexType portNum,
342  Fw::InputTlmPort* port
343  );
344 
345 #endif
346 
347 #if !FW_DIRECT_PORT_CALLS
348 
349  public:
350 
351  // ----------------------------------------------------------------------
352  // Connect typed input ports to typed output ports
353  // ----------------------------------------------------------------------
354 
357  FwIndexType portNum,
358  Svc::InputPingPort* port
359  );
360 
361 #endif
362 
363 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
364 
365  public:
366 
367  // ----------------------------------------------------------------------
368  // Connect serial input ports to special output ports
369  // ----------------------------------------------------------------------
370 
371 #if FW_ENABLE_TEXT_LOGGING == 1
372 
374  void set_LogText_OutputPort(
375  FwIndexType portNum,
376  Fw::InputSerializePort* port
377  );
378 
379 #endif
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  );
386 
389  FwIndexType portNum,
390  Fw::InputSerializePort* port
391  );
392 
395  FwIndexType portNum,
396  Fw::InputSerializePort* port
397  );
398 
401  FwIndexType portNum,
402  Fw::InputSerializePort* port
403  );
404 
407  FwIndexType portNum,
408  Fw::InputSerializePort* port
409  );
410 
413  FwIndexType portNum,
414  Fw::InputSerializePort* port
415  );
416 
417 #endif
418 
419 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
420 
421  public:
422 
423  // ----------------------------------------------------------------------
424  // Connect serial input ports to typed output ports
425  // ----------------------------------------------------------------------
426 
429  FwIndexType portNum,
430  Fw::InputSerializePort* port
431  );
432 
433 #endif
434 
435  public:
436 
437  // ----------------------------------------------------------------------
438  // Command registration
439  // ----------------------------------------------------------------------
440 
444  void regCommands();
445 
446  protected:
447 
448  // ----------------------------------------------------------------------
449  // Component construction and destruction
450  // ----------------------------------------------------------------------
451 
454  const char* compName = ""
455  );
456 
458  virtual ~FileManagerComponentBase();
459 
460  protected:
461 
462  // ----------------------------------------------------------------------
463  // Getters for numbers of special input ports
464  // ----------------------------------------------------------------------
465 
470  return NUM_CMDIN_INPUT_PORTS;
471  }
472 
473  protected:
474 
475  // ----------------------------------------------------------------------
476  // Getters for numbers of typed input ports
477  // ----------------------------------------------------------------------
478 
483  return NUM_PINGIN_INPUT_PORTS;
484  }
485 
491  }
492 
493  protected:
494 
495  // ----------------------------------------------------------------------
496  // Getters for numbers of special output ports
497  // ----------------------------------------------------------------------
498 
499 #if FW_ENABLE_TEXT_LOGGING == 1
500 
504  static constexpr FwIndexType getNum_LogText_OutputPorts() {
506  }
507 
508 #endif
509 
515  }
516 
522  }
523 
529  }
530 
536  }
537 
543  }
544 
550  }
551 
557  }
558 
559  protected:
560 
561  // ----------------------------------------------------------------------
562  // Getters for numbers of typed output ports
563  // ----------------------------------------------------------------------
564 
570  }
571 
572  protected:
573 
574  // ----------------------------------------------------------------------
575  // Connection status queries for special output ports
576  // ----------------------------------------------------------------------
577 
578 #if FW_ENABLE_TEXT_LOGGING == 1
579 
583  bool isConnected_LogText_OutputPort(
584  FwIndexType portNum
585  ) const;
586 
587 #endif
588 
593  FwIndexType portNum
594  ) const;
595 
600  FwIndexType portNum
601  ) const;
602 
607  FwIndexType portNum
608  ) const;
609 
614  FwIndexType portNum
615  ) const;
616 
621  FwIndexType portNum
622  ) const;
623 
628  FwIndexType portNum
629  ) const;
630 
635  FwIndexType portNum
636  ) const;
637 
638  protected:
639 
640  // ----------------------------------------------------------------------
641  // Connection status queries for typed output ports
642  // ----------------------------------------------------------------------
643 
648  FwIndexType portNum
649  ) const;
650 
651 #if FW_DIRECT_PORT_CALLS
652  public:
653 #else
654  protected:
655 #endif
656 
657  // ----------------------------------------------------------------------
658  // Port handler base-class functions for special input ports
659  //
660  // Call these functions directly to bypass the corresponding ports
661  // ----------------------------------------------------------------------
662 
664  void cmdIn_handlerBase(
665  FwIndexType portNum,
666  FwOpcodeType opCode,
667  U32 cmdSeq,
668  Fw::CmdArgBuffer& args
669  );
670 
671  protected:
672 
673  // ----------------------------------------------------------------------
674  // Handlers to implement for typed input ports
675  // ----------------------------------------------------------------------
676 
678  virtual void pingIn_handler(
679  FwIndexType portNum,
680  U32 key
681  ) = 0;
682 
684  virtual void schedIn_handler(
685  FwIndexType portNum,
686  U32 context
687  ) = 0;
688 
689 #if FW_DIRECT_PORT_CALLS
690  public:
691 #else
692  protected:
693 #endif
694 
695  // ----------------------------------------------------------------------
696  // Port handler base-class functions for typed input ports
697  //
698  // Call these functions directly to bypass the corresponding ports
699  // ----------------------------------------------------------------------
700 
702  void pingIn_handlerBase(
703  FwIndexType portNum,
704  U32 key
705  );
706 
708  void schedIn_handlerBase(
709  FwIndexType portNum,
710  U32 context
711  );
712 
713  protected:
714 
715  // ----------------------------------------------------------------------
716  // Pre-message hooks for typed async input ports
717  //
718  // Each of these functions is invoked just before processing a message
719  // on the corresponding port. By default, they do nothing. You can
720  // override them to provide specific pre-message behavior.
721  // ----------------------------------------------------------------------
722 
724  virtual void pingIn_preMsgHook(
725  FwIndexType portNum,
726  U32 key
727  );
728 
729  protected:
730 
731  // ----------------------------------------------------------------------
732  // Invocation functions for typed output ports
733  // ----------------------------------------------------------------------
734 
736  void pingOut_out(
737  FwIndexType portNum,
738  U32 key
739  ) const;
740 
741  protected:
742 
743  // ----------------------------------------------------------------------
744  // Internal interface handlers
745  // ----------------------------------------------------------------------
746 
748  virtual void run_internalInterfaceHandler() = 0;
749 
750  protected:
751 
752  // ----------------------------------------------------------------------
753  // Internal interface base-class functions
754  // ----------------------------------------------------------------------
755 
758 
759  protected:
760 
761  // ----------------------------------------------------------------------
762  // Command response
763  // ----------------------------------------------------------------------
764 
766  void cmdResponse_out(
767  FwOpcodeType opCode,
768  U32 cmdSeq,
769  Fw::CmdResponse response
770  );
771 
772  protected:
773 
774  // ----------------------------------------------------------------------
775  // Command handlers to implement
776  // ----------------------------------------------------------------------
777 
781  virtual void CreateDirectory_cmdHandler(
782  FwOpcodeType opCode,
783  U32 cmdSeq,
784  const Fw::CmdStringArg& dirName
785  ) = 0;
786 
790  virtual void MoveFile_cmdHandler(
791  FwOpcodeType opCode,
792  U32 cmdSeq,
793  const Fw::CmdStringArg& sourceFileName,
794  const Fw::CmdStringArg& destFileName
795  ) = 0;
796 
800  virtual void RemoveDirectory_cmdHandler(
801  FwOpcodeType opCode,
802  U32 cmdSeq,
803  const Fw::CmdStringArg& dirName
804  ) = 0;
805 
809  virtual void RemoveFile_cmdHandler(
810  FwOpcodeType opCode,
811  U32 cmdSeq,
812  const Fw::CmdStringArg& fileName,
813  bool ignoreErrors
814  ) = 0;
815 
819  virtual void AppendFile_cmdHandler(
820  FwOpcodeType opCode,
821  U32 cmdSeq,
822  const Fw::CmdStringArg& source,
823  const Fw::CmdStringArg& target
824  ) = 0;
825 
829  virtual void FileSize_cmdHandler(
830  FwOpcodeType opCode,
831  U32 cmdSeq,
832  const Fw::CmdStringArg& fileName
833  ) = 0;
834 
838  virtual void ListDirectory_cmdHandler(
839  FwOpcodeType opCode,
840  U32 cmdSeq,
841  const Fw::CmdStringArg& dirName
842  ) = 0;
843 
847  virtual void CalculateCrc_cmdHandler(
848  FwOpcodeType opCode,
849  U32 cmdSeq,
850  const Fw::CmdStringArg& filename
851  ) = 0;
852 
859  virtual void GenerateDp_cmdHandler(
860  FwOpcodeType opCode,
861  U32 cmdSeq,
862  const Fw::CmdStringArg& fileName,
863  U32 chunkSize,
864  U64 beginOffset,
865  U64 endOffset,
866  U32 priority,
868  ) = 0;
869 
870  protected:
871 
872  // ----------------------------------------------------------------------
873  // Command handler base-class functions
874  //
875  // Call these functions directly to bypass the command input port
876  // ----------------------------------------------------------------------
877 
882  FwOpcodeType opCode,
883  U32 cmdSeq,
884  Fw::CmdArgBuffer& args
885  );
886 
891  FwOpcodeType opCode,
892  U32 cmdSeq,
893  Fw::CmdArgBuffer& args
894  );
895 
900  FwOpcodeType opCode,
901  U32 cmdSeq,
902  Fw::CmdArgBuffer& args
903  );
904 
909  FwOpcodeType opCode,
910  U32 cmdSeq,
911  Fw::CmdArgBuffer& args
912  );
913 
918  FwOpcodeType opCode,
919  U32 cmdSeq,
920  Fw::CmdArgBuffer& args
921  );
922 
927  FwOpcodeType opCode,
928  U32 cmdSeq,
929  Fw::CmdArgBuffer& args
930  );
931 
936  FwOpcodeType opCode,
937  U32 cmdSeq,
938  Fw::CmdArgBuffer& args
939  );
940 
945  FwOpcodeType opCode,
946  U32 cmdSeq,
947  Fw::CmdArgBuffer& args
948  );
949 
957  FwOpcodeType opCode,
958  U32 cmdSeq,
959  Fw::CmdArgBuffer& args
960  );
961 
962  protected:
963 
964  // ----------------------------------------------------------------------
965  // Pre-message hooks for async commands
966  //
967  // Each of these functions is invoked just before processing the
968  // corresponding command. By default they do nothing. You can
969  // override them to provide specific pre-command behavior.
970  // ----------------------------------------------------------------------
971 
973  virtual void CreateDirectory_preMsgHook(
974  FwOpcodeType opCode,
975  U32 cmdSeq
976  );
977 
979  virtual void MoveFile_preMsgHook(
980  FwOpcodeType opCode,
981  U32 cmdSeq
982  );
983 
985  virtual void RemoveDirectory_preMsgHook(
986  FwOpcodeType opCode,
987  U32 cmdSeq
988  );
989 
991  virtual void RemoveFile_preMsgHook(
992  FwOpcodeType opCode,
993  U32 cmdSeq
994  );
995 
997  virtual void AppendFile_preMsgHook(
998  FwOpcodeType opCode,
999  U32 cmdSeq
1000  );
1001 
1003  virtual void FileSize_preMsgHook(
1004  FwOpcodeType opCode,
1005  U32 cmdSeq
1006  );
1007 
1009  virtual void ListDirectory_preMsgHook(
1010  FwOpcodeType opCode,
1011  U32 cmdSeq
1012  );
1013 
1015  virtual void CalculateCrc_preMsgHook(
1016  FwOpcodeType opCode,
1017  U32 cmdSeq
1018  );
1019 
1021  virtual void GenerateDp_preMsgHook(
1022  FwOpcodeType opCode,
1023  U32 cmdSeq
1024  );
1025 
1026  protected:
1027 
1028  // ----------------------------------------------------------------------
1029  // Event logging functions
1030  // ----------------------------------------------------------------------
1031 
1036  const Fw::StringBase& dirName,
1037  U32 status
1038  ) const;
1039 
1044  const Fw::StringBase& dirName,
1045  U32 status
1046  ) const;
1047 
1052  const Fw::StringBase& sourceFileName,
1053  const Fw::StringBase& destFileName,
1054  U32 status
1055  ) const;
1056 
1061  const Fw::StringBase& fileName,
1062  U32 status
1063  ) const;
1064 
1069  const Fw::StringBase& source,
1070  const Fw::StringBase& target,
1071  U32 status
1072  ) const;
1073 
1078  const Fw::StringBase& source,
1079  const Fw::StringBase& target
1080  ) const;
1081 
1086  const Fw::StringBase& dirName
1087  ) const;
1088 
1093  const Fw::StringBase& dirName
1094  ) const;
1095 
1100  const Fw::StringBase& sourceFileName,
1101  const Fw::StringBase& destFileName
1102  ) const;
1103 
1108  const Fw::StringBase& fileName
1109  ) const;
1110 
1115  const Fw::StringBase& source,
1116  const Fw::StringBase& target
1117  ) const;
1118 
1123  const Fw::StringBase& dirName
1124  ) const;
1125 
1130  const Fw::StringBase& dirName
1131  ) const;
1132 
1137  const Fw::StringBase& sourceFileName,
1138  const Fw::StringBase& destFileName
1139  ) const;
1140 
1145  const Fw::StringBase& fileName
1146  ) const;
1147 
1152  const Fw::StringBase& fileName,
1153  FwSizeType size
1154  ) const;
1155 
1160  const Fw::StringBase& fileName,
1161  U32 status
1162  ) const;
1163 
1168  const Fw::StringBase& fileName
1169  ) const;
1170 
1175  const Fw::StringBase& dirName
1176  ) const;
1177 
1182  const Fw::StringBase& dirName,
1183  U32 fileCount
1184  ) const;
1185 
1190  const Fw::StringBase& dirName,
1191  U32 status
1192  ) const;
1193 
1198  const Fw::StringBase& dirName,
1199  const Fw::StringBase& fileName,
1200  FwSizeType fileSize
1201  ) const;
1202 
1207  const Fw::StringBase& dirName,
1208  const Fw::StringBase& subdirName
1209  ) const;
1210 
1215  const Fw::StringBase& fileName
1216  ) const;
1217 
1222  const Fw::StringBase& fileName,
1223  U32 status
1224  ) const;
1225 
1230  const Fw::StringBase& fileName,
1231  U32 crc
1232  ) const;
1233 
1238  const Fw::StringBase& fileName,
1239  const Fw::StringFormatStatus& status
1240  ) const;
1241 
1246  const Fw::StringBase& fileName,
1247  U64 bytesToWrite
1248  ) const;
1249 
1254  const Fw::StringBase& fileName,
1255  U32 chunks
1256  ) const;
1257 
1262  const Fw::StringBase& fileName,
1263  const Svc::FileManager_GenerateDpStage& stage,
1264  U32 status
1265  ) const;
1266 
1271  const Fw::StringBase& fileName
1272  ) const;
1273 
1278  const Fw::StringBase& fileName,
1279  U64 beginOffset,
1280  U64 endOffset,
1281  U64 fileSize
1282  ) const;
1283 
1284  protected:
1285 
1286  // ----------------------------------------------------------------------
1287  // Telemetry serialized write
1288  // ----------------------------------------------------------------------
1289 
1294  void tlmWrite(
1295  FwChanIdType id,
1296  Fw::TlmBuffer& _tlmBuff,
1297  Fw::Time _tlmTime = Fw::Time()
1298  ) const;
1299 
1300  protected:
1301 
1302  // ----------------------------------------------------------------------
1303  // Telemetry write functions
1304  // ----------------------------------------------------------------------
1305 
1310  U32 arg,
1311  Fw::Time _tlmTime = Fw::Time()
1312  ) const;
1313 
1317  void tlmWrite_Errors(
1318  U32 arg,
1319  Fw::Time _tlmTime = Fw::Time()
1320  ) const;
1321 
1322  protected:
1323 
1324  // ----------------------------------------------------------------------
1325  // Functions for managing data products
1326  // ----------------------------------------------------------------------
1327 
1331  FwSizeType dataSize,
1332  DpContainer& container
1333  ) {
1334  return this->dpGet(
1336  dataSize,
1338  container
1339  );
1340  }
1341 
1343  void dpSend(
1344  DpContainer& container,
1345  Fw::Time timeTag = Fw::ZERO_TIME
1346  );
1347 
1348  protected:
1349 
1350  // ----------------------------------------------------------------------
1351  // Time
1352  // ----------------------------------------------------------------------
1353 
1357  Fw::Time getTime() const;
1358 
1359  private:
1360 
1361  // ----------------------------------------------------------------------
1362  // Message dispatch functions
1363  // ----------------------------------------------------------------------
1364 
1366  virtual MsgDispatchStatus doDispatch();
1367 
1368  private:
1369 
1370  // ----------------------------------------------------------------------
1371  // Calls for messages received on special input ports
1372  // ----------------------------------------------------------------------
1373 
1375  static void m_p_cmdIn_in(
1376  Fw::PassiveComponentBase* callComp,
1377  FwIndexType portNum,
1378  FwOpcodeType opCode,
1379  U32 cmdSeq,
1380  Fw::CmdArgBuffer& args
1381  );
1382 
1383  private:
1384 
1385  // ----------------------------------------------------------------------
1386  // Calls for messages received on typed input ports
1387  // ----------------------------------------------------------------------
1388 
1390  static void m_p_pingIn_in(
1391  Fw::PassiveComponentBase* callComp,
1392  FwIndexType portNum,
1393  U32 key
1394  );
1395 
1397  static void m_p_schedIn_in(
1398  Fw::PassiveComponentBase* callComp,
1399  FwIndexType portNum,
1400  U32 context
1401  );
1402 
1403  private:
1404 
1405  // ----------------------------------------------------------------------
1406  // Invocation functions for special output ports
1407  // ----------------------------------------------------------------------
1408 
1409 #if FW_ENABLE_TEXT_LOGGING
1410 
1412  void LogText_out(
1413  FwIndexType portNum,
1414  FwEventIdType id,
1415  Fw::Time& timeTag,
1416  const Fw::LogSeverity& severity,
1417  Fw::TextLogString& text
1418  ) const;
1419 
1420 #endif
1421 
1423  void cmdRegOut_out(
1424  FwIndexType portNum,
1425  FwOpcodeType opCode
1426  ) const;
1427 
1429  void cmdResponseOut_out(
1430  FwIndexType portNum,
1431  FwOpcodeType opCode,
1432  U32 cmdSeq,
1433  const Fw::CmdResponse& response
1434  ) const;
1435 
1437  void eventOut_out(
1438  FwIndexType portNum,
1439  FwEventIdType id,
1440  Fw::Time& timeTag,
1441  const Fw::LogSeverity& severity,
1442  Fw::LogBuffer& args
1443  ) const;
1444 
1446  Fw::Success productGetOut_out(
1447  FwIndexType portNum,
1448  FwDpIdType id,
1449  FwSizeType dataSize,
1450  Fw::Buffer& buffer
1451  ) const;
1452 
1454  void productSendOut_out(
1455  FwIndexType portNum,
1456  FwDpIdType id,
1457  const Fw::Buffer& buffer
1458  ) const;
1459 
1461  void timeCaller_out(
1462  FwIndexType portNum,
1463  Fw::Time& time
1464  ) const;
1465 
1467  void tlmOut_out(
1468  FwIndexType portNum,
1469  FwChanIdType id,
1470  Fw::Time& timeTag,
1471  Fw::TlmBuffer& val
1472  ) const;
1473 
1474  private:
1475 
1476  // ----------------------------------------------------------------------
1477  // Private data product handling functions
1478  // ----------------------------------------------------------------------
1479 
1482  Fw::Success::T dpGet(
1483  ContainerId::T containerId,
1484  FwSizeType dataSize,
1485  FwDpPriorityType priority,
1486  DpContainer& container
1487  );
1488 
1489 #if !FW_DIRECT_PORT_CALLS
1490 
1491  private:
1492 
1493  // ----------------------------------------------------------------------
1494  // Special input ports
1495  // ----------------------------------------------------------------------
1496 
1498  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1499 
1500 #endif
1501 
1502 #if !FW_DIRECT_PORT_CALLS
1503 
1504  private:
1505 
1506  // ----------------------------------------------------------------------
1507  // Typed input ports
1508  // ----------------------------------------------------------------------
1509 
1511  Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS];
1512 
1514  Svc::InputSchedPort m_schedIn_InputPort[NUM_SCHEDIN_INPUT_PORTS];
1515 
1516 #endif
1517 
1518 #if !FW_DIRECT_PORT_CALLS
1519 
1520  private:
1521 
1522  // ----------------------------------------------------------------------
1523  // Special output ports
1524  // ----------------------------------------------------------------------
1525 
1526 #if FW_ENABLE_TEXT_LOGGING == 1
1527 
1529  Fw::OutputLogTextPort m_LogText_OutputPort[NUM_LOGTEXT_OUTPUT_PORTS];
1530 
1531 #endif
1532 
1534  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1535 
1537  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1538 
1540  Fw::OutputLogPort m_eventOut_OutputPort[NUM_EVENTOUT_OUTPUT_PORTS];
1541 
1543  Fw::OutputDpGetPort m_productGetOut_OutputPort[NUM_PRODUCTGETOUT_OUTPUT_PORTS];
1544 
1546  Fw::OutputDpSendPort m_productSendOut_OutputPort[NUM_PRODUCTSENDOUT_OUTPUT_PORTS];
1547 
1549  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1550 
1552  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1553 
1554 #endif
1555 
1556 #if !FW_DIRECT_PORT_CALLS
1557 
1558  private:
1559 
1560  // ----------------------------------------------------------------------
1561  // Typed output ports
1562  // ----------------------------------------------------------------------
1563 
1565  Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS];
1566 
1567 #endif
1568 
1569  };
1570 
1571 }
1572 
1573 #endif
bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
A data product Container.
Definition: DpContainer.hpp:26
virtual void run_internalInterfaceHandler()=0
Internal interface handler for run.
Append 1 file&#39;s contents to the end of another.
void log_WARNING_HI_ListDirectoryError(const Fw::StringBase &dirName, U32 status) const
The File System component deleted and existing directory without error.
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
static constexpr FwSizeType SIZE_OF_FileChunkDataRecord_RECORD(FwSizeType arraySize)
Record sizes.
FwIdType FwOpcodeType
The type of a command opcode.
Fw::Success::T dpGet_FileDpContainer(FwSizeType dataSize, DpContainer &container)
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.
U32 FwDpPriorityType
The type of a data product priority.
void log_ACTIVITY_HI_CalculateCrcStarted(const Fw::StringBase &fileName) const
I32 FwEnumStoreType
The File System component moved a file to a new location without error.
Metadata for one chunk of a file data product.
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()
void log_ACTIVITY_HI_GenerateDpStarted(const Fw::StringBase &fileName, U64 bytesToWrite) const
The File System component began deleting a directory.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
void FileSize_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_productGetOut_OutputPorts()
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()
bool isConnected_productGetOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_CalculateCrcSucceeded(const Fw::StringBase &fileName, U32 crc) const
void CalculateCrc_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
const Time ZERO_TIME
Definition: Time.cpp:5
void log_ACTIVITY_HI_ListDirectoryStarted(const Fw::StringBase &dirName) const
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
Enum representing a command response.
virtual void RemoveFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RemoveFile.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
void log_ACTIVITY_HI_MoveFileStarted(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
void log_WARNING_HI_GenerateDpInvalidRange(const Fw::StringBase &fileName, U64 beginOffset, U64 endOffset, U64 fileSize) const
FPP shadow-enum representing Fw::FormatStatus.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
The File System component began moving a file to a new location.
DpContainer()
Constructor with default initialization.
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
SerializeStatus
forward declaration for string
void log_WARNING_HI_GenerateDpBufferFailed(const Fw::StringBase &fileName) const
void log_ACTIVITY_HI_CreateDirectorySucceeded(const Fw::StringBase &dirName) const
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
The File System component returned status non-zero when trying to append 2 files together.
U16 FwSizeStoreType
The type used to serialize a size value.
FwIdType FwEventIdType
The type of an event identifier.
An error occurred while attempting to remove a directory.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_GenerateDpFailed(const Fw::StringBase &fileName, const Svc::FileManager_GenerateDpStage &stage, U32 status) const
virtual void CreateDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
virtual void ListDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
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()
An error occurred while attempting to create a directory.
virtual void FileSize_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command FileSize.
T
The raw enum type.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
An error occurred while attempting to move a file.
An error occurred while attempting to remove a file.
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
void log_WARNING_HI_FileNameFormatError(const Fw::StringBase &fileName, const Fw::StringFormatStatus &status) const
Enum representing event severity.
virtual ~FileManagerComponentBase()
Destroy FileManagerComponentBase object.
The File System component appended 2 files without error.
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)
Fw::SerializeStatus serializeRecord_FileChunkHeaderRecord(const Svc::FileManager_FileChunkHeader &elt)
void log_ACTIVITY_HI_GenerateDpComplete(const Fw::StringBase &fileName, U32 chunks) const
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void FileSize_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void log_ACTIVITY_HI_MoveFileSucceeded(const Fw::StringBase &sourceFileName, const Fw::StringBase &destFileName) const
static constexpr FwSizeType SIZE_OF_FileChunkHeaderRecord_RECORD
void log_WARNING_HI_DirectoryRemoveError(const Fw::StringBase &dirName, U32 status) const
FwIdType FwDpIdType
The type of a data product identifier.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void GenerateDp_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void log_ACTIVITY_HI_AppendFileStarted(const Fw::StringBase &source, const Fw::StringBase &target) const
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void tlmWrite_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_ACTIVITY_HI_RemoveFileStarted(const Fw::StringBase &fileName) const
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void GenerateDp_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, U32 chunkSize, U64 beginOffset, U64 endOffset, U32 priority, const Svc::FileManager_GenerateDpMode &mode)=0
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
How the chunks of a file are emitted.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
The File System component began deleting an existing file.
Where a data product generation failure occurred.
static constexpr FwIndexType getNum_pingIn_InputPorts()
The File System component began creating a new directory.
Invalid offset range requested for data product generation.
void log_WARNING_HI_AppendFileFailed(const Fw::StringBase &source, const Fw::StringBase &target, U32 status) const
void regCommands()
Register commands with the Command Dispatcher.
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputDpSendPort *port)
Connect port to productSendOut[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
The File System component created a new directory without error.
void log_WARNING_HI_CalculateCrcFailed(const Fw::StringBase &fileName, U32 status) const
virtual void AppendFile_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command AppendFile.
Fw::SerializeStatus serializeRecord_FileChunkDataRecord(const U8 *array, FwSizeType size)
virtual void GenerateDp_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command GenerateDp.
The File System component deleted an existing file without error.
The File System component appended 2 files without error.
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 set_productGetOut_OutputPort(FwIndexType portNum, Fw::InputDpGetPort *port)
Connect port to productGetOut[portNum].
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)
Success/Failure.
virtual void RemoveDirectory_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &dirName)=0
void log_WARNING_HI_FileRemoveError(const Fw::StringBase &fileName, U32 status) const
friend class FileManagerTesterBase
Friend class tester to support autocoded test harness.
void dpSend(DpContainer &container, Fw::Time timeTag=Fw::ZERO_TIME)
Send a data product.
virtual void CalculateCrc_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CalculateCrc.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
virtual void AppendFile_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &source, const Fw::CmdStringArg &target)=0