7 #ifndef Svc_FileWorkerComponentAc_HPP 8 #define Svc_FileWorkerComponentAc_HPP 19 #if FW_ENABLE_TEXT_LOGGING == 1 22 #if !FW_DIRECT_PORT_CALLS 25 #if !FW_DIRECT_PORT_CALLS 141 #if !FW_DIRECT_PORT_CALLS 158 #if !FW_DIRECT_PORT_CALLS 196 #if !FW_DIRECT_PORT_CALLS 222 #if FW_ENABLE_TEXT_LOGGING == 1 225 void set_logTextOut_OutputPort(
258 #if !FW_DIRECT_PORT_CALLS 286 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 297 Fw::InputSerializePort* port
303 Fw::InputSerializePort* port
309 Fw::InputSerializePort* port
312 #if FW_ENABLE_TEXT_LOGGING == 1 315 void set_logTextOut_OutputPort(
317 Fw::InputSerializePort* port
325 Fw::InputSerializePort* port
331 Fw::InputSerializePort* port
337 Fw::InputSerializePort* port
342 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 353 Fw::InputSerializePort* port
359 Fw::InputSerializePort* port
365 Fw::InputSerializePort* port
378 const char* compName =
"" 458 #if FW_ENABLE_TEXT_LOGGING == 1 463 static constexpr
FwIndexType getNum_logTextOut_OutputPorts() {
551 #if FW_ENABLE_TEXT_LOGGING == 1 556 bool isConnected_logTextOut_OutputPort(
617 #if FW_DIRECT_PORT_CALLS 671 #if FW_DIRECT_PORT_CALLS 991 static void m_p_cmdIn_in(
1006 static void m_p_cancelIn_in(
1012 static void m_p_readIn_in(
1020 static void m_p_verifyIn_in(
1028 static void m_p_writeIn_in(
1052 #if FW_ENABLE_TEXT_LOGGING 1055 void logTextOut_out(
1066 void timeCaller_out(
1071 #if !FW_DIRECT_PORT_CALLS 1084 #if !FW_DIRECT_PORT_CALLS 1106 #if !FW_DIRECT_PORT_CALLS 1123 #if FW_ENABLE_TEXT_LOGGING == 1 1144 #if !FW_DIRECT_PORT_CALLS 1185 Fw::Time m_ReadFailedFileSizeThrottleTime;
1191 Fw::Time m_OpenFileErrorThrottleTime;
1197 Fw::Time m_WriteFileErrorThrottleTime;
1203 Fw::Time m_WriteValidationOpenErrorThrottleTime;
1209 Fw::Time m_WriteValidationReadErrorThrottleTime;
static constexpr FwIndexType getNum_verifyIn_InputPorts()
Throttle reset count for WriteValidationReadError.
Throttle reset count for WriteFileError.
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.
Throttle reset count for NotInIdle.
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
Error encountered reading to file.
void log_WARNING_LO_ReadAborted(FwSizeType bytesRead, FwSizeType readSize, const Fw::StringBase &fileName) const
Getting file size failed.
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].
bool isConnected_readDoneOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_LO_WriteBegin(FwSizeType writeSize, const Fw::StringBase &fileName) const
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
static constexpr FwIndexType getNum_readDoneOut_OutputPorts()
Getting file open failed.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void init()
Object initializer.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Writing to file was too slow.
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
Inform we are done reading from file.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
Inform we are reading from file.
virtual void verifyIn_handler(FwIndexType portNum, const Fw::StringBase &path, U32 crc)=0
Handler for input port verifyIn.
Notify we are not in IDLE state.
Reading to file was too slow.
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)
Throttle reset count for ReadFailedFileSize.
static constexpr FwIndexType getNum_cancelIn_InputPorts()
void log_WARNING_HI_CrcFailed(U32 crcStat)
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].
Throttle reset count for CrcFailed.
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.
Throttle reset count for OpenFileError.
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.
Throttle reset count for WriteValidationOpenError.
Error encountered writing to file.