F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FileWorkerComponentAc.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FileWorkerComponentAc.hpp
3 // \author Generated by fpp-to-cpp
4 // \brief hpp file for FileWorker component base class
5 // ======================================================================
6 
7 #ifndef Svc_FileWorkerComponentAc_HPP
8 #define Svc_FileWorkerComponentAc_HPP
9 
10 #include <atomic>
11 
12 #include "Fw/Cmd/CmdPortAc.hpp"
13 #include "Fw/Cmd/CmdRegPortAc.hpp"
16 #include "Fw/FPrimeBasicTypes.hpp"
17 #include "Fw/Log/LogPortAc.hpp"
18 #include "Fw/Log/LogString.hpp"
19 #if FW_ENABLE_TEXT_LOGGING == 1
20 #include "Fw/Log/LogTextPortAc.hpp"
21 #endif
24 #include "Fw/Prm/PrmGetPortAc.hpp"
25 #include "Fw/Prm/PrmSetPortAc.hpp"
26 #include "Fw/Time/TimePortAc.hpp"
27 #include "Fw/Tlm/TlmPortAc.hpp"
28 #include "Os/Mutex.hpp"
36 
37 namespace Svc {
38 
43  {
44 
45  // ----------------------------------------------------------------------
46  // Friend classes
47  // ----------------------------------------------------------------------
48 
50  friend class FileWorkerTesterBase;
52  friend class FileWorkerTester;
53 
54  protected:
55 
56  // ----------------------------------------------------------------------
57  // Constants
58  // ----------------------------------------------------------------------
59 
61  enum {
63  };
64 
66  enum {
71  };
72 
74  enum {
83  };
84 
86  enum {
90  };
91 
93  enum {
112  };
113 
115  enum {
123  };
124 
125  public:
126 
127  // ----------------------------------------------------------------------
128  // Component initialization
129  // ----------------------------------------------------------------------
130 
132  void init(
133  FwSizeType queueDepth,
134  FwEnumStoreType instance = 0
135  );
136 
137  public:
138 
139  // ----------------------------------------------------------------------
140  // Getters for special input ports
141  // ----------------------------------------------------------------------
142 
147  FwIndexType portNum
148  );
149 
150  public:
151 
152  // ----------------------------------------------------------------------
153  // Getters for typed input ports
154  // ----------------------------------------------------------------------
155 
160  FwIndexType portNum
161  );
162 
167  FwIndexType portNum
168  );
169 
174  FwIndexType portNum
175  );
176 
181  FwIndexType portNum
182  );
183 
184  public:
185 
186  // ----------------------------------------------------------------------
187  // Connect input ports to special output ports
188  // ----------------------------------------------------------------------
189 
192  FwIndexType portNum,
193  Fw::InputCmdRegPort* port
194  );
195 
198  FwIndexType portNum,
200  );
201 
204  FwIndexType portNum,
205  Fw::InputLogPort* port
206  );
207 
208 #if FW_ENABLE_TEXT_LOGGING == 1
209 
211  void set_logTextOut_OutputPort(
212  FwIndexType portNum,
213  Fw::InputLogTextPort* port
214  );
215 
216 #endif
217 
220  FwIndexType portNum,
221  Fw::InputPrmGetPort* port
222  );
223 
226  FwIndexType portNum,
227  Fw::InputPrmSetPort* port
228  );
229 
232  FwIndexType portNum,
233  Fw::InputTimePort* port
234  );
235 
238  FwIndexType portNum,
239  Fw::InputTlmPort* port
240  );
241 
242  public:
243 
244  // ----------------------------------------------------------------------
245  // Connect typed input ports to typed output ports
246  // ----------------------------------------------------------------------
247 
250  FwIndexType portNum,
252  );
253 
256  FwIndexType portNum,
258  );
259 
262  FwIndexType portNum,
264  );
265 
266 #if FW_PORT_SERIALIZATION
267 
268  public:
269 
270  // ----------------------------------------------------------------------
271  // Connect serial input ports to special output ports
272  // ----------------------------------------------------------------------
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 
292 #if FW_ENABLE_TEXT_LOGGING == 1
293 
295  void set_logTextOut_OutputPort(
296  FwIndexType portNum,
297  Fw::InputSerializePort* port
298  );
299 
300 #endif
301 
304  FwIndexType portNum,
305  Fw::InputSerializePort* port
306  );
307 
310  FwIndexType portNum,
311  Fw::InputSerializePort* port
312  );
313 
316  FwIndexType portNum,
317  Fw::InputSerializePort* port
318  );
319 
320 #endif
321 
322 #if FW_PORT_SERIALIZATION
323 
324  public:
325 
326  // ----------------------------------------------------------------------
327  // Connect serial input ports to typed output ports
328  // ----------------------------------------------------------------------
329 
332  FwIndexType portNum,
333  Fw::InputSerializePort* port
334  );
335 
338  FwIndexType portNum,
339  Fw::InputSerializePort* port
340  );
341 
344  FwIndexType portNum,
345  Fw::InputSerializePort* port
346  );
347 
348 #endif
349 
350  protected:
351 
352  // ----------------------------------------------------------------------
353  // Component construction and destruction
354  // ----------------------------------------------------------------------
355 
358  const char* compName = ""
359  );
360 
362  virtual ~FileWorkerComponentBase();
363 
364  protected:
365 
366  // ----------------------------------------------------------------------
367  // Getters for numbers of special input ports
368  // ----------------------------------------------------------------------
369 
374  return NUM_CMDIN_INPUT_PORTS;
375  }
376 
377  protected:
378 
379  // ----------------------------------------------------------------------
380  // Getters for numbers of typed input ports
381  // ----------------------------------------------------------------------
382 
388  }
389 
394  return NUM_READIN_INPUT_PORTS;
395  }
396 
402  }
403 
409  }
410 
411  protected:
412 
413  // ----------------------------------------------------------------------
414  // Getters for numbers of special output ports
415  // ----------------------------------------------------------------------
416 
422  }
423 
429  }
430 
436  }
437 
438 #if FW_ENABLE_TEXT_LOGGING == 1
439 
443  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
445  }
446 
447 #endif
448 
454  }
455 
461  }
462 
468  }
469 
475  }
476 
477  protected:
478 
479  // ----------------------------------------------------------------------
480  // Getters for numbers of typed output ports
481  // ----------------------------------------------------------------------
482 
488  }
489 
495  }
496 
502  }
503 
504  protected:
505 
506  // ----------------------------------------------------------------------
507  // Connection status queries for special output ports
508  // ----------------------------------------------------------------------
509 
514  FwIndexType portNum
515  );
516 
521  FwIndexType portNum
522  );
523 
528  FwIndexType portNum
529  );
530 
531 #if FW_ENABLE_TEXT_LOGGING == 1
532 
536  bool isConnected_logTextOut_OutputPort(
537  FwIndexType portNum
538  );
539 
540 #endif
541 
546  FwIndexType portNum
547  );
548 
553  FwIndexType portNum
554  );
555 
560  FwIndexType portNum
561  );
562 
567  FwIndexType portNum
568  );
569 
570  protected:
571 
572  // ----------------------------------------------------------------------
573  // Connection status queries for typed output ports
574  // ----------------------------------------------------------------------
575 
580  FwIndexType portNum
581  );
582 
587  FwIndexType portNum
588  );
589 
594  FwIndexType portNum
595  );
596 
597  protected:
598 
599  // ----------------------------------------------------------------------
600  // Handlers to implement for typed input ports
601  // ----------------------------------------------------------------------
602 
604  virtual void cancelIn_handler(
605  FwIndexType portNum
606  ) = 0;
607 
609  virtual void readIn_handler(
610  FwIndexType portNum,
611  const Fw::StringBase& path,
612  Fw::Buffer& buffer
613  ) = 0;
614 
616  virtual void verifyIn_handler(
617  FwIndexType portNum,
618  const Fw::StringBase& path,
619  U32 crc
620  ) = 0;
621 
623  virtual void writeIn_handler(
624  FwIndexType portNum,
625  const Fw::StringBase& path,
626  Fw::Buffer& buffer,
627  FwSizeType offsetBytes,
628  bool append
629  ) = 0;
630 
631  protected:
632 
633  // ----------------------------------------------------------------------
634  // Port handler base-class functions for typed input ports
635  //
636  // Call these functions directly to bypass the corresponding ports
637  // ----------------------------------------------------------------------
638 
641  FwIndexType portNum
642  );
643 
645  void readIn_handlerBase(
646  FwIndexType portNum,
647  const Fw::StringBase& path,
648  Fw::Buffer& buffer
649  );
650 
653  FwIndexType portNum,
654  const Fw::StringBase& path,
655  U32 crc
656  );
657 
659  void writeIn_handlerBase(
660  FwIndexType portNum,
661  const Fw::StringBase& path,
662  Fw::Buffer& buffer,
663  FwSizeType offsetBytes,
664  bool append
665  );
666 
667  protected:
668 
669  // ----------------------------------------------------------------------
670  // Pre-message hooks for typed async input ports
671  //
672  // Each of these functions is invoked just before processing a message
673  // on the corresponding port. By default, they do nothing. You can
674  // override them to provide specific pre-message behavior.
675  // ----------------------------------------------------------------------
676 
678  virtual void readIn_preMsgHook(
679  FwIndexType portNum,
680  const Fw::StringBase& path,
681  Fw::Buffer& buffer
682  );
683 
685  virtual void verifyIn_preMsgHook(
686  FwIndexType portNum,
687  const Fw::StringBase& path,
688  U32 crc
689  );
690 
692  virtual void writeIn_preMsgHook(
693  FwIndexType portNum,
694  const Fw::StringBase& path,
695  Fw::Buffer& buffer,
696  FwSizeType offsetBytes,
697  bool append
698  );
699 
700  protected:
701 
702  // ----------------------------------------------------------------------
703  // Invocation functions for typed output ports
704  // ----------------------------------------------------------------------
705 
707  void readDoneOut_out(
708  FwIndexType portNum,
709  U32 status,
710  FwSizeType sizeBytes
711  );
712 
714  void verifyDoneOut_out(
715  FwIndexType portNum,
716  U32 status,
717  FwSizeType sizeBytes
718  );
719 
721  void writeDoneOut_out(
722  FwIndexType portNum,
723  U32 status,
724  FwSizeType sizeBytes
725  );
726 
727  protected:
728 
729  // ----------------------------------------------------------------------
730  // Event logging functions
731  // ----------------------------------------------------------------------
732 
736  void log_WARNING_HI_NotInIdle(U32 currState);
737 
741  void log_WARNING_HI_CrcFailed(U32 crcStat);
742 
747  U32 crcExp,
748  U32 crcCalculated
749  ) const;
750 
754  void log_WARNING_HI_ReadFailedFileSize(U32 fsStat);
755 
760  const Fw::StringBase& fileName,
761  U32 fsStat
762  );
763 
768  FwSizeType fileSize,
769  const Fw::StringBase& fileName
770  ) const;
771 
776  FwSizeType fileSize,
777  const Fw::StringBase& fileName
778  ) const;
779 
784  FwSizeType bytesRead,
785  FwSizeType readSize,
786  const Fw::StringBase& fileName
787  ) const;
788 
793  FwSizeType bytesRead,
794  FwSizeType readSize,
795  const Fw::StringBase& fileName
796  ) const;
797 
802  FwSizeType bytesRead,
803  FwSizeType readSize,
804  const Fw::StringBase& fileName,
805  U64 timeout
806  ) const;
807 
812  FwSizeType writeSize,
813  const Fw::StringBase& fileName
814  ) const;
815 
820  FwSizeType writeSize,
821  const Fw::StringBase& fileName
822  ) const;
823 
828  FwSizeType bytesWritten,
829  FwSizeType writeSize,
830  const Fw::StringBase& fileName,
831  I32 status
832  );
833 
838  const Fw::StringBase& hashFileName,
839  I32 status
840  );
841 
846  const Fw::StringBase& hashFileName,
847  I32 status
848  );
849 
854  const Fw::StringBase& hashFileName,
855  FwSizeType bytesWritten,
856  FwSizeType hashSize
857  ) const;
858 
863  FwSizeType bytesWritten,
864  FwSizeType writeSize,
865  const Fw::StringBase& fileName,
866  U64 timeout
867  ) const;
868 
873  FwSizeType bytesWritten,
874  FwSizeType writeSize,
875  const Fw::StringBase& fileName
876  ) const;
877 
878  protected:
879 
880  // ----------------------------------------------------------------------
881  // Event throttle reset functions
882  // ----------------------------------------------------------------------
883 
886 
889 
892 
895 
898 
901 
904 
905  protected:
906 
907  // ----------------------------------------------------------------------
908  // Time
909  // ----------------------------------------------------------------------
910 
914  Fw::Time getTime() const;
915 
916  protected:
917 
918  // ----------------------------------------------------------------------
919  // Mutex operations for guarded ports
920  //
921  // You can override these operations to provide more sophisticated
922  // synchronization
923  // ----------------------------------------------------------------------
924 
926  virtual void lock();
927 
929  virtual void unLock();
930 
931  private:
932 
933  // ----------------------------------------------------------------------
934  // Message dispatch functions
935  // ----------------------------------------------------------------------
936 
938  virtual MsgDispatchStatus doDispatch();
939 
940  private:
941 
942  // ----------------------------------------------------------------------
943  // Calls for messages received on special input ports
944  // ----------------------------------------------------------------------
945 
947  static void m_p_cmdIn_in(
948  Fw::PassiveComponentBase* callComp,
949  FwIndexType portNum,
950  FwOpcodeType opCode,
951  U32 cmdSeq,
952  Fw::CmdArgBuffer& args
953  );
954 
955  private:
956 
957  // ----------------------------------------------------------------------
958  // Calls for messages received on typed input ports
959  // ----------------------------------------------------------------------
960 
962  static void m_p_cancelIn_in(
963  Fw::PassiveComponentBase* callComp,
964  FwIndexType portNum
965  );
966 
968  static void m_p_readIn_in(
969  Fw::PassiveComponentBase* callComp,
970  FwIndexType portNum,
971  const Fw::StringBase& path,
972  Fw::Buffer& buffer
973  );
974 
976  static void m_p_verifyIn_in(
977  Fw::PassiveComponentBase* callComp,
978  FwIndexType portNum,
979  const Fw::StringBase& path,
980  U32 crc
981  );
982 
984  static void m_p_writeIn_in(
985  Fw::PassiveComponentBase* callComp,
986  FwIndexType portNum,
987  const Fw::StringBase& path,
988  Fw::Buffer& buffer,
989  FwSizeType offsetBytes,
990  bool append
991  );
992 
993  private:
994 
995  // ----------------------------------------------------------------------
996  // Special input ports
997  // ----------------------------------------------------------------------
998 
1000  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1001 
1002  private:
1003 
1004  // ----------------------------------------------------------------------
1005  // Typed input ports
1006  // ----------------------------------------------------------------------
1007 
1010 
1012  Svc::InputFileReadPort m_readIn_InputPort[NUM_READIN_INPUT_PORTS];
1013 
1016 
1018  Svc::InputFileWritePort m_writeIn_InputPort[NUM_WRITEIN_INPUT_PORTS];
1019 
1020  private:
1021 
1022  // ----------------------------------------------------------------------
1023  // Special output ports
1024  // ----------------------------------------------------------------------
1025 
1027  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1028 
1030  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1031 
1033  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1034 
1035 #if FW_ENABLE_TEXT_LOGGING == 1
1036 
1038  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
1039 
1040 #endif
1041 
1043  Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS];
1044 
1046  Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS];
1047 
1049  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1050 
1052  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1053 
1054  private:
1055 
1056  // ----------------------------------------------------------------------
1057  // Typed output ports
1058  // ----------------------------------------------------------------------
1059 
1061  Svc::OutputSignalDonePort m_readDoneOut_OutputPort[NUM_READDONEOUT_OUTPUT_PORTS];
1062 
1064  Svc::OutputSignalDonePort m_verifyDoneOut_OutputPort[NUM_VERIFYDONEOUT_OUTPUT_PORTS];
1065 
1067  Svc::OutputSignalDonePort m_writeDoneOut_OutputPort[NUM_WRITEDONEOUT_OUTPUT_PORTS];
1068 
1069  private:
1070 
1071  // ----------------------------------------------------------------------
1072  // Counter values for event throttling
1073  // ----------------------------------------------------------------------
1074 
1076  FwIndexType m_NotInIdleThrottle;
1077 
1079  Fw::Time m_NotInIdleThrottleTime;
1080 
1082  FwIndexType m_CrcFailedThrottle;
1083 
1085  Fw::Time m_CrcFailedThrottleTime;
1086 
1088  FwIndexType m_ReadFailedFileSizeThrottle;
1089 
1091  Fw::Time m_ReadFailedFileSizeThrottleTime;
1092 
1094  FwIndexType m_OpenFileErrorThrottle;
1095 
1097  Fw::Time m_OpenFileErrorThrottleTime;
1098 
1100  FwIndexType m_WriteFileErrorThrottle;
1101 
1103  Fw::Time m_WriteFileErrorThrottleTime;
1104 
1106  FwIndexType m_WriteValidationOpenErrorThrottle;
1107 
1109  Fw::Time m_WriteValidationOpenErrorThrottleTime;
1110 
1112  FwIndexType m_WriteValidationReadErrorThrottle;
1113 
1115  Fw::Time m_WriteValidationReadErrorThrottleTime;
1116 
1117  private:
1118 
1119  // ----------------------------------------------------------------------
1120  // Mutexes
1121  // ----------------------------------------------------------------------
1122 
1124  Os::Mutex m_guardedPortMutex;
1125 
1127  Os::Mutex m_eventLock;
1128 
1129  };
1130 
1131 }
1132 
1133 #endif
void verifyDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port verifyDoneOut.
static constexpr FwIndexType getNum_verifyIn_InputPorts()
void log_WARNING_HI_ReadFailedFileSize(U32 fsStat)
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
FwIdType FwOpcodeType
The type of a command opcode.
void readIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
Handler base-class function for input port readIn.
virtual void cancelIn_handler(FwIndexType portNum)=0
Handler for input port cancelIn.
PlatformSizeType FwSizeType
virtual ~FileWorkerComponentBase()
Destroy FileWorkerComponentBase object.
Error encountered while creating validation file.
Error encountered while reading validation file.
I32 FwEnumStoreType
Input SignalDone port.
void verifyIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, U32 crc)
Handler base-class function for input port verifyIn.
Received a buffer and initiating write operation.
void log_WARNING_HI_WriteValidationReadError_ThrottleClear()
Reset throttle value for WriteValidationReadError.
friend class FileWorkerTesterBase
Friend class tester to support autocoded test harness.
static constexpr FwIndexType getNum_logOut_OutputPorts()
Svc::InputFileReadPort * get_readIn_InputPort(FwIndexType portNum)
Completed the write operation and will return buffer.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void set_readDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to readDoneOut[portNum].
void log_WARNING_HI_WriteValidationOpenError(const Fw::StringBase &hashFileName, I32 status)
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void log_WARNING_HI_WriteTimeout(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, U64 timeout) const
void log_WARNING_LO_ReadAborted(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
bool isConnected_writeDoneOut_OutputPort(FwIndexType portNum)
friend class FileWorkerTester
Friend class tester implementation to support white-box testing.
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
Input VerifyStatus port.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
bool isConnected_verifyDoneOut_OutputPort(FwIndexType portNum)
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void log_ACTIVITY_LO_WriteBegin(FwSizeType writeSize, const Fw::StringBase &fileName) const
Output SignalDone port.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
static constexpr FwIndexType getNum_readDoneOut_OutputPorts()
Completed the write operation and will return buffer.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum)
Input FileRead port.
virtual void unLock()
Unlock the guarded mutex.
void log_ACTIVITY_LO_ReadCompleted(FwSizeType fileSize, const Fw::StringBase &fileName) const
Completed the read operation and will return buffer.
Svc::InputFileWritePort * get_writeIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_verifyDoneOut_OutputPorts()
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
virtual void writeIn_handler(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)=0
Handler for input port writeIn.
void log_WARNING_HI_OpenFileError(const Fw::StringBase &fileName, U32 fsStat)
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
void readDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port readDoneOut.
static constexpr FwIndexType getNum_readIn_InputPorts()
static constexpr FwIndexType getNum_writeDoneOut_OutputPorts()
void log_ACTIVITY_LO_WriteCompleted(FwSizeType writeSize, const Fw::StringBase &fileName) const
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum)
Input CancelStatus port.
virtual void verifyIn_handler(FwIndexType portNum, const Fw::StringBase &path, U32 crc)=0
Handler for input port verifyIn.
Input FileWrite port.
void log_WARNING_HI_CrcFailed_ThrottleClear()
Reset throttle value for CrcFailed.
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
void writeDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes)
Invoke output port writeDoneOut.
Svc::InputCancelStatusPort * get_cancelIn_InputPort(FwIndexType portNum)
void set_writeDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to writeDoneOut[portNum].
virtual void readIn_handler(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)=0
Handler for input port readIn.
void log_WARNING_HI_WriteFileError(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, I32 status)
virtual void readIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer)
Pre-message hook for async input port readIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void log_WARNING_HI_NotInIdle(U32 currState)
void log_WARNING_LO_WriteAborted(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName) const
void log_ACTIVITY_LO_ReadBegin(FwSizeType fileSize, const Fw::StringBase &fileName) const
void cancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port cancelIn.
void log_WARNING_HI_WriteFileError_ThrottleClear()
Reset throttle value for WriteFileError.
bool isConnected_readDoneOut_OutputPort(FwIndexType portNum)
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void lock()
Lock the guarded mutex.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void log_WARNING_HI_NotInIdle_ThrottleClear()
Reset throttle value for NotInIdle.
void log_WARNING_HI_WriteValidationReadError(const Fw::StringBase &hashFileName, I32 status)
static constexpr FwIndexType getNum_cancelIn_InputPorts()
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
Error encountered while opening validation file.
void log_WARNING_LO_CrcVerificationError(U32 crcExp, U32 crcCalculated) const
void log_WARNING_HI_WriteValidationOpenError_ThrottleClear()
Reset throttle value for WriteValidationOpenError.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
Svc::InputVerifyStatusPort * get_verifyIn_InputPort(FwIndexType portNum)
void log_WARNING_LO_WriteValidationError(const Fw::StringBase &hashFileName, FwSizeType bytesWritten, FwSizeType hashSize) const
void writeIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)
Handler base-class function for input port writeIn.
static constexpr FwIndexType getNum_writeIn_InputPorts()
virtual void writeIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, Fw::Buffer &buffer, FwSizeType offsetBytes, bool append)
Pre-message hook for async input port writeIn.
void set_verifyDoneOut_OutputPort(FwIndexType portNum, Svc::InputSignalDonePort *port)
Connect port to verifyDoneOut[portNum].
FileWorkerComponentBase(const char *compName="")
Construct FileWorkerComponentBase object.
virtual void verifyIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &path, U32 crc)
Pre-message hook for async input port verifyIn.
void log_WARNING_HI_ReadError(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
void log_WARNING_HI_OpenFileError_ThrottleClear()
Reset throttle value for OpenFileError.
void log_WARNING_HI_ReadTimeout(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName, U64 timeout) const
Auto-generated base for FileWorker component.
void log_WARNING_HI_ReadFailedFileSize_ThrottleClear()
Reset throttle value for ReadFailedFileSize.
#define U64(C)
Definition: sha.h:181