F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
BufferRepeaterComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title BufferRepeaterComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for BufferRepeater 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 input port portIn
27  for (
28  FwIndexType port = 0;
29  port < static_cast<FwIndexType>(this->getNum_portIn_InputPorts());
30  port++
31  ) {
32  this->m_portIn_InputPort[port].init();
33  this->m_portIn_InputPort[port].addCallComp(
34  this,
35  m_p_portIn_in
36  );
37  this->m_portIn_InputPort[port].setPortNum(port);
38 
39 #if FW_OBJECT_NAMES == 1
40  Fw::ObjectName portName;
41  portName.format(
42  "%s_portIn_InputPort[%" PRI_PlatformIntType "]",
43  this->m_objName.toChar(),
44  port
45  );
46  this->m_portIn_InputPort[port].setObjName(portName.toChar());
47 #endif
48  }
49 
50  // Connect output port Log
51  for (
52  FwIndexType port = 0;
53  port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
54  port++
55  ) {
56  this->m_Log_OutputPort[port].init();
57 
58 #if FW_OBJECT_NAMES == 1
59  Fw::ObjectName portName;
60  portName.format(
61  "%s_Log_OutputPort[%" PRI_PlatformIntType "]",
62  this->m_objName.toChar(),
63  port
64  );
65  this->m_Log_OutputPort[port].setObjName(portName.toChar());
66 #endif
67  }
68 
69 #if FW_ENABLE_TEXT_LOGGING == 1
70  // Connect output port LogText
71  for (
72  FwIndexType port = 0;
73  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
74  port++
75  ) {
76  this->m_LogText_OutputPort[port].init();
77 
78 #if FW_OBJECT_NAMES == 1
79  Fw::ObjectName portName;
80  portName.format(
81  "%s_LogText_OutputPort[%" PRI_PlatformIntType "]",
82  this->m_objName.toChar(),
83  port
84  );
85  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
86 #endif
87  }
88 #endif
89 
90  // Connect output port Time
91  for (
92  FwIndexType port = 0;
93  port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
94  port++
95  ) {
96  this->m_Time_OutputPort[port].init();
97 
98 #if FW_OBJECT_NAMES == 1
99  Fw::ObjectName portName;
100  portName.format(
101  "%s_Time_OutputPort[%" PRI_PlatformIntType "]",
102  this->m_objName.toChar(),
103  port
104  );
105  this->m_Time_OutputPort[port].setObjName(portName.toChar());
106 #endif
107  }
108 
109  // Connect output port allocate
110  for (
111  FwIndexType port = 0;
112  port < static_cast<FwIndexType>(this->getNum_allocate_OutputPorts());
113  port++
114  ) {
115  this->m_allocate_OutputPort[port].init();
116 
117 #if FW_OBJECT_NAMES == 1
118  Fw::ObjectName portName;
119  portName.format(
120  "%s_allocate_OutputPort[%" PRI_PlatformIntType "]",
121  this->m_objName.toChar(),
122  port
123  );
124  this->m_allocate_OutputPort[port].setObjName(portName.toChar());
125 #endif
126  }
127 
128  // Connect output port deallocate
129  for (
130  FwIndexType port = 0;
131  port < static_cast<FwIndexType>(this->getNum_deallocate_OutputPorts());
132  port++
133  ) {
134  this->m_deallocate_OutputPort[port].init();
135 
136 #if FW_OBJECT_NAMES == 1
137  Fw::ObjectName portName;
138  portName.format(
139  "%s_deallocate_OutputPort[%" PRI_PlatformIntType "]",
140  this->m_objName.toChar(),
141  port
142  );
143  this->m_deallocate_OutputPort[port].setObjName(portName.toChar());
144 #endif
145  }
146 
147  // Connect output port portOut
148  for (
149  FwIndexType port = 0;
150  port < static_cast<FwIndexType>(this->getNum_portOut_OutputPorts());
151  port++
152  ) {
153  this->m_portOut_OutputPort[port].init();
154 
155 #if FW_OBJECT_NAMES == 1
156  Fw::ObjectName portName;
157  portName.format(
158  "%s_portOut_OutputPort[%" PRI_PlatformIntType "]",
159  this->m_objName.toChar(),
160  port
161  );
162  this->m_portOut_OutputPort[port].setObjName(portName.toChar());
163 #endif
164  }
165  }
166 
167  // ----------------------------------------------------------------------
168  // Getters for typed input ports
169  // ----------------------------------------------------------------------
170 
173  {
174  FW_ASSERT(
175  portNum < this->getNum_portIn_InputPorts(),
176  static_cast<FwAssertArgType>(portNum)
177  );
178 
179  return &this->m_portIn_InputPort[portNum];
180  }
181 
182  // ----------------------------------------------------------------------
183  // Connect input ports to special output ports
184  // ----------------------------------------------------------------------
185 
188  FwIndexType portNum,
189  Fw::InputLogPort* port
190  )
191  {
192  FW_ASSERT(
193  portNum < this->getNum_Log_OutputPorts(),
194  static_cast<FwAssertArgType>(portNum)
195  );
196 
197  this->m_Log_OutputPort[portNum].addCallPort(port);
198  }
199 
200 #if FW_ENABLE_TEXT_LOGGING == 1
201 
202  void BufferRepeaterComponentBase ::
203  set_LogText_OutputPort(
204  FwIndexType portNum,
206  )
207  {
208  FW_ASSERT(
209  portNum < this->getNum_LogText_OutputPorts(),
210  static_cast<FwAssertArgType>(portNum)
211  );
212 
213  this->m_LogText_OutputPort[portNum].addCallPort(port);
214  }
215 
216 #endif
217 
220  FwIndexType portNum,
221  Fw::InputTimePort* port
222  )
223  {
224  FW_ASSERT(
225  portNum < this->getNum_Time_OutputPorts(),
226  static_cast<FwAssertArgType>(portNum)
227  );
228 
229  this->m_Time_OutputPort[portNum].addCallPort(port);
230  }
231 
232  // ----------------------------------------------------------------------
233  // Connect typed input ports to typed output ports
234  // ----------------------------------------------------------------------
235 
238  FwIndexType portNum,
240  )
241  {
242  FW_ASSERT(
243  portNum < this->getNum_allocate_OutputPorts(),
244  static_cast<FwAssertArgType>(portNum)
245  );
246 
247  this->m_allocate_OutputPort[portNum].addCallPort(port);
248  }
249 
252  FwIndexType portNum,
254  )
255  {
256  FW_ASSERT(
257  portNum < this->getNum_deallocate_OutputPorts(),
258  static_cast<FwAssertArgType>(portNum)
259  );
260 
261  this->m_deallocate_OutputPort[portNum].addCallPort(port);
262  }
263 
266  FwIndexType portNum,
268  )
269  {
270  FW_ASSERT(
271  portNum < this->getNum_portOut_OutputPorts(),
272  static_cast<FwAssertArgType>(portNum)
273  );
274 
275  this->m_portOut_OutputPort[portNum].addCallPort(port);
276  }
277 
278 #if FW_PORT_SERIALIZATION
279 
280  // ----------------------------------------------------------------------
281  // Connect serial input ports to special output ports
282  // ----------------------------------------------------------------------
283 
286  FwIndexType portNum,
287  Fw::InputSerializePort* port
288  )
289  {
290  FW_ASSERT(
291  portNum < this->getNum_Log_OutputPorts(),
292  static_cast<FwAssertArgType>(portNum)
293  );
294 
295  this->m_Log_OutputPort[portNum].registerSerialPort(port);
296  }
297 
298 #if FW_ENABLE_TEXT_LOGGING == 1
299 
300  void BufferRepeaterComponentBase ::
301  set_LogText_OutputPort(
302  FwIndexType portNum,
303  Fw::InputSerializePort* port
304  )
305  {
306  FW_ASSERT(
307  portNum < this->getNum_LogText_OutputPorts(),
308  static_cast<FwAssertArgType>(portNum)
309  );
310 
311  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
312  }
313 
314 #endif
315 
318  FwIndexType portNum,
319  Fw::InputSerializePort* port
320  )
321  {
322  FW_ASSERT(
323  portNum < this->getNum_Time_OutputPorts(),
324  static_cast<FwAssertArgType>(portNum)
325  );
326 
327  this->m_Time_OutputPort[portNum].registerSerialPort(port);
328  }
329 
330 #endif
331 
332 #if FW_PORT_SERIALIZATION
333 
334  // ----------------------------------------------------------------------
335  // Connect serial input ports to typed output ports
336  // ----------------------------------------------------------------------
337 
340  FwIndexType portNum,
341  Fw::InputSerializePort* port
342  )
343  {
344  FW_ASSERT(
345  portNum < this->getNum_deallocate_OutputPorts(),
346  static_cast<FwAssertArgType>(portNum)
347  );
348 
349  this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
350  }
351 
354  FwIndexType portNum,
355  Fw::InputSerializePort* port
356  )
357  {
358  FW_ASSERT(
359  portNum < this->getNum_portOut_OutputPorts(),
360  static_cast<FwAssertArgType>(portNum)
361  );
362 
363  this->m_portOut_OutputPort[portNum].registerSerialPort(port);
364  }
365 
366 #endif
367 
368  // ----------------------------------------------------------------------
369  // Component construction and destruction
370  // ----------------------------------------------------------------------
371 
373  BufferRepeaterComponentBase(const char* compName) :
374  Fw::PassiveComponentBase(compName)
375  {
376 
377  }
378 
381  {
382 
383  }
384 
385  // ----------------------------------------------------------------------
386  // Getters for numbers of typed input ports
387  // ----------------------------------------------------------------------
388 
391  {
392  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_portIn_InputPort));
393  }
394 
395  // ----------------------------------------------------------------------
396  // Getters for numbers of special output ports
397  // ----------------------------------------------------------------------
398 
401  {
402  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Log_OutputPort));
403  }
404 
405 #if FW_ENABLE_TEXT_LOGGING == 1
406 
407  FwIndexType BufferRepeaterComponentBase ::
408  getNum_LogText_OutputPorts() const
409  {
410  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_LogText_OutputPort));
411  }
412 
413 #endif
414 
417  {
418  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_Time_OutputPort));
419  }
420 
421  // ----------------------------------------------------------------------
422  // Getters for numbers of typed output ports
423  // ----------------------------------------------------------------------
424 
427  {
428  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_allocate_OutputPort));
429  }
430 
433  {
434  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_deallocate_OutputPort));
435  }
436 
439  {
440  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_portOut_OutputPort));
441  }
442 
443  // ----------------------------------------------------------------------
444  // Connection status queries for special output ports
445  // ----------------------------------------------------------------------
446 
449  {
450  FW_ASSERT(
451  portNum < this->getNum_Log_OutputPorts(),
452  static_cast<FwAssertArgType>(portNum)
453  );
454 
455  return this->m_Log_OutputPort[portNum].isConnected();
456  }
457 
458 #if FW_ENABLE_TEXT_LOGGING == 1
459 
460  bool BufferRepeaterComponentBase ::
461  isConnected_LogText_OutputPort(FwIndexType portNum)
462  {
463  FW_ASSERT(
464  portNum < this->getNum_LogText_OutputPorts(),
465  static_cast<FwAssertArgType>(portNum)
466  );
467 
468  return this->m_LogText_OutputPort[portNum].isConnected();
469  }
470 
471 #endif
472 
475  {
476  FW_ASSERT(
477  portNum < this->getNum_Time_OutputPorts(),
478  static_cast<FwAssertArgType>(portNum)
479  );
480 
481  return this->m_Time_OutputPort[portNum].isConnected();
482  }
483 
484  // ----------------------------------------------------------------------
485  // Connection status queries for typed output ports
486  // ----------------------------------------------------------------------
487 
490  {
491  FW_ASSERT(
492  portNum < this->getNum_allocate_OutputPorts(),
493  static_cast<FwAssertArgType>(portNum)
494  );
495 
496  return this->m_allocate_OutputPort[portNum].isConnected();
497  }
498 
501  {
502  FW_ASSERT(
503  portNum < this->getNum_deallocate_OutputPorts(),
504  static_cast<FwAssertArgType>(portNum)
505  );
506 
507  return this->m_deallocate_OutputPort[portNum].isConnected();
508  }
509 
512  {
513  FW_ASSERT(
514  portNum < this->getNum_portOut_OutputPorts(),
515  static_cast<FwAssertArgType>(portNum)
516  );
517 
518  return this->m_portOut_OutputPort[portNum].isConnected();
519  }
520 
521  // ----------------------------------------------------------------------
522  // Port handler base-class functions for typed input ports
523  //
524  // Call these functions directly to bypass the corresponding ports
525  // ----------------------------------------------------------------------
526 
529  FwIndexType portNum,
530  Fw::Buffer& fwBuffer
531  )
532  {
533  // Make sure port number is valid
534  FW_ASSERT(
535  portNum < this->getNum_portIn_InputPorts(),
536  static_cast<FwAssertArgType>(portNum)
537  );
538 
539  // Call handler function
540  this->portIn_handler(
541  portNum,
542  fwBuffer
543  );
544  }
545 
546  // ----------------------------------------------------------------------
547  // Invocation functions for typed output ports
548  // ----------------------------------------------------------------------
549 
552  FwIndexType portNum,
553  U32 size
554  )
555  {
556  FW_ASSERT(
557  portNum < this->getNum_allocate_OutputPorts(),
558  static_cast<FwAssertArgType>(portNum)
559  );
560  return this->m_allocate_OutputPort[portNum].invoke(
561  size
562  );
563  }
564 
567  FwIndexType portNum,
568  Fw::Buffer& fwBuffer
569  )
570  {
571  FW_ASSERT(
572  portNum < this->getNum_deallocate_OutputPorts(),
573  static_cast<FwAssertArgType>(portNum)
574  );
575  this->m_deallocate_OutputPort[portNum].invoke(
576  fwBuffer
577  );
578  }
579 
582  FwIndexType portNum,
583  Fw::Buffer& fwBuffer
584  )
585  {
586  FW_ASSERT(
587  portNum < this->getNum_portOut_OutputPorts(),
588  static_cast<FwAssertArgType>(portNum)
589  );
590  this->m_portOut_OutputPort[portNum].invoke(
591  fwBuffer
592  );
593  }
594 
595  // ----------------------------------------------------------------------
596  // Event logging functions
597  // ----------------------------------------------------------------------
598 
601  I32 port,
602  U32 size
603  )
604  {
605  // Get the time
606  Fw::Time _logTime;
607  if (this->m_Time_OutputPort[0].isConnected()) {
608  this->m_Time_OutputPort[0].invoke(_logTime);
609  }
610 
611  FwEventIdType _id = static_cast<FwEventIdType>(0);
612 
614 
615  // Emit the event on the log port
616  if (this->m_Log_OutputPort[0].isConnected()) {
617  Fw::LogBuffer _logBuff;
619 
620 #if FW_AMPCS_COMPATIBLE
621  // Serialize the number of arguments
622  _status = _logBuff.serialize(static_cast<U8>(2));
623  FW_ASSERT(
624  _status == Fw::FW_SERIALIZE_OK,
625  static_cast<FwAssertArgType>(_status)
626  );
627 #endif
628 
629 #if FW_AMPCS_COMPATIBLE
630  // Serialize the argument size
631  _status = _logBuff.serialize(
632  static_cast<U8>(sizeof(I32))
633  );
634  FW_ASSERT(
635  _status == Fw::FW_SERIALIZE_OK,
636  static_cast<FwAssertArgType>(_status)
637  );
638 #endif
639  _status = _logBuff.serialize(port);
640  FW_ASSERT(
641  _status == Fw::FW_SERIALIZE_OK,
642  static_cast<FwAssertArgType>(_status)
643  );
644 
645 #if FW_AMPCS_COMPATIBLE
646  // Serialize the argument size
647  _status = _logBuff.serialize(
648  static_cast<U8>(sizeof(U32))
649  );
650  FW_ASSERT(
651  _status == Fw::FW_SERIALIZE_OK,
652  static_cast<FwAssertArgType>(_status)
653  );
654 #endif
655  _status = _logBuff.serialize(size);
656  FW_ASSERT(
657  _status == Fw::FW_SERIALIZE_OK,
658  static_cast<FwAssertArgType>(_status)
659  );
660 
661  this->m_Log_OutputPort[0].invoke(
662  _id,
663  _logTime,
665  _logBuff
666  );
667  }
668 
669  // Emit the event on the text log port
670 #if FW_ENABLE_TEXT_LOGGING
671  if (this->m_LogText_OutputPort[0].isConnected()) {
672 #if FW_OBJECT_NAMES == 1
673  const char* _formatString =
674  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
675 #else
676  const char* _formatString =
677  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
678 #endif
679 
680  Fw::TextLogString _logString;
681  _logString.format(
682  _formatString,
683 #if FW_OBJECT_NAMES == 1
684  this->m_objName.toChar(),
685 #endif
686  "AllocationSoftFailure ",
687  port,
688  size
689  );
690 
691  this->m_LogText_OutputPort[0].invoke(
692  _id,
693  _logTime,
695  _logString
696  );
697  }
698 #endif
699  }
700 
703  I32 port,
704  U32 size
705  )
706  {
707  // Get the time
708  Fw::Time _logTime;
709  if (this->m_Time_OutputPort[0].isConnected()) {
710  this->m_Time_OutputPort[0].invoke(_logTime);
711  }
712 
713  FwEventIdType _id = static_cast<FwEventIdType>(0);
714 
716 
717  // Emit the event on the log port
718  if (this->m_Log_OutputPort[0].isConnected()) {
719  Fw::LogBuffer _logBuff;
721 
722 #if FW_AMPCS_COMPATIBLE
723  // Serialize the number of arguments
724  _status = _logBuff.serialize(static_cast<U8>(2 + 1));
725  FW_ASSERT(
726  _status == Fw::FW_SERIALIZE_OK,
727  static_cast<FwAssertArgType>(_status)
728  );
729 
730  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
731  _status = _logBuff.serialize(static_cast<U8>(4));
732  FW_ASSERT(
733  _status == Fw::FW_SERIALIZE_OK,
734  static_cast<FwAssertArgType>(_status)
735  );
736 
737  _status = _logBuff.serialize(static_cast<U32>(0));
738  FW_ASSERT(
739  _status == Fw::FW_SERIALIZE_OK,
740  static_cast<FwAssertArgType>(_status)
741  );
742 #endif
743 
744 #if FW_AMPCS_COMPATIBLE
745  // Serialize the argument size
746  _status = _logBuff.serialize(
747  static_cast<U8>(sizeof(I32))
748  );
749  FW_ASSERT(
750  _status == Fw::FW_SERIALIZE_OK,
751  static_cast<FwAssertArgType>(_status)
752  );
753 #endif
754  _status = _logBuff.serialize(port);
755  FW_ASSERT(
756  _status == Fw::FW_SERIALIZE_OK,
757  static_cast<FwAssertArgType>(_status)
758  );
759 
760 #if FW_AMPCS_COMPATIBLE
761  // Serialize the argument size
762  _status = _logBuff.serialize(
763  static_cast<U8>(sizeof(U32))
764  );
765  FW_ASSERT(
766  _status == Fw::FW_SERIALIZE_OK,
767  static_cast<FwAssertArgType>(_status)
768  );
769 #endif
770  _status = _logBuff.serialize(size);
771  FW_ASSERT(
772  _status == Fw::FW_SERIALIZE_OK,
773  static_cast<FwAssertArgType>(_status)
774  );
775 
776  this->m_Log_OutputPort[0].invoke(
777  _id,
778  _logTime,
780  _logBuff
781  );
782  }
783 
784  // Emit the event on the text log port
785 #if FW_ENABLE_TEXT_LOGGING
786  if (this->m_LogText_OutputPort[0].isConnected()) {
787 #if FW_OBJECT_NAMES == 1
788  const char* _formatString =
789  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
790 #else
791  const char* _formatString =
792  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
793 #endif
794 
795  Fw::TextLogString _logString;
796  _logString.format(
797  _formatString,
798 #if FW_OBJECT_NAMES == 1
799  this->m_objName.toChar(),
800 #endif
801  "AllocationHardFailure ",
802  port,
803  size
804  );
805 
806  this->m_LogText_OutputPort[0].invoke(
807  _id,
808  _logTime,
810  _logString
811  );
812  }
813 #endif
814  }
815 
816  // ----------------------------------------------------------------------
817  // Time
818  // ----------------------------------------------------------------------
819 
821  getTime()
822  {
823  if (this->m_Time_OutputPort[0].isConnected()) {
824  Fw::Time _time;
825  this->m_Time_OutputPort[0].invoke(_time);
826  return _time;
827  }
828  else {
829  return Fw::Time(TB_NONE, 0, 0);
830  }
831  }
832 
833  // ----------------------------------------------------------------------
834  // Calls for messages received on typed input ports
835  // ----------------------------------------------------------------------
836 
837  void BufferRepeaterComponentBase ::
838  m_p_portIn_in(
839  Fw::PassiveComponentBase* callComp,
840  FwIndexType portNum,
841  Fw::Buffer& fwBuffer
842  )
843  {
844  FW_ASSERT(callComp);
845  BufferRepeaterComponentBase* compPtr = static_cast<BufferRepeaterComponentBase*>(callComp);
846  compPtr->portIn_handlerBase(
847  portNum,
848  fwBuffer
849  );
850  }
851 
852 }
#define FW_ASSERT(...)
Definition: Assert.hpp:14
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
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
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void init()
Initialization function.
void setPortNum(NATIVE_INT_TYPE portNum)
@ WARNING_HI
A serious but recoverable event.
@ 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.
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
Fw::Buffer invoke(U32 size)
Invoke a port interface.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Buffer &fwBuffer)
Invoke a port interface.
void init()
Initialization function.
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
void format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:56
Definition: Time.hpp:9
Auto-generated base for BufferRepeater component.
void log_WARNING_HI_AllocationSoftFailure(I32 port, U32 size)
@ EVENTID_ALLOCATIONHARDFAILURE
Hard failure in allocation.
@ EVENTID_ALLOCATIONSOFTFAILURE
Soft failure in allocation.
bool isConnected_deallocate_OutputPort(FwIndexType portNum)
virtual ~BufferRepeaterComponentBase()
Destroy BufferRepeaterComponentBase object.
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
bool isConnected_allocate_OutputPort(FwIndexType portNum)
BufferRepeaterComponentBase(const char *compName="")
Construct BufferRepeaterComponentBase object.
Fw::Buffer allocate_out(FwIndexType portNum, U32 size)
Invoke output port allocate.
bool isConnected_portOut_OutputPort(FwIndexType portNum)
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
Fw::InputBufferSendPort * get_portIn_InputPort(FwIndexType portNum)
void log_FATAL_AllocationHardFailure(I32 port, U32 size)
virtual void portIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port portIn.
bool isConnected_Log_OutputPort(FwIndexType portNum)
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.
void portOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port portOut.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void portIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port portIn.
bool isConnected_Time_OutputPort(FwIndexType portNum)
void set_portOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to portOut[portNum].
SerializeStatus
forward declaration for string
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.