F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
ComStubComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title ComStubComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for ComStub 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 dataIn
27  for (
28  FwIndexType port = 0;
29  port < static_cast<FwIndexType>(this->getNum_dataIn_InputPorts());
30  port++
31  ) {
32  this->m_dataIn_InputPort[port].init();
33  this->m_dataIn_InputPort[port].addCallComp(
34  this,
35  m_p_dataIn_in
36  );
37  this->m_dataIn_InputPort[port].setPortNum(port);
38 
39 #if FW_OBJECT_NAMES == 1
40  Fw::ObjectName portName;
41  portName.format(
42  "%s_dataIn_InputPort[%" PRI_FwIndexType "]",
43  this->m_objName.toChar(),
44  port
45  );
46  this->m_dataIn_InputPort[port].setObjName(portName.toChar());
47 #endif
48  }
49 
50  // Connect input port dataReturnIn
51  for (
52  FwIndexType port = 0;
53  port < static_cast<FwIndexType>(this->getNum_dataReturnIn_InputPorts());
54  port++
55  ) {
56  this->m_dataReturnIn_InputPort[port].init();
57  this->m_dataReturnIn_InputPort[port].addCallComp(
58  this,
59  m_p_dataReturnIn_in
60  );
61  this->m_dataReturnIn_InputPort[port].setPortNum(port);
62 
63 #if FW_OBJECT_NAMES == 1
64  Fw::ObjectName portName;
65  portName.format(
66  "%s_dataReturnIn_InputPort[%" PRI_FwIndexType "]",
67  this->m_objName.toChar(),
68  port
69  );
70  this->m_dataReturnIn_InputPort[port].setObjName(portName.toChar());
71 #endif
72  }
73 
74  // Connect input port drvAsyncSendReturnIn
75  for (
76  FwIndexType port = 0;
77  port < static_cast<FwIndexType>(this->getNum_drvAsyncSendReturnIn_InputPorts());
78  port++
79  ) {
80  this->m_drvAsyncSendReturnIn_InputPort[port].init();
81  this->m_drvAsyncSendReturnIn_InputPort[port].addCallComp(
82  this,
83  m_p_drvAsyncSendReturnIn_in
84  );
85  this->m_drvAsyncSendReturnIn_InputPort[port].setPortNum(port);
86 
87 #if FW_OBJECT_NAMES == 1
88  Fw::ObjectName portName;
89  portName.format(
90  "%s_drvAsyncSendReturnIn_InputPort[%" PRI_FwIndexType "]",
91  this->m_objName.toChar(),
92  port
93  );
94  this->m_drvAsyncSendReturnIn_InputPort[port].setObjName(portName.toChar());
95 #endif
96  }
97 
98  // Connect input port drvConnected
99  for (
100  FwIndexType port = 0;
101  port < static_cast<FwIndexType>(this->getNum_drvConnected_InputPorts());
102  port++
103  ) {
104  this->m_drvConnected_InputPort[port].init();
105  this->m_drvConnected_InputPort[port].addCallComp(
106  this,
107  m_p_drvConnected_in
108  );
109  this->m_drvConnected_InputPort[port].setPortNum(port);
110 
111 #if FW_OBJECT_NAMES == 1
112  Fw::ObjectName portName;
113  portName.format(
114  "%s_drvConnected_InputPort[%" PRI_FwIndexType "]",
115  this->m_objName.toChar(),
116  port
117  );
118  this->m_drvConnected_InputPort[port].setObjName(portName.toChar());
119 #endif
120  }
121 
122  // Connect input port drvReceiveIn
123  for (
124  FwIndexType port = 0;
125  port < static_cast<FwIndexType>(this->getNum_drvReceiveIn_InputPorts());
126  port++
127  ) {
128  this->m_drvReceiveIn_InputPort[port].init();
129  this->m_drvReceiveIn_InputPort[port].addCallComp(
130  this,
131  m_p_drvReceiveIn_in
132  );
133  this->m_drvReceiveIn_InputPort[port].setPortNum(port);
134 
135 #if FW_OBJECT_NAMES == 1
136  Fw::ObjectName portName;
137  portName.format(
138  "%s_drvReceiveIn_InputPort[%" PRI_FwIndexType "]",
139  this->m_objName.toChar(),
140  port
141  );
142  this->m_drvReceiveIn_InputPort[port].setObjName(portName.toChar());
143 #endif
144  }
145 
146  // Connect output port comStatusOut
147  for (
148  FwIndexType port = 0;
149  port < static_cast<FwIndexType>(this->getNum_comStatusOut_OutputPorts());
150  port++
151  ) {
152  this->m_comStatusOut_OutputPort[port].init();
153 
154 #if FW_OBJECT_NAMES == 1
155  Fw::ObjectName portName;
156  portName.format(
157  "%s_comStatusOut_OutputPort[%" PRI_FwIndexType "]",
158  this->m_objName.toChar(),
159  port
160  );
161  this->m_comStatusOut_OutputPort[port].setObjName(portName.toChar());
162 #endif
163  }
164 
165  // Connect output port dataOut
166  for (
167  FwIndexType port = 0;
168  port < static_cast<FwIndexType>(this->getNum_dataOut_OutputPorts());
169  port++
170  ) {
171  this->m_dataOut_OutputPort[port].init();
172 
173 #if FW_OBJECT_NAMES == 1
174  Fw::ObjectName portName;
175  portName.format(
176  "%s_dataOut_OutputPort[%" PRI_FwIndexType "]",
177  this->m_objName.toChar(),
178  port
179  );
180  this->m_dataOut_OutputPort[port].setObjName(portName.toChar());
181 #endif
182  }
183 
184  // Connect output port dataReturnOut
185  for (
186  FwIndexType port = 0;
187  port < static_cast<FwIndexType>(this->getNum_dataReturnOut_OutputPorts());
188  port++
189  ) {
190  this->m_dataReturnOut_OutputPort[port].init();
191 
192 #if FW_OBJECT_NAMES == 1
193  Fw::ObjectName portName;
194  portName.format(
195  "%s_dataReturnOut_OutputPort[%" PRI_FwIndexType "]",
196  this->m_objName.toChar(),
197  port
198  );
199  this->m_dataReturnOut_OutputPort[port].setObjName(portName.toChar());
200 #endif
201  }
202 
203  // Connect output port drvAsyncSendOut
204  for (
205  FwIndexType port = 0;
206  port < static_cast<FwIndexType>(this->getNum_drvAsyncSendOut_OutputPorts());
207  port++
208  ) {
209  this->m_drvAsyncSendOut_OutputPort[port].init();
210 
211 #if FW_OBJECT_NAMES == 1
212  Fw::ObjectName portName;
213  portName.format(
214  "%s_drvAsyncSendOut_OutputPort[%" PRI_FwIndexType "]",
215  this->m_objName.toChar(),
216  port
217  );
218  this->m_drvAsyncSendOut_OutputPort[port].setObjName(portName.toChar());
219 #endif
220  }
221 
222  // Connect output port drvReceiveReturnOut
223  for (
224  FwIndexType port = 0;
225  port < static_cast<FwIndexType>(this->getNum_drvReceiveReturnOut_OutputPorts());
226  port++
227  ) {
228  this->m_drvReceiveReturnOut_OutputPort[port].init();
229 
230 #if FW_OBJECT_NAMES == 1
231  Fw::ObjectName portName;
232  portName.format(
233  "%s_drvReceiveReturnOut_OutputPort[%" PRI_FwIndexType "]",
234  this->m_objName.toChar(),
235  port
236  );
237  this->m_drvReceiveReturnOut_OutputPort[port].setObjName(portName.toChar());
238 #endif
239  }
240 
241  // Connect output port drvSendOut
242  for (
243  FwIndexType port = 0;
244  port < static_cast<FwIndexType>(this->getNum_drvSendOut_OutputPorts());
245  port++
246  ) {
247  this->m_drvSendOut_OutputPort[port].init();
248 
249 #if FW_OBJECT_NAMES == 1
250  Fw::ObjectName portName;
251  portName.format(
252  "%s_drvSendOut_OutputPort[%" PRI_FwIndexType "]",
253  this->m_objName.toChar(),
254  port
255  );
256  this->m_drvSendOut_OutputPort[port].setObjName(portName.toChar());
257 #endif
258  }
259  }
260 
261  // ----------------------------------------------------------------------
262  // Getters for typed input ports
263  // ----------------------------------------------------------------------
264 
267  {
268  FW_ASSERT(
269  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
270  static_cast<FwAssertArgType>(portNum)
271  );
272 
273  return &this->m_dataIn_InputPort[portNum];
274  }
275 
278  {
279  FW_ASSERT(
280  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
281  static_cast<FwAssertArgType>(portNum)
282  );
283 
284  return &this->m_dataReturnIn_InputPort[portNum];
285  }
286 
289  {
290  FW_ASSERT(
291  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendReturnIn_InputPorts()),
292  static_cast<FwAssertArgType>(portNum)
293  );
294 
295  return &this->m_drvAsyncSendReturnIn_InputPort[portNum];
296  }
297 
300  {
301  FW_ASSERT(
302  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
303  static_cast<FwAssertArgType>(portNum)
304  );
305 
306  return &this->m_drvConnected_InputPort[portNum];
307  }
308 
311  {
312  FW_ASSERT(
313  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
314  static_cast<FwAssertArgType>(portNum)
315  );
316 
317  return &this->m_drvReceiveIn_InputPort[portNum];
318  }
319 
320  // ----------------------------------------------------------------------
321  // Connect typed input ports to typed output ports
322  // ----------------------------------------------------------------------
323 
326  FwIndexType portNum,
328  )
329  {
330  FW_ASSERT(
331  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
332  static_cast<FwAssertArgType>(portNum)
333  );
334 
335  this->m_comStatusOut_OutputPort[portNum].addCallPort(port);
336  }
337 
340  FwIndexType portNum,
342  )
343  {
344  FW_ASSERT(
345  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
346  static_cast<FwAssertArgType>(portNum)
347  );
348 
349  this->m_dataOut_OutputPort[portNum].addCallPort(port);
350  }
351 
354  FwIndexType portNum,
356  )
357  {
358  FW_ASSERT(
359  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
360  static_cast<FwAssertArgType>(portNum)
361  );
362 
363  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
364  }
365 
368  FwIndexType portNum,
370  )
371  {
372  FW_ASSERT(
373  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
374  static_cast<FwAssertArgType>(portNum)
375  );
376 
377  this->m_drvAsyncSendOut_OutputPort[portNum].addCallPort(port);
378  }
379 
382  FwIndexType portNum,
384  )
385  {
386  FW_ASSERT(
387  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
388  static_cast<FwAssertArgType>(portNum)
389  );
390 
391  this->m_drvReceiveReturnOut_OutputPort[portNum].addCallPort(port);
392  }
393 
396  FwIndexType portNum,
398  )
399  {
400  FW_ASSERT(
401  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
402  static_cast<FwAssertArgType>(portNum)
403  );
404 
405  this->m_drvSendOut_OutputPort[portNum].addCallPort(port);
406  }
407 
408 #if FW_PORT_SERIALIZATION
409 
410  // ----------------------------------------------------------------------
411  // Connect serial input ports to typed output ports
412  // ----------------------------------------------------------------------
413 
416  FwIndexType portNum,
417  Fw::InputSerializePort* port
418  )
419  {
420  FW_ASSERT(
421  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
422  static_cast<FwAssertArgType>(portNum)
423  );
424 
425  this->m_comStatusOut_OutputPort[portNum].registerSerialPort(port);
426  }
427 
430  FwIndexType portNum,
431  Fw::InputSerializePort* port
432  )
433  {
434  FW_ASSERT(
435  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
436  static_cast<FwAssertArgType>(portNum)
437  );
438 
439  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
440  }
441 
444  FwIndexType portNum,
445  Fw::InputSerializePort* port
446  )
447  {
448  FW_ASSERT(
449  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
450  static_cast<FwAssertArgType>(portNum)
451  );
452 
453  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
454  }
455 
458  FwIndexType portNum,
459  Fw::InputSerializePort* port
460  )
461  {
462  FW_ASSERT(
463  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
464  static_cast<FwAssertArgType>(portNum)
465  );
466 
467  this->m_drvAsyncSendOut_OutputPort[portNum].registerSerialPort(port);
468  }
469 
472  FwIndexType portNum,
473  Fw::InputSerializePort* port
474  )
475  {
476  FW_ASSERT(
477  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
478  static_cast<FwAssertArgType>(portNum)
479  );
480 
481  this->m_drvReceiveReturnOut_OutputPort[portNum].registerSerialPort(port);
482  }
483 
484 #endif
485 
486  // ----------------------------------------------------------------------
487  // Component construction and destruction
488  // ----------------------------------------------------------------------
489 
491  ComStubComponentBase(const char* compName) :
492  Fw::PassiveComponentBase(compName)
493  {
494 
495  }
496 
499  {
500 
501  }
502 
503  // ----------------------------------------------------------------------
504  // Getters for numbers of typed input ports
505  // ----------------------------------------------------------------------
506 
509  {
510  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataIn_InputPort));
511  }
512 
515  {
516  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnIn_InputPort));
517  }
518 
521  {
522  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvAsyncSendReturnIn_InputPort));
523  }
524 
527  {
528  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvConnected_InputPort));
529  }
530 
533  {
534  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvReceiveIn_InputPort));
535  }
536 
537  // ----------------------------------------------------------------------
538  // Getters for numbers of typed output ports
539  // ----------------------------------------------------------------------
540 
543  {
544  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_comStatusOut_OutputPort));
545  }
546 
549  {
550  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataOut_OutputPort));
551  }
552 
555  {
556  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnOut_OutputPort));
557  }
558 
561  {
562  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvAsyncSendOut_OutputPort));
563  }
564 
567  {
568  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvReceiveReturnOut_OutputPort));
569  }
570 
573  {
574  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvSendOut_OutputPort));
575  }
576 
577  // ----------------------------------------------------------------------
578  // Connection status queries for typed output ports
579  // ----------------------------------------------------------------------
580 
583  {
584  FW_ASSERT(
585  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
586  static_cast<FwAssertArgType>(portNum)
587  );
588 
589  return this->m_comStatusOut_OutputPort[portNum].isConnected();
590  }
591 
594  {
595  FW_ASSERT(
596  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
597  static_cast<FwAssertArgType>(portNum)
598  );
599 
600  return this->m_dataOut_OutputPort[portNum].isConnected();
601  }
602 
605  {
606  FW_ASSERT(
607  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
608  static_cast<FwAssertArgType>(portNum)
609  );
610 
611  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
612  }
613 
616  {
617  FW_ASSERT(
618  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
619  static_cast<FwAssertArgType>(portNum)
620  );
621 
622  return this->m_drvAsyncSendOut_OutputPort[portNum].isConnected();
623  }
624 
627  {
628  FW_ASSERT(
629  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
630  static_cast<FwAssertArgType>(portNum)
631  );
632 
633  return this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected();
634  }
635 
638  {
639  FW_ASSERT(
640  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
641  static_cast<FwAssertArgType>(portNum)
642  );
643 
644  return this->m_drvSendOut_OutputPort[portNum].isConnected();
645  }
646 
647  // ----------------------------------------------------------------------
648  // Port handler base-class functions for typed input ports
649  //
650  // Call these functions directly to bypass the corresponding ports
651  // ----------------------------------------------------------------------
652 
655  FwIndexType portNum,
656  Fw::Buffer& data,
657  const ComCfg::FrameContext& context
658  )
659  {
660  // Make sure port number is valid
661  FW_ASSERT(
662  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
663  static_cast<FwAssertArgType>(portNum)
664  );
665 
666  // Call handler function
667  this->dataIn_handler(
668  portNum,
669  data,
670  context
671  );
672  }
673 
676  FwIndexType portNum,
677  Fw::Buffer& data,
678  const ComCfg::FrameContext& context
679  )
680  {
681  // Make sure port number is valid
682  FW_ASSERT(
683  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
684  static_cast<FwAssertArgType>(portNum)
685  );
686 
687  // Call handler function
688  this->dataReturnIn_handler(
689  portNum,
690  data,
691  context
692  );
693  }
694 
697  FwIndexType portNum,
698  Fw::Buffer& buffer,
699  const Drv::ByteStreamStatus& status
700  )
701  {
702  // Make sure port number is valid
703  FW_ASSERT(
704  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendReturnIn_InputPorts()),
705  static_cast<FwAssertArgType>(portNum)
706  );
707 
708  // Call handler function
710  portNum,
711  buffer,
712  status
713  );
714  }
715 
718  {
719  // Make sure port number is valid
720  FW_ASSERT(
721  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
722  static_cast<FwAssertArgType>(portNum)
723  );
724 
725  // Call handler function
726  this->drvConnected_handler(portNum);
727  }
728 
731  FwIndexType portNum,
732  Fw::Buffer& buffer,
733  const Drv::ByteStreamStatus& status
734  )
735  {
736  // Make sure port number is valid
737  FW_ASSERT(
738  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
739  static_cast<FwAssertArgType>(portNum)
740  );
741 
742  // Call handler function
743  this->drvReceiveIn_handler(
744  portNum,
745  buffer,
746  status
747  );
748  }
749 
750  // ----------------------------------------------------------------------
751  // Invocation functions for typed output ports
752  // ----------------------------------------------------------------------
753 
756  FwIndexType portNum,
757  Fw::Success& condition
758  )
759  {
760  FW_ASSERT(
761  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
762  static_cast<FwAssertArgType>(portNum)
763  );
764 
765  FW_ASSERT(
766  this->m_comStatusOut_OutputPort[portNum].isConnected(),
767  static_cast<FwAssertArgType>(portNum)
768  );
769  this->m_comStatusOut_OutputPort[portNum].invoke(
770  condition
771  );
772  }
773 
776  FwIndexType portNum,
777  Fw::Buffer& data,
778  const ComCfg::FrameContext& context
779  )
780  {
781  FW_ASSERT(
782  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
783  static_cast<FwAssertArgType>(portNum)
784  );
785 
786  FW_ASSERT(
787  this->m_dataOut_OutputPort[portNum].isConnected(),
788  static_cast<FwAssertArgType>(portNum)
789  );
790  this->m_dataOut_OutputPort[portNum].invoke(
791  data,
792  context
793  );
794  }
795 
798  FwIndexType portNum,
799  Fw::Buffer& data,
800  const ComCfg::FrameContext& context
801  )
802  {
803  FW_ASSERT(
804  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
805  static_cast<FwAssertArgType>(portNum)
806  );
807 
808  FW_ASSERT(
809  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
810  static_cast<FwAssertArgType>(portNum)
811  );
812  this->m_dataReturnOut_OutputPort[portNum].invoke(
813  data,
814  context
815  );
816  }
817 
820  FwIndexType portNum,
821  Fw::Buffer& fwBuffer
822  )
823  {
824  FW_ASSERT(
825  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
826  static_cast<FwAssertArgType>(portNum)
827  );
828 
829  FW_ASSERT(
830  this->m_drvAsyncSendOut_OutputPort[portNum].isConnected(),
831  static_cast<FwAssertArgType>(portNum)
832  );
833  this->m_drvAsyncSendOut_OutputPort[portNum].invoke(
834  fwBuffer
835  );
836  }
837 
840  FwIndexType portNum,
841  Fw::Buffer& fwBuffer
842  )
843  {
844  FW_ASSERT(
845  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
846  static_cast<FwAssertArgType>(portNum)
847  );
848 
849  FW_ASSERT(
850  this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected(),
851  static_cast<FwAssertArgType>(portNum)
852  );
853  this->m_drvReceiveReturnOut_OutputPort[portNum].invoke(
854  fwBuffer
855  );
856  }
857 
860  FwIndexType portNum,
861  Fw::Buffer& sendBuffer
862  )
863  {
864  FW_ASSERT(
865  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
866  static_cast<FwAssertArgType>(portNum)
867  );
868 
869  FW_ASSERT(
870  this->m_drvSendOut_OutputPort[portNum].isConnected(),
871  static_cast<FwAssertArgType>(portNum)
872  );
873  return this->m_drvSendOut_OutputPort[portNum].invoke(
874  sendBuffer
875  );
876  }
877 
878  // ----------------------------------------------------------------------
879  // Calls for messages received on typed input ports
880  // ----------------------------------------------------------------------
881 
882  void ComStubComponentBase ::
883  m_p_dataIn_in(
884  Fw::PassiveComponentBase* callComp,
885  FwIndexType portNum,
886  Fw::Buffer& data,
887  const ComCfg::FrameContext& context
888  )
889  {
890  FW_ASSERT(callComp);
891  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
892  compPtr->dataIn_handlerBase(
893  portNum,
894  data,
895  context
896  );
897  }
898 
899  void ComStubComponentBase ::
900  m_p_dataReturnIn_in(
901  Fw::PassiveComponentBase* callComp,
902  FwIndexType portNum,
903  Fw::Buffer& data,
904  const ComCfg::FrameContext& context
905  )
906  {
907  FW_ASSERT(callComp);
908  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
909  compPtr->dataReturnIn_handlerBase(
910  portNum,
911  data,
912  context
913  );
914  }
915 
916  void ComStubComponentBase ::
917  m_p_drvAsyncSendReturnIn_in(
918  Fw::PassiveComponentBase* callComp,
919  FwIndexType portNum,
920  Fw::Buffer& buffer,
921  const Drv::ByteStreamStatus& status
922  )
923  {
924  FW_ASSERT(callComp);
925  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
926  compPtr->drvAsyncSendReturnIn_handlerBase(
927  portNum,
928  buffer,
929  status
930  );
931  }
932 
933  void ComStubComponentBase ::
934  m_p_drvConnected_in(
935  Fw::PassiveComponentBase* callComp,
936  FwIndexType portNum
937  )
938  {
939  FW_ASSERT(callComp);
940  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
941  compPtr->drvConnected_handlerBase(portNum);
942  }
943 
944  void ComStubComponentBase ::
945  m_p_drvReceiveIn_in(
946  Fw::PassiveComponentBase* callComp,
947  FwIndexType portNum,
948  Fw::Buffer& buffer,
949  const Drv::ByteStreamStatus& status
950  )
951  {
952  FW_ASSERT(callComp);
953  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
954  compPtr->drvReceiveIn_handlerBase(
955  portNum,
956  buffer,
957  status
958  );
959  }
960 
961 }
bool isConnected_drvAsyncSendOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_drvSendOut_OutputPorts() const
ComStubComponentBase(const char *compName="")
Construct ComStubComponentBase object.
void set_drvAsyncSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvAsyncSendOut[portNum].
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
FwIndexType getNum_dataIn_InputPorts() const
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
FwIndexType getNum_drvReceiveReturnOut_OutputPorts() const
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
Drv::ByteStreamStatus drvSendOut_out(FwIndexType portNum, Fw::Buffer &sendBuffer)
Invoke output port drvSendOut.
void drvConnected_handlerBase(FwIndexType portNum)
Handler base-class function for input port drvConnected.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
bool isConnected_drvReceiveReturnOut_OutputPort(FwIndexType portNum)
FwIndexType getNum_dataReturnOut_OutputPorts() const
FwIndexType getNum_drvConnected_InputPorts() const
Auto-generated base for ComStub component.
void addCallPort(InputSuccessConditionPort *callPort)
Register an input port.
virtual void drvAsyncSendReturnIn_handler(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)=0
Handler for input port drvAsyncSendReturnIn.
Drv::InputByteStreamDataPort * get_drvReceiveIn_InputPort(FwIndexType portNum)
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
virtual void drvConnected_handler(FwIndexType portNum)=0
Handler for input port drvConnected.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
virtual ~ComStubComponentBase()
Destroy ComStubComponentBase object.
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void init()
Object initializer.
Definition: ObjBase.cpp:24
void drvReceiveReturnOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port drvReceiveReturnOut.
void init()
Initialization function.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
void drvAsyncSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port drvAsyncSendOut.
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
Status returned by the send call.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
const char * toChar() const
Definition: ObjectName.hpp:50
void invoke(Fw::Success &condition) const
Invoke a port interface.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port interface.
Drv::InputByteStreamReadyPort * get_drvConnected_InputPort(FwIndexType portNum)
void init()
Initialization function.
bool isConnected_drvSendOut_OutputPort(FwIndexType portNum)
bool isConnected() const
Definition: PortBase.cpp:38
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:55
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
void setPortNum(FwIndexType portNum)
FwIndexType getNum_drvReceiveIn_InputPorts() const
FwIndexType getNum_dataOut_OutputPorts() const
void init()
Initialization function.
virtual void drvReceiveIn_handler(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)=0
Handler for input port drvReceiveIn.
Drv::InputByteStreamDataPort * get_drvAsyncSendReturnIn_InputPort(FwIndexType portNum)
void init()
Initialization function.
void init()
Initialization function.
FwIndexType getNum_drvAsyncSendReturnIn_InputPorts() const
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
PlatformIndexType FwIndexType
Drv::ByteStreamStatus invoke(Fw::Buffer &sendBuffer) const
Invoke a port interface.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:90
void set_drvReceiveReturnOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvReceiveReturnOut[portNum].
void addCallPort(InputByteStreamSendPort *callPort)
Register an input port.
Type used to pass context info between components during framing/deframing.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void drvReceiveIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvReceiveIn.
RateGroupDivider component implementation.
void set_drvSendOut_OutputPort(FwIndexType portNum, Drv::InputByteStreamSendPort *port)
Connect port to drvSendOut[portNum].
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition)
Invoke output port comStatusOut.
void init()
Initialization function.
FwIndexType getNum_dataReturnIn_InputPorts() const
FwIndexType getNum_comStatusOut_OutputPorts() const
#define FW_ASSERT(...)
Definition: Assert.hpp:14
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
Success/Failure.
void drvAsyncSendReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvAsyncSendReturnIn.
void init()
Initialization function.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
FwIndexType getNum_drvAsyncSendOut_OutputPorts() const