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  // Connection status queries for typed output ports
505  // ----------------------------------------------------------------------
506 
509  {
510  FW_ASSERT(
511  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
512  static_cast<FwAssertArgType>(portNum)
513  );
514 
515  return this->m_comStatusOut_OutputPort[portNum].isConnected();
516  }
517 
520  {
521  FW_ASSERT(
522  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
523  static_cast<FwAssertArgType>(portNum)
524  );
525 
526  return this->m_dataOut_OutputPort[portNum].isConnected();
527  }
528 
531  {
532  FW_ASSERT(
533  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
534  static_cast<FwAssertArgType>(portNum)
535  );
536 
537  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
538  }
539 
542  {
543  FW_ASSERT(
544  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
545  static_cast<FwAssertArgType>(portNum)
546  );
547 
548  return this->m_drvAsyncSendOut_OutputPort[portNum].isConnected();
549  }
550 
553  {
554  FW_ASSERT(
555  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
556  static_cast<FwAssertArgType>(portNum)
557  );
558 
559  return this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected();
560  }
561 
564  {
565  FW_ASSERT(
566  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
567  static_cast<FwAssertArgType>(portNum)
568  );
569 
570  return this->m_drvSendOut_OutputPort[portNum].isConnected();
571  }
572 
573  // ----------------------------------------------------------------------
574  // Port handler base-class functions for typed input ports
575  //
576  // Call these functions directly to bypass the corresponding ports
577  // ----------------------------------------------------------------------
578 
581  FwIndexType portNum,
582  Fw::Buffer& data,
583  const ComCfg::FrameContext& context
584  )
585  {
586  // Make sure port number is valid
587  FW_ASSERT(
588  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
589  static_cast<FwAssertArgType>(portNum)
590  );
591 
592  // Call handler function
593  this->dataIn_handler(
594  portNum,
595  data,
596  context
597  );
598  }
599 
602  FwIndexType portNum,
603  Fw::Buffer& data,
604  const ComCfg::FrameContext& context
605  )
606  {
607  // Make sure port number is valid
608  FW_ASSERT(
609  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
610  static_cast<FwAssertArgType>(portNum)
611  );
612 
613  // Call handler function
614  this->dataReturnIn_handler(
615  portNum,
616  data,
617  context
618  );
619  }
620 
623  FwIndexType portNum,
624  Fw::Buffer& buffer,
625  const Drv::ByteStreamStatus& status
626  )
627  {
628  // Make sure port number is valid
629  FW_ASSERT(
630  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendReturnIn_InputPorts()),
631  static_cast<FwAssertArgType>(portNum)
632  );
633 
634  // Call handler function
636  portNum,
637  buffer,
638  status
639  );
640  }
641 
644  {
645  // Make sure port number is valid
646  FW_ASSERT(
647  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
648  static_cast<FwAssertArgType>(portNum)
649  );
650 
651  // Call handler function
652  this->drvConnected_handler(portNum);
653  }
654 
657  FwIndexType portNum,
658  Fw::Buffer& buffer,
659  const Drv::ByteStreamStatus& status
660  )
661  {
662  // Make sure port number is valid
663  FW_ASSERT(
664  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
665  static_cast<FwAssertArgType>(portNum)
666  );
667 
668  // Call handler function
669  this->drvReceiveIn_handler(
670  portNum,
671  buffer,
672  status
673  );
674  }
675 
676  // ----------------------------------------------------------------------
677  // Invocation functions for typed output ports
678  // ----------------------------------------------------------------------
679 
682  FwIndexType portNum,
683  Fw::Success& condition
684  )
685  {
686  FW_ASSERT(
687  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
688  static_cast<FwAssertArgType>(portNum)
689  );
690 
691  FW_ASSERT(
692  this->m_comStatusOut_OutputPort[portNum].isConnected(),
693  static_cast<FwAssertArgType>(portNum)
694  );
695  this->m_comStatusOut_OutputPort[portNum].invoke(
696  condition
697  );
698  }
699 
702  FwIndexType portNum,
703  Fw::Buffer& data,
704  const ComCfg::FrameContext& context
705  )
706  {
707  FW_ASSERT(
708  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
709  static_cast<FwAssertArgType>(portNum)
710  );
711 
712  FW_ASSERT(
713  this->m_dataOut_OutputPort[portNum].isConnected(),
714  static_cast<FwAssertArgType>(portNum)
715  );
716  this->m_dataOut_OutputPort[portNum].invoke(
717  data,
718  context
719  );
720  }
721 
724  FwIndexType portNum,
725  Fw::Buffer& data,
726  const ComCfg::FrameContext& context
727  )
728  {
729  FW_ASSERT(
730  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
731  static_cast<FwAssertArgType>(portNum)
732  );
733 
734  FW_ASSERT(
735  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
736  static_cast<FwAssertArgType>(portNum)
737  );
738  this->m_dataReturnOut_OutputPort[portNum].invoke(
739  data,
740  context
741  );
742  }
743 
746  FwIndexType portNum,
747  Fw::Buffer& fwBuffer
748  )
749  {
750  FW_ASSERT(
751  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
752  static_cast<FwAssertArgType>(portNum)
753  );
754 
755  FW_ASSERT(
756  this->m_drvAsyncSendOut_OutputPort[portNum].isConnected(),
757  static_cast<FwAssertArgType>(portNum)
758  );
759  this->m_drvAsyncSendOut_OutputPort[portNum].invoke(
760  fwBuffer
761  );
762  }
763 
766  FwIndexType portNum,
767  Fw::Buffer& fwBuffer
768  )
769  {
770  FW_ASSERT(
771  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
772  static_cast<FwAssertArgType>(portNum)
773  );
774 
775  FW_ASSERT(
776  this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected(),
777  static_cast<FwAssertArgType>(portNum)
778  );
779  this->m_drvReceiveReturnOut_OutputPort[portNum].invoke(
780  fwBuffer
781  );
782  }
783 
786  FwIndexType portNum,
787  Fw::Buffer& sendBuffer
788  )
789  {
790  FW_ASSERT(
791  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
792  static_cast<FwAssertArgType>(portNum)
793  );
794 
795  FW_ASSERT(
796  this->m_drvSendOut_OutputPort[portNum].isConnected(),
797  static_cast<FwAssertArgType>(portNum)
798  );
799  return this->m_drvSendOut_OutputPort[portNum].invoke(
800  sendBuffer
801  );
802  }
803 
804  // ----------------------------------------------------------------------
805  // Calls for messages received on typed input ports
806  // ----------------------------------------------------------------------
807 
808  void ComStubComponentBase ::
809  m_p_dataIn_in(
810  Fw::PassiveComponentBase* callComp,
811  FwIndexType portNum,
812  Fw::Buffer& data,
813  const ComCfg::FrameContext& context
814  )
815  {
816  FW_ASSERT(callComp);
817  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
818  compPtr->dataIn_handlerBase(
819  portNum,
820  data,
821  context
822  );
823  }
824 
825  void ComStubComponentBase ::
826  m_p_dataReturnIn_in(
827  Fw::PassiveComponentBase* callComp,
828  FwIndexType portNum,
829  Fw::Buffer& data,
830  const ComCfg::FrameContext& context
831  )
832  {
833  FW_ASSERT(callComp);
834  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
835  compPtr->dataReturnIn_handlerBase(
836  portNum,
837  data,
838  context
839  );
840  }
841 
842  void ComStubComponentBase ::
843  m_p_drvAsyncSendReturnIn_in(
844  Fw::PassiveComponentBase* callComp,
845  FwIndexType portNum,
846  Fw::Buffer& buffer,
847  const Drv::ByteStreamStatus& status
848  )
849  {
850  FW_ASSERT(callComp);
851  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
852  compPtr->drvAsyncSendReturnIn_handlerBase(
853  portNum,
854  buffer,
855  status
856  );
857  }
858 
859  void ComStubComponentBase ::
860  m_p_drvConnected_in(
861  Fw::PassiveComponentBase* callComp,
862  FwIndexType portNum
863  )
864  {
865  FW_ASSERT(callComp);
866  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
867  compPtr->drvConnected_handlerBase(portNum);
868  }
869 
870  void ComStubComponentBase ::
871  m_p_drvReceiveIn_in(
872  Fw::PassiveComponentBase* callComp,
873  FwIndexType portNum,
874  Fw::Buffer& buffer,
875  const Drv::ByteStreamStatus& status
876  )
877  {
878  FW_ASSERT(callComp);
879  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
880  compPtr->drvReceiveIn_handlerBase(
881  portNum,
882  buffer,
883  status
884  );
885  }
886 
887 }
static constexpr FwIndexType getNum_dataIn_InputPorts()
bool isConnected_drvAsyncSendOut_OutputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_drvSendOut_OutputPorts()
ComStubComponentBase(const char *compName="")
Construct ComStubComponentBase object.
static constexpr FwIndexType getNum_drvAsyncSendOut_OutputPorts()
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.
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
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)
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
bool isConnected_drvReceiveReturnOut_OutputPort(FwIndexType portNum)
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.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
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)
static constexpr FwIndexType getNum_comStatusOut_OutputPorts()
void init()
Initialization function.
bool isConnected_drvSendOut_OutputPort(FwIndexType portNum)
bool isConnected() const
Definition: PortBase.cpp:38
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
static constexpr FwIndexType getNum_drvReceiveReturnOut_OutputPorts()
#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)
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.
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.
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)
static constexpr FwIndexType getNum_drvConnected_InputPorts()
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.
Implementation of malloc based allocator.
void init()
Initialization function.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
static constexpr FwIndexType getNum_drvAsyncSendReturnIn_InputPorts()
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.
static constexpr FwIndexType getNum_drvReceiveIn_InputPorts()