F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
AssertFatalAdapterComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AssertFatalAdapterComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for AssertFatalAdapter component base class
5 // ======================================================================
6 
8 #include "Fw/Types/Assert.hpp"
10 #if FW_ENABLE_TEXT_LOGGING
11 #include "Fw/Types/String.hpp"
12 #endif
13 
14 namespace Svc {
15 
16  // ----------------------------------------------------------------------
17  // Component initialization
18  // ----------------------------------------------------------------------
19 
21  init(FwEnumStoreType instance)
22  {
23  // Initialize base class
25 
26  // Connect output port Log
27  for (
28  FwIndexType port = 0;
29  port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
30  port++
31  ) {
32  this->m_Log_OutputPort[port].init();
33 
34 #if FW_OBJECT_NAMES == 1
35  Fw::ObjectName portName;
36  portName.format(
37  "%s_Log_OutputPort[%" PRI_PlatformIntType "]",
38  this->m_objName.toChar(),
39  port
40  );
41  this->m_Log_OutputPort[port].setObjName(portName.toChar());
42 #endif
43  }
44 
45 #if FW_ENABLE_TEXT_LOGGING == 1
46  // Connect output port LogText
47  for (
48  FwIndexType port = 0;
49  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
50  port++
51  ) {
52  this->m_LogText_OutputPort[port].init();
53 
54 #if FW_OBJECT_NAMES == 1
55  Fw::ObjectName portName;
56  portName.format(
57  "%s_LogText_OutputPort[%" PRI_PlatformIntType "]",
58  this->m_objName.toChar(),
59  port
60  );
61  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
62 #endif
63  }
64 #endif
65 
66  // Connect output port Time
67  for (
68  FwIndexType port = 0;
69  port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
70  port++
71  ) {
72  this->m_Time_OutputPort[port].init();
73 
74 #if FW_OBJECT_NAMES == 1
75  Fw::ObjectName portName;
76  portName.format(
77  "%s_Time_OutputPort[%" PRI_PlatformIntType "]",
78  this->m_objName.toChar(),
79  port
80  );
81  this->m_Time_OutputPort[port].setObjName(portName.toChar());
82 #endif
83  }
84  }
85 
86  // ----------------------------------------------------------------------
87  // Connect input ports to special output ports
88  // ----------------------------------------------------------------------
89 
92  FwIndexType portNum,
93  Fw::InputLogPort* port
94  )
95  {
96  FW_ASSERT(
97  portNum < this->getNum_Log_OutputPorts(),
98  static_cast<FwAssertArgType>(portNum)
99  );
100 
101  this->m_Log_OutputPort[portNum].addCallPort(port);
102  }
103 
104 #if FW_ENABLE_TEXT_LOGGING == 1
105 
106  void AssertFatalAdapterComponentBase ::
107  set_LogText_OutputPort(
108  FwIndexType portNum,
110  )
111  {
112  FW_ASSERT(
113  portNum < this->getNum_LogText_OutputPorts(),
114  static_cast<FwAssertArgType>(portNum)
115  );
116 
117  this->m_LogText_OutputPort[portNum].addCallPort(port);
118  }
119 
120 #endif
121 
124  FwIndexType portNum,
125  Fw::InputTimePort* port
126  )
127  {
128  FW_ASSERT(
129  portNum < this->getNum_Time_OutputPorts(),
130  static_cast<FwAssertArgType>(portNum)
131  );
132 
133  this->m_Time_OutputPort[portNum].addCallPort(port);
134  }
135 
136 #if FW_PORT_SERIALIZATION
137 
138  // ----------------------------------------------------------------------
139  // Connect serial input ports to special output ports
140  // ----------------------------------------------------------------------
141 
144  FwIndexType portNum,
145  Fw::InputSerializePort* port
146  )
147  {
148  FW_ASSERT(
149  portNum < this->getNum_Log_OutputPorts(),
150  static_cast<FwAssertArgType>(portNum)
151  );
152 
153  this->m_Log_OutputPort[portNum].registerSerialPort(port);
154  }
155 
156 #if FW_ENABLE_TEXT_LOGGING == 1
157 
158  void AssertFatalAdapterComponentBase ::
159  set_LogText_OutputPort(
160  FwIndexType portNum,
161  Fw::InputSerializePort* port
162  )
163  {
164  FW_ASSERT(
165  portNum < this->getNum_LogText_OutputPorts(),
166  static_cast<FwAssertArgType>(portNum)
167  );
168 
169  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
170  }
171 
172 #endif
173 
176  FwIndexType portNum,
177  Fw::InputSerializePort* port
178  )
179  {
180  FW_ASSERT(
181  portNum < this->getNum_Time_OutputPorts(),
182  static_cast<FwAssertArgType>(portNum)
183  );
184 
185  this->m_Time_OutputPort[portNum].registerSerialPort(port);
186  }
187 
188 #endif
189 
190  // ----------------------------------------------------------------------
191  // Component construction and destruction
192  // ----------------------------------------------------------------------
193 
195  AssertFatalAdapterComponentBase(const char* compName) :
196  Fw::PassiveComponentBase(compName)
197  {
198 
199  }
200 
203  {
204 
205  }
206 
207  // ----------------------------------------------------------------------
208  // Getters for numbers of special output ports
209  // ----------------------------------------------------------------------
210 
213  {
214  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Log_OutputPort));
215  }
216 
217 #if FW_ENABLE_TEXT_LOGGING == 1
218 
219  FwIndexType AssertFatalAdapterComponentBase ::
220  getNum_LogText_OutputPorts() const
221  {
222  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_LogText_OutputPort));
223  }
224 
225 #endif
226 
229  {
230  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Time_OutputPort));
231  }
232 
233  // ----------------------------------------------------------------------
234  // Connection status queries for special output ports
235  // ----------------------------------------------------------------------
236 
239  {
240  FW_ASSERT(
241  portNum < this->getNum_Log_OutputPorts(),
242  static_cast<FwAssertArgType>(portNum)
243  );
244 
245  return this->m_Log_OutputPort[portNum].isConnected();
246  }
247 
248 #if FW_ENABLE_TEXT_LOGGING == 1
249 
250  bool AssertFatalAdapterComponentBase ::
251  isConnected_LogText_OutputPort(FwIndexType portNum)
252  {
253  FW_ASSERT(
254  portNum < this->getNum_LogText_OutputPorts(),
255  static_cast<FwAssertArgType>(portNum)
256  );
257 
258  return this->m_LogText_OutputPort[portNum].isConnected();
259  }
260 
261 #endif
262 
265  {
266  FW_ASSERT(
267  portNum < this->getNum_Time_OutputPorts(),
268  static_cast<FwAssertArgType>(portNum)
269  );
270 
271  return this->m_Time_OutputPort[portNum].isConnected();
272  }
273 
274  // ----------------------------------------------------------------------
275  // Event logging functions
276  // ----------------------------------------------------------------------
277 
280  const Fw::StringBase& file,
281  U32 line
282  )
283  {
284  // Get the time
285  Fw::Time _logTime;
286  if (this->m_Time_OutputPort[0].isConnected()) {
287  this->m_Time_OutputPort[0].invoke(_logTime);
288  }
289 
290  FwEventIdType _id = static_cast<FwEventIdType>(0);
291 
292  _id = this->getIdBase() + EVENTID_AF_ASSERT_0;
293 
294  // Emit the event on the log port
295  if (this->m_Log_OutputPort[0].isConnected()) {
296  Fw::LogBuffer _logBuff;
298 
299 #if FW_AMPCS_COMPATIBLE
300  // Serialize the number of arguments
301  _status = _logBuff.serialize(static_cast<U8>(2 + 1));
302  FW_ASSERT(
303  _status == Fw::FW_SERIALIZE_OK,
304  static_cast<FwAssertArgType>(_status)
305  );
306 
307  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
308  _status = _logBuff.serialize(static_cast<U8>(4));
309  FW_ASSERT(
310  _status == Fw::FW_SERIALIZE_OK,
311  static_cast<FwAssertArgType>(_status)
312  );
313 
314  _status = _logBuff.serialize(static_cast<U32>(0));
315  FW_ASSERT(
316  _status == Fw::FW_SERIALIZE_OK,
317  static_cast<FwAssertArgType>(_status)
318  );
319 #endif
320 
321  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
322  FW_ASSERT(
323  _status == Fw::FW_SERIALIZE_OK,
324  static_cast<FwAssertArgType>(_status)
325  );
326 
327 #if FW_AMPCS_COMPATIBLE
328  // Serialize the argument size
329  _status = _logBuff.serialize(
330  static_cast<U8>(sizeof(U32))
331  );
332  FW_ASSERT(
333  _status == Fw::FW_SERIALIZE_OK,
334  static_cast<FwAssertArgType>(_status)
335  );
336 #endif
337  _status = _logBuff.serialize(line);
338  FW_ASSERT(
339  _status == Fw::FW_SERIALIZE_OK,
340  static_cast<FwAssertArgType>(_status)
341  );
342 
343  this->m_Log_OutputPort[0].invoke(
344  _id,
345  _logTime,
347  _logBuff
348  );
349  }
350 
351  // Emit the event on the text log port
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 "";
357 #else
358  const char* _formatString =
359  "%s: Assert in file %s, line %" PRIu32 "";
360 #endif
361 
362  Fw::TextLogString _logString;
363  _logString.format(
364  _formatString,
365 #if FW_OBJECT_NAMES == 1
366  this->m_objName.toChar(),
367 #endif
368  "AF_ASSERT_0 ",
369  file.toChar(),
370  line
371  );
372 
373  this->m_LogText_OutputPort[0].invoke(
374  _id,
375  _logTime,
377  _logString
378  );
379  }
380 #endif
381  }
382 
385  const Fw::StringBase& file,
386  U32 line,
387  U32 arg1
388  )
389  {
390  // Get the time
391  Fw::Time _logTime;
392  if (this->m_Time_OutputPort[0].isConnected()) {
393  this->m_Time_OutputPort[0].invoke(_logTime);
394  }
395 
396  FwEventIdType _id = static_cast<FwEventIdType>(0);
397 
398  _id = this->getIdBase() + EVENTID_AF_ASSERT_1;
399 
400  // Emit the event on the log port
401  if (this->m_Log_OutputPort[0].isConnected()) {
402  Fw::LogBuffer _logBuff;
404 
405 #if FW_AMPCS_COMPATIBLE
406  // Serialize the number of arguments
407  _status = _logBuff.serialize(static_cast<U8>(3 + 1));
408  FW_ASSERT(
409  _status == Fw::FW_SERIALIZE_OK,
410  static_cast<FwAssertArgType>(_status)
411  );
412 
413  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
414  _status = _logBuff.serialize(static_cast<U8>(4));
415  FW_ASSERT(
416  _status == Fw::FW_SERIALIZE_OK,
417  static_cast<FwAssertArgType>(_status)
418  );
419 
420  _status = _logBuff.serialize(static_cast<U32>(0));
421  FW_ASSERT(
422  _status == Fw::FW_SERIALIZE_OK,
423  static_cast<FwAssertArgType>(_status)
424  );
425 #endif
426 
427  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
428  FW_ASSERT(
429  _status == Fw::FW_SERIALIZE_OK,
430  static_cast<FwAssertArgType>(_status)
431  );
432 
433 #if FW_AMPCS_COMPATIBLE
434  // Serialize the argument size
435  _status = _logBuff.serialize(
436  static_cast<U8>(sizeof(U32))
437  );
438  FW_ASSERT(
439  _status == Fw::FW_SERIALIZE_OK,
440  static_cast<FwAssertArgType>(_status)
441  );
442 #endif
443  _status = _logBuff.serialize(line);
444  FW_ASSERT(
445  _status == Fw::FW_SERIALIZE_OK,
446  static_cast<FwAssertArgType>(_status)
447  );
448 
449 #if FW_AMPCS_COMPATIBLE
450  // Serialize the argument size
451  _status = _logBuff.serialize(
452  static_cast<U8>(sizeof(U32))
453  );
454  FW_ASSERT(
455  _status == Fw::FW_SERIALIZE_OK,
456  static_cast<FwAssertArgType>(_status)
457  );
458 #endif
459  _status = _logBuff.serialize(arg1);
460  FW_ASSERT(
461  _status == Fw::FW_SERIALIZE_OK,
462  static_cast<FwAssertArgType>(_status)
463  );
464 
465  this->m_Log_OutputPort[0].invoke(
466  _id,
467  _logTime,
469  _logBuff
470  );
471  }
472 
473  // Emit the event on the text log port
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 "";
479 #else
480  const char* _formatString =
481  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 "";
482 #endif
483 
484  Fw::TextLogString _logString;
485  _logString.format(
486  _formatString,
487 #if FW_OBJECT_NAMES == 1
488  this->m_objName.toChar(),
489 #endif
490  "AF_ASSERT_1 ",
491  file.toChar(),
492  line,
493  arg1
494  );
495 
496  this->m_LogText_OutputPort[0].invoke(
497  _id,
498  _logTime,
500  _logString
501  );
502  }
503 #endif
504  }
505 
508  const Fw::StringBase& file,
509  U32 line,
510  U32 arg1,
511  U32 arg2
512  )
513  {
514  // Get the time
515  Fw::Time _logTime;
516  if (this->m_Time_OutputPort[0].isConnected()) {
517  this->m_Time_OutputPort[0].invoke(_logTime);
518  }
519 
520  FwEventIdType _id = static_cast<FwEventIdType>(0);
521 
522  _id = this->getIdBase() + EVENTID_AF_ASSERT_2;
523 
524  // Emit the event on the log port
525  if (this->m_Log_OutputPort[0].isConnected()) {
526  Fw::LogBuffer _logBuff;
528 
529 #if FW_AMPCS_COMPATIBLE
530  // Serialize the number of arguments
531  _status = _logBuff.serialize(static_cast<U8>(4 + 1));
532  FW_ASSERT(
533  _status == Fw::FW_SERIALIZE_OK,
534  static_cast<FwAssertArgType>(_status)
535  );
536 
537  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
538  _status = _logBuff.serialize(static_cast<U8>(4));
539  FW_ASSERT(
540  _status == Fw::FW_SERIALIZE_OK,
541  static_cast<FwAssertArgType>(_status)
542  );
543 
544  _status = _logBuff.serialize(static_cast<U32>(0));
545  FW_ASSERT(
546  _status == Fw::FW_SERIALIZE_OK,
547  static_cast<FwAssertArgType>(_status)
548  );
549 #endif
550 
551  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
552  FW_ASSERT(
553  _status == Fw::FW_SERIALIZE_OK,
554  static_cast<FwAssertArgType>(_status)
555  );
556 
557 #if FW_AMPCS_COMPATIBLE
558  // Serialize the argument size
559  _status = _logBuff.serialize(
560  static_cast<U8>(sizeof(U32))
561  );
562  FW_ASSERT(
563  _status == Fw::FW_SERIALIZE_OK,
564  static_cast<FwAssertArgType>(_status)
565  );
566 #endif
567  _status = _logBuff.serialize(line);
568  FW_ASSERT(
569  _status == Fw::FW_SERIALIZE_OK,
570  static_cast<FwAssertArgType>(_status)
571  );
572 
573 #if FW_AMPCS_COMPATIBLE
574  // Serialize the argument size
575  _status = _logBuff.serialize(
576  static_cast<U8>(sizeof(U32))
577  );
578  FW_ASSERT(
579  _status == Fw::FW_SERIALIZE_OK,
580  static_cast<FwAssertArgType>(_status)
581  );
582 #endif
583  _status = _logBuff.serialize(arg1);
584  FW_ASSERT(
585  _status == Fw::FW_SERIALIZE_OK,
586  static_cast<FwAssertArgType>(_status)
587  );
588 
589 #if FW_AMPCS_COMPATIBLE
590  // Serialize the argument size
591  _status = _logBuff.serialize(
592  static_cast<U8>(sizeof(U32))
593  );
594  FW_ASSERT(
595  _status == Fw::FW_SERIALIZE_OK,
596  static_cast<FwAssertArgType>(_status)
597  );
598 #endif
599  _status = _logBuff.serialize(arg2);
600  FW_ASSERT(
601  _status == Fw::FW_SERIALIZE_OK,
602  static_cast<FwAssertArgType>(_status)
603  );
604 
605  this->m_Log_OutputPort[0].invoke(
606  _id,
607  _logTime,
609  _logBuff
610  );
611  }
612 
613  // Emit the event on the text log port
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 "";
619 #else
620  const char* _formatString =
621  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 " %" PRIu32 "";
622 #endif
623 
624  Fw::TextLogString _logString;
625  _logString.format(
626  _formatString,
627 #if FW_OBJECT_NAMES == 1
628  this->m_objName.toChar(),
629 #endif
630  "AF_ASSERT_2 ",
631  file.toChar(),
632  line,
633  arg1,
634  arg2
635  );
636 
637  this->m_LogText_OutputPort[0].invoke(
638  _id,
639  _logTime,
641  _logString
642  );
643  }
644 #endif
645  }
646 
649  const Fw::StringBase& file,
650  U32 line,
651  U32 arg1,
652  U32 arg2,
653  U32 arg3
654  )
655  {
656  // Get the time
657  Fw::Time _logTime;
658  if (this->m_Time_OutputPort[0].isConnected()) {
659  this->m_Time_OutputPort[0].invoke(_logTime);
660  }
661 
662  FwEventIdType _id = static_cast<FwEventIdType>(0);
663 
664  _id = this->getIdBase() + EVENTID_AF_ASSERT_3;
665 
666  // Emit the event on the log port
667  if (this->m_Log_OutputPort[0].isConnected()) {
668  Fw::LogBuffer _logBuff;
670 
671 #if FW_AMPCS_COMPATIBLE
672  // Serialize the number of arguments
673  _status = _logBuff.serialize(static_cast<U8>(5 + 1));
674  FW_ASSERT(
675  _status == Fw::FW_SERIALIZE_OK,
676  static_cast<FwAssertArgType>(_status)
677  );
678 
679  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
680  _status = _logBuff.serialize(static_cast<U8>(4));
681  FW_ASSERT(
682  _status == Fw::FW_SERIALIZE_OK,
683  static_cast<FwAssertArgType>(_status)
684  );
685 
686  _status = _logBuff.serialize(static_cast<U32>(0));
687  FW_ASSERT(
688  _status == Fw::FW_SERIALIZE_OK,
689  static_cast<FwAssertArgType>(_status)
690  );
691 #endif
692 
693  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
694  FW_ASSERT(
695  _status == Fw::FW_SERIALIZE_OK,
696  static_cast<FwAssertArgType>(_status)
697  );
698 
699 #if FW_AMPCS_COMPATIBLE
700  // Serialize the argument size
701  _status = _logBuff.serialize(
702  static_cast<U8>(sizeof(U32))
703  );
704  FW_ASSERT(
705  _status == Fw::FW_SERIALIZE_OK,
706  static_cast<FwAssertArgType>(_status)
707  );
708 #endif
709  _status = _logBuff.serialize(line);
710  FW_ASSERT(
711  _status == Fw::FW_SERIALIZE_OK,
712  static_cast<FwAssertArgType>(_status)
713  );
714 
715 #if FW_AMPCS_COMPATIBLE
716  // Serialize the argument size
717  _status = _logBuff.serialize(
718  static_cast<U8>(sizeof(U32))
719  );
720  FW_ASSERT(
721  _status == Fw::FW_SERIALIZE_OK,
722  static_cast<FwAssertArgType>(_status)
723  );
724 #endif
725  _status = _logBuff.serialize(arg1);
726  FW_ASSERT(
727  _status == Fw::FW_SERIALIZE_OK,
728  static_cast<FwAssertArgType>(_status)
729  );
730 
731 #if FW_AMPCS_COMPATIBLE
732  // Serialize the argument size
733  _status = _logBuff.serialize(
734  static_cast<U8>(sizeof(U32))
735  );
736  FW_ASSERT(
737  _status == Fw::FW_SERIALIZE_OK,
738  static_cast<FwAssertArgType>(_status)
739  );
740 #endif
741  _status = _logBuff.serialize(arg2);
742  FW_ASSERT(
743  _status == Fw::FW_SERIALIZE_OK,
744  static_cast<FwAssertArgType>(_status)
745  );
746 
747 #if FW_AMPCS_COMPATIBLE
748  // Serialize the argument size
749  _status = _logBuff.serialize(
750  static_cast<U8>(sizeof(U32))
751  );
752  FW_ASSERT(
753  _status == Fw::FW_SERIALIZE_OK,
754  static_cast<FwAssertArgType>(_status)
755  );
756 #endif
757  _status = _logBuff.serialize(arg3);
758  FW_ASSERT(
759  _status == Fw::FW_SERIALIZE_OK,
760  static_cast<FwAssertArgType>(_status)
761  );
762 
763  this->m_Log_OutputPort[0].invoke(
764  _id,
765  _logTime,
767  _logBuff
768  );
769  }
770 
771  // Emit the event on the text log port
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 "";
777 #else
778  const char* _formatString =
779  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 " %" PRIu32 " %" PRIu32 "";
780 #endif
781 
782  Fw::TextLogString _logString;
783  _logString.format(
784  _formatString,
785 #if FW_OBJECT_NAMES == 1
786  this->m_objName.toChar(),
787 #endif
788  "AF_ASSERT_3 ",
789  file.toChar(),
790  line,
791  arg1,
792  arg2,
793  arg3
794  );
795 
796  this->m_LogText_OutputPort[0].invoke(
797  _id,
798  _logTime,
800  _logString
801  );
802  }
803 #endif
804  }
805 
808  const Fw::StringBase& file,
809  U32 line,
810  U32 arg1,
811  U32 arg2,
812  U32 arg3,
813  U32 arg4
814  )
815  {
816  // Get the time
817  Fw::Time _logTime;
818  if (this->m_Time_OutputPort[0].isConnected()) {
819  this->m_Time_OutputPort[0].invoke(_logTime);
820  }
821 
822  FwEventIdType _id = static_cast<FwEventIdType>(0);
823 
824  _id = this->getIdBase() + EVENTID_AF_ASSERT_4;
825 
826  // Emit the event on the log port
827  if (this->m_Log_OutputPort[0].isConnected()) {
828  Fw::LogBuffer _logBuff;
830 
831 #if FW_AMPCS_COMPATIBLE
832  // Serialize the number of arguments
833  _status = _logBuff.serialize(static_cast<U8>(6 + 1));
834  FW_ASSERT(
835  _status == Fw::FW_SERIALIZE_OK,
836  static_cast<FwAssertArgType>(_status)
837  );
838 
839  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
840  _status = _logBuff.serialize(static_cast<U8>(4));
841  FW_ASSERT(
842  _status == Fw::FW_SERIALIZE_OK,
843  static_cast<FwAssertArgType>(_status)
844  );
845 
846  _status = _logBuff.serialize(static_cast<U32>(0));
847  FW_ASSERT(
848  _status == Fw::FW_SERIALIZE_OK,
849  static_cast<FwAssertArgType>(_status)
850  );
851 #endif
852 
853  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
854  FW_ASSERT(
855  _status == Fw::FW_SERIALIZE_OK,
856  static_cast<FwAssertArgType>(_status)
857  );
858 
859 #if FW_AMPCS_COMPATIBLE
860  // Serialize the argument size
861  _status = _logBuff.serialize(
862  static_cast<U8>(sizeof(U32))
863  );
864  FW_ASSERT(
865  _status == Fw::FW_SERIALIZE_OK,
866  static_cast<FwAssertArgType>(_status)
867  );
868 #endif
869  _status = _logBuff.serialize(line);
870  FW_ASSERT(
871  _status == Fw::FW_SERIALIZE_OK,
872  static_cast<FwAssertArgType>(_status)
873  );
874 
875 #if FW_AMPCS_COMPATIBLE
876  // Serialize the argument size
877  _status = _logBuff.serialize(
878  static_cast<U8>(sizeof(U32))
879  );
880  FW_ASSERT(
881  _status == Fw::FW_SERIALIZE_OK,
882  static_cast<FwAssertArgType>(_status)
883  );
884 #endif
885  _status = _logBuff.serialize(arg1);
886  FW_ASSERT(
887  _status == Fw::FW_SERIALIZE_OK,
888  static_cast<FwAssertArgType>(_status)
889  );
890 
891 #if FW_AMPCS_COMPATIBLE
892  // Serialize the argument size
893  _status = _logBuff.serialize(
894  static_cast<U8>(sizeof(U32))
895  );
896  FW_ASSERT(
897  _status == Fw::FW_SERIALIZE_OK,
898  static_cast<FwAssertArgType>(_status)
899  );
900 #endif
901  _status = _logBuff.serialize(arg2);
902  FW_ASSERT(
903  _status == Fw::FW_SERIALIZE_OK,
904  static_cast<FwAssertArgType>(_status)
905  );
906 
907 #if FW_AMPCS_COMPATIBLE
908  // Serialize the argument size
909  _status = _logBuff.serialize(
910  static_cast<U8>(sizeof(U32))
911  );
912  FW_ASSERT(
913  _status == Fw::FW_SERIALIZE_OK,
914  static_cast<FwAssertArgType>(_status)
915  );
916 #endif
917  _status = _logBuff.serialize(arg3);
918  FW_ASSERT(
919  _status == Fw::FW_SERIALIZE_OK,
920  static_cast<FwAssertArgType>(_status)
921  );
922 
923 #if FW_AMPCS_COMPATIBLE
924  // Serialize the argument size
925  _status = _logBuff.serialize(
926  static_cast<U8>(sizeof(U32))
927  );
928  FW_ASSERT(
929  _status == Fw::FW_SERIALIZE_OK,
930  static_cast<FwAssertArgType>(_status)
931  );
932 #endif
933  _status = _logBuff.serialize(arg4);
934  FW_ASSERT(
935  _status == Fw::FW_SERIALIZE_OK,
936  static_cast<FwAssertArgType>(_status)
937  );
938 
939  this->m_Log_OutputPort[0].invoke(
940  _id,
941  _logTime,
943  _logBuff
944  );
945  }
946 
947  // Emit the event on the text log port
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 "";
953 #else
954  const char* _formatString =
955  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 "";
956 #endif
957 
958  Fw::TextLogString _logString;
959  _logString.format(
960  _formatString,
961 #if FW_OBJECT_NAMES == 1
962  this->m_objName.toChar(),
963 #endif
964  "AF_ASSERT_4 ",
965  file.toChar(),
966  line,
967  arg1,
968  arg2,
969  arg3,
970  arg4
971  );
972 
973  this->m_LogText_OutputPort[0].invoke(
974  _id,
975  _logTime,
977  _logString
978  );
979  }
980 #endif
981  }
982 
985  const Fw::StringBase& file,
986  U32 line,
987  U32 arg1,
988  U32 arg2,
989  U32 arg3,
990  U32 arg4,
991  U32 arg5
992  )
993  {
994  // Get the time
995  Fw::Time _logTime;
996  if (this->m_Time_OutputPort[0].isConnected()) {
997  this->m_Time_OutputPort[0].invoke(_logTime);
998  }
999 
1000  FwEventIdType _id = static_cast<FwEventIdType>(0);
1001 
1002  _id = this->getIdBase() + EVENTID_AF_ASSERT_5;
1003 
1004  // Emit the event on the log port
1005  if (this->m_Log_OutputPort[0].isConnected()) {
1006  Fw::LogBuffer _logBuff;
1008 
1009 #if FW_AMPCS_COMPATIBLE
1010  // Serialize the number of arguments
1011  _status = _logBuff.serialize(static_cast<U8>(7 + 1));
1012  FW_ASSERT(
1013  _status == Fw::FW_SERIALIZE_OK,
1014  static_cast<FwAssertArgType>(_status)
1015  );
1016 
1017  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
1018  _status = _logBuff.serialize(static_cast<U8>(4));
1019  FW_ASSERT(
1020  _status == Fw::FW_SERIALIZE_OK,
1021  static_cast<FwAssertArgType>(_status)
1022  );
1023 
1024  _status = _logBuff.serialize(static_cast<U32>(0));
1025  FW_ASSERT(
1026  _status == Fw::FW_SERIALIZE_OK,
1027  static_cast<FwAssertArgType>(_status)
1028  );
1029 #endif
1030 
1031  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1032  FW_ASSERT(
1033  _status == Fw::FW_SERIALIZE_OK,
1034  static_cast<FwAssertArgType>(_status)
1035  );
1036 
1037 #if FW_AMPCS_COMPATIBLE
1038  // Serialize the argument size
1039  _status = _logBuff.serialize(
1040  static_cast<U8>(sizeof(U32))
1041  );
1042  FW_ASSERT(
1043  _status == Fw::FW_SERIALIZE_OK,
1044  static_cast<FwAssertArgType>(_status)
1045  );
1046 #endif
1047  _status = _logBuff.serialize(line);
1048  FW_ASSERT(
1049  _status == Fw::FW_SERIALIZE_OK,
1050  static_cast<FwAssertArgType>(_status)
1051  );
1052 
1053 #if FW_AMPCS_COMPATIBLE
1054  // Serialize the argument size
1055  _status = _logBuff.serialize(
1056  static_cast<U8>(sizeof(U32))
1057  );
1058  FW_ASSERT(
1059  _status == Fw::FW_SERIALIZE_OK,
1060  static_cast<FwAssertArgType>(_status)
1061  );
1062 #endif
1063  _status = _logBuff.serialize(arg1);
1064  FW_ASSERT(
1065  _status == Fw::FW_SERIALIZE_OK,
1066  static_cast<FwAssertArgType>(_status)
1067  );
1068 
1069 #if FW_AMPCS_COMPATIBLE
1070  // Serialize the argument size
1071  _status = _logBuff.serialize(
1072  static_cast<U8>(sizeof(U32))
1073  );
1074  FW_ASSERT(
1075  _status == Fw::FW_SERIALIZE_OK,
1076  static_cast<FwAssertArgType>(_status)
1077  );
1078 #endif
1079  _status = _logBuff.serialize(arg2);
1080  FW_ASSERT(
1081  _status == Fw::FW_SERIALIZE_OK,
1082  static_cast<FwAssertArgType>(_status)
1083  );
1084 
1085 #if FW_AMPCS_COMPATIBLE
1086  // Serialize the argument size
1087  _status = _logBuff.serialize(
1088  static_cast<U8>(sizeof(U32))
1089  );
1090  FW_ASSERT(
1091  _status == Fw::FW_SERIALIZE_OK,
1092  static_cast<FwAssertArgType>(_status)
1093  );
1094 #endif
1095  _status = _logBuff.serialize(arg3);
1096  FW_ASSERT(
1097  _status == Fw::FW_SERIALIZE_OK,
1098  static_cast<FwAssertArgType>(_status)
1099  );
1100 
1101 #if FW_AMPCS_COMPATIBLE
1102  // Serialize the argument size
1103  _status = _logBuff.serialize(
1104  static_cast<U8>(sizeof(U32))
1105  );
1106  FW_ASSERT(
1107  _status == Fw::FW_SERIALIZE_OK,
1108  static_cast<FwAssertArgType>(_status)
1109  );
1110 #endif
1111  _status = _logBuff.serialize(arg4);
1112  FW_ASSERT(
1113  _status == Fw::FW_SERIALIZE_OK,
1114  static_cast<FwAssertArgType>(_status)
1115  );
1116 
1117 #if FW_AMPCS_COMPATIBLE
1118  // Serialize the argument size
1119  _status = _logBuff.serialize(
1120  static_cast<U8>(sizeof(U32))
1121  );
1122  FW_ASSERT(
1123  _status == Fw::FW_SERIALIZE_OK,
1124  static_cast<FwAssertArgType>(_status)
1125  );
1126 #endif
1127  _status = _logBuff.serialize(arg5);
1128  FW_ASSERT(
1129  _status == Fw::FW_SERIALIZE_OK,
1130  static_cast<FwAssertArgType>(_status)
1131  );
1132 
1133  this->m_Log_OutputPort[0].invoke(
1134  _id,
1135  _logTime,
1137  _logBuff
1138  );
1139  }
1140 
1141  // Emit the event on the text log port
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 "";
1147 #else
1148  const char* _formatString =
1149  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 "";
1150 #endif
1151 
1152  Fw::TextLogString _logString;
1153  _logString.format(
1154  _formatString,
1155 #if FW_OBJECT_NAMES == 1
1156  this->m_objName.toChar(),
1157 #endif
1158  "AF_ASSERT_5 ",
1159  file.toChar(),
1160  line,
1161  arg1,
1162  arg2,
1163  arg3,
1164  arg4,
1165  arg5
1166  );
1167 
1168  this->m_LogText_OutputPort[0].invoke(
1169  _id,
1170  _logTime,
1172  _logString
1173  );
1174  }
1175 #endif
1176  }
1177 
1180  const Fw::StringBase& file,
1181  U32 line,
1182  U32 arg1,
1183  U32 arg2,
1184  U32 arg3,
1185  U32 arg4,
1186  U32 arg5,
1187  U32 arg6
1188  )
1189  {
1190  // Get the time
1191  Fw::Time _logTime;
1192  if (this->m_Time_OutputPort[0].isConnected()) {
1193  this->m_Time_OutputPort[0].invoke(_logTime);
1194  }
1195 
1196  FwEventIdType _id = static_cast<FwEventIdType>(0);
1197 
1198  _id = this->getIdBase() + EVENTID_AF_ASSERT_6;
1199 
1200  // Emit the event on the log port
1201  if (this->m_Log_OutputPort[0].isConnected()) {
1202  Fw::LogBuffer _logBuff;
1204 
1205 #if FW_AMPCS_COMPATIBLE
1206  // Serialize the number of arguments
1207  _status = _logBuff.serialize(static_cast<U8>(8 + 1));
1208  FW_ASSERT(
1209  _status == Fw::FW_SERIALIZE_OK,
1210  static_cast<FwAssertArgType>(_status)
1211  );
1212 
1213  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
1214  _status = _logBuff.serialize(static_cast<U8>(4));
1215  FW_ASSERT(
1216  _status == Fw::FW_SERIALIZE_OK,
1217  static_cast<FwAssertArgType>(_status)
1218  );
1219 
1220  _status = _logBuff.serialize(static_cast<U32>(0));
1221  FW_ASSERT(
1222  _status == Fw::FW_SERIALIZE_OK,
1223  static_cast<FwAssertArgType>(_status)
1224  );
1225 #endif
1226 
1227  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1228  FW_ASSERT(
1229  _status == Fw::FW_SERIALIZE_OK,
1230  static_cast<FwAssertArgType>(_status)
1231  );
1232 
1233 #if FW_AMPCS_COMPATIBLE
1234  // Serialize the argument size
1235  _status = _logBuff.serialize(
1236  static_cast<U8>(sizeof(U32))
1237  );
1238  FW_ASSERT(
1239  _status == Fw::FW_SERIALIZE_OK,
1240  static_cast<FwAssertArgType>(_status)
1241  );
1242 #endif
1243  _status = _logBuff.serialize(line);
1244  FW_ASSERT(
1245  _status == Fw::FW_SERIALIZE_OK,
1246  static_cast<FwAssertArgType>(_status)
1247  );
1248 
1249 #if FW_AMPCS_COMPATIBLE
1250  // Serialize the argument size
1251  _status = _logBuff.serialize(
1252  static_cast<U8>(sizeof(U32))
1253  );
1254  FW_ASSERT(
1255  _status == Fw::FW_SERIALIZE_OK,
1256  static_cast<FwAssertArgType>(_status)
1257  );
1258 #endif
1259  _status = _logBuff.serialize(arg1);
1260  FW_ASSERT(
1261  _status == Fw::FW_SERIALIZE_OK,
1262  static_cast<FwAssertArgType>(_status)
1263  );
1264 
1265 #if FW_AMPCS_COMPATIBLE
1266  // Serialize the argument size
1267  _status = _logBuff.serialize(
1268  static_cast<U8>(sizeof(U32))
1269  );
1270  FW_ASSERT(
1271  _status == Fw::FW_SERIALIZE_OK,
1272  static_cast<FwAssertArgType>(_status)
1273  );
1274 #endif
1275  _status = _logBuff.serialize(arg2);
1276  FW_ASSERT(
1277  _status == Fw::FW_SERIALIZE_OK,
1278  static_cast<FwAssertArgType>(_status)
1279  );
1280 
1281 #if FW_AMPCS_COMPATIBLE
1282  // Serialize the argument size
1283  _status = _logBuff.serialize(
1284  static_cast<U8>(sizeof(U32))
1285  );
1286  FW_ASSERT(
1287  _status == Fw::FW_SERIALIZE_OK,
1288  static_cast<FwAssertArgType>(_status)
1289  );
1290 #endif
1291  _status = _logBuff.serialize(arg3);
1292  FW_ASSERT(
1293  _status == Fw::FW_SERIALIZE_OK,
1294  static_cast<FwAssertArgType>(_status)
1295  );
1296 
1297 #if FW_AMPCS_COMPATIBLE
1298  // Serialize the argument size
1299  _status = _logBuff.serialize(
1300  static_cast<U8>(sizeof(U32))
1301  );
1302  FW_ASSERT(
1303  _status == Fw::FW_SERIALIZE_OK,
1304  static_cast<FwAssertArgType>(_status)
1305  );
1306 #endif
1307  _status = _logBuff.serialize(arg4);
1308  FW_ASSERT(
1309  _status == Fw::FW_SERIALIZE_OK,
1310  static_cast<FwAssertArgType>(_status)
1311  );
1312 
1313 #if FW_AMPCS_COMPATIBLE
1314  // Serialize the argument size
1315  _status = _logBuff.serialize(
1316  static_cast<U8>(sizeof(U32))
1317  );
1318  FW_ASSERT(
1319  _status == Fw::FW_SERIALIZE_OK,
1320  static_cast<FwAssertArgType>(_status)
1321  );
1322 #endif
1323  _status = _logBuff.serialize(arg5);
1324  FW_ASSERT(
1325  _status == Fw::FW_SERIALIZE_OK,
1326  static_cast<FwAssertArgType>(_status)
1327  );
1328 
1329 #if FW_AMPCS_COMPATIBLE
1330  // Serialize the argument size
1331  _status = _logBuff.serialize(
1332  static_cast<U8>(sizeof(U32))
1333  );
1334  FW_ASSERT(
1335  _status == Fw::FW_SERIALIZE_OK,
1336  static_cast<FwAssertArgType>(_status)
1337  );
1338 #endif
1339  _status = _logBuff.serialize(arg6);
1340  FW_ASSERT(
1341  _status == Fw::FW_SERIALIZE_OK,
1342  static_cast<FwAssertArgType>(_status)
1343  );
1344 
1345  this->m_Log_OutputPort[0].invoke(
1346  _id,
1347  _logTime,
1349  _logBuff
1350  );
1351  }
1352 
1353  // Emit the event on the text log port
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 "";
1359 #else
1360  const char* _formatString =
1361  "%s: Assert in file %s, line %" PRIu32 ": %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 " %" PRIu32 "";
1362 #endif
1363 
1364  Fw::TextLogString _logString;
1365  _logString.format(
1366  _formatString,
1367 #if FW_OBJECT_NAMES == 1
1368  this->m_objName.toChar(),
1369 #endif
1370  "AF_ASSERT_6 ",
1371  file.toChar(),
1372  line,
1373  arg1,
1374  arg2,
1375  arg3,
1376  arg4,
1377  arg5,
1378  arg6
1379  );
1380 
1381  this->m_LogText_OutputPort[0].invoke(
1382  _id,
1383  _logTime,
1385  _logString
1386  );
1387  }
1388 #endif
1389  }
1390 
1393  const Fw::StringBase& file,
1394  U32 line,
1395  U32 numArgs
1396  )
1397  {
1398  // Get the time
1399  Fw::Time _logTime;
1400  if (this->m_Time_OutputPort[0].isConnected()) {
1401  this->m_Time_OutputPort[0].invoke(_logTime);
1402  }
1403 
1404  FwEventIdType _id = static_cast<FwEventIdType>(0);
1405 
1406  _id = this->getIdBase() + EVENTID_AF_UNEXPECTED_ASSERT;
1407 
1408  // Emit the event on the log port
1409  if (this->m_Log_OutputPort[0].isConnected()) {
1410  Fw::LogBuffer _logBuff;
1412 
1413 #if FW_AMPCS_COMPATIBLE
1414  // Serialize the number of arguments
1415  _status = _logBuff.serialize(static_cast<U8>(3 + 1));
1416  FW_ASSERT(
1417  _status == Fw::FW_SERIALIZE_OK,
1418  static_cast<FwAssertArgType>(_status)
1419  );
1420 
1421  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
1422  _status = _logBuff.serialize(static_cast<U8>(4));
1423  FW_ASSERT(
1424  _status == Fw::FW_SERIALIZE_OK,
1425  static_cast<FwAssertArgType>(_status)
1426  );
1427 
1428  _status = _logBuff.serialize(static_cast<U32>(0));
1429  FW_ASSERT(
1430  _status == Fw::FW_SERIALIZE_OK,
1431  static_cast<FwAssertArgType>(_status)
1432  );
1433 #endif
1434 
1435  _status = file.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 200));
1436  FW_ASSERT(
1437  _status == Fw::FW_SERIALIZE_OK,
1438  static_cast<FwAssertArgType>(_status)
1439  );
1440 
1441 #if FW_AMPCS_COMPATIBLE
1442  // Serialize the argument size
1443  _status = _logBuff.serialize(
1444  static_cast<U8>(sizeof(U32))
1445  );
1446  FW_ASSERT(
1447  _status == Fw::FW_SERIALIZE_OK,
1448  static_cast<FwAssertArgType>(_status)
1449  );
1450 #endif
1451  _status = _logBuff.serialize(line);
1452  FW_ASSERT(
1453  _status == Fw::FW_SERIALIZE_OK,
1454  static_cast<FwAssertArgType>(_status)
1455  );
1456 
1457 #if FW_AMPCS_COMPATIBLE
1458  // Serialize the argument size
1459  _status = _logBuff.serialize(
1460  static_cast<U8>(sizeof(U32))
1461  );
1462  FW_ASSERT(
1463  _status == Fw::FW_SERIALIZE_OK,
1464  static_cast<FwAssertArgType>(_status)
1465  );
1466 #endif
1467  _status = _logBuff.serialize(numArgs);
1468  FW_ASSERT(
1469  _status == Fw::FW_SERIALIZE_OK,
1470  static_cast<FwAssertArgType>(_status)
1471  );
1472 
1473  this->m_Log_OutputPort[0].invoke(
1474  _id,
1475  _logTime,
1477  _logBuff
1478  );
1479  }
1480 
1481  // Emit the event on the text log port
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 "";
1487 #else
1488  const char* _formatString =
1489  "%s: Unexpected assert in file %s, line %" PRIu32 ", args %" PRIu32 "";
1490 #endif
1491 
1492  Fw::TextLogString _logString;
1493  _logString.format(
1494  _formatString,
1495 #if FW_OBJECT_NAMES == 1
1496  this->m_objName.toChar(),
1497 #endif
1498  "AF_UNEXPECTED_ASSERT ",
1499  file.toChar(),
1500  line,
1501  numArgs
1502  );
1503 
1504  this->m_LogText_OutputPort[0].invoke(
1505  _id,
1506  _logTime,
1508  _logString
1509  );
1510  }
1511 #endif
1512  }
1513 
1514  // ----------------------------------------------------------------------
1515  // Time
1516  // ----------------------------------------------------------------------
1517 
1519  getTime()
1520  {
1521  if (this->m_Time_OutputPort[0].isConnected()) {
1522  Fw::Time _time;
1523  this->m_Time_OutputPort[0].invoke(_time);
1524  return _time;
1525  }
1526  else {
1527  return Fw::Time(TB_NONE, 0, 0);
1528  }
1529  }
1530 
1531 }
#define FW_ASSERT(...)
Definition: Assert.hpp:14
#define FW_MIN(a, b)
MIN macro.
Definition: BasicTypes.h:72
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:30
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:70
#define PRI_PlatformIntType
@ TB_NONE
No time base has been established.
Definition: FpConfig.h:70
I32 FwEnumStoreType
Definition: FpConfig.h:64
PlatformAssertArgType FwAssertArgType
Definition: FpConfig.h:39
U32 FwEventIdType
Definition: FpConfig.h:103
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
Definition: FpConfig.h:319
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Definition: FpConfig.h:148
@ FATAL
A fatal non-recoverable event.
void init()
Object initializer.
Definition: ObjBase.cpp:27
const char * toChar() const
Definition: ObjectName.hpp:50
void init()
Initialization function.
Definition: LogPortAc.cpp:151
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Invoke a port interface.
Definition: LogPortAc.cpp:170
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
void invoke(Fw::Time &time)
Invoke a port interface.
Definition: TimePortAc.cpp:147
void init()
Initialization function.
Definition: TimePortAc.cpp:128
bool isConnected()
Definition: PortBase.cpp:41
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
Definition: StringBase.cpp:56
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Definition: StringBase.cpp:146
Definition: Time.hpp:9
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)
void log_FATAL_AF_ASSERT_0(const Fw::StringBase &file, U32 line)
void log_FATAL_AF_UNEXPECTED_ASSERT(const Fw::StringBase &file, U32 line, U32 numArgs)
@ EVENTID_AF_UNEXPECTED_ASSERT
An unexpected 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)
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)
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.