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 #if !FW_DIRECT_PORT_CALLS
27  // Connect input port dataIn
28  for (
29  FwIndexType port = 0;
30  port < static_cast<FwIndexType>(this->getNum_dataIn_InputPorts());
31  port++
32  ) {
33  this->m_dataIn_InputPort[port].init();
34  this->m_dataIn_InputPort[port].addCallComp(
35  this,
36  m_p_dataIn_in
37  );
38  this->m_dataIn_InputPort[port].setPortNum(port);
39 
40 #if FW_OBJECT_NAMES == 1
41  Fw::ObjectName portName;
42  portName.format(
43  "%s_dataIn_InputPort[%" PRI_FwIndexType "]",
44  this->m_objName.toChar(),
45  port
46  );
47  this->m_dataIn_InputPort[port].setObjName(portName.toChar());
48 #endif
49  }
50 #endif
51 
52 #if !FW_DIRECT_PORT_CALLS
53  // Connect input port dataReturnIn
54  for (
55  FwIndexType port = 0;
56  port < static_cast<FwIndexType>(this->getNum_dataReturnIn_InputPorts());
57  port++
58  ) {
59  this->m_dataReturnIn_InputPort[port].init();
60  this->m_dataReturnIn_InputPort[port].addCallComp(
61  this,
62  m_p_dataReturnIn_in
63  );
64  this->m_dataReturnIn_InputPort[port].setPortNum(port);
65 
66 #if FW_OBJECT_NAMES == 1
67  Fw::ObjectName portName;
68  portName.format(
69  "%s_dataReturnIn_InputPort[%" PRI_FwIndexType "]",
70  this->m_objName.toChar(),
71  port
72  );
73  this->m_dataReturnIn_InputPort[port].setObjName(portName.toChar());
74 #endif
75  }
76 #endif
77 
78 #if !FW_DIRECT_PORT_CALLS
79  // Connect input port drvAsyncSendReturnIn
80  for (
81  FwIndexType port = 0;
82  port < static_cast<FwIndexType>(this->getNum_drvAsyncSendReturnIn_InputPorts());
83  port++
84  ) {
85  this->m_drvAsyncSendReturnIn_InputPort[port].init();
86  this->m_drvAsyncSendReturnIn_InputPort[port].addCallComp(
87  this,
88  m_p_drvAsyncSendReturnIn_in
89  );
90  this->m_drvAsyncSendReturnIn_InputPort[port].setPortNum(port);
91 
92 #if FW_OBJECT_NAMES == 1
93  Fw::ObjectName portName;
94  portName.format(
95  "%s_drvAsyncSendReturnIn_InputPort[%" PRI_FwIndexType "]",
96  this->m_objName.toChar(),
97  port
98  );
99  this->m_drvAsyncSendReturnIn_InputPort[port].setObjName(portName.toChar());
100 #endif
101  }
102 #endif
103 
104 #if !FW_DIRECT_PORT_CALLS
105  // Connect input port drvConnected
106  for (
107  FwIndexType port = 0;
108  port < static_cast<FwIndexType>(this->getNum_drvConnected_InputPorts());
109  port++
110  ) {
111  this->m_drvConnected_InputPort[port].init();
112  this->m_drvConnected_InputPort[port].addCallComp(
113  this,
114  m_p_drvConnected_in
115  );
116  this->m_drvConnected_InputPort[port].setPortNum(port);
117 
118 #if FW_OBJECT_NAMES == 1
119  Fw::ObjectName portName;
120  portName.format(
121  "%s_drvConnected_InputPort[%" PRI_FwIndexType "]",
122  this->m_objName.toChar(),
123  port
124  );
125  this->m_drvConnected_InputPort[port].setObjName(portName.toChar());
126 #endif
127  }
128 #endif
129 
130 #if !FW_DIRECT_PORT_CALLS
131  // Connect input port drvReceiveIn
132  for (
133  FwIndexType port = 0;
134  port < static_cast<FwIndexType>(this->getNum_drvReceiveIn_InputPorts());
135  port++
136  ) {
137  this->m_drvReceiveIn_InputPort[port].init();
138  this->m_drvReceiveIn_InputPort[port].addCallComp(
139  this,
140  m_p_drvReceiveIn_in
141  );
142  this->m_drvReceiveIn_InputPort[port].setPortNum(port);
143 
144 #if FW_OBJECT_NAMES == 1
145  Fw::ObjectName portName;
146  portName.format(
147  "%s_drvReceiveIn_InputPort[%" PRI_FwIndexType "]",
148  this->m_objName.toChar(),
149  port
150  );
151  this->m_drvReceiveIn_InputPort[port].setObjName(portName.toChar());
152 #endif
153  }
154 #endif
155 
156 #if !FW_DIRECT_PORT_CALLS
157  // Connect output port comStatusOut
158  for (
159  FwIndexType port = 0;
160  port < static_cast<FwIndexType>(this->getNum_comStatusOut_OutputPorts());
161  port++
162  ) {
163  this->m_comStatusOut_OutputPort[port].init();
164 
165 #if FW_OBJECT_NAMES == 1
166  Fw::ObjectName portName;
167  portName.format(
168  "%s_comStatusOut_OutputPort[%" PRI_FwIndexType "]",
169  this->m_objName.toChar(),
170  port
171  );
172  this->m_comStatusOut_OutputPort[port].setObjName(portName.toChar());
173 #endif
174  }
175 #endif
176 
177 #if !FW_DIRECT_PORT_CALLS
178  // Connect output port dataOut
179  for (
180  FwIndexType port = 0;
181  port < static_cast<FwIndexType>(this->getNum_dataOut_OutputPorts());
182  port++
183  ) {
184  this->m_dataOut_OutputPort[port].init();
185 
186 #if FW_OBJECT_NAMES == 1
187  Fw::ObjectName portName;
188  portName.format(
189  "%s_dataOut_OutputPort[%" PRI_FwIndexType "]",
190  this->m_objName.toChar(),
191  port
192  );
193  this->m_dataOut_OutputPort[port].setObjName(portName.toChar());
194 #endif
195  }
196 #endif
197 
198 #if !FW_DIRECT_PORT_CALLS
199  // Connect output port dataReturnOut
200  for (
201  FwIndexType port = 0;
202  port < static_cast<FwIndexType>(this->getNum_dataReturnOut_OutputPorts());
203  port++
204  ) {
205  this->m_dataReturnOut_OutputPort[port].init();
206 
207 #if FW_OBJECT_NAMES == 1
208  Fw::ObjectName portName;
209  portName.format(
210  "%s_dataReturnOut_OutputPort[%" PRI_FwIndexType "]",
211  this->m_objName.toChar(),
212  port
213  );
214  this->m_dataReturnOut_OutputPort[port].setObjName(portName.toChar());
215 #endif
216  }
217 #endif
218 
219 #if !FW_DIRECT_PORT_CALLS
220  // Connect output port drvAsyncSendOut
221  for (
222  FwIndexType port = 0;
223  port < static_cast<FwIndexType>(this->getNum_drvAsyncSendOut_OutputPorts());
224  port++
225  ) {
226  this->m_drvAsyncSendOut_OutputPort[port].init();
227 
228 #if FW_OBJECT_NAMES == 1
229  Fw::ObjectName portName;
230  portName.format(
231  "%s_drvAsyncSendOut_OutputPort[%" PRI_FwIndexType "]",
232  this->m_objName.toChar(),
233  port
234  );
235  this->m_drvAsyncSendOut_OutputPort[port].setObjName(portName.toChar());
236 #endif
237  }
238 #endif
239 
240 #if !FW_DIRECT_PORT_CALLS
241  // Connect output port drvReceiveReturnOut
242  for (
243  FwIndexType port = 0;
244  port < static_cast<FwIndexType>(this->getNum_drvReceiveReturnOut_OutputPorts());
245  port++
246  ) {
247  this->m_drvReceiveReturnOut_OutputPort[port].init();
248 
249 #if FW_OBJECT_NAMES == 1
250  Fw::ObjectName portName;
251  portName.format(
252  "%s_drvReceiveReturnOut_OutputPort[%" PRI_FwIndexType "]",
253  this->m_objName.toChar(),
254  port
255  );
256  this->m_drvReceiveReturnOut_OutputPort[port].setObjName(portName.toChar());
257 #endif
258  }
259 #endif
260 
261 #if !FW_DIRECT_PORT_CALLS
262  // Connect output port drvSendOut
263  for (
264  FwIndexType port = 0;
265  port < static_cast<FwIndexType>(this->getNum_drvSendOut_OutputPorts());
266  port++
267  ) {
268  this->m_drvSendOut_OutputPort[port].init();
269 
270 #if FW_OBJECT_NAMES == 1
271  Fw::ObjectName portName;
272  portName.format(
273  "%s_drvSendOut_OutputPort[%" PRI_FwIndexType "]",
274  this->m_objName.toChar(),
275  port
276  );
277  this->m_drvSendOut_OutputPort[port].setObjName(portName.toChar());
278 #endif
279  }
280 #endif
281  }
282 
283 #if !FW_DIRECT_PORT_CALLS
284 
285  // ----------------------------------------------------------------------
286  // Getters for typed input ports
287  // ----------------------------------------------------------------------
288 
291  {
292  FW_ASSERT(
293  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
294  static_cast<FwAssertArgType>(portNum)
295  );
296 
297  return &this->m_dataIn_InputPort[portNum];
298  }
299 
302  {
303  FW_ASSERT(
304  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
305  static_cast<FwAssertArgType>(portNum)
306  );
307 
308  return &this->m_dataReturnIn_InputPort[portNum];
309  }
310 
313  {
314  FW_ASSERT(
315  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendReturnIn_InputPorts()),
316  static_cast<FwAssertArgType>(portNum)
317  );
318 
319  return &this->m_drvAsyncSendReturnIn_InputPort[portNum];
320  }
321 
324  {
325  FW_ASSERT(
326  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
327  static_cast<FwAssertArgType>(portNum)
328  );
329 
330  return &this->m_drvConnected_InputPort[portNum];
331  }
332 
335  {
336  FW_ASSERT(
337  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
338  static_cast<FwAssertArgType>(portNum)
339  );
340 
341  return &this->m_drvReceiveIn_InputPort[portNum];
342  }
343 
344 #endif
345 
346 #if !FW_DIRECT_PORT_CALLS
347 
348  // ----------------------------------------------------------------------
349  // Connect typed input ports to typed output ports
350  // ----------------------------------------------------------------------
351 
354  FwIndexType portNum,
356  )
357  {
358  FW_ASSERT(
359  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
360  static_cast<FwAssertArgType>(portNum)
361  );
362 
363  this->m_comStatusOut_OutputPort[portNum].addCallPort(port);
364  }
365 
368  FwIndexType portNum,
370  )
371  {
372  FW_ASSERT(
373  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
374  static_cast<FwAssertArgType>(portNum)
375  );
376 
377  this->m_dataOut_OutputPort[portNum].addCallPort(port);
378  }
379 
382  FwIndexType portNum,
384  )
385  {
386  FW_ASSERT(
387  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
388  static_cast<FwAssertArgType>(portNum)
389  );
390 
391  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
392  }
393 
396  FwIndexType portNum,
398  )
399  {
400  FW_ASSERT(
401  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
402  static_cast<FwAssertArgType>(portNum)
403  );
404 
405  this->m_drvAsyncSendOut_OutputPort[portNum].addCallPort(port);
406  }
407 
410  FwIndexType portNum,
412  )
413  {
414  FW_ASSERT(
415  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
416  static_cast<FwAssertArgType>(portNum)
417  );
418 
419  this->m_drvReceiveReturnOut_OutputPort[portNum].addCallPort(port);
420  }
421 
424  FwIndexType portNum,
426  )
427  {
428  FW_ASSERT(
429  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
430  static_cast<FwAssertArgType>(portNum)
431  );
432 
433  this->m_drvSendOut_OutputPort[portNum].addCallPort(port);
434  }
435 
436 #endif
437 
438 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
439 
440  // ----------------------------------------------------------------------
441  // Connect serial input ports to typed output ports
442  // ----------------------------------------------------------------------
443 
446  FwIndexType portNum,
447  Fw::InputSerializePort* port
448  )
449  {
450  FW_ASSERT(
451  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
452  static_cast<FwAssertArgType>(portNum)
453  );
454 
455  this->m_comStatusOut_OutputPort[portNum].registerSerialPort(port);
456  }
457 
460  FwIndexType portNum,
461  Fw::InputSerializePort* port
462  )
463  {
464  FW_ASSERT(
465  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
466  static_cast<FwAssertArgType>(portNum)
467  );
468 
469  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
470  }
471 
474  FwIndexType portNum,
475  Fw::InputSerializePort* port
476  )
477  {
478  FW_ASSERT(
479  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
480  static_cast<FwAssertArgType>(portNum)
481  );
482 
483  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
484  }
485 
488  FwIndexType portNum,
489  Fw::InputSerializePort* port
490  )
491  {
492  FW_ASSERT(
493  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
494  static_cast<FwAssertArgType>(portNum)
495  );
496 
497  this->m_drvAsyncSendOut_OutputPort[portNum].registerSerialPort(port);
498  }
499 
502  FwIndexType portNum,
503  Fw::InputSerializePort* port
504  )
505  {
506  FW_ASSERT(
507  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
508  static_cast<FwAssertArgType>(portNum)
509  );
510 
511  this->m_drvReceiveReturnOut_OutputPort[portNum].registerSerialPort(port);
512  }
513 
514 #endif
515 
516  // ----------------------------------------------------------------------
517  // Component construction and destruction
518  // ----------------------------------------------------------------------
519 
521  ComStubComponentBase(const char* compName) :
522  Fw::PassiveComponentBase(compName)
523  {
524 
525  }
526 
529  {
530 
531  }
532 
533 #if !FW_DIRECT_PORT_CALLS
534 
535  // ----------------------------------------------------------------------
536  // Connection status queries for typed output ports
537  // ----------------------------------------------------------------------
538 
541  {
542  FW_ASSERT(
543  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
544  static_cast<FwAssertArgType>(portNum)
545  );
546 
547  return this->m_comStatusOut_OutputPort[portNum].isConnected();
548  }
549 
552  {
553  FW_ASSERT(
554  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
555  static_cast<FwAssertArgType>(portNum)
556  );
557 
558  return this->m_dataOut_OutputPort[portNum].isConnected();
559  }
560 
563  {
564  FW_ASSERT(
565  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
566  static_cast<FwAssertArgType>(portNum)
567  );
568 
569  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
570  }
571 
574  {
575  FW_ASSERT(
576  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
577  static_cast<FwAssertArgType>(portNum)
578  );
579 
580  return this->m_drvAsyncSendOut_OutputPort[portNum].isConnected();
581  }
582 
585  {
586  FW_ASSERT(
587  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
588  static_cast<FwAssertArgType>(portNum)
589  );
590 
591  return this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected();
592  }
593 
596  {
597  FW_ASSERT(
598  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
599  static_cast<FwAssertArgType>(portNum)
600  );
601 
602  return this->m_drvSendOut_OutputPort[portNum].isConnected();
603  }
604 
605 #endif
606 
607  // ----------------------------------------------------------------------
608  // Port handler base-class functions for typed input ports
609  //
610  // Call these functions directly to bypass the corresponding ports
611  // ----------------------------------------------------------------------
612 
615  FwIndexType portNum,
616  Fw::Buffer& data,
617  const ComCfg::FrameContext& context
618  )
619  {
620  // Make sure port number is valid
621  FW_ASSERT(
622  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
623  static_cast<FwAssertArgType>(portNum)
624  );
625 
626  // Call handler function
627  this->dataIn_handler(
628  portNum,
629  data,
630  context
631  );
632  }
633 
636  FwIndexType portNum,
637  Fw::Buffer& data,
638  const ComCfg::FrameContext& context
639  )
640  {
641  // Make sure port number is valid
642  FW_ASSERT(
643  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
644  static_cast<FwAssertArgType>(portNum)
645  );
646 
647  // Call handler function
648  this->dataReturnIn_handler(
649  portNum,
650  data,
651  context
652  );
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_drvAsyncSendReturnIn_InputPorts()),
665  static_cast<FwAssertArgType>(portNum)
666  );
667 
668  // Call handler function
670  portNum,
671  buffer,
672  status
673  );
674  }
675 
678  {
679  // Make sure port number is valid
680  FW_ASSERT(
681  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
682  static_cast<FwAssertArgType>(portNum)
683  );
684 
685  // Call handler function
686  this->drvConnected_handler(portNum);
687  }
688 
691  FwIndexType portNum,
692  Fw::Buffer& buffer,
693  const Drv::ByteStreamStatus& status
694  )
695  {
696  // Make sure port number is valid
697  FW_ASSERT(
698  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
699  static_cast<FwAssertArgType>(portNum)
700  );
701 
702  // Call handler function
703  this->drvReceiveIn_handler(
704  portNum,
705  buffer,
706  status
707  );
708  }
709 
710 #if !FW_DIRECT_PORT_CALLS
711 
712  // ----------------------------------------------------------------------
713  // Invocation functions for typed output ports
714  // ----------------------------------------------------------------------
715 
718  FwIndexType portNum,
719  Fw::Success& condition
720  ) const
721  {
722  FW_ASSERT(
723  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
724  static_cast<FwAssertArgType>(portNum)
725  );
726 
727  FW_ASSERT(
728  this->m_comStatusOut_OutputPort[portNum].isConnected(),
729  static_cast<FwAssertArgType>(portNum)
730  );
731  this->m_comStatusOut_OutputPort[portNum].invoke(
732  condition
733  );
734  }
735 
738  FwIndexType portNum,
739  Fw::Buffer& data,
740  const ComCfg::FrameContext& context
741  ) const
742  {
743  FW_ASSERT(
744  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
745  static_cast<FwAssertArgType>(portNum)
746  );
747 
748  FW_ASSERT(
749  this->m_dataOut_OutputPort[portNum].isConnected(),
750  static_cast<FwAssertArgType>(portNum)
751  );
752  this->m_dataOut_OutputPort[portNum].invoke(
753  data,
754  context
755  );
756  }
757 
760  FwIndexType portNum,
761  Fw::Buffer& data,
762  const ComCfg::FrameContext& context
763  ) const
764  {
765  FW_ASSERT(
766  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
767  static_cast<FwAssertArgType>(portNum)
768  );
769 
770  FW_ASSERT(
771  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
772  static_cast<FwAssertArgType>(portNum)
773  );
774  this->m_dataReturnOut_OutputPort[portNum].invoke(
775  data,
776  context
777  );
778  }
779 
782  FwIndexType portNum,
783  Fw::Buffer& fwBuffer
784  ) const
785  {
786  FW_ASSERT(
787  (0 <= portNum) && (portNum < this->getNum_drvAsyncSendOut_OutputPorts()),
788  static_cast<FwAssertArgType>(portNum)
789  );
790 
791  FW_ASSERT(
792  this->m_drvAsyncSendOut_OutputPort[portNum].isConnected(),
793  static_cast<FwAssertArgType>(portNum)
794  );
795  this->m_drvAsyncSendOut_OutputPort[portNum].invoke(
796  fwBuffer
797  );
798  }
799 
802  FwIndexType portNum,
803  Fw::Buffer& fwBuffer
804  ) const
805  {
806  FW_ASSERT(
807  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
808  static_cast<FwAssertArgType>(portNum)
809  );
810 
811  FW_ASSERT(
812  this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected(),
813  static_cast<FwAssertArgType>(portNum)
814  );
815  this->m_drvReceiveReturnOut_OutputPort[portNum].invoke(
816  fwBuffer
817  );
818  }
819 
822  FwIndexType portNum,
823  Fw::Buffer& sendBuffer
824  ) const
825  {
826  FW_ASSERT(
827  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
828  static_cast<FwAssertArgType>(portNum)
829  );
830 
831  FW_ASSERT(
832  this->m_drvSendOut_OutputPort[portNum].isConnected(),
833  static_cast<FwAssertArgType>(portNum)
834  );
835  return this->m_drvSendOut_OutputPort[portNum].invoke(
836  sendBuffer
837  );
838  }
839 
840 #endif
841 
842  // ----------------------------------------------------------------------
843  // Calls for messages received on typed input ports
844  // ----------------------------------------------------------------------
845 
846  void ComStubComponentBase ::
847  m_p_dataIn_in(
848  Fw::PassiveComponentBase* callComp,
849  FwIndexType portNum,
850  Fw::Buffer& data,
851  const ComCfg::FrameContext& context
852  )
853  {
854  FW_ASSERT(callComp);
855  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
856  compPtr->dataIn_handlerBase(
857  portNum,
858  data,
859  context
860  );
861  }
862 
863  void ComStubComponentBase ::
864  m_p_dataReturnIn_in(
865  Fw::PassiveComponentBase* callComp,
866  FwIndexType portNum,
867  Fw::Buffer& data,
868  const ComCfg::FrameContext& context
869  )
870  {
871  FW_ASSERT(callComp);
872  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
873  compPtr->dataReturnIn_handlerBase(
874  portNum,
875  data,
876  context
877  );
878  }
879 
880  void ComStubComponentBase ::
881  m_p_drvAsyncSendReturnIn_in(
882  Fw::PassiveComponentBase* callComp,
883  FwIndexType portNum,
884  Fw::Buffer& buffer,
885  const Drv::ByteStreamStatus& status
886  )
887  {
888  FW_ASSERT(callComp);
889  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
890  compPtr->drvAsyncSendReturnIn_handlerBase(
891  portNum,
892  buffer,
893  status
894  );
895  }
896 
897  void ComStubComponentBase ::
898  m_p_drvConnected_in(
899  Fw::PassiveComponentBase* callComp,
900  FwIndexType portNum
901  )
902  {
903  FW_ASSERT(callComp);
904  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
905  compPtr->drvConnected_handlerBase(portNum);
906  }
907 
908  void ComStubComponentBase ::
909  m_p_drvReceiveIn_in(
910  Fw::PassiveComponentBase* callComp,
911  FwIndexType portNum,
912  Fw::Buffer& buffer,
913  const Drv::ByteStreamStatus& status
914  )
915  {
916  FW_ASSERT(callComp);
917  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
918  compPtr->drvReceiveIn_handlerBase(
919  portNum,
920  buffer,
921  status
922  );
923  }
924 
925 }
static constexpr FwIndexType getNum_dataIn_InputPorts()
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 set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
void drvConnected_handlerBase(FwIndexType portNum)
Handler base-class function for input port drvConnected.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum) 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
bool isConnected_drvAsyncSendOut_OutputPort(FwIndexType portNum) const
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition) const
Invoke output port comStatusOut.
void init()
Initialization function.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
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 connection.
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
const char * toChar() const
Convert to a C-style char*.
Definition: ObjectName.hpp:50
void invoke(Fw::Success &condition) const
Invoke a port connection.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port connection.
Drv::InputByteStreamReadyPort * get_drvConnected_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_comStatusOut_OutputPorts()
bool isConnected_drvReceiveReturnOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
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:39
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.
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
Drv::InputByteStreamDataPort * get_drvAsyncSendReturnIn_InputPort(FwIndexType portNum)
void init()
Initialization function.
void drvAsyncSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port drvAsyncSendOut.
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
void set_drvReceiveReturnOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvReceiveReturnOut[portNum].
void addCallPort(InputByteStreamSendPort *callPort)
Register an input port.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
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()
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
Implementation of malloc based allocator.
void init()
Initialization function.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
static constexpr FwIndexType getNum_drvAsyncSendReturnIn_InputPorts()
Success/Failure.
bool isConnected_drvSendOut_OutputPort(FwIndexType portNum) const
void drvAsyncSendReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvAsyncSendReturnIn.
void drvReceiveReturnOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port drvReceiveReturnOut.
void init()
Initialization function.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
Drv::ByteStreamStatus drvSendOut_out(FwIndexType portNum, Fw::Buffer &sendBuffer) const
Invoke output port drvSendOut.
static constexpr FwIndexType getNum_drvReceiveIn_InputPorts()