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 
7 #include "Fw/Types/Assert.hpp"
9 #if FW_ENABLE_TEXT_LOGGING
10 #include "Fw/Types/String.hpp"
11 #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_FwIndexType "]",
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_FwIndexType "]",
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_FwIndexType "]",
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_FwIndexType "]",
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_FwIndexType "]",
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_FwIndexType "]",
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_FwIndexType "]",
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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  (0 <= portNum) && (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  // Connection status queries for special output ports
387  // ----------------------------------------------------------------------
388 
391  {
392  FW_ASSERT(
393  (0 <= portNum) && (portNum < this->getNum_Log_OutputPorts()),
394  static_cast<FwAssertArgType>(portNum)
395  );
396 
397  return this->m_Log_OutputPort[portNum].isConnected();
398  }
399 
400 #if FW_ENABLE_TEXT_LOGGING == 1
401 
402  bool BufferRepeaterComponentBase ::
403  isConnected_LogText_OutputPort(FwIndexType portNum)
404  {
405  FW_ASSERT(
406  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
407  static_cast<FwAssertArgType>(portNum)
408  );
409 
410  return this->m_LogText_OutputPort[portNum].isConnected();
411  }
412 
413 #endif
414 
417  {
418  FW_ASSERT(
419  (0 <= portNum) && (portNum < this->getNum_Time_OutputPorts()),
420  static_cast<FwAssertArgType>(portNum)
421  );
422 
423  return this->m_Time_OutputPort[portNum].isConnected();
424  }
425 
426  // ----------------------------------------------------------------------
427  // Connection status queries for typed output ports
428  // ----------------------------------------------------------------------
429 
432  {
433  FW_ASSERT(
434  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
435  static_cast<FwAssertArgType>(portNum)
436  );
437 
438  return this->m_allocate_OutputPort[portNum].isConnected();
439  }
440 
443  {
444  FW_ASSERT(
445  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
446  static_cast<FwAssertArgType>(portNum)
447  );
448 
449  return this->m_deallocate_OutputPort[portNum].isConnected();
450  }
451 
454  {
455  FW_ASSERT(
456  (0 <= portNum) && (portNum < this->getNum_portOut_OutputPorts()),
457  static_cast<FwAssertArgType>(portNum)
458  );
459 
460  return this->m_portOut_OutputPort[portNum].isConnected();
461  }
462 
463  // ----------------------------------------------------------------------
464  // Port handler base-class functions for typed input ports
465  //
466  // Call these functions directly to bypass the corresponding ports
467  // ----------------------------------------------------------------------
468 
471  FwIndexType portNum,
472  Fw::Buffer& fwBuffer
473  )
474  {
475  // Make sure port number is valid
476  FW_ASSERT(
477  (0 <= portNum) && (portNum < this->getNum_portIn_InputPorts()),
478  static_cast<FwAssertArgType>(portNum)
479  );
480 
481  // Call handler function
482  this->portIn_handler(
483  portNum,
484  fwBuffer
485  );
486  }
487 
488  // ----------------------------------------------------------------------
489  // Invocation functions for typed output ports
490  // ----------------------------------------------------------------------
491 
494  FwIndexType portNum,
495  FwSizeType size
496  )
497  {
498  FW_ASSERT(
499  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
500  static_cast<FwAssertArgType>(portNum)
501  );
502 
503  FW_ASSERT(
504  this->m_allocate_OutputPort[portNum].isConnected(),
505  static_cast<FwAssertArgType>(portNum)
506  );
507  return this->m_allocate_OutputPort[portNum].invoke(
508  size
509  );
510  }
511 
514  FwIndexType portNum,
515  Fw::Buffer& fwBuffer
516  )
517  {
518  FW_ASSERT(
519  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
520  static_cast<FwAssertArgType>(portNum)
521  );
522 
523  FW_ASSERT(
524  this->m_deallocate_OutputPort[portNum].isConnected(),
525  static_cast<FwAssertArgType>(portNum)
526  );
527  this->m_deallocate_OutputPort[portNum].invoke(
528  fwBuffer
529  );
530  }
531 
534  FwIndexType portNum,
535  Fw::Buffer& fwBuffer
536  )
537  {
538  FW_ASSERT(
539  (0 <= portNum) && (portNum < this->getNum_portOut_OutputPorts()),
540  static_cast<FwAssertArgType>(portNum)
541  );
542 
543  FW_ASSERT(
544  this->m_portOut_OutputPort[portNum].isConnected(),
545  static_cast<FwAssertArgType>(portNum)
546  );
547  this->m_portOut_OutputPort[portNum].invoke(
548  fwBuffer
549  );
550  }
551 
552  // ----------------------------------------------------------------------
553  // Event logging functions
554  // ----------------------------------------------------------------------
555 
558  I32 port,
559  FwSizeType size
560  ) const
561  {
562  // Get the time
563  Fw::Time _logTime;
564  if (this->m_Time_OutputPort[0].isConnected()) {
565  this->m_Time_OutputPort[0].invoke(_logTime);
566  }
567 
568  FwEventIdType _id = static_cast<FwEventIdType>(0);
569 
571 
572  // Emit the event on the log port
573  if (this->m_Log_OutputPort[0].isConnected()) {
574  Fw::LogBuffer _logBuff;
576 
577 #if FW_AMPCS_COMPATIBLE
578  // Serialize the number of arguments
579  _status = _logBuff.serializeFrom(static_cast<U8>(2));
580  FW_ASSERT(
581  _status == Fw::FW_SERIALIZE_OK,
582  static_cast<FwAssertArgType>(_status)
583  );
584 #endif
585 
586 #if FW_AMPCS_COMPATIBLE
587  // Serialize the argument size
588  _status = _logBuff.serializeFrom(
589  static_cast<U8>(sizeof(I32))
590  );
591  FW_ASSERT(
592  _status == Fw::FW_SERIALIZE_OK,
593  static_cast<FwAssertArgType>(_status)
594  );
595 #endif
596  _status = _logBuff.serializeFrom(port);
597  FW_ASSERT(
598  _status == Fw::FW_SERIALIZE_OK,
599  static_cast<FwAssertArgType>(_status)
600  );
601 
602 #if FW_AMPCS_COMPATIBLE
603  // Serialize the argument size
604  _status = _logBuff.serializeFrom(
605  static_cast<U8>(sizeof(FwSizeType))
606  );
607  FW_ASSERT(
608  _status == Fw::FW_SERIALIZE_OK,
609  static_cast<FwAssertArgType>(_status)
610  );
611 #endif
612  _status = _logBuff.serializeFrom(size);
613  FW_ASSERT(
614  _status == Fw::FW_SERIALIZE_OK,
615  static_cast<FwAssertArgType>(_status)
616  );
617 
618  this->m_Log_OutputPort[0].invoke(
619  _id,
620  _logTime,
622  _logBuff
623  );
624  }
625 
626  // Emit the event on the text log port
627 #if FW_ENABLE_TEXT_LOGGING
628  if (this->m_LogText_OutputPort[0].isConnected()) {
629 #if FW_OBJECT_NAMES == 1
630  const char* _formatString =
631  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu64 "";
632 #else
633  const char* _formatString =
634  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu64 "";
635 #endif
636 
637  Fw::TextLogString _logString;
638  _logString.format(
639  _formatString,
640 #if FW_OBJECT_NAMES == 1
641  this->m_objName.toChar(),
642 #endif
643  "AllocationSoftFailure ",
644  port,
645  size
646  );
647 
648  this->m_LogText_OutputPort[0].invoke(
649  _id,
650  _logTime,
652  _logString
653  );
654  }
655 #endif
656  }
657 
660  I32 port,
661  FwSizeType size
662  ) const
663  {
664  // Get the time
665  Fw::Time _logTime;
666  if (this->m_Time_OutputPort[0].isConnected()) {
667  this->m_Time_OutputPort[0].invoke(_logTime);
668  }
669 
670  FwEventIdType _id = static_cast<FwEventIdType>(0);
671 
673 
674  // Emit the event on the log port
675  if (this->m_Log_OutputPort[0].isConnected()) {
676  Fw::LogBuffer _logBuff;
678 
679 #if FW_AMPCS_COMPATIBLE
680  // Serialize the number of arguments
681  _status = _logBuff.serializeFrom(static_cast<U8>(2 + 1));
682  FW_ASSERT(
683  _status == Fw::FW_SERIALIZE_OK,
684  static_cast<FwAssertArgType>(_status)
685  );
686 
687  // For FATAL, add stack size of 4 and a dummy entry. No support for stacks yet.
688  _status = _logBuff.serializeFrom(static_cast<U8>(4));
689  FW_ASSERT(
690  _status == Fw::FW_SERIALIZE_OK,
691  static_cast<FwAssertArgType>(_status)
692  );
693 
694  _status = _logBuff.serializeFrom(static_cast<U32>(0));
695  FW_ASSERT(
696  _status == Fw::FW_SERIALIZE_OK,
697  static_cast<FwAssertArgType>(_status)
698  );
699 #endif
700 
701 #if FW_AMPCS_COMPATIBLE
702  // Serialize the argument size
703  _status = _logBuff.serializeFrom(
704  static_cast<U8>(sizeof(I32))
705  );
706  FW_ASSERT(
707  _status == Fw::FW_SERIALIZE_OK,
708  static_cast<FwAssertArgType>(_status)
709  );
710 #endif
711  _status = _logBuff.serializeFrom(port);
712  FW_ASSERT(
713  _status == Fw::FW_SERIALIZE_OK,
714  static_cast<FwAssertArgType>(_status)
715  );
716 
717 #if FW_AMPCS_COMPATIBLE
718  // Serialize the argument size
719  _status = _logBuff.serializeFrom(
720  static_cast<U8>(sizeof(FwSizeType))
721  );
722  FW_ASSERT(
723  _status == Fw::FW_SERIALIZE_OK,
724  static_cast<FwAssertArgType>(_status)
725  );
726 #endif
727  _status = _logBuff.serializeFrom(size);
728  FW_ASSERT(
729  _status == Fw::FW_SERIALIZE_OK,
730  static_cast<FwAssertArgType>(_status)
731  );
732 
733  this->m_Log_OutputPort[0].invoke(
734  _id,
735  _logTime,
737  _logBuff
738  );
739  }
740 
741  // Emit the event on the text log port
742 #if FW_ENABLE_TEXT_LOGGING
743  if (this->m_LogText_OutputPort[0].isConnected()) {
744 #if FW_OBJECT_NAMES == 1
745  const char* _formatString =
746  "(%s) %s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu64 "";
747 #else
748  const char* _formatString =
749  "%s: Failed to allocate %" PRIi32 " byte buffer for port %" PRIu64 "";
750 #endif
751 
752  Fw::TextLogString _logString;
753  _logString.format(
754  _formatString,
755 #if FW_OBJECT_NAMES == 1
756  this->m_objName.toChar(),
757 #endif
758  "AllocationHardFailure ",
759  port,
760  size
761  );
762 
763  this->m_LogText_OutputPort[0].invoke(
764  _id,
765  _logTime,
767  _logString
768  );
769  }
770 #endif
771  }
772 
773  // ----------------------------------------------------------------------
774  // Time
775  // ----------------------------------------------------------------------
776 
778  getTime() const
779  {
780  if (this->m_Time_OutputPort[0].isConnected()) {
781  Fw::Time _time;
782  this->m_Time_OutputPort[0].invoke(_time);
783  return _time;
784  }
785  else {
786  return Fw::Time(TimeBase::TB_NONE, 0, 0);
787  }
788  }
789 
790  // ----------------------------------------------------------------------
791  // Calls for messages received on typed input ports
792  // ----------------------------------------------------------------------
793 
794  void BufferRepeaterComponentBase ::
795  m_p_portIn_in(
796  Fw::PassiveComponentBase* callComp,
797  FwIndexType portNum,
798  Fw::Buffer& fwBuffer
799  )
800  {
801  FW_ASSERT(callComp);
802  BufferRepeaterComponentBase* compPtr = static_cast<BufferRepeaterComponentBase*>(callComp);
803  compPtr->portIn_handlerBase(
804  portNum,
805  fwBuffer
806  );
807  }
808 
809 }
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
static constexpr FwIndexType getNum_portIn_InputPorts()
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
PlatformSizeType FwSizeType
I32 FwEnumStoreType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
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.
void log_WARNING_HI_AllocationSoftFailure(I32 port, FwSizeType size) const
No time base has been established (Required)
static constexpr FwIndexType getNum_portOut_OutputPorts()
void init()
Object initializer.
Definition: ObjBase.cpp:24
bool isConnected_allocate_OutputPort(FwIndexType portNum)
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_allocate_OutputPorts()
FwIdType FwEventIdType
The type of an event identifier.
BufferRepeaterComponentBase(const char *compName="")
Construct BufferRepeaterComponentBase object.
virtual void portIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port portIn.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:26
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].
static constexpr FwIndexType getNum_Time_OutputPorts()
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
bool isConnected_Time_OutputPort(FwIndexType portNum)
const char * toChar() const
Convert to a C-style char*.
Definition: ObjectName.hpp:50
static constexpr FwIndexType getNum_deallocate_OutputPorts()
bool isConnected_Log_OutputPort(FwIndexType portNum)
A serious but recoverable event.
bool isConnected() const
Definition: PortBase.cpp:38
Fw::InputBufferSendPort * get_portIn_InputPort(FwIndexType portNum)
virtual ~BufferRepeaterComponentBase()
Destroy BufferRepeaterComponentBase object.
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
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)
Fw::Buffer invoke(FwSizeType size) const
Invoke a port interface.
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
void log_FATAL_AllocationHardFailure(I32 port, FwSizeType size) const
PlatformIndexType FwIndexType
A fatal non-recoverable event.
static constexpr FwIndexType getNum_Log_OutputPorts()
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
void init()
Initialization function.
RateGroupDivider component implementation.
Auto-generated base for BufferRepeater component.
Implementation of malloc based allocator.
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Fw::Buffer allocate_out(FwIndexType portNum, FwSizeType size)
Invoke output port allocate.
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port deallocate.