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 drvConnected
75  for (
76  FwIndexType port = 0;
77  port < static_cast<FwIndexType>(this->getNum_drvConnected_InputPorts());
78  port++
79  ) {
80  this->m_drvConnected_InputPort[port].init();
81  this->m_drvConnected_InputPort[port].addCallComp(
82  this,
83  m_p_drvConnected_in
84  );
85  this->m_drvConnected_InputPort[port].setPortNum(port);
86 
87 #if FW_OBJECT_NAMES == 1
88  Fw::ObjectName portName;
89  portName.format(
90  "%s_drvConnected_InputPort[%" PRI_FwIndexType "]",
91  this->m_objName.toChar(),
92  port
93  );
94  this->m_drvConnected_InputPort[port].setObjName(portName.toChar());
95 #endif
96  }
97 
98  // Connect input port drvReceiveIn
99  for (
100  FwIndexType port = 0;
101  port < static_cast<FwIndexType>(this->getNum_drvReceiveIn_InputPorts());
102  port++
103  ) {
104  this->m_drvReceiveIn_InputPort[port].init();
105  this->m_drvReceiveIn_InputPort[port].addCallComp(
106  this,
107  m_p_drvReceiveIn_in
108  );
109  this->m_drvReceiveIn_InputPort[port].setPortNum(port);
110 
111 #if FW_OBJECT_NAMES == 1
112  Fw::ObjectName portName;
113  portName.format(
114  "%s_drvReceiveIn_InputPort[%" PRI_FwIndexType "]",
115  this->m_objName.toChar(),
116  port
117  );
118  this->m_drvReceiveIn_InputPort[port].setObjName(portName.toChar());
119 #endif
120  }
121 
122  // Connect input port drvSendReturnIn
123  for (
124  FwIndexType port = 0;
125  port < static_cast<FwIndexType>(this->getNum_drvSendReturnIn_InputPorts());
126  port++
127  ) {
128  this->m_drvSendReturnIn_InputPort[port].init();
129  this->m_drvSendReturnIn_InputPort[port].addCallComp(
130  this,
131  m_p_drvSendReturnIn_in
132  );
133  this->m_drvSendReturnIn_InputPort[port].setPortNum(port);
134 
135 #if FW_OBJECT_NAMES == 1
136  Fw::ObjectName portName;
137  portName.format(
138  "%s_drvSendReturnIn_InputPort[%" PRI_FwIndexType "]",
139  this->m_objName.toChar(),
140  port
141  );
142  this->m_drvSendReturnIn_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 drvReceiveReturnOut
204  for (
205  FwIndexType port = 0;
206  port < static_cast<FwIndexType>(this->getNum_drvReceiveReturnOut_OutputPorts());
207  port++
208  ) {
209  this->m_drvReceiveReturnOut_OutputPort[port].init();
210 
211 #if FW_OBJECT_NAMES == 1
212  Fw::ObjectName portName;
213  portName.format(
214  "%s_drvReceiveReturnOut_OutputPort[%" PRI_FwIndexType "]",
215  this->m_objName.toChar(),
216  port
217  );
218  this->m_drvReceiveReturnOut_OutputPort[port].setObjName(portName.toChar());
219 #endif
220  }
221 
222  // Connect output port drvSendOut
223  for (
224  FwIndexType port = 0;
225  port < static_cast<FwIndexType>(this->getNum_drvSendOut_OutputPorts());
226  port++
227  ) {
228  this->m_drvSendOut_OutputPort[port].init();
229 
230 #if FW_OBJECT_NAMES == 1
231  Fw::ObjectName portName;
232  portName.format(
233  "%s_drvSendOut_OutputPort[%" PRI_FwIndexType "]",
234  this->m_objName.toChar(),
235  port
236  );
237  this->m_drvSendOut_OutputPort[port].setObjName(portName.toChar());
238 #endif
239  }
240  }
241 
242  // ----------------------------------------------------------------------
243  // Getters for typed input ports
244  // ----------------------------------------------------------------------
245 
248  {
249  FW_ASSERT(
250  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
251  static_cast<FwAssertArgType>(portNum)
252  );
253 
254  return &this->m_dataIn_InputPort[portNum];
255  }
256 
259  {
260  FW_ASSERT(
261  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
262  static_cast<FwAssertArgType>(portNum)
263  );
264 
265  return &this->m_dataReturnIn_InputPort[portNum];
266  }
267 
270  {
271  FW_ASSERT(
272  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
273  static_cast<FwAssertArgType>(portNum)
274  );
275 
276  return &this->m_drvConnected_InputPort[portNum];
277  }
278 
281  {
282  FW_ASSERT(
283  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
284  static_cast<FwAssertArgType>(portNum)
285  );
286 
287  return &this->m_drvReceiveIn_InputPort[portNum];
288  }
289 
292  {
293  FW_ASSERT(
294  (0 <= portNum) && (portNum < this->getNum_drvSendReturnIn_InputPorts()),
295  static_cast<FwAssertArgType>(portNum)
296  );
297 
298  return &this->m_drvSendReturnIn_InputPort[portNum];
299  }
300 
301  // ----------------------------------------------------------------------
302  // Connect typed input ports to typed output ports
303  // ----------------------------------------------------------------------
304 
307  FwIndexType portNum,
309  )
310  {
311  FW_ASSERT(
312  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
313  static_cast<FwAssertArgType>(portNum)
314  );
315 
316  this->m_comStatusOut_OutputPort[portNum].addCallPort(port);
317  }
318 
321  FwIndexType portNum,
323  )
324  {
325  FW_ASSERT(
326  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
327  static_cast<FwAssertArgType>(portNum)
328  );
329 
330  this->m_dataOut_OutputPort[portNum].addCallPort(port);
331  }
332 
335  FwIndexType portNum,
337  )
338  {
339  FW_ASSERT(
340  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
341  static_cast<FwAssertArgType>(portNum)
342  );
343 
344  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
345  }
346 
349  FwIndexType portNum,
351  )
352  {
353  FW_ASSERT(
354  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
355  static_cast<FwAssertArgType>(portNum)
356  );
357 
358  this->m_drvReceiveReturnOut_OutputPort[portNum].addCallPort(port);
359  }
360 
363  FwIndexType portNum,
365  )
366  {
367  FW_ASSERT(
368  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
369  static_cast<FwAssertArgType>(portNum)
370  );
371 
372  this->m_drvSendOut_OutputPort[portNum].addCallPort(port);
373  }
374 
375 #if FW_PORT_SERIALIZATION
376 
377  // ----------------------------------------------------------------------
378  // Connect serial input ports to typed output ports
379  // ----------------------------------------------------------------------
380 
383  FwIndexType portNum,
384  Fw::InputSerializePort* port
385  )
386  {
387  FW_ASSERT(
388  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
389  static_cast<FwAssertArgType>(portNum)
390  );
391 
392  this->m_comStatusOut_OutputPort[portNum].registerSerialPort(port);
393  }
394 
397  FwIndexType portNum,
398  Fw::InputSerializePort* port
399  )
400  {
401  FW_ASSERT(
402  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
403  static_cast<FwAssertArgType>(portNum)
404  );
405 
406  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
407  }
408 
411  FwIndexType portNum,
412  Fw::InputSerializePort* port
413  )
414  {
415  FW_ASSERT(
416  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
417  static_cast<FwAssertArgType>(portNum)
418  );
419 
420  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
421  }
422 
425  FwIndexType portNum,
426  Fw::InputSerializePort* port
427  )
428  {
429  FW_ASSERT(
430  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
431  static_cast<FwAssertArgType>(portNum)
432  );
433 
434  this->m_drvReceiveReturnOut_OutputPort[portNum].registerSerialPort(port);
435  }
436 
439  FwIndexType portNum,
440  Fw::InputSerializePort* port
441  )
442  {
443  FW_ASSERT(
444  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
445  static_cast<FwAssertArgType>(portNum)
446  );
447 
448  this->m_drvSendOut_OutputPort[portNum].registerSerialPort(port);
449  }
450 
451 #endif
452 
453  // ----------------------------------------------------------------------
454  // Component construction and destruction
455  // ----------------------------------------------------------------------
456 
458  ComStubComponentBase(const char* compName) :
459  Fw::PassiveComponentBase(compName)
460  {
461 
462  }
463 
466  {
467 
468  }
469 
470  // ----------------------------------------------------------------------
471  // Getters for numbers of typed input ports
472  // ----------------------------------------------------------------------
473 
476  {
477  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataIn_InputPort));
478  }
479 
482  {
483  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnIn_InputPort));
484  }
485 
488  {
489  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvConnected_InputPort));
490  }
491 
494  {
495  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvReceiveIn_InputPort));
496  }
497 
500  {
501  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvSendReturnIn_InputPort));
502  }
503 
504  // ----------------------------------------------------------------------
505  // Getters for numbers of typed output ports
506  // ----------------------------------------------------------------------
507 
510  {
511  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_comStatusOut_OutputPort));
512  }
513 
516  {
517  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataOut_OutputPort));
518  }
519 
522  {
523  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnOut_OutputPort));
524  }
525 
528  {
529  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvReceiveReturnOut_OutputPort));
530  }
531 
534  {
535  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_drvSendOut_OutputPort));
536  }
537 
538  // ----------------------------------------------------------------------
539  // Connection status queries for typed output ports
540  // ----------------------------------------------------------------------
541 
544  {
545  FW_ASSERT(
546  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
547  static_cast<FwAssertArgType>(portNum)
548  );
549 
550  return this->m_comStatusOut_OutputPort[portNum].isConnected();
551  }
552 
555  {
556  FW_ASSERT(
557  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
558  static_cast<FwAssertArgType>(portNum)
559  );
560 
561  return this->m_dataOut_OutputPort[portNum].isConnected();
562  }
563 
566  {
567  FW_ASSERT(
568  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
569  static_cast<FwAssertArgType>(portNum)
570  );
571 
572  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
573  }
574 
577  {
578  FW_ASSERT(
579  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
580  static_cast<FwAssertArgType>(portNum)
581  );
582 
583  return this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected();
584  }
585 
588  {
589  FW_ASSERT(
590  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
591  static_cast<FwAssertArgType>(portNum)
592  );
593 
594  return this->m_drvSendOut_OutputPort[portNum].isConnected();
595  }
596 
597  // ----------------------------------------------------------------------
598  // Port handler base-class functions for typed input ports
599  //
600  // Call these functions directly to bypass the corresponding ports
601  // ----------------------------------------------------------------------
602 
605  FwIndexType portNum,
606  Fw::Buffer& data,
607  const ComCfg::FrameContext& context
608  )
609  {
610  // Make sure port number is valid
611  FW_ASSERT(
612  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
613  static_cast<FwAssertArgType>(portNum)
614  );
615 
616  // Call handler function
617  this->dataIn_handler(
618  portNum,
619  data,
620  context
621  );
622  }
623 
626  FwIndexType portNum,
627  Fw::Buffer& data,
628  const ComCfg::FrameContext& context
629  )
630  {
631  // Make sure port number is valid
632  FW_ASSERT(
633  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
634  static_cast<FwAssertArgType>(portNum)
635  );
636 
637  // Call handler function
638  this->dataReturnIn_handler(
639  portNum,
640  data,
641  context
642  );
643  }
644 
647  {
648  // Make sure port number is valid
649  FW_ASSERT(
650  (0 <= portNum) && (portNum < this->getNum_drvConnected_InputPorts()),
651  static_cast<FwAssertArgType>(portNum)
652  );
653 
654  // Call handler function
655  this->drvConnected_handler(portNum);
656  }
657 
660  FwIndexType portNum,
661  Fw::Buffer& buffer,
662  const Drv::ByteStreamStatus& status
663  )
664  {
665  // Make sure port number is valid
666  FW_ASSERT(
667  (0 <= portNum) && (portNum < this->getNum_drvReceiveIn_InputPorts()),
668  static_cast<FwAssertArgType>(portNum)
669  );
670 
671  // Call handler function
672  this->drvReceiveIn_handler(
673  portNum,
674  buffer,
675  status
676  );
677  }
678 
681  FwIndexType portNum,
682  Fw::Buffer& buffer,
683  const Drv::ByteStreamStatus& status
684  )
685  {
686  // Make sure port number is valid
687  FW_ASSERT(
688  (0 <= portNum) && (portNum < this->getNum_drvSendReturnIn_InputPorts()),
689  static_cast<FwAssertArgType>(portNum)
690  );
691 
692  // Call handler function
694  portNum,
695  buffer,
696  status
697  );
698  }
699 
700  // ----------------------------------------------------------------------
701  // Invocation functions for typed output ports
702  // ----------------------------------------------------------------------
703 
706  FwIndexType portNum,
707  Fw::Success& condition
708  )
709  {
710  FW_ASSERT(
711  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
712  static_cast<FwAssertArgType>(portNum)
713  );
714 
715  FW_ASSERT(
716  this->m_comStatusOut_OutputPort[portNum].isConnected(),
717  static_cast<FwAssertArgType>(portNum)
718  );
719  this->m_comStatusOut_OutputPort[portNum].invoke(
720  condition
721  );
722  }
723 
726  FwIndexType portNum,
727  Fw::Buffer& data,
728  const ComCfg::FrameContext& context
729  )
730  {
731  FW_ASSERT(
732  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
733  static_cast<FwAssertArgType>(portNum)
734  );
735 
736  FW_ASSERT(
737  this->m_dataOut_OutputPort[portNum].isConnected(),
738  static_cast<FwAssertArgType>(portNum)
739  );
740  this->m_dataOut_OutputPort[portNum].invoke(
741  data,
742  context
743  );
744  }
745 
748  FwIndexType portNum,
749  Fw::Buffer& data,
750  const ComCfg::FrameContext& context
751  )
752  {
753  FW_ASSERT(
754  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
755  static_cast<FwAssertArgType>(portNum)
756  );
757 
758  FW_ASSERT(
759  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
760  static_cast<FwAssertArgType>(portNum)
761  );
762  this->m_dataReturnOut_OutputPort[portNum].invoke(
763  data,
764  context
765  );
766  }
767 
770  FwIndexType portNum,
771  Fw::Buffer& fwBuffer
772  )
773  {
774  FW_ASSERT(
775  (0 <= portNum) && (portNum < this->getNum_drvReceiveReturnOut_OutputPorts()),
776  static_cast<FwAssertArgType>(portNum)
777  );
778 
779  FW_ASSERT(
780  this->m_drvReceiveReturnOut_OutputPort[portNum].isConnected(),
781  static_cast<FwAssertArgType>(portNum)
782  );
783  this->m_drvReceiveReturnOut_OutputPort[portNum].invoke(
784  fwBuffer
785  );
786  }
787 
790  FwIndexType portNum,
791  Fw::Buffer& fwBuffer
792  )
793  {
794  FW_ASSERT(
795  (0 <= portNum) && (portNum < this->getNum_drvSendOut_OutputPorts()),
796  static_cast<FwAssertArgType>(portNum)
797  );
798 
799  FW_ASSERT(
800  this->m_drvSendOut_OutputPort[portNum].isConnected(),
801  static_cast<FwAssertArgType>(portNum)
802  );
803  this->m_drvSendOut_OutputPort[portNum].invoke(
804  fwBuffer
805  );
806  }
807 
808  // ----------------------------------------------------------------------
809  // Calls for messages received on typed input ports
810  // ----------------------------------------------------------------------
811 
812  void ComStubComponentBase ::
813  m_p_dataIn_in(
814  Fw::PassiveComponentBase* callComp,
815  FwIndexType portNum,
816  Fw::Buffer& data,
817  const ComCfg::FrameContext& context
818  )
819  {
820  FW_ASSERT(callComp);
821  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
822  compPtr->dataIn_handlerBase(
823  portNum,
824  data,
825  context
826  );
827  }
828 
829  void ComStubComponentBase ::
830  m_p_dataReturnIn_in(
831  Fw::PassiveComponentBase* callComp,
832  FwIndexType portNum,
833  Fw::Buffer& data,
834  const ComCfg::FrameContext& context
835  )
836  {
837  FW_ASSERT(callComp);
838  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
839  compPtr->dataReturnIn_handlerBase(
840  portNum,
841  data,
842  context
843  );
844  }
845 
846  void ComStubComponentBase ::
847  m_p_drvConnected_in(
848  Fw::PassiveComponentBase* callComp,
849  FwIndexType portNum
850  )
851  {
852  FW_ASSERT(callComp);
853  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
854  compPtr->drvConnected_handlerBase(portNum);
855  }
856 
857  void ComStubComponentBase ::
858  m_p_drvReceiveIn_in(
859  Fw::PassiveComponentBase* callComp,
860  FwIndexType portNum,
861  Fw::Buffer& buffer,
862  const Drv::ByteStreamStatus& status
863  )
864  {
865  FW_ASSERT(callComp);
866  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
867  compPtr->drvReceiveIn_handlerBase(
868  portNum,
869  buffer,
870  status
871  );
872  }
873 
874  void ComStubComponentBase ::
875  m_p_drvSendReturnIn_in(
876  Fw::PassiveComponentBase* callComp,
877  FwIndexType portNum,
878  Fw::Buffer& buffer,
879  const Drv::ByteStreamStatus& status
880  )
881  {
882  FW_ASSERT(callComp);
883  ComStubComponentBase* compPtr = static_cast<ComStubComponentBase*>(callComp);
884  compPtr->drvSendReturnIn_handlerBase(
885  portNum,
886  buffer,
887  status
888  );
889  }
890 
891 }
Drv::InputByteStreamDataPort * get_drvSendReturnIn_InputPort(FwIndexType portNum)
FwIndexType getNum_drvSendOut_OutputPorts() const
ComStubComponentBase(const char *compName="")
Construct ComStubComponentBase object.
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.
void drvSendReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)
Handler base-class function for input port drvSendReturnIn.
void drvConnected_handlerBase(FwIndexType portNum)
Handler base-class function for input port drvConnected.
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
void set_drvSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvSendOut[portNum].
FwIndexType getNum_drvSendReturnIn_InputPorts() const
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.
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:26
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.
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum)
void drvSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port drvSendOut.
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:42
#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.
void init()
Initialization function.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
virtual void drvSendReturnIn_handler(FwIndexType portNum, Fw::Buffer &buffer, const Drv::ByteStreamStatus &status)=0
Handler for input port drvSendReturnIn.
PlatformIndexType FwIndexType
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:93
void set_drvReceiveReturnOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to drvReceiveReturnOut[portNum].
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.
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 init()
Initialization function.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.