10 #if FW_ENABLE_TEXT_LOGGING
32 this->m_Log_OutputPort[port].
init();
34 #if FW_OBJECT_NAMES == 1
38 this->m_objName.toChar(),
41 this->m_Log_OutputPort[port].setObjName(portName.
toChar());
45 #if FW_ENABLE_TEXT_LOGGING == 1
49 port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
52 this->m_LogText_OutputPort[port].
init();
54 #if FW_OBJECT_NAMES == 1
58 this->m_objName.toChar(),
61 this->m_LogText_OutputPort[port].setObjName(portName.
toChar());
72 this->m_Time_OutputPort[port].
init();
74 #if FW_OBJECT_NAMES == 1
78 this->m_objName.toChar(),
81 this->m_Time_OutputPort[port].setObjName(portName.
toChar());
104 #if FW_ENABLE_TEXT_LOGGING == 1
106 void AssertFatalAdapterComponentBase ::
107 set_LogText_OutputPort(
113 portNum < this->getNum_LogText_OutputPorts(),
117 this->m_LogText_OutputPort[portNum].addCallPort(port);
133 this->m_Time_OutputPort[portNum].
addCallPort(port);
136 #if FW_PORT_SERIALIZATION
145 Fw::InputSerializePort* port
153 this->m_Log_OutputPort[portNum].registerSerialPort(port);
156 #if FW_ENABLE_TEXT_LOGGING == 1
158 void AssertFatalAdapterComponentBase ::
159 set_LogText_OutputPort(
161 Fw::InputSerializePort* port
165 portNum < this->getNum_LogText_OutputPorts(),
169 this->m_LogText_OutputPort[portNum].registerSerialPort(port);
177 Fw::InputSerializePort* port
185 this->m_Time_OutputPort[portNum].registerSerialPort(port);
196 Fw::PassiveComponentBase(compName)
217 #if FW_ENABLE_TEXT_LOGGING == 1
220 getNum_LogText_OutputPorts()
const
245 return this->m_Log_OutputPort[portNum].
isConnected();
248 #if FW_ENABLE_TEXT_LOGGING == 1
250 bool AssertFatalAdapterComponentBase ::
251 isConnected_LogText_OutputPort(
FwIndexType portNum)
254 portNum < this->getNum_LogText_OutputPorts(),
258 return this->m_LogText_OutputPort[portNum].isConnected();
271 return this->m_Time_OutputPort[portNum].
isConnected();
286 if (this->m_Time_OutputPort[0].isConnected()) {
287 this->m_Time_OutputPort[0].
invoke(_logTime);
295 if (this->m_Log_OutputPort[0].isConnected()) {
299 #if FW_AMPCS_COMPATIBLE
301 _status = _logBuff.
serialize(
static_cast<U8>(2 + 1));
314 _status = _logBuff.
serialize(
static_cast<U32
>(0));
327 #if FW_AMPCS_COMPATIBLE
330 static_cast<U8>(
sizeof(U32))
343 this->m_Log_OutputPort[0].
invoke(
352 #if FW_ENABLE_TEXT_LOGGING
353 if (this->m_LogText_OutputPort[0].isConnected()) {
354 #if FW_OBJECT_NAMES == 1
355 const char* _formatString =
356 "(%s) %s: Assert in file %s, line %" PRIu32
"";
358 const char* _formatString =
359 "%s: Assert in file %s, line %" PRIu32
"";
366 this->m_objName.toChar(),
373 this->m_LogText_OutputPort[0].invoke(
392 if (this->m_Time_OutputPort[0].isConnected()) {
393 this->m_Time_OutputPort[0].
invoke(_logTime);
401 if (this->m_Log_OutputPort[0].isConnected()) {
405 #if FW_AMPCS_COMPATIBLE
407 _status = _logBuff.
serialize(
static_cast<U8>(3 + 1));
420 _status = _logBuff.
serialize(
static_cast<U32
>(0));
433 #if FW_AMPCS_COMPATIBLE
436 static_cast<U8>(
sizeof(U32))
449 #if FW_AMPCS_COMPATIBLE
452 static_cast<U8>(
sizeof(U32))
465 this->m_Log_OutputPort[0].
invoke(
474 #if FW_ENABLE_TEXT_LOGGING
475 if (this->m_LogText_OutputPort[0].isConnected()) {
476 #if FW_OBJECT_NAMES == 1
477 const char* _formatString =
478 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
"";
480 const char* _formatString =
481 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
"";
488 this->m_objName.toChar(),
496 this->m_LogText_OutputPort[0].invoke(
516 if (this->m_Time_OutputPort[0].isConnected()) {
517 this->m_Time_OutputPort[0].
invoke(_logTime);
525 if (this->m_Log_OutputPort[0].isConnected()) {
529 #if FW_AMPCS_COMPATIBLE
531 _status = _logBuff.
serialize(
static_cast<U8>(4 + 1));
544 _status = _logBuff.
serialize(
static_cast<U32
>(0));
557 #if FW_AMPCS_COMPATIBLE
560 static_cast<U8>(
sizeof(U32))
573 #if FW_AMPCS_COMPATIBLE
576 static_cast<U8>(
sizeof(U32))
589 #if FW_AMPCS_COMPATIBLE
592 static_cast<U8>(
sizeof(U32))
605 this->m_Log_OutputPort[0].
invoke(
614 #if FW_ENABLE_TEXT_LOGGING
615 if (this->m_LogText_OutputPort[0].isConnected()) {
616 #if FW_OBJECT_NAMES == 1
617 const char* _formatString =
618 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
"";
620 const char* _formatString =
621 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
"";
628 this->m_objName.toChar(),
637 this->m_LogText_OutputPort[0].invoke(
658 if (this->m_Time_OutputPort[0].isConnected()) {
659 this->m_Time_OutputPort[0].
invoke(_logTime);
667 if (this->m_Log_OutputPort[0].isConnected()) {
671 #if FW_AMPCS_COMPATIBLE
673 _status = _logBuff.
serialize(
static_cast<U8>(5 + 1));
686 _status = _logBuff.
serialize(
static_cast<U32
>(0));
699 #if FW_AMPCS_COMPATIBLE
702 static_cast<U8>(
sizeof(U32))
715 #if FW_AMPCS_COMPATIBLE
718 static_cast<U8>(
sizeof(U32))
731 #if FW_AMPCS_COMPATIBLE
734 static_cast<U8>(
sizeof(U32))
747 #if FW_AMPCS_COMPATIBLE
750 static_cast<U8>(
sizeof(U32))
763 this->m_Log_OutputPort[0].
invoke(
772 #if FW_ENABLE_TEXT_LOGGING
773 if (this->m_LogText_OutputPort[0].isConnected()) {
774 #if FW_OBJECT_NAMES == 1
775 const char* _formatString =
776 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
"";
778 const char* _formatString =
779 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
"";
786 this->m_objName.toChar(),
796 this->m_LogText_OutputPort[0].invoke(
818 if (this->m_Time_OutputPort[0].isConnected()) {
819 this->m_Time_OutputPort[0].
invoke(_logTime);
827 if (this->m_Log_OutputPort[0].isConnected()) {
831 #if FW_AMPCS_COMPATIBLE
833 _status = _logBuff.
serialize(
static_cast<U8>(6 + 1));
846 _status = _logBuff.
serialize(
static_cast<U32
>(0));
859 #if FW_AMPCS_COMPATIBLE
862 static_cast<U8>(
sizeof(U32))
875 #if FW_AMPCS_COMPATIBLE
878 static_cast<U8>(
sizeof(U32))
891 #if FW_AMPCS_COMPATIBLE
894 static_cast<U8>(
sizeof(U32))
907 #if FW_AMPCS_COMPATIBLE
910 static_cast<U8>(
sizeof(U32))
923 #if FW_AMPCS_COMPATIBLE
926 static_cast<U8>(
sizeof(U32))
939 this->m_Log_OutputPort[0].
invoke(
948 #if FW_ENABLE_TEXT_LOGGING
949 if (this->m_LogText_OutputPort[0].isConnected()) {
950 #if FW_OBJECT_NAMES == 1
951 const char* _formatString =
952 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
954 const char* _formatString =
955 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
962 this->m_objName.toChar(),
973 this->m_LogText_OutputPort[0].invoke(
996 if (this->m_Time_OutputPort[0].isConnected()) {
997 this->m_Time_OutputPort[0].
invoke(_logTime);
1005 if (this->m_Log_OutputPort[0].isConnected()) {
1009 #if FW_AMPCS_COMPATIBLE
1011 _status = _logBuff.
serialize(
static_cast<U8>(7 + 1));
1024 _status = _logBuff.
serialize(
static_cast<U32
>(0));
1037 #if FW_AMPCS_COMPATIBLE
1040 static_cast<U8>(
sizeof(U32))
1053 #if FW_AMPCS_COMPATIBLE
1056 static_cast<U8>(
sizeof(U32))
1069 #if FW_AMPCS_COMPATIBLE
1072 static_cast<U8>(
sizeof(U32))
1085 #if FW_AMPCS_COMPATIBLE
1088 static_cast<U8>(
sizeof(U32))
1101 #if FW_AMPCS_COMPATIBLE
1104 static_cast<U8>(
sizeof(U32))
1117 #if FW_AMPCS_COMPATIBLE
1120 static_cast<U8>(
sizeof(U32))
1133 this->m_Log_OutputPort[0].
invoke(
1142 #if FW_ENABLE_TEXT_LOGGING
1143 if (this->m_LogText_OutputPort[0].isConnected()) {
1144 #if FW_OBJECT_NAMES == 1
1145 const char* _formatString =
1146 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
1148 const char* _formatString =
1149 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
1156 this->m_objName.toChar(),
1168 this->m_LogText_OutputPort[0].invoke(
1192 if (this->m_Time_OutputPort[0].isConnected()) {
1193 this->m_Time_OutputPort[0].
invoke(_logTime);
1201 if (this->m_Log_OutputPort[0].isConnected()) {
1205 #if FW_AMPCS_COMPATIBLE
1207 _status = _logBuff.
serialize(
static_cast<U8>(8 + 1));
1220 _status = _logBuff.
serialize(
static_cast<U32
>(0));
1233 #if FW_AMPCS_COMPATIBLE
1236 static_cast<U8>(
sizeof(U32))
1249 #if FW_AMPCS_COMPATIBLE
1252 static_cast<U8>(
sizeof(U32))
1265 #if FW_AMPCS_COMPATIBLE
1268 static_cast<U8>(
sizeof(U32))
1281 #if FW_AMPCS_COMPATIBLE
1284 static_cast<U8>(
sizeof(U32))
1297 #if FW_AMPCS_COMPATIBLE
1300 static_cast<U8>(
sizeof(U32))
1313 #if FW_AMPCS_COMPATIBLE
1316 static_cast<U8>(
sizeof(U32))
1329 #if FW_AMPCS_COMPATIBLE
1332 static_cast<U8>(
sizeof(U32))
1345 this->m_Log_OutputPort[0].
invoke(
1354 #if FW_ENABLE_TEXT_LOGGING
1355 if (this->m_LogText_OutputPort[0].isConnected()) {
1356 #if FW_OBJECT_NAMES == 1
1357 const char* _formatString =
1358 "(%s) %s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
1360 const char* _formatString =
1361 "%s: Assert in file %s, line %" PRIu32
": %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
" %" PRIu32
"";
1368 this->m_objName.toChar(),
1381 this->m_LogText_OutputPort[0].invoke(
1400 if (this->m_Time_OutputPort[0].isConnected()) {
1401 this->m_Time_OutputPort[0].
invoke(_logTime);
1409 if (this->m_Log_OutputPort[0].isConnected()) {
1413 #if FW_AMPCS_COMPATIBLE
1415 _status = _logBuff.
serialize(
static_cast<U8>(3 + 1));
1428 _status = _logBuff.
serialize(
static_cast<U32
>(0));
1441 #if FW_AMPCS_COMPATIBLE
1444 static_cast<U8>(
sizeof(U32))
1457 #if FW_AMPCS_COMPATIBLE
1460 static_cast<U8>(
sizeof(U32))
1473 this->m_Log_OutputPort[0].
invoke(
1482 #if FW_ENABLE_TEXT_LOGGING
1483 if (this->m_LogText_OutputPort[0].isConnected()) {
1484 #if FW_OBJECT_NAMES == 1
1485 const char* _formatString =
1486 "(%s) %s: Unexpected assert in file %s, line %" PRIu32
", args %" PRIu32
"";
1488 const char* _formatString =
1489 "%s: Unexpected assert in file %s, line %" PRIu32
", args %" PRIu32
"";
1496 this->m_objName.toChar(),
1498 "AF_UNEXPECTED_ASSERT ",
1504 this->m_LogText_OutputPort[0].invoke(
1521 if (this->m_Time_OutputPort[0].isConnected()) {
1523 this->m_Time_OutputPort[0].
invoke(_time);
#define FW_MIN(a, b)
MIN macro.
uint8_t U8
8-bit unsigned integer
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
PlatformAssertArgType FwAssertArgType
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
PlatformIndexType FwIndexType
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
@ FATAL
A fatal non-recoverable event.
void init()
Object initializer.
const char * toChar() const
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
void addCallPort(InputLogPort *callPort)
Register an input port.
void addCallPort(InputTimePort *callPort)
Register an input port.
void invoke(Fw::Time &time)
Invoke a port interface.
void init()
Initialization function.
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
virtual const CHAR * toChar() const =0
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
void log_FATAL_AF_ASSERT_2(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2)
AssertFatalAdapterComponentBase(const char *compName="")
Construct AssertFatalAdapterComponentBase object.
void log_FATAL_AF_ASSERT_1(const Fw::StringBase &file, U32 line, U32 arg1)
virtual ~AssertFatalAdapterComponentBase()
Destroy AssertFatalAdapterComponentBase object.
void log_FATAL_AF_ASSERT_3(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3)
FwIndexType getNum_Log_OutputPorts() const
void log_FATAL_AF_ASSERT_0(const Fw::StringBase &file, U32 line)
bool isConnected_Log_OutputPort(FwIndexType portNum)
void log_FATAL_AF_UNEXPECTED_ASSERT(const Fw::StringBase &file, U32 line, U32 numArgs)
@ EVENTID_AF_UNEXPECTED_ASSERT
An unexpected assert happened.
@ EVENTID_AF_ASSERT_4
An assert happened.
@ EVENTID_AF_ASSERT_0
An assert happened.
@ EVENTID_AF_ASSERT_1
An assert happened.
@ EVENTID_AF_ASSERT_2
An assert happened.
@ EVENTID_AF_ASSERT_5
An assert happened.
@ EVENTID_AF_ASSERT_6
An assert happened.
@ EVENTID_AF_ASSERT_3
An assert happened.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void log_FATAL_AF_ASSERT_5(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4, U32 arg5)
FwIndexType getNum_Time_OutputPorts() const
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void log_FATAL_AF_ASSERT_6(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4, U32 arg5, U32 arg6)
void log_FATAL_AF_ASSERT_4(const Fw::StringBase &file, U32 line, U32 arg1, U32 arg2, U32 arg3, U32 arg4)
bool isConnected_Time_OutputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.