7 #ifndef Svc_FileWorkerComponentAc_HPP 8 #define Svc_FileWorkerComponentAc_HPP 20 #if !FW_DIRECT_PORT_CALLS 23 #if !FW_DIRECT_PORT_CALLS 140 #if !FW_DIRECT_PORT_CALLS 157 #if !FW_DIRECT_PORT_CALLS 195 #if !FW_DIRECT_PORT_CALLS 221 #if FW_ENABLE_TEXT_LOGGING == 1 224 void set_logTextOut_OutputPort(
257 #if !FW_DIRECT_PORT_CALLS 285 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 296 Fw::InputSerializePort* port
302 Fw::InputSerializePort* port
308 Fw::InputSerializePort* port
311 #if FW_ENABLE_TEXT_LOGGING == 1 314 void set_logTextOut_OutputPort(
316 Fw::InputSerializePort* port
324 Fw::InputSerializePort* port
330 Fw::InputSerializePort* port
336 Fw::InputSerializePort* port
341 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 352 Fw::InputSerializePort* port
358 Fw::InputSerializePort* port
364 Fw::InputSerializePort* port
377 const char* compName =
"" 457 #if FW_ENABLE_TEXT_LOGGING == 1 462 static constexpr
FwIndexType getNum_logTextOut_OutputPorts() {
550 #if FW_ENABLE_TEXT_LOGGING == 1 555 bool isConnected_logTextOut_OutputPort(
616 #if FW_DIRECT_PORT_CALLS 670 #if FW_DIRECT_PORT_CALLS 998 static void m_p_cmdIn_in(
1013 static void m_p_cancelIn_in(
1019 static void m_p_readIn_in(
1027 static void m_p_verifyIn_in(
1035 static void m_p_writeIn_in(
1059 #if FW_ENABLE_TEXT_LOGGING 1062 void logTextOut_out(
1073 void timeCaller_out(
1078 #if !FW_DIRECT_PORT_CALLS 1091 #if !FW_DIRECT_PORT_CALLS 1113 #if !FW_DIRECT_PORT_CALLS 1130 #if FW_ENABLE_TEXT_LOGGING == 1 1151 #if !FW_DIRECT_PORT_CALLS 1192 Fw::Time m_ReadFailedFileSizeThrottleTime;
1198 Fw::Time m_OpenFileErrorThrottleTime;
1204 Fw::Time m_WriteFileErrorThrottleTime;
1210 Fw::Time m_WriteValidationOpenErrorThrottleTime;
1216 Fw::Time m_WriteValidationReadErrorThrottleTime;
Throttle reset count for ReadFailedFileSize.
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.
Throttle reset count for CrcFailed.
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)
Throttle reset count for WriteValidationOpenError.
Inform we are done reading from file.
void log_WARNING_HI_WriteTimeout(FwSizeType bytesWritten, FwSizeType writeSize, const Fw::StringBase &fileName, U64 timeout) const
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
Throttle reset count for WriteValidationReadError.
Getting file open failed.
Throttle reset count for OpenFileError.
Notify we are not in IDLE state.
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].
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()
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void init()
Object initializer.
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
Inform we are reading from file.
virtual void unLock()
Unlock the guarded mutex.
void log_ACTIVITY_LO_ReadCompleted(FwSizeType fileSize, const Fw::StringBase &fileName) const
Reading to file was too slow.
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)
Error encountered reading to file.
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)
virtual void verifyIn_handler(FwIndexType portNum, const Fw::StringBase &path, U32 crc)=0
Handler for input port verifyIn.
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.
Writing to file was too slow.
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.
Throttle reset count for WriteFileError.
Enum representing event severity.
void readDoneOut_out(FwIndexType portNum, U32 status, FwSizeType sizeBytes) const
Invoke output port readDoneOut.
Throttle reset count for NotInIdle.
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
Error encountered writing to file.
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)
Getting file size failed.
static constexpr FwIndexType getNum_cancelIn_InputPorts()
void log_WARNING_HI_CrcFailed(U32 crcStat)
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.