10 #if FW_ENABLE_TEXT_LOGGING 32 this->m_send_InputPort[port].
init();
39 #if FW_OBJECT_NAMES == 1 43 this->m_objName.toChar(),
46 this->m_send_InputPort[port].setObjName(portName.
toChar());
56 this->m_Log_OutputPort[port].
init();
58 #if FW_OBJECT_NAMES == 1 62 this->m_objName.toChar(),
65 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
69 #if FW_ENABLE_TEXT_LOGGING == 1 73 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
76 this->m_LogText_OutputPort[port].
init();
78 #if FW_OBJECT_NAMES == 1 82 this->m_objName.toChar(),
85 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
96 this->m_Time_OutputPort[port].
init();
98 #if FW_OBJECT_NAMES == 1 102 this->m_objName.toChar(),
105 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
115 this->m_Tlm_OutputPort[port].
init();
117 #if FW_OBJECT_NAMES == 1 121 this->m_objName.toChar(),
124 this->m_Tlm_OutputPort[port].setObjName(portName.
toChar());
134 this->m_allocate_OutputPort[port].
init();
136 #if FW_OBJECT_NAMES == 1 140 this->m_objName.toChar(),
143 this->m_allocate_OutputPort[port].setObjName(portName.
toChar());
153 this->m_deallocate_OutputPort[port].
init();
155 #if FW_OBJECT_NAMES == 1 159 this->m_objName.toChar(),
162 this->m_deallocate_OutputPort[port].setObjName(portName.
toChar());
172 this->m_ready_OutputPort[port].
init();
174 #if FW_OBJECT_NAMES == 1 178 this->m_objName.toChar(),
181 this->m_ready_OutputPort[port].setObjName(portName.
toChar());
191 this->m_recv_OutputPort[port].
init();
193 #if FW_OBJECT_NAMES == 1 197 this->m_objName.toChar(),
200 this->m_recv_OutputPort[port].setObjName(portName.
toChar());
214 static_cast<FwAssertArgType>(portNum)
217 return &this->m_send_InputPort[portNum];
232 static_cast<FwAssertArgType>(portNum)
238 #if FW_ENABLE_TEXT_LOGGING == 1 240 void LinuxUartDriverComponentBase ::
241 set_LogText_OutputPort(
247 portNum < this->getNum_LogText_OutputPorts(),
248 static_cast<FwAssertArgType>(portNum)
251 this->m_LogText_OutputPort[portNum].addCallPort(port);
264 static_cast<FwAssertArgType>(portNum)
267 this->m_Time_OutputPort[portNum].
addCallPort(port);
278 static_cast<FwAssertArgType>(portNum)
296 static_cast<FwAssertArgType>(portNum)
299 this->m_allocate_OutputPort[portNum].
addCallPort(port);
310 static_cast<FwAssertArgType>(portNum)
313 this->m_deallocate_OutputPort[portNum].
addCallPort(port);
324 static_cast<FwAssertArgType>(portNum)
327 this->m_ready_OutputPort[portNum].
addCallPort(port);
338 static_cast<FwAssertArgType>(portNum)
341 this->m_recv_OutputPort[portNum].
addCallPort(port);
344 #if FW_PORT_SERIALIZATION 353 Fw::InputSerializePort* port
358 static_cast<FwAssertArgType>(portNum)
361 this->m_Log_OutputPort[portNum].registerSerialPort(port);
364 #if FW_ENABLE_TEXT_LOGGING == 1 366 void LinuxUartDriverComponentBase ::
367 set_LogText_OutputPort(
369 Fw::InputSerializePort* port
373 portNum < this->getNum_LogText_OutputPorts(),
374 static_cast<FwAssertArgType>(portNum)
377 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
385 Fw::InputSerializePort* port
390 static_cast<FwAssertArgType>(portNum)
393 this->m_Time_OutputPort[portNum].registerSerialPort(port);
399 Fw::InputSerializePort* port
404 static_cast<FwAssertArgType>(portNum)
407 this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
412 #if FW_PORT_SERIALIZATION 421 Fw::InputSerializePort* port
426 static_cast<FwAssertArgType>(portNum)
429 this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
435 Fw::InputSerializePort* port
440 static_cast<FwAssertArgType>(portNum)
443 this->m_ready_OutputPort[portNum].registerSerialPort(port);
449 Fw::InputSerializePort* port
454 static_cast<FwAssertArgType>(portNum)
457 this->m_recv_OutputPort[portNum].registerSerialPort(port);
468 Fw::PassiveComponentBase(compName)
470 this->m_WriteErrorThrottle = 0;
471 this->m_ReadErrorThrottle = 0;
472 this->m_NoBuffersThrottle = 0;
501 #if FW_ENABLE_TEXT_LOGGING == 1 504 getNum_LogText_OutputPorts()
const 560 static_cast<FwAssertArgType>(portNum)
563 return this->m_Log_OutputPort[portNum].
isConnected();
566 #if FW_ENABLE_TEXT_LOGGING == 1 568 bool LinuxUartDriverComponentBase ::
569 isConnected_LogText_OutputPort(
FwIndexType portNum)
572 portNum < this->getNum_LogText_OutputPorts(),
573 static_cast<FwAssertArgType>(portNum)
576 return this->m_LogText_OutputPort[portNum].isConnected();
586 static_cast<FwAssertArgType>(portNum)
589 return this->m_Time_OutputPort[portNum].
isConnected();
597 static_cast<FwAssertArgType>(portNum)
600 return this->m_Tlm_OutputPort[portNum].
isConnected();
612 static_cast<FwAssertArgType>(portNum)
615 return this->m_allocate_OutputPort[portNum].
isConnected();
623 static_cast<FwAssertArgType>(portNum)
626 return this->m_deallocate_OutputPort[portNum].
isConnected();
634 static_cast<FwAssertArgType>(portNum)
637 return this->m_ready_OutputPort[portNum].
isConnected();
645 static_cast<FwAssertArgType>(portNum)
648 return this->m_recv_OutputPort[portNum].
isConnected();
666 static_cast<FwAssertArgType>(portNum)
698 static_cast<FwAssertArgType>(portNum)
700 return this->m_allocate_OutputPort[portNum].
invoke(
713 static_cast<FwAssertArgType>(portNum)
715 this->m_deallocate_OutputPort[portNum].
invoke(
725 static_cast<FwAssertArgType>(portNum)
727 this->m_ready_OutputPort[portNum].
invoke();
739 static_cast<FwAssertArgType>(portNum)
741 this->m_recv_OutputPort[portNum].
invoke(
760 if (this->m_Time_OutputPort[0].isConnected()) {
761 this->m_Time_OutputPort[0].
invoke(_logTime);
769 if (this->m_Log_OutputPort[0].isConnected()) {
773 #if FW_AMPCS_COMPATIBLE 775 _status = _logBuff.
serialize(static_cast<U8>(3));
778 static_cast<FwAssertArgType>(_status)
785 static_cast<FwAssertArgType>(_status)
788 #if FW_AMPCS_COMPATIBLE 791 static_cast<U8>(
sizeof(I32))
795 static_cast<FwAssertArgType>(_status)
801 static_cast<FwAssertArgType>(_status)
807 static_cast<FwAssertArgType>(_status)
810 this->m_Log_OutputPort[0].
invoke(
819 #if FW_ENABLE_TEXT_LOGGING 820 if (this->m_LogText_OutputPort[0].isConnected()) {
821 #if FW_OBJECT_NAMES == 1 822 const char* _formatString =
823 "(%s) %s: Error opening UART device %s: %" PRIi32
" %s";
825 const char* _formatString =
826 "%s: Error opening UART device %s: %" PRIi32
" %s";
833 this->m_objName.toChar(),
841 this->m_LogText_OutputPort[0].invoke(
859 if (this->m_Time_OutputPort[0].isConnected()) {
860 this->m_Time_OutputPort[0].
invoke(_logTime);
868 if (this->m_Log_OutputPort[0].isConnected()) {
872 #if FW_AMPCS_COMPATIBLE 874 _status = _logBuff.
serialize(static_cast<U8>(2));
877 static_cast<FwAssertArgType>(_status)
884 static_cast<FwAssertArgType>(_status)
887 #if FW_AMPCS_COMPATIBLE 890 static_cast<U8>(
sizeof(I32))
894 static_cast<FwAssertArgType>(_status)
900 static_cast<FwAssertArgType>(_status)
903 this->m_Log_OutputPort[0].
invoke(
912 #if FW_ENABLE_TEXT_LOGGING 913 if (this->m_LogText_OutputPort[0].isConnected()) {
914 #if FW_OBJECT_NAMES == 1 915 const char* _formatString =
916 "(%s) %s: Error configuring UART device %s: %" PRIi32
"";
918 const char* _formatString =
919 "%s: Error configuring UART device %s: %" PRIi32
"";
926 this->m_objName.toChar(),
933 this->m_LogText_OutputPort[0].invoke(
954 this->m_WriteErrorThrottle++;
959 if (this->m_Time_OutputPort[0].isConnected()) {
960 this->m_Time_OutputPort[0].
invoke(_logTime);
968 if (this->m_Log_OutputPort[0].isConnected()) {
972 #if FW_AMPCS_COMPATIBLE 974 _status = _logBuff.
serialize(static_cast<U8>(2));
977 static_cast<FwAssertArgType>(_status)
984 static_cast<FwAssertArgType>(_status)
987 #if FW_AMPCS_COMPATIBLE 990 static_cast<U8>(
sizeof(I32))
994 static_cast<FwAssertArgType>(_status)
1000 static_cast<FwAssertArgType>(_status)
1003 this->m_Log_OutputPort[0].
invoke(
1012 #if FW_ENABLE_TEXT_LOGGING 1013 if (this->m_LogText_OutputPort[0].isConnected()) {
1014 #if FW_OBJECT_NAMES == 1 1015 const char* _formatString =
1016 "(%s) %s: Error writing UART device %s: %" PRIi32
"";
1018 const char* _formatString =
1019 "%s: Error writing UART device %s: %" PRIi32
"";
1026 this->m_objName.toChar(),
1033 this->m_LogText_OutputPort[0].invoke(
1054 this->m_ReadErrorThrottle++;
1059 if (this->m_Time_OutputPort[0].isConnected()) {
1060 this->m_Time_OutputPort[0].
invoke(_logTime);
1068 if (this->m_Log_OutputPort[0].isConnected()) {
1072 #if FW_AMPCS_COMPATIBLE 1074 _status = _logBuff.
serialize(static_cast<U8>(2));
1077 static_cast<FwAssertArgType>(_status)
1084 static_cast<FwAssertArgType>(_status)
1087 #if FW_AMPCS_COMPATIBLE 1090 static_cast<U8>(
sizeof(I32))
1094 static_cast<FwAssertArgType>(_status)
1100 static_cast<FwAssertArgType>(_status)
1103 this->m_Log_OutputPort[0].
invoke(
1112 #if FW_ENABLE_TEXT_LOGGING 1113 if (this->m_LogText_OutputPort[0].isConnected()) {
1114 #if FW_OBJECT_NAMES == 1 1115 const char* _formatString =
1116 "(%s) %s: Error reading UART device %s: %" PRIi32
"";
1118 const char* _formatString =
1119 "%s: Error reading UART device %s: %" PRIi32
"";
1126 this->m_objName.toChar(),
1133 this->m_LogText_OutputPort[0].invoke(
1148 if (this->m_Time_OutputPort[0].isConnected()) {
1149 this->m_Time_OutputPort[0].
invoke(_logTime);
1157 if (this->m_Log_OutputPort[0].isConnected()) {
1161 #if FW_AMPCS_COMPATIBLE 1163 _status = _logBuff.
serialize(static_cast<U8>(1));
1166 static_cast<FwAssertArgType>(_status)
1173 static_cast<FwAssertArgType>(_status)
1176 this->m_Log_OutputPort[0].
invoke(
1185 #if FW_ENABLE_TEXT_LOGGING 1186 if (this->m_LogText_OutputPort[0].isConnected()) {
1187 #if FW_OBJECT_NAMES == 1 1188 const char* _formatString =
1189 "(%s) %s: UART Device %s configured";
1191 const char* _formatString =
1192 "%s: UART Device %s configured";
1199 this->m_objName.toChar(),
1205 this->m_LogText_OutputPort[0].invoke(
1223 this->m_NoBuffersThrottle++;
1228 if (this->m_Time_OutputPort[0].isConnected()) {
1229 this->m_Time_OutputPort[0].
invoke(_logTime);
1237 if (this->m_Log_OutputPort[0].isConnected()) {
1241 #if FW_AMPCS_COMPATIBLE 1243 _status = _logBuff.
serialize(static_cast<U8>(1));
1246 static_cast<FwAssertArgType>(_status)
1253 static_cast<FwAssertArgType>(_status)
1256 this->m_Log_OutputPort[0].
invoke(
1265 #if FW_ENABLE_TEXT_LOGGING 1266 if (this->m_LogText_OutputPort[0].isConnected()) {
1267 #if FW_OBJECT_NAMES == 1 1268 const char* _formatString =
1269 "(%s) %s: UART Device %s ran out of buffers";
1271 const char* _formatString =
1272 "%s: UART Device %s ran out of buffers";
1279 this->m_objName.toChar(),
1285 this->m_LogText_OutputPort[0].invoke(
1304 if (this->m_Time_OutputPort[0].isConnected()) {
1305 this->m_Time_OutputPort[0].
invoke(_logTime);
1313 if (this->m_Log_OutputPort[0].isConnected()) {
1317 #if FW_AMPCS_COMPATIBLE 1319 _status = _logBuff.
serialize(static_cast<U8>(3));
1322 static_cast<FwAssertArgType>(_status)
1329 static_cast<FwAssertArgType>(_status)
1332 #if FW_AMPCS_COMPATIBLE 1335 static_cast<U8>(
sizeof(U32))
1339 static_cast<FwAssertArgType>(_status)
1345 static_cast<FwAssertArgType>(_status)
1348 #if FW_AMPCS_COMPATIBLE 1351 static_cast<U8>(
sizeof(U32))
1355 static_cast<FwAssertArgType>(_status)
1361 static_cast<FwAssertArgType>(_status)
1364 this->m_Log_OutputPort[0].
invoke(
1373 #if FW_ENABLE_TEXT_LOGGING 1374 if (this->m_LogText_OutputPort[0].isConnected()) {
1375 #if FW_OBJECT_NAMES == 1 1376 const char* _formatString =
1377 "(%s) %s: UART Device %s target buffer too small. Size: %" PRIu32
" Needs: %" PRIu32
"";
1379 const char* _formatString =
1380 "%s: UART Device %s target buffer too small. Size: %" PRIu32
" Needs: %" PRIu32
"";
1387 this->m_objName.toChar(),
1395 this->m_LogText_OutputPort[0].invoke(
1413 this->m_WriteErrorThrottle = 0;
1420 this->m_ReadErrorThrottle = 0;
1427 this->m_NoBuffersThrottle = 0;
1440 if (this->m_Tlm_OutputPort[0].isConnected()) {
1442 this->m_Time_OutputPort[0].isConnected() &&
1445 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1452 static_cast<FwAssertArgType>(_stat)
1459 this->m_Tlm_OutputPort[0].
invoke(
1473 if (this->m_Tlm_OutputPort[0].isConnected()) {
1475 this->m_Time_OutputPort[0].isConnected() &&
1478 this->m_Time_OutputPort[0].
invoke(_tlmTime);
1485 static_cast<FwAssertArgType>(_stat)
1492 this->m_Tlm_OutputPort[0].
invoke(
1507 if (this->m_Time_OutputPort[0].isConnected()) {
1509 this->m_Time_OutputPort[0].
invoke(_time);
1527 this->m_guardedPortMutex.
lock();
1533 this->m_guardedPortMutex.
unLock();
virtual void lock()
Lock the guarded mutex.
Serialization/Deserialization operation was successful.
virtual void unLock()
Unlock the guarded mutex.
bool isConnected_deallocate_OutputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus) const
Invoke a port interface.
void addCallPort(InputByteStreamReadyPort *callPort)
Register an input port.
void log_WARNING_HI_BufferTooSmall(const Fw::StringBase &device, U32 size, U32 needed) const
bool isConnected_Time_OutputPort(FwIndexType portNum)
bool isConnected_allocate_OutputPort(FwIndexType portNum)
Drv::InputByteStreamSendPort * get_send_InputPort(FwIndexType portNum)
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void set_Tlm_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to Tlm[portNum].
Status associated with the received data.
Fw::Buffer invoke(U32 size) const
Invoke a port interface.
FwIndexType getNum_deallocate_OutputPorts() const
void unLock()
unlock the mutex and assert success
Fw::Buffer allocate_out(FwIndexType portNum, U32 size)
Invoke output port allocate.
FwIndexType getNum_send_InputPorts() const
LinuxUartDriverComponentBase(const char *compName="")
Construct LinuxUartDriverComponentBase object.
void init()
Initialization function.
Auto-generated base for LinuxUartDriver component.
PlatformIndexType FwIndexType
void log_WARNING_HI_WriteError(const Fw::StringBase &device, I32 error)
void addCallPort(InputTlmPort *callPort)
Register an input port.
void addCallPort(InputByteStreamRecvPort *callPort)
Register an input port.
void set_ready_OutputPort(FwIndexType portNum, Drv::InputByteStreamReadyPort *port)
Connect port to ready[portNum].
void init()
Object initializer.
void log_WARNING_HI_ReadError(const Fw::StringBase &device, I32 error)
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.
Channel ID for BytesSent.
void init()
Initialization function.
FwIndexType getNum_recv_OutputPorts() const
FwIndexType getNum_ready_OutputPorts() const
#define FW_MIN(a, b)
MIN macro.
void tlmWrite_BytesRecv(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port interface.
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void log_WARNING_HI_WriteError_ThrottleClear()
Reset throttle value for WriteError.
const char * toChar() const
No time base has been established.
void log_WARNING_HI_OpenError(const Fw::StringBase &device, I32 error, const Fw::StringBase &name) const
Channel ID for BytesRecv.
Drv::SendStatus send_handlerBase(FwIndexType portNum, Fw::Buffer &sendBuffer)
Handler base-class function for input port send.
A serious but recoverable event.
bool isConnected_Log_OutputPort(FwIndexType portNum)
void log_ACTIVITY_HI_PortOpened(const Fw::StringBase &device) const
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
FwIndexType getNum_Log_OutputPorts() const
void set_recv_OutputPort(FwIndexType portNum, Drv::InputByteStreamRecvPort *port)
Connect port to recv[portNum].
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
void init()
Initialization function.
void log_WARNING_HI_NoBuffers(const Fw::StringBase &device)
bool isConnected_Tlm_OutputPort(FwIndexType portNum)
#define PRI_PlatformIntType
void tlmWrite_BytesSent(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void recv_out(FwIndexType portNum, Fw::Buffer &recvBuffer, const Drv::RecvStatus &recvStatus)
Invoke output port recv.
Status returned by the send call.
bool isConnected_recv_OutputPort(FwIndexType portNum)
Important informational events.
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
FwIndexType getNum_Tlm_OutputPorts() const
FwIndexType getNum_allocate_OutputPorts() const
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void invoke() const
Invoke a port interface.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
void addCallPort(InputLogPort *callPort)
Register an input port.
void ready_out(FwIndexType portNum)
Invoke output port ready.
void init()
Initialization function.
FwIndexType getNum_Time_OutputPorts() const
Throttle reset count for WriteError.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
virtual ~LinuxUartDriverComponentBase()
Destroy LinuxUartDriverComponentBase object.
bool isConnected_ready_OutputPort(FwIndexType portNum)
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
void log_WARNING_HI_NoBuffers_ThrottleClear()
Reset throttle value for NoBuffers.
Throttle reset count for NoBuffers.
virtual Drv::SendStatus send_handler(FwIndexType portNum, Fw::Buffer &sendBuffer)=0
Handler for input port send.
Throttle reset count for ReadError.
void init()
Initialization function.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
virtual const CHAR * toChar() const =0
void lock()
lock the mutex and assert success
void log_WARNING_HI_ReadError_ThrottleClear()
Reset throttle value for ReadError.
void init()
Initialization function.
void log_WARNING_HI_ConfigError(const Fw::StringBase &device, I32 error) const