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 #include "Fw/Log/LogTextPortAc.hpp"
20 #if !FW_DIRECT_PORT_CALLS
22 #endif
23 #if !FW_DIRECT_PORT_CALLS
25 #endif
26 #include "Fw/Prm/PrmGetPortAc.hpp"
27 #include "Fw/Prm/PrmSetPortAc.hpp"
28 #include "Fw/Time/TimePortAc.hpp"
29 #include "Fw/Tlm/TlmPortAc.hpp"
30 #include "Os/Mutex.hpp"
38 
39 namespace Svc {
40 
45  {
46 
47  // ----------------------------------------------------------------------
48  // Friend classes
49  // ----------------------------------------------------------------------
50 
52  friend class FileWorkerTesterBase;
54  friend class FileWorkerTester;
55 
56  protected:
57 
58  // ----------------------------------------------------------------------
59  // Constants
60  // ----------------------------------------------------------------------
61 
63  enum {
65  };
66 
68  enum {
73  };
74 
76  enum {
85  };
86 
88  enum {
92  };
93 
95  enum {
115  };
116 
118  enum {
126  };
127 
128  public:
129 
130  // ----------------------------------------------------------------------
131  // Component initialization
132  // ----------------------------------------------------------------------
133 
135  void init(
136  FwSizeType queueDepth,
137  FwEnumStoreType instance = 0
138  );
139 
140 #if !FW_DIRECT_PORT_CALLS
141 
142  public:
143 
144  // ----------------------------------------------------------------------
145  // Getters for special input ports
146  // ----------------------------------------------------------------------
147 
152  FwIndexType portNum
153  );
154 
155 #endif
156 
157 #if !FW_DIRECT_PORT_CALLS
158 
159  public:
160 
161  // ----------------------------------------------------------------------
162  // Getters for typed input ports
163  // ----------------------------------------------------------------------
164 
169  FwIndexType portNum
170  );
171 
176  FwIndexType portNum
177  );
178 
183  FwIndexType portNum
184  );
185 
190  FwIndexType portNum
191  );
192 
193 #endif
194 
195 #if !FW_DIRECT_PORT_CALLS
196 
197  public:
198 
199  // ----------------------------------------------------------------------
200  // Connect input ports to special output ports
201  // ----------------------------------------------------------------------
202 
205  FwIndexType portNum,
206  Fw::InputCmdRegPort* port
207  );
208 
211  FwIndexType portNum,
213  );
214 
217  FwIndexType portNum,
218  Fw::InputLogPort* port
219  );
220 
221 #if FW_ENABLE_TEXT_LOGGING == 1
222 
224  void set_logTextOut_OutputPort(
225  FwIndexType portNum,
226  Fw::InputLogTextPort* port
227  );
228 
229 #endif
230 
233  FwIndexType portNum,
234  Fw::InputPrmGetPort* port
235  );
236 
239  FwIndexType portNum,
240  Fw::InputPrmSetPort* port
241  );
242 
245  FwIndexType portNum,
246  Fw::InputTimePort* port
247  );
248 
251  FwIndexType portNum,
252  Fw::InputTlmPort* port
253  );
254 
255 #endif
256 
257 #if !FW_DIRECT_PORT_CALLS
258 
259  public:
260 
261  // ----------------------------------------------------------------------
262  // Connect typed input ports to typed output ports
263  // ----------------------------------------------------------------------
264 
267  FwIndexType portNum,
269  );
270 
273  FwIndexType portNum,
275  );
276 
279  FwIndexType portNum,
281  );
282 
283 #endif
284 
285 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
286 
287  public:
288 
289  // ----------------------------------------------------------------------
290  // Connect serial input ports to special output ports
291  // ----------------------------------------------------------------------
292 
295  FwIndexType portNum,
296  Fw::InputSerializePort* port
297  );
298 
301  FwIndexType portNum,
302  Fw::InputSerializePort* port
303  );
304 
307  FwIndexType portNum,
308  Fw::InputSerializePort* port
309  );
310 
311 #if FW_ENABLE_TEXT_LOGGING == 1
312 
314  void set_logTextOut_OutputPort(
315  FwIndexType portNum,
316  Fw::InputSerializePort* port
317  );
318 
319 #endif
320 
323  FwIndexType portNum,
324  Fw::InputSerializePort* port
325  );
326 
329  FwIndexType portNum,
330  Fw::InputSerializePort* port
331  );
332 
335  FwIndexType portNum,
336  Fw::InputSerializePort* port
337  );
338 
339 #endif
340 
341 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
342 
343  public:
344 
345  // ----------------------------------------------------------------------
346  // Connect serial input ports to typed output ports
347  // ----------------------------------------------------------------------
348 
351  FwIndexType portNum,
352  Fw::InputSerializePort* port
353  );
354 
357  FwIndexType portNum,
358  Fw::InputSerializePort* port
359  );
360 
363  FwIndexType portNum,
364  Fw::InputSerializePort* port
365  );
366 
367 #endif
368 
369  protected:
370 
371  // ----------------------------------------------------------------------
372  // Component construction and destruction
373  // ----------------------------------------------------------------------
374 
377  const char* compName = ""
378  );
379 
381  virtual ~FileWorkerComponentBase();
382 
383  protected:
384 
385  // ----------------------------------------------------------------------
386  // Getters for numbers of special input ports
387  // ----------------------------------------------------------------------
388 
393  return NUM_CMDIN_INPUT_PORTS;
394  }
395 
396  protected:
397 
398  // ----------------------------------------------------------------------
399  // Getters for numbers of typed input ports
400  // ----------------------------------------------------------------------
401 
407  }
408 
413  return NUM_READIN_INPUT_PORTS;
414  }
415 
421  }
422 
428  }
429 
430  protected:
431 
432  // ----------------------------------------------------------------------
433  // Getters for numbers of special output ports
434  // ----------------------------------------------------------------------
435 
441  }
442 
448  }
449 
455  }
456 
457 #if FW_ENABLE_TEXT_LOGGING == 1
458 
462  static constexpr FwIndexType getNum_logTextOut_OutputPorts() {
464  }
465 
466 #endif
467 
473  }
474 
480  }
481 
487  }
488 
494  }
495 
496  protected:
497 
498  // ----------------------------------------------------------------------
499  // Getters for numbers of typed output ports
500  // ----------------------------------------------------------------------
501 
507  }
508 
514  }
515 
521  }
522 
523  protected:
524 
525  // ----------------------------------------------------------------------
526  // Connection status queries for special output ports
527  // ----------------------------------------------------------------------
528 
533  FwIndexType portNum
534  ) const;
535 
540  FwIndexType portNum
541  ) const;
542 
547  FwIndexType portNum
548  ) const;
549 
550 #if FW_ENABLE_TEXT_LOGGING == 1
551 
555  bool isConnected_logTextOut_OutputPort(
556  FwIndexType portNum
557  ) const;
558 
559 #endif
560 
565  FwIndexType portNum
566  ) const;
567 
572  FwIndexType portNum
573  ) const;
574 
579  FwIndexType portNum
580  ) const;
581 
586  FwIndexType portNum
587  ) const;
588 
589  protected:
590 
591  // ----------------------------------------------------------------------
592  // Connection status queries for typed output ports
593  // ----------------------------------------------------------------------
594 
599  FwIndexType portNum
600  ) const;
601 
606  FwIndexType portNum
607  ) const;
608 
613  FwIndexType portNum
614  ) const;
615 
616 #if FW_DIRECT_PORT_CALLS
617  public:
618 #else
619  protected:
620 #endif
621 
622  // ----------------------------------------------------------------------
623  // Port handler base-class functions for special input ports
624  //
625  // Call these functions directly to bypass the corresponding ports
626  // ----------------------------------------------------------------------
627 
629  void cmdIn_handlerBase(
630  FwIndexType portNum,
631  FwOpcodeType opCode,
632  U32 cmdSeq,
633  Fw::CmdArgBuffer& args
634  );
635 
636  protected:
637 
638  // ----------------------------------------------------------------------
639  // Handlers to implement for typed input ports
640  // ----------------------------------------------------------------------
641 
643  virtual void cancelIn_handler(
644  FwIndexType portNum
645  ) = 0;
646 
648  virtual void readIn_handler(
649  FwIndexType portNum,
650  const Fw::StringBase& path,
651  Fw::Buffer& buffer
652  ) = 0;
653 
655  virtual void verifyIn_handler(
656  FwIndexType portNum,
657  const Fw::StringBase& path,
658  U32 crc
659  ) = 0;
660 
662  virtual void writeIn_handler(
663  FwIndexType portNum,
664  const Fw::StringBase& path,
665  Fw::Buffer& buffer,
666  FwSizeType offsetBytes,
667  bool append
668  ) = 0;
669 
670 #if FW_DIRECT_PORT_CALLS
671  public:
672 #else
673  protected:
674 #endif
675 
676  // ----------------------------------------------------------------------
677  // Port handler base-class functions for typed input ports
678  //
679  // Call these functions directly to bypass the corresponding ports
680  // ----------------------------------------------------------------------
681 
684  FwIndexType portNum
685  );
686 
688  void readIn_handlerBase(
689  FwIndexType portNum,
690  const Fw::StringBase& path,
691  Fw::Buffer& buffer
692  );
693 
696  FwIndexType portNum,
697  const Fw::StringBase& path,
698  U32 crc
699  );
700 
702  void writeIn_handlerBase(
703  FwIndexType portNum,
704  const Fw::StringBase& path,
705  Fw::Buffer& buffer,
706  FwSizeType offsetBytes,
707  bool append
708  );
709 
710  protected:
711 
712  // ----------------------------------------------------------------------
713  // Pre-message hooks for typed async input ports
714  //
715  // Each of these functions is invoked just before processing a message
716  // on the corresponding port. By default, they do nothing. You can
717  // override them to provide specific pre-message behavior.
718  // ----------------------------------------------------------------------
719 
721  virtual void readIn_preMsgHook(
722  FwIndexType portNum,
723  const Fw::StringBase& path,
724  Fw::Buffer& buffer
725  );
726 
728  virtual void verifyIn_preMsgHook(
729  FwIndexType portNum,
730  const Fw::StringBase& path,
731  U32 crc
732  );
733 
735  virtual void writeIn_preMsgHook(
736  FwIndexType portNum,
737  const Fw::StringBase& path,
738  Fw::Buffer& buffer,
739  FwSizeType offsetBytes,
740  bool append
741  );
742 
743  protected:
744 
745  // ----------------------------------------------------------------------
746  // Invocation functions for typed output ports
747  // ----------------------------------------------------------------------
748 
750  void readDoneOut_out(
751  FwIndexType portNum,
752  U32 status,
753  FwSizeType sizeBytes
754  ) const;
755 
757  void verifyDoneOut_out(
758  FwIndexType portNum,
759  U32 status,
760  FwSizeType sizeBytes
761  ) const;
762 
764  void writeDoneOut_out(
765  FwIndexType portNum,
766  U32 status,
767  FwSizeType sizeBytes
768  ) const;
769 
770  protected:
771 
772  // ----------------------------------------------------------------------
773  // Event logging functions
774  // ----------------------------------------------------------------------
775 
779  void log_WARNING_HI_NotInIdle(U32 currState);
780 
784  void log_WARNING_HI_CrcFailed(U32 crcStat);
785 
790  U32 crcExp,
791  U32 crcCalculated
792  ) const;
793 
797  void log_WARNING_HI_ReadFailedFileSize(U32 fsStat);
798 
803  const Fw::StringBase& fileName,
804  U32 fsStat
805  );
806 
811  FwSizeType fileSize,
812  const Fw::StringBase& fileName
813  ) const;
814 
819  FwSizeType fileSize,
820  const Fw::StringBase& fileName
821  ) const;
822 
827  FwSizeType bytesRead,
828  FwSizeType readSize,
829  const Fw::StringBase& fileName
830  ) const;
831 
836  FwSizeType bytesRead,
837  FwSizeType readSize,
838  const Fw::StringBase& fileName
839  ) const;
840 
845  FwSizeType bytesRead,
846  FwSizeType readSize,
847  const Fw::StringBase& fileName,
848  U64 timeout
849  ) const;
850 
855  FwSizeType writeSize,
856  const Fw::StringBase& fileName
857  ) const;
858 
863  FwSizeType writeSize,
864  const Fw::StringBase& fileName
865  ) const;
866 
871  FwSizeType bytesWritten,
872  FwSizeType writeSize,
873  const Fw::StringBase& fileName,
874  I32 status
875  );
876 
881  const Fw::StringBase& hashFileName,
882  I32 status
883  );
884 
889  const Fw::StringBase& hashFileName,
890  I32 status
891  );
892 
897  const Fw::StringBase& hashFileName,
898  FwSizeType bytesWritten,
899  FwSizeType hashSize
900  ) const;
901 
906  FwSizeType bytesWritten,
907  FwSizeType writeSize,
908  const Fw::StringBase& fileName,
909  U64 timeout
910  ) const;
911 
916  FwSizeType bytesWritten,
917  FwSizeType writeSize,
918  const Fw::StringBase& fileName
919  ) const;
920 
925  const Fw::StringBase& handler,
926  const Fw::StringBase& issue
927  ) const;
928 
929  protected:
930 
931  // ----------------------------------------------------------------------
932  // Event throttle reset functions
933  // ----------------------------------------------------------------------
934 
937 
940 
943 
946 
949 
952 
955 
956  protected:
957 
958  // ----------------------------------------------------------------------
959  // Time
960  // ----------------------------------------------------------------------
961 
965  Fw::Time getTime() const;
966 
967  protected:
968 
969  // ----------------------------------------------------------------------
970  // Mutex operations for guarded ports
971  //
972  // You can override these operations to provide more sophisticated
973  // synchronization
974  // ----------------------------------------------------------------------
975 
977  virtual void lock();
978 
980  virtual void unLock();
981 
982  private:
983 
984  // ----------------------------------------------------------------------
985  // Message dispatch functions
986  // ----------------------------------------------------------------------
987 
989  virtual MsgDispatchStatus doDispatch();
990 
991  private:
992 
993  // ----------------------------------------------------------------------
994  // Calls for messages received on special input ports
995  // ----------------------------------------------------------------------
996 
998  static void m_p_cmdIn_in(
999  Fw::PassiveComponentBase* callComp,
1000  FwIndexType portNum,
1001  FwOpcodeType opCode,
1002  U32 cmdSeq,
1003  Fw::CmdArgBuffer& args
1004  );
1005 
1006  private:
1007 
1008  // ----------------------------------------------------------------------
1009  // Calls for messages received on typed input ports
1010  // ----------------------------------------------------------------------
1011 
1013  static void m_p_cancelIn_in(
1014  Fw::PassiveComponentBase* callComp,
1015  FwIndexType portNum
1016  );
1017 
1019  static void m_p_readIn_in(
1020  Fw::PassiveComponentBase* callComp,
1021  FwIndexType portNum,
1022  const Fw::StringBase& path,
1023  Fw::Buffer& buffer
1024  );
1025 
1027  static void m_p_verifyIn_in(
1028  Fw::PassiveComponentBase* callComp,
1029  FwIndexType portNum,
1030  const Fw::StringBase& path,
1031  U32 crc
1032  );
1033 
1035  static void m_p_writeIn_in(
1036  Fw::PassiveComponentBase* callComp,
1037  FwIndexType portNum,
1038  const Fw::StringBase& path,
1039  Fw::Buffer& buffer,
1040  FwSizeType offsetBytes,
1041  bool append
1042  );
1043 
1044  private:
1045 
1046  // ----------------------------------------------------------------------
1047  // Invocation functions for special output ports
1048  // ----------------------------------------------------------------------
1049 
1051  void logOut_out(
1052  FwIndexType portNum,
1053  FwEventIdType id,
1054  Fw::Time& timeTag,
1055  const Fw::LogSeverity& severity,
1056  Fw::LogBuffer& args
1057  ) const;
1058 
1059 #if FW_ENABLE_TEXT_LOGGING
1060 
1062  void logTextOut_out(
1063  FwIndexType portNum,
1064  FwEventIdType id,
1065  Fw::Time& timeTag,
1066  const Fw::LogSeverity& severity,
1067  Fw::TextLogString& text
1068  ) const;
1069 
1070 #endif
1071 
1073  void timeCaller_out(
1074  FwIndexType portNum,
1075  Fw::Time& time
1076  ) const;
1077 
1078 #if !FW_DIRECT_PORT_CALLS
1079 
1080  private:
1081 
1082  // ----------------------------------------------------------------------
1083  // Special input ports
1084  // ----------------------------------------------------------------------
1085 
1087  Fw::InputCmdPort m_cmdIn_InputPort[NUM_CMDIN_INPUT_PORTS];
1088 
1089 #endif
1090 
1091 #if !FW_DIRECT_PORT_CALLS
1092 
1093  private:
1094 
1095  // ----------------------------------------------------------------------
1096  // Typed input ports
1097  // ----------------------------------------------------------------------
1098 
1101 
1103  Svc::InputFileReadPort m_readIn_InputPort[NUM_READIN_INPUT_PORTS];
1104 
1107 
1109  Svc::InputFileWritePort m_writeIn_InputPort[NUM_WRITEIN_INPUT_PORTS];
1110 
1111 #endif
1112 
1113 #if !FW_DIRECT_PORT_CALLS
1114 
1115  private:
1116 
1117  // ----------------------------------------------------------------------
1118  // Special output ports
1119  // ----------------------------------------------------------------------
1120 
1122  Fw::OutputCmdRegPort m_cmdRegOut_OutputPort[NUM_CMDREGOUT_OUTPUT_PORTS];
1123 
1125  Fw::OutputCmdResponsePort m_cmdResponseOut_OutputPort[NUM_CMDRESPONSEOUT_OUTPUT_PORTS];
1126 
1128  Fw::OutputLogPort m_logOut_OutputPort[NUM_LOGOUT_OUTPUT_PORTS];
1129 
1130 #if FW_ENABLE_TEXT_LOGGING == 1
1131 
1133  Fw::OutputLogTextPort m_logTextOut_OutputPort[NUM_LOGTEXTOUT_OUTPUT_PORTS];
1134 
1135 #endif
1136 
1138  Fw::OutputPrmGetPort m_prmGetOut_OutputPort[NUM_PRMGETOUT_OUTPUT_PORTS];
1139 
1141  Fw::OutputPrmSetPort m_prmSetOut_OutputPort[NUM_PRMSETOUT_OUTPUT_PORTS];
1142 
1144  Fw::OutputTimePort m_timeCaller_OutputPort[NUM_TIMECALLER_OUTPUT_PORTS];
1145 
1147  Fw::OutputTlmPort m_tlmOut_OutputPort[NUM_TLMOUT_OUTPUT_PORTS];
1148 
1149 #endif
1150 
1151 #if !FW_DIRECT_PORT_CALLS
1152 
1153  private:
1154 
1155  // ----------------------------------------------------------------------
1156  // Typed output ports
1157  // ----------------------------------------------------------------------
1158 
1160  Svc::OutputSignalDonePort m_readDoneOut_OutputPort[NUM_READDONEOUT_OUTPUT_PORTS];
1161 
1163  Svc::OutputSignalDonePort m_verifyDoneOut_OutputPort[NUM_VERIFYDONEOUT_OUTPUT_PORTS];
1164 
1166  Svc::OutputSignalDonePort m_writeDoneOut_OutputPort[NUM_WRITEDONEOUT_OUTPUT_PORTS];
1167 
1168 #endif
1169 
1170  private:
1171 
1172  // ----------------------------------------------------------------------
1173  // Counter values for event throttling
1174  // ----------------------------------------------------------------------
1175 
1177  FwIndexType m_NotInIdleThrottle;
1178 
1180  Fw::Time m_NotInIdleThrottleTime;
1181 
1183  FwIndexType m_CrcFailedThrottle;
1184 
1186  Fw::Time m_CrcFailedThrottleTime;
1187 
1189  FwIndexType m_ReadFailedFileSizeThrottle;
1190 
1192  Fw::Time m_ReadFailedFileSizeThrottleTime;
1193 
1195  FwIndexType m_OpenFileErrorThrottle;
1196 
1198  Fw::Time m_OpenFileErrorThrottleTime;
1199 
1201  FwIndexType m_WriteFileErrorThrottle;
1202 
1204  Fw::Time m_WriteFileErrorThrottleTime;
1205 
1207  FwIndexType m_WriteValidationOpenErrorThrottle;
1208 
1210  Fw::Time m_WriteValidationOpenErrorThrottleTime;
1211 
1213  FwIndexType m_WriteValidationReadErrorThrottle;
1214 
1216  Fw::Time m_WriteValidationReadErrorThrottleTime;
1217 
1218  private:
1219 
1220  // ----------------------------------------------------------------------
1221  // Mutexes
1222  // ----------------------------------------------------------------------
1223 
1225  Os::Mutex m_guardedPortMutex;
1226 
1228  Os::Mutex m_eventLock;
1229 
1230  };
1231 
1232 }
1233 
1234 #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
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.
Error encountered while creating validation file.
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
Error encountered while opening validation file.
void log_WARNING_HI_InvalidInput(const Fw::StringBase &handler, const Fw::StringBase &issue) const
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.
Svc::InputFileWritePort * get_writeIn_InputPort(FwIndexType portNum)
bool isConnected_verifyDoneOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_verifyDoneOut_OutputPorts()
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()
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.
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.
Enum representing event severity.
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()
Completed the write operation and will return buffer.
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()
Received a buffer and initiating write operation.
void log_WARNING_LO_CrcVerificationError(U32 crcExp, U32 crcCalculated) const
void log_WARNING_HI_WriteValidationOpenError_ThrottleClear()
Reset throttle value for WriteValidationOpenError.
Invalid input arguments received on a port handler.
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
RateGroupDivider component implementation.
Completed the read operation and will return buffer.
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.
Completed the write operation and will return buffer.
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
Error encountered while reading validation file.
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