F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
GenericHubComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title GenericHubComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for GenericHub 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 #if !FW_DIRECT_PORT_CALLS
27  // Connect input port bufferIn
28  for (
29  FwIndexType port = 0;
30  port < static_cast<FwIndexType>(this->getNum_bufferIn_InputPorts());
31  port++
32  ) {
33  this->m_bufferIn_InputPort[port].init();
34  this->m_bufferIn_InputPort[port].addCallComp(
35  this,
36  m_p_bufferIn_in
37  );
38  this->m_bufferIn_InputPort[port].setPortNum(port);
39 
40 #if FW_OBJECT_NAMES == 1
41  Fw::ObjectName portName;
42  portName.format(
43  "%s_bufferIn_InputPort[%" PRI_FwIndexType "]",
44  this->m_objName.toChar(),
45  port
46  );
47  this->m_bufferIn_InputPort[port].setObjName(portName.toChar());
48 #endif
49  }
50 #endif
51 
52 #if !FW_DIRECT_PORT_CALLS
53  // Connect input port bufferOutReturn
54  for (
55  FwIndexType port = 0;
56  port < static_cast<FwIndexType>(this->getNum_bufferOutReturn_InputPorts());
57  port++
58  ) {
59  this->m_bufferOutReturn_InputPort[port].init();
60  this->m_bufferOutReturn_InputPort[port].addCallComp(
61  this,
62  m_p_bufferOutReturn_in
63  );
64  this->m_bufferOutReturn_InputPort[port].setPortNum(port);
65 
66 #if FW_OBJECT_NAMES == 1
67  Fw::ObjectName portName;
68  portName.format(
69  "%s_bufferOutReturn_InputPort[%" PRI_FwIndexType "]",
70  this->m_objName.toChar(),
71  port
72  );
73  this->m_bufferOutReturn_InputPort[port].setObjName(portName.toChar());
74 #endif
75  }
76 #endif
77 
78 #if !FW_DIRECT_PORT_CALLS
79  // Connect input port cmdDispIn
80  for (
81  FwIndexType port = 0;
82  port < static_cast<FwIndexType>(this->getNum_cmdDispIn_InputPorts());
83  port++
84  ) {
85  this->m_cmdDispIn_InputPort[port].init();
86  this->m_cmdDispIn_InputPort[port].addCallComp(
87  this,
88  m_p_cmdDispIn_in
89  );
90  this->m_cmdDispIn_InputPort[port].setPortNum(port);
91 
92 #if FW_OBJECT_NAMES == 1
93  Fw::ObjectName portName;
94  portName.format(
95  "%s_cmdDispIn_InputPort[%" PRI_FwIndexType "]",
96  this->m_objName.toChar(),
97  port
98  );
99  this->m_cmdDispIn_InputPort[port].setObjName(portName.toChar());
100 #endif
101  }
102 #endif
103 
104 #if !FW_DIRECT_PORT_CALLS
105  // Connect input port cmdRespIn
106  for (
107  FwIndexType port = 0;
108  port < static_cast<FwIndexType>(this->getNum_cmdRespIn_InputPorts());
109  port++
110  ) {
111  this->m_cmdRespIn_InputPort[port].init();
112  this->m_cmdRespIn_InputPort[port].addCallComp(
113  this,
114  m_p_cmdRespIn_in
115  );
116  this->m_cmdRespIn_InputPort[port].setPortNum(port);
117 
118 #if FW_OBJECT_NAMES == 1
119  Fw::ObjectName portName;
120  portName.format(
121  "%s_cmdRespIn_InputPort[%" PRI_FwIndexType "]",
122  this->m_objName.toChar(),
123  port
124  );
125  this->m_cmdRespIn_InputPort[port].setObjName(portName.toChar());
126 #endif
127  }
128 #endif
129 
130 #if !FW_DIRECT_PORT_CALLS
131  // Connect input port eventIn
132  for (
133  FwIndexType port = 0;
134  port < static_cast<FwIndexType>(this->getNum_eventIn_InputPorts());
135  port++
136  ) {
137  this->m_eventIn_InputPort[port].init();
138  this->m_eventIn_InputPort[port].addCallComp(
139  this,
140  m_p_eventIn_in
141  );
142  this->m_eventIn_InputPort[port].setPortNum(port);
143 
144 #if FW_OBJECT_NAMES == 1
145  Fw::ObjectName portName;
146  portName.format(
147  "%s_eventIn_InputPort[%" PRI_FwIndexType "]",
148  this->m_objName.toChar(),
149  port
150  );
151  this->m_eventIn_InputPort[port].setObjName(portName.toChar());
152 #endif
153  }
154 #endif
155 
156 #if !FW_DIRECT_PORT_CALLS
157  // Connect input port fromBufferDriver
158  for (
159  FwIndexType port = 0;
160  port < static_cast<FwIndexType>(this->getNum_fromBufferDriver_InputPorts());
161  port++
162  ) {
163  this->m_fromBufferDriver_InputPort[port].init();
164  this->m_fromBufferDriver_InputPort[port].addCallComp(
165  this,
166  m_p_fromBufferDriver_in
167  );
168  this->m_fromBufferDriver_InputPort[port].setPortNum(port);
169 
170 #if FW_OBJECT_NAMES == 1
171  Fw::ObjectName portName;
172  portName.format(
173  "%s_fromBufferDriver_InputPort[%" PRI_FwIndexType "]",
174  this->m_objName.toChar(),
175  port
176  );
177  this->m_fromBufferDriver_InputPort[port].setObjName(portName.toChar());
178 #endif
179  }
180 #endif
181 
182 #if !FW_DIRECT_PORT_CALLS
183  // Connect input port tlmIn
184  for (
185  FwIndexType port = 0;
186  port < static_cast<FwIndexType>(this->getNum_tlmIn_InputPorts());
187  port++
188  ) {
189  this->m_tlmIn_InputPort[port].init();
190  this->m_tlmIn_InputPort[port].addCallComp(
191  this,
192  m_p_tlmIn_in
193  );
194  this->m_tlmIn_InputPort[port].setPortNum(port);
195 
196 #if FW_OBJECT_NAMES == 1
197  Fw::ObjectName portName;
198  portName.format(
199  "%s_tlmIn_InputPort[%" PRI_FwIndexType "]",
200  this->m_objName.toChar(),
201  port
202  );
203  this->m_tlmIn_InputPort[port].setObjName(portName.toChar());
204 #endif
205  }
206 #endif
207 
208 #if !FW_DIRECT_PORT_CALLS
209  // Connect input port toBufferDriverReturn
210  for (
211  FwIndexType port = 0;
212  port < static_cast<FwIndexType>(this->getNum_toBufferDriverReturn_InputPorts());
213  port++
214  ) {
215  this->m_toBufferDriverReturn_InputPort[port].init();
216  this->m_toBufferDriverReturn_InputPort[port].addCallComp(
217  this,
218  m_p_toBufferDriverReturn_in
219  );
220  this->m_toBufferDriverReturn_InputPort[port].setPortNum(port);
221 
222 #if FW_OBJECT_NAMES == 1
223  Fw::ObjectName portName;
224  portName.format(
225  "%s_toBufferDriverReturn_InputPort[%" PRI_FwIndexType "]",
226  this->m_objName.toChar(),
227  port
228  );
229  this->m_toBufferDriverReturn_InputPort[port].setObjName(portName.toChar());
230 #endif
231  }
232 #endif
233 
234 #if !FW_DIRECT_PORT_CALLS
235  // Connect input port serialIn
236  for (
237  FwIndexType port = 0;
238  port < static_cast<FwIndexType>(this->getNum_serialIn_InputPorts());
239  port++
240  ) {
241  this->m_serialIn_InputPort[port].init();
242  this->m_serialIn_InputPort[port].addCallComp(
243  this,
244  m_p_serialIn_in
245  );
246  this->m_serialIn_InputPort[port].setPortNum(port);
247 
248 #if FW_OBJECT_NAMES == 1
249  Fw::ObjectName portName;
250  portName.format(
251  "%s_serialIn_InputPort[%" PRI_FwIndexType "]",
252  this->m_objName.toChar(),
253  port
254  );
255  this->m_serialIn_InputPort[port].setObjName(portName.toChar());
256 #endif
257  }
258 #endif
259 
260 #if !FW_DIRECT_PORT_CALLS
261  // Connect output port allocate
262  for (
263  FwIndexType port = 0;
264  port < static_cast<FwIndexType>(this->getNum_allocate_OutputPorts());
265  port++
266  ) {
267  this->m_allocate_OutputPort[port].init();
268 
269 #if FW_OBJECT_NAMES == 1
270  Fw::ObjectName portName;
271  portName.format(
272  "%s_allocate_OutputPort[%" PRI_FwIndexType "]",
273  this->m_objName.toChar(),
274  port
275  );
276  this->m_allocate_OutputPort[port].setObjName(portName.toChar());
277 #endif
278  }
279 #endif
280 
281 #if !FW_DIRECT_PORT_CALLS
282  // Connect output port bufferInReturn
283  for (
284  FwIndexType port = 0;
285  port < static_cast<FwIndexType>(this->getNum_bufferInReturn_OutputPorts());
286  port++
287  ) {
288  this->m_bufferInReturn_OutputPort[port].init();
289 
290 #if FW_OBJECT_NAMES == 1
291  Fw::ObjectName portName;
292  portName.format(
293  "%s_bufferInReturn_OutputPort[%" PRI_FwIndexType "]",
294  this->m_objName.toChar(),
295  port
296  );
297  this->m_bufferInReturn_OutputPort[port].setObjName(portName.toChar());
298 #endif
299  }
300 #endif
301 
302 #if !FW_DIRECT_PORT_CALLS
303  // Connect output port bufferOut
304  for (
305  FwIndexType port = 0;
306  port < static_cast<FwIndexType>(this->getNum_bufferOut_OutputPorts());
307  port++
308  ) {
309  this->m_bufferOut_OutputPort[port].init();
310 
311 #if FW_OBJECT_NAMES == 1
312  Fw::ObjectName portName;
313  portName.format(
314  "%s_bufferOut_OutputPort[%" PRI_FwIndexType "]",
315  this->m_objName.toChar(),
316  port
317  );
318  this->m_bufferOut_OutputPort[port].setObjName(portName.toChar());
319 #endif
320  }
321 #endif
322 
323 #if !FW_DIRECT_PORT_CALLS
324  // Connect output port cmdDispOut
325  for (
326  FwIndexType port = 0;
327  port < static_cast<FwIndexType>(this->getNum_cmdDispOut_OutputPorts());
328  port++
329  ) {
330  this->m_cmdDispOut_OutputPort[port].init();
331 
332 #if FW_OBJECT_NAMES == 1
333  Fw::ObjectName portName;
334  portName.format(
335  "%s_cmdDispOut_OutputPort[%" PRI_FwIndexType "]",
336  this->m_objName.toChar(),
337  port
338  );
339  this->m_cmdDispOut_OutputPort[port].setObjName(portName.toChar());
340 #endif
341  }
342 #endif
343 
344 #if !FW_DIRECT_PORT_CALLS
345  // Connect output port cmdRespOut
346  for (
347  FwIndexType port = 0;
348  port < static_cast<FwIndexType>(this->getNum_cmdRespOut_OutputPorts());
349  port++
350  ) {
351  this->m_cmdRespOut_OutputPort[port].init();
352 
353 #if FW_OBJECT_NAMES == 1
354  Fw::ObjectName portName;
355  portName.format(
356  "%s_cmdRespOut_OutputPort[%" PRI_FwIndexType "]",
357  this->m_objName.toChar(),
358  port
359  );
360  this->m_cmdRespOut_OutputPort[port].setObjName(portName.toChar());
361 #endif
362  }
363 #endif
364 
365 #if !FW_DIRECT_PORT_CALLS
366  // Connect output port deallocate
367  for (
368  FwIndexType port = 0;
369  port < static_cast<FwIndexType>(this->getNum_deallocate_OutputPorts());
370  port++
371  ) {
372  this->m_deallocate_OutputPort[port].init();
373 
374 #if FW_OBJECT_NAMES == 1
375  Fw::ObjectName portName;
376  portName.format(
377  "%s_deallocate_OutputPort[%" PRI_FwIndexType "]",
378  this->m_objName.toChar(),
379  port
380  );
381  this->m_deallocate_OutputPort[port].setObjName(portName.toChar());
382 #endif
383  }
384 #endif
385 
386 #if !FW_DIRECT_PORT_CALLS
387  // Connect output port eventOut
388  for (
389  FwIndexType port = 0;
390  port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
391  port++
392  ) {
393  this->m_eventOut_OutputPort[port].init();
394 
395 #if FW_OBJECT_NAMES == 1
396  Fw::ObjectName portName;
397  portName.format(
398  "%s_eventOut_OutputPort[%" PRI_FwIndexType "]",
399  this->m_objName.toChar(),
400  port
401  );
402  this->m_eventOut_OutputPort[port].setObjName(portName.toChar());
403 #endif
404  }
405 #endif
406 
407 #if !FW_DIRECT_PORT_CALLS
408  // Connect output port fromBufferDriverReturn
409  for (
410  FwIndexType port = 0;
411  port < static_cast<FwIndexType>(this->getNum_fromBufferDriverReturn_OutputPorts());
412  port++
413  ) {
414  this->m_fromBufferDriverReturn_OutputPort[port].init();
415 
416 #if FW_OBJECT_NAMES == 1
417  Fw::ObjectName portName;
418  portName.format(
419  "%s_fromBufferDriverReturn_OutputPort[%" PRI_FwIndexType "]",
420  this->m_objName.toChar(),
421  port
422  );
423  this->m_fromBufferDriverReturn_OutputPort[port].setObjName(portName.toChar());
424 #endif
425  }
426 #endif
427 
428 #if !FW_DIRECT_PORT_CALLS
429  // Connect output port tlmOut
430  for (
431  FwIndexType port = 0;
432  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
433  port++
434  ) {
435  this->m_tlmOut_OutputPort[port].init();
436 
437 #if FW_OBJECT_NAMES == 1
438  Fw::ObjectName portName;
439  portName.format(
440  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
441  this->m_objName.toChar(),
442  port
443  );
444  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
445 #endif
446  }
447 #endif
448 
449 #if !FW_DIRECT_PORT_CALLS
450  // Connect output port toBufferDriver
451  for (
452  FwIndexType port = 0;
453  port < static_cast<FwIndexType>(this->getNum_toBufferDriver_OutputPorts());
454  port++
455  ) {
456  this->m_toBufferDriver_OutputPort[port].init();
457 
458 #if FW_OBJECT_NAMES == 1
459  Fw::ObjectName portName;
460  portName.format(
461  "%s_toBufferDriver_OutputPort[%" PRI_FwIndexType "]",
462  this->m_objName.toChar(),
463  port
464  );
465  this->m_toBufferDriver_OutputPort[port].setObjName(portName.toChar());
466 #endif
467  }
468 #endif
469 
470 #if !FW_DIRECT_PORT_CALLS
471  // Connect output port serialOut
472  for (
473  FwIndexType port = 0;
474  port < static_cast<FwIndexType>(this->getNum_serialOut_OutputPorts());
475  port++
476  ) {
477  this->m_serialOut_OutputPort[port].init();
478 
479 #if FW_OBJECT_NAMES == 1
480  Fw::ObjectName portName;
481  portName.format(
482  "%s_serialOut_OutputPort[%" PRI_FwIndexType "]",
483  this->m_objName.toChar(),
484  port
485  );
486  this->m_serialOut_OutputPort[port].setObjName(portName.toChar());
487 #endif
488  }
489 #endif
490  }
491 
492 #if !FW_DIRECT_PORT_CALLS
493 
494  // ----------------------------------------------------------------------
495  // Getters for typed input ports
496  // ----------------------------------------------------------------------
497 
500  {
501  FW_ASSERT(
502  (0 <= portNum) && (portNum < this->getNum_bufferIn_InputPorts()),
503  static_cast<FwAssertArgType>(portNum)
504  );
505 
506  return &this->m_bufferIn_InputPort[portNum];
507  }
508 
511  {
512  FW_ASSERT(
513  (0 <= portNum) && (portNum < this->getNum_bufferOutReturn_InputPorts()),
514  static_cast<FwAssertArgType>(portNum)
515  );
516 
517  return &this->m_bufferOutReturn_InputPort[portNum];
518  }
519 
522  {
523  FW_ASSERT(
524  (0 <= portNum) && (portNum < this->getNum_cmdDispIn_InputPorts()),
525  static_cast<FwAssertArgType>(portNum)
526  );
527 
528  return &this->m_cmdDispIn_InputPort[portNum];
529  }
530 
533  {
534  FW_ASSERT(
535  (0 <= portNum) && (portNum < this->getNum_cmdRespIn_InputPorts()),
536  static_cast<FwAssertArgType>(portNum)
537  );
538 
539  return &this->m_cmdRespIn_InputPort[portNum];
540  }
541 
544  {
545  FW_ASSERT(
546  (0 <= portNum) && (portNum < this->getNum_eventIn_InputPorts()),
547  static_cast<FwAssertArgType>(portNum)
548  );
549 
550  return &this->m_eventIn_InputPort[portNum];
551  }
552 
555  {
556  FW_ASSERT(
557  (0 <= portNum) && (portNum < this->getNum_fromBufferDriver_InputPorts()),
558  static_cast<FwAssertArgType>(portNum)
559  );
560 
561  return &this->m_fromBufferDriver_InputPort[portNum];
562  }
563 
566  {
567  FW_ASSERT(
568  (0 <= portNum) && (portNum < this->getNum_tlmIn_InputPorts()),
569  static_cast<FwAssertArgType>(portNum)
570  );
571 
572  return &this->m_tlmIn_InputPort[portNum];
573  }
574 
577  {
578  FW_ASSERT(
579  (0 <= portNum) && (portNum < this->getNum_toBufferDriverReturn_InputPorts()),
580  static_cast<FwAssertArgType>(portNum)
581  );
582 
583  return &this->m_toBufferDriverReturn_InputPort[portNum];
584  }
585 
586 #endif
587 
588 #if !FW_DIRECT_PORT_CALLS
589 
590  // ----------------------------------------------------------------------
591  // Getters for serial input ports
592  // ----------------------------------------------------------------------
593 
594  Fw::InputSerializePort* GenericHubComponentBase ::
596  {
597  FW_ASSERT(
598  (0 <= portNum) && (portNum < this->getNum_serialIn_InputPorts()),
599  static_cast<FwAssertArgType>(portNum)
600  );
601 
602  return &this->m_serialIn_InputPort[portNum];
603  }
604 
605 #endif
606 
607 #if !FW_DIRECT_PORT_CALLS
608 
609  // ----------------------------------------------------------------------
610  // Connect typed input ports to typed output ports
611  // ----------------------------------------------------------------------
612 
615  FwIndexType portNum,
617  )
618  {
619  FW_ASSERT(
620  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
621  static_cast<FwAssertArgType>(portNum)
622  );
623 
624  this->m_allocate_OutputPort[portNum].addCallPort(port);
625  }
626 
629  FwIndexType portNum,
631  )
632  {
633  FW_ASSERT(
634  (0 <= portNum) && (portNum < this->getNum_bufferInReturn_OutputPorts()),
635  static_cast<FwAssertArgType>(portNum)
636  );
637 
638  this->m_bufferInReturn_OutputPort[portNum].addCallPort(port);
639  }
640 
643  FwIndexType portNum,
645  )
646  {
647  FW_ASSERT(
648  (0 <= portNum) && (portNum < this->getNum_bufferOut_OutputPorts()),
649  static_cast<FwAssertArgType>(portNum)
650  );
651 
652  this->m_bufferOut_OutputPort[portNum].addCallPort(port);
653  }
654 
657  FwIndexType portNum,
658  Fw::InputComPort* port
659  )
660  {
661  FW_ASSERT(
662  (0 <= portNum) && (portNum < this->getNum_cmdDispOut_OutputPorts()),
663  static_cast<FwAssertArgType>(portNum)
664  );
665 
666  this->m_cmdDispOut_OutputPort[portNum].addCallPort(port);
667  }
668 
671  FwIndexType portNum,
673  )
674  {
675  FW_ASSERT(
676  (0 <= portNum) && (portNum < this->getNum_cmdRespOut_OutputPorts()),
677  static_cast<FwAssertArgType>(portNum)
678  );
679 
680  this->m_cmdRespOut_OutputPort[portNum].addCallPort(port);
681  }
682 
685  FwIndexType portNum,
687  )
688  {
689  FW_ASSERT(
690  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
691  static_cast<FwAssertArgType>(portNum)
692  );
693 
694  this->m_deallocate_OutputPort[portNum].addCallPort(port);
695  }
696 
699  FwIndexType portNum,
700  Fw::InputLogPort* port
701  )
702  {
703  FW_ASSERT(
704  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
705  static_cast<FwAssertArgType>(portNum)
706  );
707 
708  this->m_eventOut_OutputPort[portNum].addCallPort(port);
709  }
710 
713  FwIndexType portNum,
715  )
716  {
717  FW_ASSERT(
718  (0 <= portNum) && (portNum < this->getNum_fromBufferDriverReturn_OutputPorts()),
719  static_cast<FwAssertArgType>(portNum)
720  );
721 
722  this->m_fromBufferDriverReturn_OutputPort[portNum].addCallPort(port);
723  }
724 
727  FwIndexType portNum,
728  Fw::InputTlmPort* port
729  )
730  {
731  FW_ASSERT(
732  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
733  static_cast<FwAssertArgType>(portNum)
734  );
735 
736  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
737  }
738 
741  FwIndexType portNum,
743  )
744  {
745  FW_ASSERT(
746  (0 <= portNum) && (portNum < this->getNum_toBufferDriver_OutputPorts()),
747  static_cast<FwAssertArgType>(portNum)
748  );
749 
750  this->m_toBufferDriver_OutputPort[portNum].addCallPort(port);
751  }
752 
753 #endif
754 
755 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
756 
757  // ----------------------------------------------------------------------
758  // Connect serial input ports to typed output ports
759  // ----------------------------------------------------------------------
760 
763  FwIndexType portNum,
764  Fw::InputSerializePort* port
765  )
766  {
767  FW_ASSERT(
768  (0 <= portNum) && (portNum < this->getNum_bufferInReturn_OutputPorts()),
769  static_cast<FwAssertArgType>(portNum)
770  );
771 
772  this->m_bufferInReturn_OutputPort[portNum].registerSerialPort(port);
773  }
774 
777  FwIndexType portNum,
778  Fw::InputSerializePort* port
779  )
780  {
781  FW_ASSERT(
782  (0 <= portNum) && (portNum < this->getNum_bufferOut_OutputPorts()),
783  static_cast<FwAssertArgType>(portNum)
784  );
785 
786  this->m_bufferOut_OutputPort[portNum].registerSerialPort(port);
787  }
788 
791  FwIndexType portNum,
792  Fw::InputSerializePort* port
793  )
794  {
795  FW_ASSERT(
796  (0 <= portNum) && (portNum < this->getNum_cmdDispOut_OutputPorts()),
797  static_cast<FwAssertArgType>(portNum)
798  );
799 
800  this->m_cmdDispOut_OutputPort[portNum].registerSerialPort(port);
801  }
802 
805  FwIndexType portNum,
806  Fw::InputSerializePort* port
807  )
808  {
809  FW_ASSERT(
810  (0 <= portNum) && (portNum < this->getNum_cmdRespOut_OutputPorts()),
811  static_cast<FwAssertArgType>(portNum)
812  );
813 
814  this->m_cmdRespOut_OutputPort[portNum].registerSerialPort(port);
815  }
816 
819  FwIndexType portNum,
820  Fw::InputSerializePort* port
821  )
822  {
823  FW_ASSERT(
824  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
825  static_cast<FwAssertArgType>(portNum)
826  );
827 
828  this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
829  }
830 
833  FwIndexType portNum,
834  Fw::InputSerializePort* port
835  )
836  {
837  FW_ASSERT(
838  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
839  static_cast<FwAssertArgType>(portNum)
840  );
841 
842  this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
843  }
844 
847  FwIndexType portNum,
848  Fw::InputSerializePort* port
849  )
850  {
851  FW_ASSERT(
852  (0 <= portNum) && (portNum < this->getNum_fromBufferDriverReturn_OutputPorts()),
853  static_cast<FwAssertArgType>(portNum)
854  );
855 
856  this->m_fromBufferDriverReturn_OutputPort[portNum].registerSerialPort(port);
857  }
858 
861  FwIndexType portNum,
862  Fw::InputSerializePort* port
863  )
864  {
865  FW_ASSERT(
866  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
867  static_cast<FwAssertArgType>(portNum)
868  );
869 
870  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
871  }
872 
875  FwIndexType portNum,
876  Fw::InputSerializePort* port
877  )
878  {
879  FW_ASSERT(
880  (0 <= portNum) && (portNum < this->getNum_toBufferDriver_OutputPorts()),
881  static_cast<FwAssertArgType>(portNum)
882  );
883 
884  this->m_toBufferDriver_OutputPort[portNum].registerSerialPort(port);
885  }
886 
887 #endif
888 
889 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
890 
891  // ----------------------------------------------------------------------
892  // Connect typed and serial input ports to serial output ports
893  // ----------------------------------------------------------------------
894 
895  void GenericHubComponentBase ::
896  set_serialOut_OutputPort(
897  FwIndexType portNum,
898  Fw::InputPortBase* port
899  )
900  {
901  FW_ASSERT(
902  (0 <= portNum) && (portNum < this->getNum_serialOut_OutputPorts()),
903  static_cast<FwAssertArgType>(portNum)
904  );
905 
906  this->m_serialOut_OutputPort[portNum].registerSerialPort(port);
907  }
908 
909 #endif
910 
911  // ----------------------------------------------------------------------
912  // Component construction and destruction
913  // ----------------------------------------------------------------------
914 
916  GenericHubComponentBase(const char* compName) :
917  Fw::PassiveComponentBase(compName)
918  {
919 
920  }
921 
924  {
925 
926  }
927 
928 #if !FW_DIRECT_PORT_CALLS
929 
930  // ----------------------------------------------------------------------
931  // Connection status queries for typed output ports
932  // ----------------------------------------------------------------------
933 
936  {
937  FW_ASSERT(
938  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
939  static_cast<FwAssertArgType>(portNum)
940  );
941 
942  return this->m_allocate_OutputPort[portNum].isConnected();
943  }
944 
947  {
948  FW_ASSERT(
949  (0 <= portNum) && (portNum < this->getNum_bufferInReturn_OutputPorts()),
950  static_cast<FwAssertArgType>(portNum)
951  );
952 
953  return this->m_bufferInReturn_OutputPort[portNum].isConnected();
954  }
955 
958  {
959  FW_ASSERT(
960  (0 <= portNum) && (portNum < this->getNum_bufferOut_OutputPorts()),
961  static_cast<FwAssertArgType>(portNum)
962  );
963 
964  return this->m_bufferOut_OutputPort[portNum].isConnected();
965  }
966 
969  {
970  FW_ASSERT(
971  (0 <= portNum) && (portNum < this->getNum_cmdDispOut_OutputPorts()),
972  static_cast<FwAssertArgType>(portNum)
973  );
974 
975  return this->m_cmdDispOut_OutputPort[portNum].isConnected();
976  }
977 
980  {
981  FW_ASSERT(
982  (0 <= portNum) && (portNum < this->getNum_cmdRespOut_OutputPorts()),
983  static_cast<FwAssertArgType>(portNum)
984  );
985 
986  return this->m_cmdRespOut_OutputPort[portNum].isConnected();
987  }
988 
991  {
992  FW_ASSERT(
993  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
994  static_cast<FwAssertArgType>(portNum)
995  );
996 
997  return this->m_deallocate_OutputPort[portNum].isConnected();
998  }
999 
1002  {
1003  FW_ASSERT(
1004  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
1005  static_cast<FwAssertArgType>(portNum)
1006  );
1007 
1008  return this->m_eventOut_OutputPort[portNum].isConnected();
1009  }
1010 
1013  {
1014  FW_ASSERT(
1015  (0 <= portNum) && (portNum < this->getNum_fromBufferDriverReturn_OutputPorts()),
1016  static_cast<FwAssertArgType>(portNum)
1017  );
1018 
1019  return this->m_fromBufferDriverReturn_OutputPort[portNum].isConnected();
1020  }
1021 
1024  {
1025  FW_ASSERT(
1026  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1027  static_cast<FwAssertArgType>(portNum)
1028  );
1029 
1030  return this->m_tlmOut_OutputPort[portNum].isConnected();
1031  }
1032 
1035  {
1036  FW_ASSERT(
1037  (0 <= portNum) && (portNum < this->getNum_toBufferDriver_OutputPorts()),
1038  static_cast<FwAssertArgType>(portNum)
1039  );
1040 
1041  return this->m_toBufferDriver_OutputPort[portNum].isConnected();
1042  }
1043 
1044 #endif
1045 
1046 #if !FW_DIRECT_PORT_CALLS
1047 
1048  // ----------------------------------------------------------------------
1049  // Connection status queries for serial output ports
1050  // ----------------------------------------------------------------------
1051 
1054  {
1055  FW_ASSERT(
1056  (0 <= portNum) && (portNum < this->getNum_serialOut_OutputPorts()),
1057  static_cast<FwAssertArgType>(portNum)
1058  );
1059 
1060  return this->m_serialOut_OutputPort[portNum].isConnected();
1061  }
1062 
1063 #endif
1064 
1065  // ----------------------------------------------------------------------
1066  // Port handler base-class functions for typed input ports
1067  //
1068  // Call these functions directly to bypass the corresponding ports
1069  // ----------------------------------------------------------------------
1070 
1073  FwIndexType portNum,
1074  Fw::Buffer& fwBuffer
1075  )
1076  {
1077  // Make sure port number is valid
1078  FW_ASSERT(
1079  (0 <= portNum) && (portNum < this->getNum_bufferIn_InputPorts()),
1080  static_cast<FwAssertArgType>(portNum)
1081  );
1082 
1083  // Call handler function
1084  this->bufferIn_handler(
1085  portNum,
1086  fwBuffer
1087  );
1088  }
1089 
1092  FwIndexType portNum,
1093  Fw::Buffer& fwBuffer
1094  )
1095  {
1096  // Make sure port number is valid
1097  FW_ASSERT(
1098  (0 <= portNum) && (portNum < this->getNum_bufferOutReturn_InputPorts()),
1099  static_cast<FwAssertArgType>(portNum)
1100  );
1101 
1102  // Call handler function
1104  portNum,
1105  fwBuffer
1106  );
1107  }
1108 
1111  FwIndexType portNum,
1112  Fw::ComBuffer& data,
1113  U32 context
1114  )
1115  {
1116  // Make sure port number is valid
1117  FW_ASSERT(
1118  (0 <= portNum) && (portNum < this->getNum_cmdDispIn_InputPorts()),
1119  static_cast<FwAssertArgType>(portNum)
1120  );
1121 
1122  // Call handler function
1123  this->cmdDispIn_handler(
1124  portNum,
1125  data,
1126  context
1127  );
1128  }
1129 
1132  FwIndexType portNum,
1133  FwOpcodeType opCode,
1134  U32 cmdSeq,
1135  const Fw::CmdResponse& response
1136  )
1137  {
1138  // Make sure port number is valid
1139  FW_ASSERT(
1140  (0 <= portNum) && (portNum < this->getNum_cmdRespIn_InputPorts()),
1141  static_cast<FwAssertArgType>(portNum)
1142  );
1143 
1144  // Call handler function
1145  this->cmdRespIn_handler(
1146  portNum,
1147  opCode,
1148  cmdSeq,
1149  response
1150  );
1151  }
1152 
1155  FwIndexType portNum,
1156  FwEventIdType id,
1157  Fw::Time& timeTag,
1158  const Fw::LogSeverity& severity,
1159  Fw::LogBuffer& args
1160  )
1161  {
1162  // Make sure port number is valid
1163  FW_ASSERT(
1164  (0 <= portNum) && (portNum < this->getNum_eventIn_InputPorts()),
1165  static_cast<FwAssertArgType>(portNum)
1166  );
1167 
1168  // Call handler function
1169  this->eventIn_handler(
1170  portNum,
1171  id,
1172  timeTag,
1173  severity,
1174  args
1175  );
1176  }
1177 
1180  FwIndexType portNum,
1181  Fw::Buffer& fwBuffer
1182  )
1183  {
1184  // Make sure port number is valid
1185  FW_ASSERT(
1186  (0 <= portNum) && (portNum < this->getNum_fromBufferDriver_InputPorts()),
1187  static_cast<FwAssertArgType>(portNum)
1188  );
1189 
1190  // Call handler function
1192  portNum,
1193  fwBuffer
1194  );
1195  }
1196 
1199  FwIndexType portNum,
1200  FwChanIdType id,
1201  Fw::Time& timeTag,
1202  Fw::TlmBuffer& val
1203  )
1204  {
1205  // Make sure port number is valid
1206  FW_ASSERT(
1207  (0 <= portNum) && (portNum < this->getNum_tlmIn_InputPorts()),
1208  static_cast<FwAssertArgType>(portNum)
1209  );
1210 
1211  // Call handler function
1212  this->tlmIn_handler(
1213  portNum,
1214  id,
1215  timeTag,
1216  val
1217  );
1218  }
1219 
1222  FwIndexType portNum,
1223  Fw::Buffer& fwBuffer
1224  )
1225  {
1226  // Make sure port number is valid
1227  FW_ASSERT(
1228  (0 <= portNum) && (portNum < this->getNum_toBufferDriverReturn_InputPorts()),
1229  static_cast<FwAssertArgType>(portNum)
1230  );
1231 
1232  // Call handler function
1234  portNum,
1235  fwBuffer
1236  );
1237  }
1238 
1239  // ----------------------------------------------------------------------
1240  // Port handler base-class functions for serial input ports
1241  //
1242  // Call these functions directly to bypass the corresponding ports
1243  // ----------------------------------------------------------------------
1244 
1247  FwIndexType portNum,
1248  Fw::LinearBufferBase& buffer
1249  )
1250  {
1251  // Make sure port number is valid
1252  FW_ASSERT(
1253  (0 <= portNum) && (portNum < this->getNum_serialIn_InputPorts()),
1254  static_cast<FwAssertArgType>(portNum)
1255  );
1256 
1257  // Call handler function
1258  this->serialIn_handler(
1259  portNum,
1260  buffer
1261  );
1262  }
1263 
1264 #if !FW_DIRECT_PORT_CALLS
1265 
1266  // ----------------------------------------------------------------------
1267  // Invocation functions for typed output ports
1268  // ----------------------------------------------------------------------
1269 
1272  FwIndexType portNum,
1273  FwSizeType size
1274  ) const
1275  {
1276  FW_ASSERT(
1277  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
1278  static_cast<FwAssertArgType>(portNum)
1279  );
1280 
1281  FW_ASSERT(
1282  this->m_allocate_OutputPort[portNum].isConnected(),
1283  static_cast<FwAssertArgType>(portNum)
1284  );
1285  return this->m_allocate_OutputPort[portNum].invoke(
1286  size
1287  );
1288  }
1289 
1292  FwIndexType portNum,
1293  Fw::Buffer& fwBuffer
1294  ) const
1295  {
1296  FW_ASSERT(
1297  (0 <= portNum) && (portNum < this->getNum_bufferInReturn_OutputPorts()),
1298  static_cast<FwAssertArgType>(portNum)
1299  );
1300 
1301  FW_ASSERT(
1302  this->m_bufferInReturn_OutputPort[portNum].isConnected(),
1303  static_cast<FwAssertArgType>(portNum)
1304  );
1305  this->m_bufferInReturn_OutputPort[portNum].invoke(
1306  fwBuffer
1307  );
1308  }
1309 
1312  FwIndexType portNum,
1313  Fw::Buffer& fwBuffer
1314  ) const
1315  {
1316  FW_ASSERT(
1317  (0 <= portNum) && (portNum < this->getNum_bufferOut_OutputPorts()),
1318  static_cast<FwAssertArgType>(portNum)
1319  );
1320 
1321  FW_ASSERT(
1322  this->m_bufferOut_OutputPort[portNum].isConnected(),
1323  static_cast<FwAssertArgType>(portNum)
1324  );
1325  this->m_bufferOut_OutputPort[portNum].invoke(
1326  fwBuffer
1327  );
1328  }
1329 
1332  FwIndexType portNum,
1333  Fw::ComBuffer& data,
1334  U32 context
1335  ) const
1336  {
1337  FW_ASSERT(
1338  (0 <= portNum) && (portNum < this->getNum_cmdDispOut_OutputPorts()),
1339  static_cast<FwAssertArgType>(portNum)
1340  );
1341 
1342  FW_ASSERT(
1343  this->m_cmdDispOut_OutputPort[portNum].isConnected(),
1344  static_cast<FwAssertArgType>(portNum)
1345  );
1346  this->m_cmdDispOut_OutputPort[portNum].invoke(
1347  data,
1348  context
1349  );
1350  }
1351 
1354  FwIndexType portNum,
1355  FwOpcodeType opCode,
1356  U32 cmdSeq,
1357  const Fw::CmdResponse& response
1358  ) const
1359  {
1360  FW_ASSERT(
1361  (0 <= portNum) && (portNum < this->getNum_cmdRespOut_OutputPorts()),
1362  static_cast<FwAssertArgType>(portNum)
1363  );
1364 
1365  FW_ASSERT(
1366  this->m_cmdRespOut_OutputPort[portNum].isConnected(),
1367  static_cast<FwAssertArgType>(portNum)
1368  );
1369  this->m_cmdRespOut_OutputPort[portNum].invoke(
1370  opCode,
1371  cmdSeq,
1372  response
1373  );
1374  }
1375 
1378  FwIndexType portNum,
1379  Fw::Buffer& fwBuffer
1380  ) const
1381  {
1382  FW_ASSERT(
1383  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
1384  static_cast<FwAssertArgType>(portNum)
1385  );
1386 
1387  FW_ASSERT(
1388  this->m_deallocate_OutputPort[portNum].isConnected(),
1389  static_cast<FwAssertArgType>(portNum)
1390  );
1391  this->m_deallocate_OutputPort[portNum].invoke(
1392  fwBuffer
1393  );
1394  }
1395 
1398  FwIndexType portNum,
1399  FwEventIdType id,
1400  Fw::Time& timeTag,
1401  const Fw::LogSeverity& severity,
1402  Fw::LogBuffer& args
1403  ) const
1404  {
1405  FW_ASSERT(
1406  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
1407  static_cast<FwAssertArgType>(portNum)
1408  );
1409 
1410  FW_ASSERT(
1411  this->m_eventOut_OutputPort[portNum].isConnected(),
1412  static_cast<FwAssertArgType>(portNum)
1413  );
1414  this->m_eventOut_OutputPort[portNum].invoke(
1415  id,
1416  timeTag,
1417  severity,
1418  args
1419  );
1420  }
1421 
1424  FwIndexType portNum,
1425  Fw::Buffer& fwBuffer
1426  ) const
1427  {
1428  FW_ASSERT(
1429  (0 <= portNum) && (portNum < this->getNum_fromBufferDriverReturn_OutputPorts()),
1430  static_cast<FwAssertArgType>(portNum)
1431  );
1432 
1433  FW_ASSERT(
1434  this->m_fromBufferDriverReturn_OutputPort[portNum].isConnected(),
1435  static_cast<FwAssertArgType>(portNum)
1436  );
1437  this->m_fromBufferDriverReturn_OutputPort[portNum].invoke(
1438  fwBuffer
1439  );
1440  }
1441 
1444  FwIndexType portNum,
1445  FwChanIdType id,
1446  Fw::Time& timeTag,
1447  Fw::TlmBuffer& val
1448  ) const
1449  {
1450  FW_ASSERT(
1451  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1452  static_cast<FwAssertArgType>(portNum)
1453  );
1454 
1455  FW_ASSERT(
1456  this->m_tlmOut_OutputPort[portNum].isConnected(),
1457  static_cast<FwAssertArgType>(portNum)
1458  );
1459  this->m_tlmOut_OutputPort[portNum].invoke(
1460  id,
1461  timeTag,
1462  val
1463  );
1464  }
1465 
1468  FwIndexType portNum,
1469  Fw::Buffer& fwBuffer
1470  ) const
1471  {
1472  FW_ASSERT(
1473  (0 <= portNum) && (portNum < this->getNum_toBufferDriver_OutputPorts()),
1474  static_cast<FwAssertArgType>(portNum)
1475  );
1476 
1477  FW_ASSERT(
1478  this->m_toBufferDriver_OutputPort[portNum].isConnected(),
1479  static_cast<FwAssertArgType>(portNum)
1480  );
1481  this->m_toBufferDriver_OutputPort[portNum].invoke(
1482  fwBuffer
1483  );
1484  }
1485 
1486 #endif
1487 
1488 #if !FW_DIRECT_PORT_CALLS
1489 
1490  // ----------------------------------------------------------------------
1491  // Invocation functions for serial output ports
1492  // ----------------------------------------------------------------------
1493 
1496  FwIndexType portNum,
1497  Fw::LinearBufferBase& buffer
1498  )
1499  {
1500  FW_ASSERT(
1501  (0 <= portNum) && (portNum < this->getNum_serialOut_OutputPorts()),
1502  static_cast<FwAssertArgType>(portNum)
1503  );
1504 
1505  FW_ASSERT(
1506  this->m_serialOut_OutputPort[portNum].isConnected(),
1507  static_cast<FwAssertArgType>(portNum)
1508  );
1509  return this->m_serialOut_OutputPort[portNum].invokeSerial(
1510  buffer
1511  );
1512  }
1513 
1514 #endif
1515 
1516  // ----------------------------------------------------------------------
1517  // Calls for messages received on typed input ports
1518  // ----------------------------------------------------------------------
1519 
1520  void GenericHubComponentBase ::
1521  m_p_bufferIn_in(
1522  Fw::PassiveComponentBase* callComp,
1523  FwIndexType portNum,
1524  Fw::Buffer& fwBuffer
1525  )
1526  {
1527  FW_ASSERT(callComp != nullptr);
1528  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1529  compPtr->bufferIn_handlerBase(
1530  portNum,
1531  fwBuffer
1532  );
1533  }
1534 
1535  void GenericHubComponentBase ::
1536  m_p_bufferOutReturn_in(
1537  Fw::PassiveComponentBase* callComp,
1538  FwIndexType portNum,
1539  Fw::Buffer& fwBuffer
1540  )
1541  {
1542  FW_ASSERT(callComp != nullptr);
1543  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1544  compPtr->bufferOutReturn_handlerBase(
1545  portNum,
1546  fwBuffer
1547  );
1548  }
1549 
1550  void GenericHubComponentBase ::
1551  m_p_cmdDispIn_in(
1552  Fw::PassiveComponentBase* callComp,
1553  FwIndexType portNum,
1554  Fw::ComBuffer& data,
1555  U32 context
1556  )
1557  {
1558  FW_ASSERT(callComp != nullptr);
1559  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1560  compPtr->cmdDispIn_handlerBase(
1561  portNum,
1562  data,
1563  context
1564  );
1565  }
1566 
1567  void GenericHubComponentBase ::
1568  m_p_cmdRespIn_in(
1569  Fw::PassiveComponentBase* callComp,
1570  FwIndexType portNum,
1571  FwOpcodeType opCode,
1572  U32 cmdSeq,
1573  const Fw::CmdResponse& response
1574  )
1575  {
1576  FW_ASSERT(callComp != nullptr);
1577  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1578  compPtr->cmdRespIn_handlerBase(
1579  portNum,
1580  opCode,
1581  cmdSeq,
1582  response
1583  );
1584  }
1585 
1586  void GenericHubComponentBase ::
1587  m_p_eventIn_in(
1588  Fw::PassiveComponentBase* callComp,
1589  FwIndexType portNum,
1590  FwEventIdType id,
1591  Fw::Time& timeTag,
1592  const Fw::LogSeverity& severity,
1593  Fw::LogBuffer& args
1594  )
1595  {
1596  FW_ASSERT(callComp != nullptr);
1597  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1598  compPtr->eventIn_handlerBase(
1599  portNum,
1600  id,
1601  timeTag,
1602  severity,
1603  args
1604  );
1605  }
1606 
1607  void GenericHubComponentBase ::
1608  m_p_fromBufferDriver_in(
1609  Fw::PassiveComponentBase* callComp,
1610  FwIndexType portNum,
1611  Fw::Buffer& fwBuffer
1612  )
1613  {
1614  FW_ASSERT(callComp != nullptr);
1615  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1616  compPtr->fromBufferDriver_handlerBase(
1617  portNum,
1618  fwBuffer
1619  );
1620  }
1621 
1622  void GenericHubComponentBase ::
1623  m_p_tlmIn_in(
1624  Fw::PassiveComponentBase* callComp,
1625  FwIndexType portNum,
1626  FwChanIdType id,
1627  Fw::Time& timeTag,
1628  Fw::TlmBuffer& val
1629  )
1630  {
1631  FW_ASSERT(callComp != nullptr);
1632  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1633  compPtr->tlmIn_handlerBase(
1634  portNum,
1635  id,
1636  timeTag,
1637  val
1638  );
1639  }
1640 
1641  void GenericHubComponentBase ::
1642  m_p_toBufferDriverReturn_in(
1643  Fw::PassiveComponentBase* callComp,
1644  FwIndexType portNum,
1645  Fw::Buffer& fwBuffer
1646  )
1647  {
1648  FW_ASSERT(callComp != nullptr);
1649  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1650  compPtr->toBufferDriverReturn_handlerBase(
1651  portNum,
1652  fwBuffer
1653  );
1654  }
1655 
1656  // ----------------------------------------------------------------------
1657  // Calls for messages received on serial input ports
1658  // ----------------------------------------------------------------------
1659 
1660 #if FW_PORT_SERIALIZATION
1661 
1662  void GenericHubComponentBase ::
1663  m_p_serialIn_in(
1664  Fw::PassiveComponentBase* callComp,
1665  FwIndexType portNum,
1666  Fw::LinearBufferBase& buffer
1667  )
1668  {
1669  FW_ASSERT(callComp != nullptr);
1670  GenericHubComponentBase* compPtr = static_cast<GenericHubComponentBase*>(callComp);
1671  compPtr->serialIn_handlerBase(
1672  portNum,
1673  buffer
1674  );
1675  }
1676 
1677 #endif
1678 
1679 }
static constexpr FwIndexType getNum_allocate_OutputPorts()
void invoke(Fw::ComBuffer &data, U32 context) const
Invoke a port connection.
Definition: ComPortAc.cpp:181
void init()
Initialization function.
Definition: ComPortAc.cpp:162
void set_bufferOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferOut[portNum].
static constexpr FwIndexType getNum_cmdDispIn_InputPorts()
virtual ~GenericHubComponentBase()
Destroy GenericHubComponentBase object.
virtual void fromBufferDriver_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port fromBufferDriver.
FwIdType FwOpcodeType
The type of a command opcode.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
bool isConnected_cmdDispOut_OutputPort(FwIndexType portNum) const
PlatformSizeType FwSizeType
void fromBufferDriver_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port fromBufferDriver.
I32 FwEnumStoreType
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
Fw::Buffer allocate_out(FwIndexType portNum, FwSizeType size) const
Invoke output port allocate.
void set_cmdDispOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdDispOut[portNum].
virtual void toBufferDriverReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port toBufferDriverReturn.
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
static constexpr FwIndexType getNum_tlmIn_InputPorts()
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
static constexpr FwIndexType getNum_cmdDispOut_OutputPorts()
static constexpr FwIndexType getNum_serialIn_InputPorts()
static constexpr FwIndexType getNum_eventOut_OutputPorts()
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: TlmPortAc.cpp:95
bool isConnected_allocate_OutputPort(FwIndexType portNum) const
void set_bufferInReturn_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferInReturn[portNum].
static constexpr FwIndexType getNum_fromBufferDriver_InputPorts()
bool isConnected_bufferOut_OutputPort(FwIndexType portNum) const
void cmdRespIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdRespIn.
static constexpr FwIndexType getNum_serialOut_OutputPorts()
virtual void cmdRespIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdRespIn.
static constexpr FwIndexType getNum_bufferInReturn_OutputPorts()
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
Enum representing a command response.
void init()
Initialization function.
Definition: TlmPortAc.cpp:89
Fw::InputBufferSendPort * get_bufferOutReturn_InputPort(FwIndexType portNum)
void eventIn_handlerBase(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Handler base-class function for input port eventIn.
void tlmIn_handlerBase(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Handler base-class function for input port tlmIn.
bool isConnected_deallocate_OutputPort(FwIndexType portNum) const
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:177
static constexpr FwIndexType getNum_bufferOut_OutputPorts()
void init()
Object initializer.
Definition: ObjBase.cpp:24
void init()
Initialization function.
Definition: ComPortAc.cpp:81
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
static constexpr FwIndexType getNum_cmdRespIn_InputPorts()
Auto-generated base for GenericHub component.
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
void set_toBufferDriver_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to toBufferDriver[portNum].
FwIdType FwEventIdType
The type of an event identifier.
void cmdDispIn_handlerBase(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Handler base-class function for input port cmdDispIn.
Fw::InputCmdResponsePort * get_cmdRespIn_InputPort(FwIndexType portNum)
void init()
Initialization function.
Definition: LogPortAc.cpp:97
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: ComPortAc.cpp:87
Fw::InputSerializePort * get_serialIn_InputPort(FwIndexType portNum)
void bufferOutReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferOutReturn.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
static constexpr FwIndexType getNum_cmdRespOut_OutputPorts()
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocate.
void set_fromBufferDriverReturn_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to fromBufferDriverReturn[portNum].
void init()
Initialization function.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_eventIn_InputPorts()
bool isConnected_cmdRespOut_OutputPort(FwIndexType portNum) const
void bufferOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferOut.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
void set_cmdRespOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdRespOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
virtual void eventIn_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)=0
Handler for input port eventIn.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void bufferInReturn_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port bufferInReturn.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
Definition: TlmPortAc.cpp:190
const char * toChar() const
Convert to a C-style char*.
bool isConnected() const
Definition: PortBase.cpp:38
Enum representing event severity.
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:58
void init()
Initialization function.
Definition: LogPortAc.cpp:180
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: LogPortAc.cpp:103
void setPortNum(FwIndexType portNum)
void cmdRespOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port cmdRespOut.
static constexpr FwIndexType getNum_bufferIn_InputPorts()
void eventOut_out(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke output port eventOut.
Fw::SerializeStatus serialOut_out(FwIndexType portNum, Fw::LinearBufferBase &buffer)
Invoke output port serialOut.
Fw::Buffer invoke(FwSizeType size) const
void init()
Initialization function.
static constexpr FwIndexType getNum_fromBufferDriverReturn_OutputPorts()
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
void init()
Initialization function.
bool isConnected_serialOut_OutputPort(FwIndexType portNum) const
Fw::InputLogPort * get_eventIn_InputPort(FwIndexType portNum)
virtual void cmdDispIn_handler(FwIndexType portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port cmdDispIn.
void tlmOut_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke output port tlmOut.
PlatformIndexType FwIndexType
void bufferIn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port bufferIn.
void toBufferDriverReturn_handlerBase(FwIndexType portNum, Fw::Buffer &fwBuffer)
Handler base-class function for input port toBufferDriverReturn.
Fw::InputComPort * get_cmdDispIn_InputPort(FwIndexType portNum)
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
void init()
Initialization function.
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
RateGroupDivider component implementation.
bool isConnected_fromBufferDriverReturn_OutputPort(FwIndexType portNum) const
Fw::InputBufferSendPort * get_bufferIn_InputPort(FwIndexType portNum)
Fw::InputBufferSendPort * get_fromBufferDriver_InputPort(FwIndexType portNum)
virtual void tlmIn_handler(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)=0
Handler for input port tlmIn.
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
void addCallPort(InputComPort *callPort)
Register an input port.
Definition: ComPortAc.cpp:168
Fw::InputTlmPort * get_tlmIn_InputPort(FwIndexType portNum)
GenericHubComponentBase(const char *compName="")
Construct GenericHubComponentBase object.
void toBufferDriver_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port toBufferDriver.
static constexpr FwIndexType getNum_toBufferDriverReturn_InputPorts()
Fw::InputBufferSendPort * get_toBufferDriverReturn_InputPort(FwIndexType portNum)
bool isConnected_toBufferDriver_OutputPort(FwIndexType portNum) const
Implementation of malloc based allocator.
static constexpr FwIndexType getNum_deallocate_OutputPorts()
static constexpr FwIndexType getNum_bufferOutReturn_InputPorts()
virtual void bufferIn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferIn.
virtual void bufferOutReturn_handler(FwIndexType portNum, Fw::Buffer &fwBuffer)=0
Handler for input port bufferOutReturn.
void cmdDispOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port cmdDispOut.
static constexpr FwIndexType getNum_toBufferDriver_OutputPorts()
virtual void serialIn_handler(FwIndexType portNum, Fw::LinearBufferBase &buffer)=0
Handler for input port serialIn.
bool isConnected_bufferInReturn_OutputPort(FwIndexType portNum) const
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void serialIn_handlerBase(FwIndexType portNum, Fw::LinearBufferBase &buffer)
Handler base-class function for input port serialIn.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void fromBufferDriverReturn_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port fromBufferDriverReturn.