F´ Flight Software - C/C++ Documentation
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 
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 
561  FW_ASSERT(
562  this->m_allocate_OutputPort[portNum].isConnected(),
563  static_cast<FwAssertArgType>(portNum)
564  );
565  return this->m_allocate_OutputPort[portNum].invoke(
566  size
567  );
568  }
569 
572  FwIndexType portNum,
573  Fw::Buffer& fwBuffer
574  )
575  {
576  FW_ASSERT(
577  portNum < this->getNum_deallocate_OutputPorts(),
578  static_cast<FwAssertArgType>(portNum)
579  );
580 
581  FW_ASSERT(
582  this->m_deallocate_OutputPort[portNum].isConnected(),
583  static_cast<FwAssertArgType>(portNum)
584  );
585  this->m_deallocate_OutputPort[portNum].invoke(
586  fwBuffer
587  );
588  }
589 
592  FwIndexType portNum,
593  Fw::Buffer& fwBuffer
594  )
595  {
596  FW_ASSERT(
597  portNum < this->getNum_portOut_OutputPorts(),
598  static_cast<FwAssertArgType>(portNum)
599  );
600 
601  FW_ASSERT(
602  this->m_portOut_OutputPort[portNum].isConnected(),
603  static_cast<FwAssertArgType>(portNum)
604  );
605  this->m_portOut_OutputPort[portNum].invoke(
606  fwBuffer
607  );
608  }
609 
610  // ----------------------------------------------------------------------
611  // Event logging functions
612  // ----------------------------------------------------------------------
613 
616  I32 port,
617  U32 size
618  ) const
619  {
620  // Get the time
621  Fw::Time _logTime;
622  if (this->m_Time_OutputPort[0].isConnected()) {
623  this->m_Time_OutputPort[0].invoke(_logTime);
624  }
625 
626  FwEventIdType _id = static_cast<FwEventIdType>(0);
627 
629 
630  // Emit the event on the log port
631  if (this->m_Log_OutputPort[0].isConnected()) {
632  Fw::LogBuffer _logBuff;
634 
635 #if FW_AMPCS_COMPATIBLE
636  // Serialize the number of arguments
637  _status = _logBuff.serialize(static_cast<U8>(2));
638  FW_ASSERT(
639  _status == Fw::FW_SERIALIZE_OK,
640  static_cast<FwAssertArgType>(_status)
641  );
642 #endif
643 
644 #if FW_AMPCS_COMPATIBLE
645  // Serialize the argument size
646  _status = _logBuff.serialize(
647  static_cast<U8>(sizeof(I32))
648  );
649  FW_ASSERT(
650  _status == Fw::FW_SERIALIZE_OK,
651  static_cast<FwAssertArgType>(_status)
652  );
653 #endif
654  _status = _logBuff.serialize(port);
655  FW_ASSERT(
656  _status == Fw::FW_SERIALIZE_OK,
657  static_cast<FwAssertArgType>(_status)
658  );
659 
660 #if FW_AMPCS_COMPATIBLE
661  // Serialize the argument size
662  _status = _logBuff.serialize(
663  static_cast<U8>(sizeof(U32))
664  );
665  FW_ASSERT(
666  _status == Fw::FW_SERIALIZE_OK,
667  static_cast<FwAssertArgType>(_status)
668  );
669 #endif
670  _status = _logBuff.serialize(size);
671  FW_ASSERT(
672  _status == Fw::FW_SERIALIZE_OK,
673  static_cast<FwAssertArgType>(_status)
674  );
675 
676  this->m_Log_OutputPort[0].invoke(
677  _id,
678  _logTime,
680  _logBuff
681  );
682  }
683 
684  // Emit the event on the text log port
685 #if FW_ENABLE_TEXT_LOGGING
686  if (this->m_LogText_OutputPort[0].isConnected()) {
687 #if FW_OBJECT_NAMES == 1
688  const char* _formatString =
689  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
690 #else
691  const char* _formatString =
692  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
693 #endif
694 
695  Fw::TextLogString _logString;
696  _logString.format(
697  _formatString,
698 #if FW_OBJECT_NAMES == 1
699  this->m_objName.toChar(),
700 #endif
701  "AllocationSoftFailure ",
702  port,
703  size
704  );
705 
706  this->m_LogText_OutputPort[0].invoke(
707  _id,
708  _logTime,
710  _logString
711  );
712  }
713 #endif
714  }
715 
718  I32 port,
719  U32 size
720  ) const
721  {
722  // Get the time
723  Fw::Time _logTime;
724  if (this->m_Time_OutputPort[0].isConnected()) {
725  this->m_Time_OutputPort[0].invoke(_logTime);
726  }
727 
728  FwEventIdType _id = static_cast<FwEventIdType>(0);
729 
731 
732  // Emit the event on the log port
733  if (this->m_Log_OutputPort[0].isConnected()) {
734  Fw::LogBuffer _logBuff;
736 
737 #if FW_AMPCS_COMPATIBLE
738  // Serialize the number of arguments
739  _status = _logBuff.serialize(static_cast<U8>(2 + 1));
740  FW_ASSERT(
741  _status == Fw::FW_SERIALIZE_OK,
742  static_cast<FwAssertArgType>(_status)
743  );
744 
745  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
746  _status = _logBuff.serialize(static_cast<U8>(4));
747  FW_ASSERT(
748  _status == Fw::FW_SERIALIZE_OK,
749  static_cast<FwAssertArgType>(_status)
750  );
751 
752  _status = _logBuff.serialize(static_cast<U32>(0));
753  FW_ASSERT(
754  _status == Fw::FW_SERIALIZE_OK,
755  static_cast<FwAssertArgType>(_status)
756  );
757 #endif
758 
759 #if FW_AMPCS_COMPATIBLE
760  // Serialize the argument size
761  _status = _logBuff.serialize(
762  static_cast<U8>(sizeof(I32))
763  );
764  FW_ASSERT(
765  _status == Fw::FW_SERIALIZE_OK,
766  static_cast<FwAssertArgType>(_status)
767  );
768 #endif
769  _status = _logBuff.serialize(port);
770  FW_ASSERT(
771  _status == Fw::FW_SERIALIZE_OK,
772  static_cast<FwAssertArgType>(_status)
773  );
774 
775 #if FW_AMPCS_COMPATIBLE
776  // Serialize the argument size
777  _status = _logBuff.serialize(
778  static_cast<U8>(sizeof(U32))
779  );
780  FW_ASSERT(
781  _status == Fw::FW_SERIALIZE_OK,
782  static_cast<FwAssertArgType>(_status)
783  );
784 #endif
785  _status = _logBuff.serialize(size);
786  FW_ASSERT(
787  _status == Fw::FW_SERIALIZE_OK,
788  static_cast<FwAssertArgType>(_status)
789  );
790 
791  this->m_Log_OutputPort[0].invoke(
792  _id,
793  _logTime,
795  _logBuff
796  );
797  }
798 
799  // Emit the event on the text log port
800 #if FW_ENABLE_TEXT_LOGGING
801  if (this->m_LogText_OutputPort[0].isConnected()) {
802 #if FW_OBJECT_NAMES == 1
803  const char* _formatString =
804  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
805 #else
806  const char* _formatString =
807  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu32 "";
808 #endif
809 
810  Fw::TextLogString _logString;
811  _logString.format(
812  _formatString,
813 #if FW_OBJECT_NAMES == 1
814  this->m_objName.toChar(),
815 #endif
816  "AllocationHardFailure ",
817  port,
818  size
819  );
820 
821  this->m_LogText_OutputPort[0].invoke(
822  _id,
823  _logTime,
825  _logString
826  );
827  }
828 #endif
829  }
830 
831  // ----------------------------------------------------------------------
832  // Time
833  // ----------------------------------------------------------------------
834 
837  {
838  if (this->m_Time_OutputPort[0].isConnected()) {
839  Fw::Time _time;
840  this->m_Time_OutputPort[0].invoke(_time);
841  return _time;
842  }
843  else {
844  return Fw::Time(TB_NONE, 0, 0);
845  }
846  }
847 
848  // ----------------------------------------------------------------------
849  // Calls for messages received on typed input ports
850  // ----------------------------------------------------------------------
851 
852  void BufferRepeaterComponentBase ::
853  m_p_portIn_in(
854  Fw::PassiveComponentBase* callComp,
855  FwIndexType portNum,
856  Fw::Buffer& fwBuffer
857  )
858  {
859  FW_ASSERT(callComp);
860  BufferRepeaterComponentBase* compPtr = static_cast<BufferRepeaterComponentBase*>(callComp);
861  compPtr->portIn_handlerBase(
862  portNum,
863  fwBuffer
864  );
865  }
866 
867 }
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
Definition: Time.hpp:9
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Fw::Buffer invoke(U32 size) const
Invoke a port interface.
bool isConnected_deallocate_OutputPort(FwIndexType portNum)
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
void portOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port portOut.
I32 FwEnumStoreType
Definition: FpConfig.h:64
PlatformIndexType FwIndexType
Definition: FpConfig.h:25
void init()
Object initializer.
Definition: ObjBase.cpp:26
bool isConnected_allocate_OutputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
BufferRepeaterComponentBase(const char *compName="")
Construct BufferRepeaterComponentBase object.
virtual void portIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port portIn.
void init()
Initialization function.
Definition: TimePortAc.cpp:128
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void init()
Initialization function.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void set_portOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to portOut[portNum].
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
bool isConnected_Time_OutputPort(FwIndexType portNum)
const char * toChar() const
Definition: ObjectName.hpp:50
No time base has been established.
Definition: FpConfig.h:70
bool isConnected_Log_OutputPort(FwIndexType portNum)
Fw::Buffer allocate_out(FwIndexType portNum, U32 size)
Invoke output port allocate.
A serious but recoverable event.
bool isConnected() const
Definition: PortBase.cpp:42
Fw::InputBufferSendPort * get_portIn_InputPort(FwIndexType portNum)
virtual ~BufferRepeaterComponentBase()
Destroy BufferRepeaterComponentBase object.
U32 FwEventIdType
Definition: FpConfig.h:103
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:55
void init()
Initialization function.
Definition: LogPortAc.cpp:151
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
void setPortNum(FwIndexType portNum)
void portIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port portIn.
bool isConnected_portOut_OutputPort(FwIndexType portNum)
void init()
Initialization function.
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Definition: LogPortAc.cpp:170
A fatal non-recoverable event.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:85
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
void init()
Initialization function.
void log_FATAL_AllocationHardFailure(I32 port, U32 size) const
void log_WARNING_HI_AllocationSoftFailure(I32 port, U32 size) const
Auto-generated base for BufferRepeater component.
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:148
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.