7 #ifndef Svc_DpWriterComponentAc_HPP 8 #define Svc_DpWriterComponentAc_HPP 21 #if FW_ENABLE_TEXT_LOGGING == 1 192 #if FW_ENABLE_TEXT_LOGGING == 1 195 void set_textEventOut_OutputPort(
238 #if FW_PORT_SERIALIZATION 249 Fw::InputSerializePort* port
255 Fw::InputSerializePort* port
261 Fw::InputSerializePort* port
264 #if FW_ENABLE_TEXT_LOGGING == 1 267 void set_textEventOut_OutputPort(
269 Fw::InputSerializePort* port
277 Fw::InputSerializePort* port
283 Fw::InputSerializePort* port
288 #if FW_PORT_SERIALIZATION 299 Fw::InputSerializePort* port
305 Fw::InputSerializePort* port
311 Fw::InputSerializePort* port
335 const char* compName =
"" 401 #if FW_ENABLE_TEXT_LOGGING == 1 406 static constexpr
FwIndexType getNum_textEventOut_OutputPorts() {
480 #if FW_ENABLE_TEXT_LOGGING == 1 485 bool isConnected_textEventOut_OutputPort(
848 static void m_p_cmdIn_in(
863 static void m_p_bufferSendIn_in(
870 static void m_p_schedIn_in(
912 #if FW_ENABLE_TEXT_LOGGING == 1 947 std::atomic<FwIndexType> m_InvalidBufferThrottle;
950 std::atomic<FwIndexType> m_BufferTooSmallForPacketThrottle;
953 std::atomic<FwIndexType> m_InvalidHeaderHashThrottle;
956 std::atomic<FwIndexType> m_InvalidHeaderThrottle;
959 std::atomic<FwIndexType> m_BufferTooSmallForDataThrottle;
962 std::atomic<FwIndexType> m_FileOpenErrorThrottle;
965 std::atomic<FwIndexType> m_FileWriteErrorThrottle;
974 bool m_first_update_NumBuffersReceived =
true;
977 bool m_first_update_NumBytesWritten =
true;
980 bool m_first_update_NumSuccessfulWrites =
true;
983 bool m_first_update_NumFailedWrites =
true;
986 bool m_first_update_NumErrors =
true;
995 U32 m_last_NumBuffersReceived = {};
998 U64 m_last_NumBytesWritten = {};
1001 U32 m_last_NumSuccessfulWrites = {};
1004 U32 m_last_NumFailedWrites = {};
1007 U32 m_last_NumErrors = {};
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocBufferSendOut.
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
Throttle reset count for FileWriteError.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
void log_WARNING_HI_BufferTooSmallForData(FwSizeType bufferSize, U32 minSize)
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
PlatformSizeType FwSizeType
Throttle reset count for InvalidHeader.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
U32 FwDpPriorityType
The type of a data product priority.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum)
Throttle reset count for BufferTooSmallForData.
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
An error occurred when opening a file.
friend class DpWriterTester
Friend class tester implementation to support white-box testing.
Enum representing a command response.
virtual void bufferSendIn_preMsgHook(FwIndexType portNum, Fw::Buffer &fwBuffer)
Pre-message hook for async input port bufferSendIn.
static constexpr FwIndexType getNum_schedIn_InputPorts()
static constexpr FwIndexType getNum_timeGetOut_OutputPorts()
static constexpr FwIndexType getNum_deallocBufferSendOut_OutputPorts()
Received buffer is too small to hold the data specified in the header.
Channel ID for NumBuffersReceived.
Throttle reset count for InvalidHeaderHash.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
Received buffer is invalid.
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
void tlmWrite_NumFailedWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileWriteError_ThrottleClear()
Reset throttle value for FileWriteError.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum)
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port procBufferSendOut.
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size)
Invoke output port dpWrittenOut.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidHeaderHash(FwSizeType bufferSize, U32 storedHash, U32 computedHash)
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
void tlmWrite_NumBuffersReceived(U32 arg, Fw::Time _tlmTime=Fw::Time())
Channel ID for NumBytesWritten.
static constexpr FwIndexType getNum_procBufferSendOut_OutputPorts()
bool isConnected_eventOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_BufferTooSmallForData_ThrottleClear()
Reset throttle value for BufferTooSmallForData.
void log_WARNING_HI_FileOpenError_ThrottleClear()
Reset throttle value for FileOpenError.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
DpWriterComponentBase(const char *compName="")
Construct DpWriterComponentBase object.
void log_WARNING_HI_FileOpenError(U32 status, const Fw::StringBase &file)
void log_WARNING_HI_InvalidHeader_ThrottleClear()
Reset throttle value for InvalidHeader.
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
Throttle reset count for InvalidBuffer.
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
An error occurred when writing to a file.
void regCommands()
Register commands with the Command Dispatcher.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
Error occurred when deserializing the packet header.
Throttle reset count for BufferTooSmallForPacket.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void log_ACTIVITY_LO_FileWritten(U32 bytes, const Fw::StringBase &file) const
static constexpr FwIndexType getNum_cmdRegIn_OutputPorts()
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_dpWrittenOut_OutputPorts()
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_FileWriteError(U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
RateGroupDivider component implementation.
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum)
friend class DpWriterTesterBase
Friend class tester to support autocoded test harness.
void bufferSendIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferSendIn.
void tlmWrite_NumBytesWritten(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
void log_WARNING_HI_InvalidHeader(FwSizeType bufferSize, U32 errorCode)
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
Received buffer is too small to hold a data product packet.
void log_WARNING_HI_BufferTooSmallForPacket_ThrottleClear()
Reset throttle value for BufferTooSmallForPacket.
void set_procBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to procBufferSendOut[portNum].
The received buffer has an invalid header hash.
Channel ID for NumSuccessfulWrites.
Channel ID for NumFailedWrites.
void log_WARNING_HI_InvalidBuffer()
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
Throttle reset count for FileOpenError.
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
Auto-generated base for DpWriter component.
Channel ID for NumErrors.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_cmdIn_InputPorts()