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
22 #if !FW_DIRECT_PORT_CALLS
24 #endif
25 #if !FW_DIRECT_PORT_CALLS
27 #endif
28 #include "Fw/Prm/PrmGetPortAc.hpp"
29 #include "Fw/Prm/PrmSetPortAc.hpp"
30 #include "Fw/Time/TimePortAc.hpp"
31 #include "Fw/Tlm/TlmPortAc.hpp"
32 #include "Os/Mutex.hpp"
40 
41 namespace Svc {
42 
47  {
48 
49  // ----------------------------------------------------------------------
50  // Friend classes
51  // ----------------------------------------------------------------------
52 
54  friend class FileWorkerTesterBase;
56  friend class FileWorkerTester;
57 
58  protected:
59 
60  // ----------------------------------------------------------------------
61  // Constants
62  // ----------------------------------------------------------------------
63 
65  enum {
67  };
68 
70  enum {
75  };
76 
78  enum {
87  };
88 
90  enum {
94  };
95 
97  enum {
116  };
117 
119  enum {
127  };
128 
129  public:
130 
131  // ----------------------------------------------------------------------
132  // Component initialization
133  // ----------------------------------------------------------------------
134 
136  void init(
137  FwSizeType queueDepth,
138  FwEnumStoreType instance = 0
139  );
140 
141 #if !FW_DIRECT_PORT_CALLS
142 
143  public:
144 
145  // ----------------------------------------------------------------------
146  // Getters for special input ports
147  // ----------------------------------------------------------------------
148 
153  FwIndexType portNum
154  );
155 
156 #endif
157 
158 #if !FW_DIRECT_PORT_CALLS
159 
160  public:
161 
162  // ----------------------------------------------------------------------
163  // Getters for typed input ports
164  // ----------------------------------------------------------------------
165 
170  FwIndexType portNum
171  );
172 
177  FwIndexType portNum
178  );
179 
184  FwIndexType portNum
185  );
186 
191  FwIndexType portNum
192  );
193 
194 #endif
195 
196 #if !FW_DIRECT_PORT_CALLS
197 
198  public:
199 
200  // ----------------------------------------------------------------------
201  // Connect input ports to special output ports
202  // ----------------------------------------------------------------------
203 
206  FwIndexType portNum,
207  Fw::InputCmdRegPort* port
208  );
209 
212  FwIndexType portNum,
214  );
215 
218  FwIndexType portNum,
219  Fw::InputLogPort* port
220  );
221 
222 #if FW_ENABLE_TEXT_LOGGING == 1
223 
225  void set_logTextOut_OutputPort(
226  FwIndexType portNum,
227  Fw::InputLogTextPort* port
228  );
229 
230 #endif
231 
234  FwIndexType portNum,
235  Fw::InputPrmGetPort* port
236  );
237 
240  FwIndexType portNum,
241  Fw::InputPrmSetPort* port
242  );
243 
246  FwIndexType portNum,
247  Fw::InputTimePort* port
248  );
249 
252  FwIndexType portNum,
253  Fw::InputTlmPort* port
254  );
255 
256 #endif
257 
258 #if !FW_DIRECT_PORT_CALLS
259 
260  public:
261 
262  // ----------------------------------------------------------------------
263  // Connect typed input ports to typed output ports
264  // ----------------------------------------------------------------------
265 
268  FwIndexType portNum,
270  );
271 
274  FwIndexType portNum,
276  );
277 
280  FwIndexType portNum,
282  );
283 
284 #endif
285 
286 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
287 
288  public:
289 
290  // ----------------------------------------------------------------------
291  // Connect serial input ports to special output ports
292  // ----------------------------------------------------------------------
293 
296  FwIndexType portNum,
297  Fw::InputSerializePort* port
298  );
299 
302  FwIndexType portNum,
303  Fw::InputSerializePort* port
304  );
305 
308  FwIndexType portNum,
309  Fw::InputSerializePort* port
310  );
311 
312 #if FW_ENABLE_TEXT_LOGGING == 1
313 
315  void set_logTextOut_OutputPort(
316  FwIndexType portNum,
317  Fw::InputSerializePort* port
318  );
319 
320 #endif
321 
324  FwIndexType portNum,
325  Fw::InputSerializePort* port
326  );
327 
330  FwIndexType portNum,
331  Fw::InputSerializePort* port
332  );
333 
336  FwIndexType portNum,
337  Fw::InputSerializePort* port
338  );
339 
340 #endif
341 
342 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
343 
344  public:
345 
346  // ----------------------------------------------------------------------
347  // Connect serial input ports to typed output ports
348  // ----------------------------------------------------------------------
349 
352  FwIndexType portNum,
353  Fw::InputSerializePort* port
354  );
355 
358  FwIndexType portNum,
359  Fw::InputSerializePort* port
360  );
361 
364  FwIndexType portNum,
365  Fw::InputSerializePort* port
366  );
367 
368 #endif
369 
370  protected:
371 
372  // ----------------------------------------------------------------------
373  // Component construction and destruction
374  // ----------------------------------------------------------------------
375 
378  const char* compName = ""
379  );
380 
382  virtual ~FileWorkerComponentBase();
383 
384  protected:
385 
386  // ----------------------------------------------------------------------
387  // Getters for numbers of special input ports
388  // ----------------------------------------------------------------------
389 
394  return NUM_CMDIN_INPUT_PORTS;
395  }
396 
397  protected:
398 
399  // ----------------------------------------------------------------------
400  // Getters for numbers of typed input ports
401  // ----------------------------------------------------------------------
402 
408  }
409 
414  return NUM_READIN_INPUT_PORTS;
415  }
416 
422  }
423 
429  }
430 
431  protected:
432 
433  // ----------------------------------------------------------------------
434  // Getters for numbers of special output ports
435  // ----------------------------------------------------------------------
436 
442  }
443 
449  }
450 
456  }
457 
458 #if FW_ENABLE_TEXT_LOGGING == 1
459 
463  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
465  }
466 
467 #endif
468 
474  }
475 
481  }
482 
488  }
489 
495  }
496 
497  protected:
498 
499  // ----------------------------------------------------------------------
500  // Getters for numbers of typed output ports
501  // ----------------------------------------------------------------------
502 
508  }
509 
515  }
516 
522  }
523 
524  protected:
525 
526  // ----------------------------------------------------------------------
527  // Connection status queries for special output ports
528  // ----------------------------------------------------------------------
529 
534  FwIndexType portNum
535  ) const;
536 
541  FwIndexType portNum
542  ) const;
543 
548  FwIndexType portNum
549  ) const;
550 
551 #if FW_ENABLE_TEXT_LOGGING == 1
552 
556  bool isConnected_logTextOut_OutputPort(
557  FwIndexType portNum
558  ) const;
559 
560 #endif
561 
566  FwIndexType portNum
567  ) const;
568 
573  FwIndexType portNum
574  ) const;
575 
580  FwIndexType portNum
581  ) const;
582 
587  FwIndexType portNum
588  ) const;
589 
590  protected:
591 
592  // ----------------------------------------------------------------------
593  // Connection status queries for typed output ports
594  // ----------------------------------------------------------------------
595 
600  FwIndexType portNum
601  ) const;
602 
607  FwIndexType portNum
608  ) const;
609 
614  FwIndexType portNum
615  ) const;
616 
617 #if FW_DIRECT_PORT_CALLS
618  public:
619 #else
620  protected:
621 #endif
622 
623  // ----------------------------------------------------------------------
624  // Port handler base-class functions for special input ports
625  //
626  // Call these functions directly to bypass the corresponding ports
627  // ----------------------------------------------------------------------
628 
630  void cmdIn_handlerBase(
631  FwIndexType portNum,
632  FwOpcodeType opCode,
633  U32 cmdSeq,
634  Fw::CmdArgBuffer& args
635  );
636 
637  protected:
638 
639  // ----------------------------------------------------------------------
640  // Handlers to implement for typed input ports
641  // ----------------------------------------------------------------------
642 
644  virtual void cancelIn_handler(
645  FwIndexType portNum
646  ) = 0;
647 
649  virtual void readIn_handler(
650  FwIndexType portNum,
651  const Fw::StringBase& path,
652  Fw::Buffer& buffer
653  ) = 0;
654 
656  virtual void verifyIn_handler(
657  FwIndexType portNum,
658  const Fw::StringBase& path,
659  U32 crc
660  ) = 0;
661 
663  virtual void writeIn_handler(
664  FwIndexType portNum,
665  const Fw::StringBase& path,
666  Fw::Buffer& buffer,
667  FwSizeType offsetBytes,
668  bool append
669  ) = 0;
670 
671 #if FW_DIRECT_PORT_CALLS
672  public:
673 #else
674  protected:
675 #endif
676 
677  // ----------------------------------------------------------------------
678  // Port handler base-class functions for typed input ports
679  //
680  // Call these functions directly to bypass the corresponding ports
681  // ----------------------------------------------------------------------
682 
685  FwIndexType portNum
686  );
687 
689  void readIn_handlerBase(
690  FwIndexType portNum,
691  const Fw::StringBase& path,
692  Fw::Buffer& buffer
693  );
694 
697  FwIndexType portNum,
698  const Fw::StringBase& path,
699  U32 crc
700  );
701 
703  void writeIn_handlerBase(
704  FwIndexType portNum,
705  const Fw::StringBase& path,
706  Fw::Buffer& buffer,
707  FwSizeType offsetBytes,
708  bool append
709  );
710 
711  protected:
712 
713  // ----------------------------------------------------------------------
714  // Pre-message hooks for typed async input ports
715  //
716  // Each of these functions is invoked just before processing a message
717  // on the corresponding port. By default, they do nothing. You can
718  // override them to provide specific pre-message behavior.
719  // ----------------------------------------------------------------------
720 
722  virtual void readIn_preMsgHook(
723  FwIndexType portNum,
724  const Fw::StringBase& path,
725  Fw::Buffer& buffer
726  );
727 
729  virtual void verifyIn_preMsgHook(
730  FwIndexType portNum,
731  const Fw::StringBase& path,
732  U32 crc
733  );
734 
736  virtual void writeIn_preMsgHook(
737  FwIndexType portNum,
738  const Fw::StringBase& path,
739  Fw::Buffer& buffer,
740  FwSizeType offsetBytes,
741  bool append
742  );
743 
744  protected:
745 
746  // ----------------------------------------------------------------------
747  // Invocation functions for typed output ports
748  // ----------------------------------------------------------------------
749 
751  void readDoneOut_out(
752  FwIndexType portNum,
753  U32 status,
754  FwSizeType sizeBytes
755  ) const;
756 
758  void verifyDoneOut_out(
759  FwIndexType portNum,
760  U32 status,
761  FwSizeType sizeBytes
762  ) const;
763 
765  void writeDoneOut_out(
766  FwIndexType portNum,
767  U32 status,
768  FwSizeType sizeBytes
769  ) const;
770 
771  protected:
772 
773  // ----------------------------------------------------------------------
774  // Event logging functions
775  // ----------------------------------------------------------------------
776 
780  void log_WARNING_HI_NotInIdle(U32 currState);
781 
785  void log_WARNING_HI_CrcFailed(U32 crcStat);
786 
791  U32 crcExp,
792  U32 crcCalculated
793  ) const;
794 
798  void log_WARNING_HI_ReadFailedFileSize(U32 fsStat);
799 
804  const Fw::StringBase& fileName,
805  U32 fsStat
806  );
807 
812  FwSizeType fileSize,
813  const Fw::StringBase& fileName
814  ) const;
815 
820  FwSizeType fileSize,
821  const Fw::StringBase& fileName
822  ) const;
823 
828  FwSizeType bytesRead,
829  FwSizeType readSize,
830  const Fw::StringBase& fileName
831  ) const;
832 
837  FwSizeType bytesRead,
838  FwSizeType readSize,
839  const Fw::StringBase& fileName
840  ) const;
841 
846  FwSizeType bytesRead,
847  FwSizeType readSize,
848  const Fw::StringBase& fileName,
849  U64 timeout
850  ) const;
851 
856  FwSizeType writeSize,
857  const Fw::StringBase& fileName
858  ) const;
859 
864  FwSizeType writeSize,
865  const Fw::StringBase& fileName
866  ) const;
867 
872  FwSizeType bytesWritten,
873  FwSizeType writeSize,
874  const Fw::StringBase& fileName,
875  I32 status
876  );
877 
882  const Fw::StringBase& hashFileName,
883  I32 status
884  );
885 
890  const Fw::StringBase& hashFileName,
891  I32 status
892  );
893 
898  const Fw::StringBase& hashFileName,
899  FwSizeType bytesWritten,
900  FwSizeType hashSize
901  ) const;
902 
907  FwSizeType bytesWritten,
908  FwSizeType writeSize,
909  const Fw::StringBase& fileName,
910  U64 timeout
911  ) const;
912 
917  FwSizeType bytesWritten,
918  FwSizeType writeSize,
919  const Fw::StringBase& fileName
920  ) const;
921 
922  protected:
923 
924  // ----------------------------------------------------------------------
925  // Event throttle reset functions
926  // ----------------------------------------------------------------------
927 
930 
933 
936 
939 
942 
945 
948 
949  protected:
950 
951  // ----------------------------------------------------------------------
952  // Time
953  // ----------------------------------------------------------------------
954 
958  Fw::Time getTime() const;
959 
960  protected:
961 
962  // ----------------------------------------------------------------------
963  // Mutex operations for guarded ports
964  //
965  // You can override these operations to provide more sophisticated
966  // synchronization
967  // ----------------------------------------------------------------------
968 
970  virtual void lock();
971 
973  virtual void unLock();
974 
975  private:
976 
977  // ----------------------------------------------------------------------
978  // Message dispatch functions
979  // ----------------------------------------------------------------------
980 
982  virtual MsgDispatchStatus doDispatch();
983 
984  private:
985 
986  // ----------------------------------------------------------------------
987  // Calls for messages received on special input ports
988  // ----------------------------------------------------------------------
989 
991  static void m_p_cmdIn_in(
992  Fw::PassiveComponentBase* callComp,
993  FwIndexType portNum,
994  FwOpcodeType opCode,
995  U32 cmdSeq,
996  Fw::CmdArgBuffer& args
997  );
998 
999  private:
1000 
1001  // ----------------------------------------------------------------------
1002  // Calls for messages received on typed input ports
1003  // ----------------------------------------------------------------------
1004 
1006  static void m_p_cancelIn_in(
1007  Fw::PassiveComponentBase* callComp,
1008  FwIndexType portNum
1009  );
1010 
1012  static void m_p_readIn_in(
1013  Fw::PassiveComponentBase* callComp,
1014  FwIndexType portNum,
1015  const Fw::StringBase& path,
1016  Fw::Buffer& buffer
1017  );
1018 
1020  static void m_p_verifyIn_in(
1021  Fw::PassiveComponentBase* callComp,
1022  FwIndexType portNum,
1023  const Fw::StringBase& path,
1024  U32 crc
1025  );
1026 
1028  static void m_p_writeIn_in(
1029  Fw::PassiveComponentBase* callComp,
1030  FwIndexType portNum,
1031  const Fw::StringBase& path,
1032  Fw::Buffer& buffer,
1033  FwSizeType offsetBytes,
1034  bool append
1035  );
1036 
1037  private:
1038 
1039  // ----------------------------------------------------------------------
1040  // Invocation functions for special output ports
1041  // ----------------------------------------------------------------------
1042 
1044  void logOut_out(
1045  FwIndexType portNum,
1046  FwEventIdType id,
1047  Fw::Time& timeTag,
1048  const Fw::LogSeverity& severity,
1049  Fw::LogBuffer& args
1050  ) const;
1051 
1052 #if FW_ENABLE_TEXT_LOGGING
1053 
1055  void logTextOut_out(
1056  FwIndexType portNum,
1057  FwEventIdType id,
1058  Fw::Time& timeTag,
1059  const Fw::LogSeverity& severity,
1060  Fw::TextLogString& text
1061  ) const;
1062 
1063 #endif
1064 
1066  void timeCaller_out(
1067  FwIndexType portNum,
1068  Fw::Time& time
1069  ) const;
1070 
1071 #if !FW_DIRECT_PORT_CALLS
1072 
1073  private:
1074 
1075  // ----------------------------------------------------------------------
1076  // Special input ports
1077  // ----------------------------------------------------------------------
1078 
1080  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1081 
1082 #endif
1083 
1084 #if !FW_DIRECT_PORT_CALLS
1085 
1086  private:
1087 
1088  // ----------------------------------------------------------------------
1089  // Typed input ports
1090  // ----------------------------------------------------------------------
1091 
1094 
1096  Svc::InputFileReadPort m_readIn_InputPort[NUM_READIN_INPUT_PORTS];
1097 
1100 
1102  Svc::InputFileWritePort m_writeIn_InputPort[NUM_WRITEIN_INPUT_PORTS];
1103 
1104 #endif
1105 
1106 #if !FW_DIRECT_PORT_CALLS
1107 
1108  private:
1109 
1110  // ----------------------------------------------------------------------
1111  // Special output ports
1112  // ----------------------------------------------------------------------
1113 
1115  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1116 
1118  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1119 
1121  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1122 
1123 #if FW_ENABLE_TEXT_LOGGING == 1
1124 
1126  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
1127 
1128 #endif
1129 
1131  Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS];
1132 
1134  Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS];
1135 
1137  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1138 
1140  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1141 
1142 #endif
1143 
1144 #if !FW_DIRECT_PORT_CALLS
1145 
1146  private:
1147 
1148  // ----------------------------------------------------------------------
1149  // Typed output ports
1150  // ----------------------------------------------------------------------
1151 
1153  Svc::OutputSignalDonePort m_readDoneOut_OutputPort[NUM_READDONEOUT_OUTPUT_PORTS];
1154 
1156  Svc::OutputSignalDonePort m_verifyDoneOut_OutputPort[NUM_VERIFYDONEOUT_OUTPUT_PORTS];
1157 
1159  Svc::OutputSignalDonePort m_writeDoneOut_OutputPort[NUM_WRITEDONEOUT_OUTPUT_PORTS];
1160 
1161 #endif
1162 
1163  private:
1164 
1165  // ----------------------------------------------------------------------
1166  // Counter values for event throttling
1167  // ----------------------------------------------------------------------
1168 
1170  FwIndexType m_NotInIdleThrottle;
1171 
1173  Fw::Time m_NotInIdleThrottleTime;
1174 
1176  FwIndexType m_CrcFailedThrottle;
1177 
1179  Fw::Time m_CrcFailedThrottleTime;
1180 
1182  FwIndexType m_ReadFailedFileSizeThrottle;
1183 
1185  Fw::Time m_ReadFailedFileSizeThrottleTime;
1186 
1188  FwIndexType m_OpenFileErrorThrottle;
1189 
1191  Fw::Time m_OpenFileErrorThrottleTime;
1192 
1194  FwIndexType m_WriteFileErrorThrottle;
1195 
1197  Fw::Time m_WriteFileErrorThrottleTime;
1198 
1200  FwIndexType m_WriteValidationOpenErrorThrottle;
1201 
1203  Fw::Time m_WriteValidationOpenErrorThrottleTime;
1204 
1206  FwIndexType m_WriteValidationReadErrorThrottle;
1207 
1209  Fw::Time m_WriteValidationReadErrorThrottleTime;
1210 
1211  private:
1212 
1213  // ----------------------------------------------------------------------
1214  // Mutexes
1215  // ----------------------------------------------------------------------
1216 
1218  Os::Mutex m_guardedPortMutex;
1219 
1221  Os::Mutex m_eventLock;
1222 
1223  };
1224 
1225 }
1226 
1227 #endif
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].
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
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
Error encountered while opening validation file.
virtual ~FileWorkerComponentBase()
Destroy FileWorkerComponentBase object.
I32 FwEnumStoreType
Input SignalDone port.
void verifyIn_handlerBase(FwIndexType portNum, const Fw::StringBase &path, U32 crc)
Handler base-class function for input port verifyIn.
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)
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)
void log_WARNING_HI_WriteTimeout(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, U64 timeout) const
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
void log_WARNING_LO_ReadAborted(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
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_readDoneOut_OutputPort(FwIndexType portNum) const
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()
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Input FileRead port.
virtual void unLock()
Unlock the guarded mutex.
void log_ACTIVITY_LO_ReadCompleted(FwSizeType fileSize, const Fw::StringBase &fileName) const
void writeDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes) const
Invoke output port writeDoneOut.
FwIdType FwEventIdType
The type of an event identifier.
Error encountered while reading validation file.
Svc::InputFileWritePort * get_writeIn_InputPort(FwIndexType portNum)
Received a buffer and initiating write operation.
bool isConnected_verifyDoneOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_verifyDoneOut_OutputPorts()
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
Completed the read operation and will return buffer.
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()
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)
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 verifyDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes) const
Invoke output port verifyDoneOut.
Completed the write operation and will return buffer.
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.
Error encountered while creating validation file.
Enum representing event severity.
Completed the write operation and will return buffer.
void readDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes) const
Invoke output port readDoneOut.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
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.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_WriteFileError_ThrottleClear()
Reset throttle value for WriteFileError.
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()
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.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
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
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) 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.
bool isConnected_writeDoneOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_ReadFailedFileSize_ThrottleClear()
Reset throttle value for ReadFailedFileSize.
#define U64(C)
Definition: sha.h:181