10#if FW_ENABLE_TEXT_LOGGING
20 void AssertFatalAdapterComponentBase ::
29 port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
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());
69 port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
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());
90 void AssertFatalAdapterComponentBase ::
97 portNum < this->getNum_Log_OutputPorts(),
101 this->m_Log_OutputPort[portNum].addCallPort(port);
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);
122 void AssertFatalAdapterComponentBase ::
129 portNum < this->getNum_Time_OutputPorts(),
133 this->m_Time_OutputPort[portNum].addCallPort(port);
136#if FW_PORT_SERIALIZATION
142 void AssertFatalAdapterComponentBase ::
145 Fw::InputSerializePort* port
149 portNum < this->getNum_Log_OutputPorts(),
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);
174 void AssertFatalAdapterComponentBase ::
177 Fw::InputSerializePort* port
181 portNum < this->getNum_Time_OutputPorts(),
185 this->m_Time_OutputPort[portNum].registerSerialPort(port);
194 AssertFatalAdapterComponentBase ::
195 AssertFatalAdapterComponentBase(
const char* compName) :
196 Fw::PassiveComponentBase(compName)
201 AssertFatalAdapterComponentBase ::
202 ~AssertFatalAdapterComponentBase()
212 getNum_Log_OutputPorts()
const
217#if FW_ENABLE_TEXT_LOGGING == 1
220 getNum_LogText_OutputPorts()
const
228 getNum_Time_OutputPorts()
const
237 bool AssertFatalAdapterComponentBase ::
241 portNum < this->getNum_Log_OutputPorts(),
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();
263 bool AssertFatalAdapterComponentBase ::
267 portNum < this->getNum_Time_OutputPorts(),
271 return this->m_Time_OutputPort[portNum].isConnected();
278 void AssertFatalAdapterComponentBase ::
279 log_FATAL_AF_ASSERT_0(
286 if (this->m_Time_OutputPort[0].isConnected()) {
287 this->m_Time_OutputPort[0].invoke(_logTime);
292 _id = this->getIdBase() + EVENTID_AF_ASSERT_0;
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(
383 void AssertFatalAdapterComponentBase ::
384 log_FATAL_AF_ASSERT_1(
392 if (this->m_Time_OutputPort[0].isConnected()) {
393 this->m_Time_OutputPort[0].invoke(_logTime);
398 _id = this->getIdBase() + EVENTID_AF_ASSERT_1;
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(
506 void AssertFatalAdapterComponentBase ::
507 log_FATAL_AF_ASSERT_2(
516 if (this->m_Time_OutputPort[0].isConnected()) {
517 this->m_Time_OutputPort[0].invoke(_logTime);
522 _id = this->getIdBase() + EVENTID_AF_ASSERT_2;
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(
647 void AssertFatalAdapterComponentBase ::
648 log_FATAL_AF_ASSERT_3(
658 if (this->m_Time_OutputPort[0].isConnected()) {
659 this->m_Time_OutputPort[0].invoke(_logTime);
664 _id = this->getIdBase() + EVENTID_AF_ASSERT_3;
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(
806 void AssertFatalAdapterComponentBase ::
807 log_FATAL_AF_ASSERT_4(
818 if (this->m_Time_OutputPort[0].isConnected()) {
819 this->m_Time_OutputPort[0].invoke(_logTime);
824 _id = this->getIdBase() + EVENTID_AF_ASSERT_4;
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(
983 void AssertFatalAdapterComponentBase ::
984 log_FATAL_AF_ASSERT_5(
996 if (this->m_Time_OutputPort[0].isConnected()) {
997 this->m_Time_OutputPort[0].invoke(_logTime);
1002 _id = this->getIdBase() + EVENTID_AF_ASSERT_5;
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(
1178 void AssertFatalAdapterComponentBase ::
1179 log_FATAL_AF_ASSERT_6(
1192 if (this->m_Time_OutputPort[0].isConnected()) {
1193 this->m_Time_OutputPort[0].invoke(_logTime);
1198 _id = this->getIdBase() + EVENTID_AF_ASSERT_6;
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(
1391 void AssertFatalAdapterComponentBase ::
1392 log_FATAL_AF_UNEXPECTED_ASSERT(
1400 if (this->m_Time_OutputPort[0].isConnected()) {
1401 this->m_Time_OutputPort[0].invoke(_logTime);
1406 _id = this->getIdBase() + EVENTID_AF_UNEXPECTED_ASSERT;
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)/*#en...
@ FATAL
A fatal non-recoverable event.
void init()
Object initializer.
const char * toChar() const
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void format(const CHAR *formatString,...)
write formatted string to buffer
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
virtual const CHAR * toChar() const =0
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.