7 #ifndef Svc_DpWriterComponentAc_HPP 8 #define Svc_DpWriterComponentAc_HPP 22 #if !FW_DIRECT_PORT_CALLS 25 #if !FW_DIRECT_PORT_CALLS 142 #if !FW_DIRECT_PORT_CALLS 159 #if !FW_DIRECT_PORT_CALLS 183 #if !FW_DIRECT_PORT_CALLS 209 #if FW_ENABLE_TEXT_LOGGING == 1 212 void set_textEventOut_OutputPort(
233 #if !FW_DIRECT_PORT_CALLS 261 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 272 Fw::InputSerializePort* port
278 Fw::InputSerializePort* port
284 Fw::InputSerializePort* port
287 #if FW_ENABLE_TEXT_LOGGING == 1 290 void set_textEventOut_OutputPort(
292 Fw::InputSerializePort* port
300 Fw::InputSerializePort* port
306 Fw::InputSerializePort* port
311 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 322 Fw::InputSerializePort* port
328 Fw::InputSerializePort* port
334 Fw::InputSerializePort* port
358 const char* compName =
"" 424 #if FW_ENABLE_TEXT_LOGGING == 1 429 static constexpr
FwIndexType getNum_textEventOut_OutputPorts() {
503 #if FW_ENABLE_TEXT_LOGGING == 1 508 bool isConnected_textEventOut_OutputPort(
555 #if FW_DIRECT_PORT_CALLS 593 #if FW_DIRECT_PORT_CALLS 946 static void m_p_cmdIn_in(
961 static void m_p_bufferSendIn_in(
968 static void m_p_schedIn_in(
987 void cmdResponseOut_out(
1003 #if FW_ENABLE_TEXT_LOGGING 1006 void textEventOut_out(
1017 void timeGetOut_out(
1030 #if !FW_DIRECT_PORT_CALLS 1043 #if !FW_DIRECT_PORT_CALLS 1059 #if !FW_DIRECT_PORT_CALLS 1076 #if FW_ENABLE_TEXT_LOGGING == 1 1091 #if !FW_DIRECT_PORT_CALLS 1117 std::atomic<FwIndexType> m_InvalidBufferThrottle;
1120 std::atomic<FwIndexType> m_BufferTooSmallForPacketThrottle;
1123 std::atomic<FwIndexType> m_InvalidHeaderHashThrottle;
1126 std::atomic<FwIndexType> m_InvalidHeaderThrottle;
1129 std::atomic<FwIndexType> m_BufferTooSmallForDataThrottle;
1132 std::atomic<FwIndexType> m_FileNameFormatErrorThrottle;
1135 std::atomic<FwIndexType> m_FileOpenErrorThrottle;
1138 std::atomic<FwIndexType> m_FileWriteErrorThrottle;
1147 bool m_first_update_NumBuffersReceived =
true;
1150 bool m_first_update_NumBytesWritten =
true;
1153 bool m_first_update_NumSuccessfulWrites =
true;
1156 bool m_first_update_NumFailedWrites =
true;
1159 bool m_first_update_NumErrors =
true;
1168 U32 m_last_NumBuffersReceived = {};
1171 U64 m_last_NumBytesWritten = {};
1174 U32 m_last_NumSuccessfulWrites = {};
1177 U32 m_last_NumFailedWrites = {};
1180 U32 m_last_NumErrors = {};
static constexpr FwIndexType getNum_bufferSendIn_InputPorts()
virtual ~DpWriterComponentBase()
Destroy DpWriterComponentBase object.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
An error occurred when writing to a file.
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
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum) const
U32 FwDpPriorityType
The type of a data product priority.
static constexpr FwIndexType getNum_eventOut_OutputPorts()
Throttle reset count for InvalidBuffer.
Throttle reset count for InvalidHeader.
virtual void schedInInternal_internalInterfaceHandler()=0
Internal interface handler for schedInInternal.
void set_dpWrittenOut_OutputPort(FwIndexType portNum, Svc::InputDpWrittenPort *port)
Connect port to dpWrittenOut[portNum].
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void log_WARNING_HI_FileNameFormatError_ThrottleClear()
Reset throttle value for FileNameFormatError.
Channel ID for NumBytesWritten.
friend class DpWriterTester
Friend class tester implementation to support white-box testing.
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum) const
Enum representing a command response.
Received buffer is invalid.
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()
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
static constexpr FwIndexType getNum_deallocBufferSendOut_OutputPorts()
The received buffer has an invalid header hash.
void tlmWrite_NumErrors(U32 arg, Fw::Time _tlmTime=Fw::Time())
void init()
Object initializer.
bool isConnected_dpWrittenOut_OutputPort(FwIndexType portNum) const
Fw::InputBufferSendPort * get_bufferSendIn_InputPort(FwIndexType portNum)
bool isConnected_deallocBufferSendOut_OutputPort(FwIndexType portNum) const
void deallocBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocBufferSendOut.
void log_WARNING_HI_InvalidBuffer_ThrottleClear()
Reset throttle value for InvalidBuffer.
FwIdType FwEventIdType
The type of an event identifier.
void tlmWrite_NumFailedWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_FileWriteError_ThrottleClear()
Reset throttle value for FileWriteError.
Throttle reset count for FileNameFormatError.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
Throttle reset count for BufferTooSmallForData.
void dpWrittenOut_out(FwIndexType portNum, const Fw::StringBase &fileName, FwDpPriorityType priority, FwSizeType size) const
Invoke output port dpWrittenOut.
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidHeaderHash(FwSizeType bufferSize, U32 storedHash, U32 computedHash)
Throttle reset count for FileWriteError.
void set_deallocBufferSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocBufferSendOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
Channel ID for NumBuffersReceived.
void tlmWrite_NumBuffersReceived(U32 arg, Fw::Time _tlmTime=Fw::Time())
Throttle reset count for FileOpenError.
static constexpr FwIndexType getNum_procBufferSendOut_OutputPorts()
void procBufferSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port procBufferSendOut.
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.
Enum representing event severity.
void log_WARNING_HI_FileNameFormatError(const Fw::StringFormatStatus &status)
virtual void schedInInternal_overflowHook()=0
Overflow hook for async input port schedInInternal.
void log_WARNING_HI_InvalidHeaderHash_ThrottleClear()
Reset throttle value for InvalidHeaderHash.
bool isConnected_procBufferSendOut_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_BufferTooSmallForPacket(FwSizeType bufferSize, U32 minSize)
void regCommands()
Register commands with the Command Dispatcher.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
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
Channel ID for NumErrors.
static constexpr FwIndexType getNum_cmdRegIn_OutputPorts()
An error occurred when opening a file.
Received buffer is too small to hold the data specified in the header.
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].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
virtual void bufferSendIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferSendIn.
void log_WARNING_HI_FileWriteError(U32 status, U32 bytesWritten, U32 bytesToWrite, const Fw::StringBase &file)
Channel ID for NumFailedWrites.
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
RateGroupDivider component implementation.
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())
void log_WARNING_HI_InvalidHeader(FwSizeType bufferSize, U32 errorCode)
Received buffer is too small to hold a data product packet.
An error occurred when formatting a file name.
void tlmWrite_NumSuccessfulWrites(U32 arg, Fw::Time _tlmTime=Fw::Time())
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].
Error occurred when deserializing the packet header.
Throttle reset count for InvalidHeaderHash.
void log_WARNING_HI_InvalidBuffer()
Channel ID for NumSuccessfulWrites.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
Auto-generated base for DpWriter component.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void schedInInternal_internalInterfaceInvoke()
Internal interface base-class function for schedInInternal.
Throttle reset count for BufferTooSmallForPacket.