7 #ifndef Drv_PosixUartDriverComponentAc_HPP 8 #define Drv_PosixUartDriverComponentAc_HPP 22 #if !FW_DIRECT_PORT_CALLS 25 #if !FW_DIRECT_PORT_CALLS 117 #if !FW_DIRECT_PORT_CALLS 148 #if !FW_DIRECT_PORT_CALLS 162 #if FW_ENABLE_TEXT_LOGGING == 1 165 void set_LogText_OutputPort(
186 #if !FW_DIRECT_PORT_CALLS 220 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 231 Fw::InputSerializePort* port
234 #if FW_ENABLE_TEXT_LOGGING == 1 237 void set_LogText_OutputPort(
239 Fw::InputSerializePort* port
247 Fw::InputSerializePort* port
253 Fw::InputSerializePort* port
258 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION 269 Fw::InputSerializePort* port
275 Fw::InputSerializePort* port
281 Fw::InputSerializePort* port
294 const char* compName =
"" 340 #if FW_ENABLE_TEXT_LOGGING == 1 345 static constexpr
FwIndexType getNum_LogText_OutputPorts() {
412 #if FW_ENABLE_TEXT_LOGGING == 1 417 bool isConnected_LogText_OutputPort(
495 #if FW_DIRECT_PORT_CALLS 703 static void m_p_recvReturnIn_in(
710 static void m_p_run_in(
738 #if FW_ENABLE_TEXT_LOGGING 765 #if !FW_DIRECT_PORT_CALLS 784 #if !FW_DIRECT_PORT_CALLS 795 #if FW_ENABLE_TEXT_LOGGING == 1 810 #if !FW_DIRECT_PORT_CALLS 839 std::atomic<FwIndexType> m_WriteErrorThrottle;
842 std::atomic<FwIndexType> m_ReadErrorThrottle;
845 std::atomic<FwIndexType> m_NoBuffersThrottle;
Svc::InputSchedPort * get_run_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_Log_OutputPorts()
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
bool isConnected_Log_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_recvReturnIn_InputPorts()
PlatformSizeType FwSizeType
void log_WARNING_HI_ReadError(const Fw::StringBase &device, I32 error)
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocate.
void log_WARNING_HI_ConfigError(const Fw::StringBase &device, I32 error) const
Throttle reset count for ReadError.
static constexpr FwIndexType getNum_Time_OutputPorts()
void log_WARNING_HI_WriteError_ThrottleClear()
Reset throttle value for WriteError.
void set_ready_OutputPort(FwIndexType portNum, Drv::InputByteStreamReadyPort *port)
Connect port to ready[portNum].
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
bool isConnected_Tlm_OutputPort(FwIndexType portNum) const
virtual void run_handler(FwIndexType portNum, U32 context)=0
Handler for input port run.
Drv::ByteStreamStatus send_handlerBase(FwIndexType portNum, Fw::Buffer &sendBuffer)
Handler base-class function for input port send.
void log_ACTIVITY_HI_PortOpened(const Fw::StringBase &device) const
Channel ID for BytesSent.
void log_WARNING_HI_NoBuffers_ThrottleClear()
Reset throttle value for NoBuffers.
virtual Drv::ByteStreamStatus send_handler(FwIndexType portNum, Fw::Buffer &sendBuffer)=0
Handler for input port send.
void init()
Object initializer.
Channel ID for BytesRecv.
bool isConnected_Time_OutputPort(FwIndexType portNum) const
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
FwIdType FwEventIdType
The type of an event identifier.
Fw::Buffer allocate_out(FwIndexType portNum, FwSizeType size) const
Invoke output port allocate.
Status returned by the send call.
void tlmWrite_BytesSent(FwSizeType arg, Fw::Time _tlmTime=Fw::Time()) const
FwIdType FwChanIdType
The type of a telemetry channel identifier.
static constexpr FwIndexType getNum_ready_OutputPorts()
void set_recv_OutputPort(FwIndexType portNum, Drv::InputByteStreamDataPort *port)
Connect port to recv[portNum].
Enum representing event severity.
bool isConnected_ready_OutputPort(FwIndexType portNum) const
virtual void lock()
Lock the guarded mutex.
static constexpr FwIndexType getNum_deallocate_OutputPorts()
Throttle reset count for NoBuffers.
bool isConnected_deallocate_OutputPort(FwIndexType portNum) const
virtual void unLock()
Unlock the guarded mutex.
static constexpr FwIndexType getNum_Tlm_OutputPorts()
void log_WARNING_HI_WriteError(const Fw::StringBase &device, I32 error)
friend class PosixUartDriverTesterBase
Friend class tester to support autocoded test harness.
void recvReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port recvReturnIn.
bool isConnected_allocate_OutputPort(FwIndexType portNum) const
void log_WARNING_HI_NoBuffers(const Fw::StringBase &device)
friend class PosixUartDriverTester
Friend class tester implementation to support white-box testing.
PlatformIndexType FwIndexType
virtual ~PosixUartDriverComponentBase()
Destroy PosixUartDriverComponentBase object.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void log_WARNING_HI_BufferTooSmall(const Fw::StringBase &device, U32 size, U32 needed) const
bool isConnected_recv_OutputPort(FwIndexType portNum) const
Drv::InputByteStreamSendPort * get_send_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_allocate_OutputPorts()
Auto-generated base for PosixUartDriver component.
static constexpr FwIndexType getNum_run_InputPorts()
Throttle reset count for WriteError.
void log_WARNING_HI_ReadError_ThrottleClear()
Reset throttle value for ReadError.
void ready_out(FwIndexType portNum) const
Invoke output port ready.
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void run_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port run.
static constexpr FwIndexType getNum_send_InputPorts()
static constexpr FwIndexType getNum_recv_OutputPorts()
PosixUartDriverComponentBase(const char *compName="")
Construct PosixUartDriverComponentBase object.
Fw::InputBufferSendPort * get_recvReturnIn_InputPort(FwIndexType portNum)
void log_WARNING_HI_OpenError(const Fw::StringBase &device, I32 error, const Fw::StringBase &name) const
virtual void recvReturnIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port recvReturnIn.
void recv_out(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status) const
Invoke output port recv.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void tlmWrite_BytesRecv(FwSizeType arg, Fw::Time _tlmTime=Fw::Time()) const