F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AosFramerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AosFramerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for AosFramer 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  namespace Ccsds {
17 
18  // ----------------------------------------------------------------------
19  // Component initialization
20  // ----------------------------------------------------------------------
21 
24  {
25  // Initialize base class
27 
28 #if !FW_DIRECT_PORT_CALLS
29  // Connect input port comStatusIn
30  for (
31  FwIndexType port = 0;
32  port < static_cast<FwIndexType>(this->getNum_comStatusIn_InputPorts());
33  port++
34  ) {
35  this->m_comStatusIn_InputPort[port].init();
36  this->m_comStatusIn_InputPort[port].addCallComp(
37  this,
38  m_p_comStatusIn_in
39  );
40  this->m_comStatusIn_InputPort[port].setPortNum(port);
41 
42 #if FW_OBJECT_NAMES == 1
43  Fw::ObjectName portName;
44  portName.format(
45  "%s_comStatusIn_InputPort[%" PRI_FwIndexType "]",
46  this->m_objName.toChar(),
47  port
48  );
49  this->m_comStatusIn_InputPort[port].setObjName(portName.toChar());
50 #endif
51  }
52 #endif
53 
54 #if !FW_DIRECT_PORT_CALLS
55  // Connect input port dataIn
56  for (
57  FwIndexType port = 0;
58  port < static_cast<FwIndexType>(this->getNum_dataIn_InputPorts());
59  port++
60  ) {
61  this->m_dataIn_InputPort[port].init();
62  this->m_dataIn_InputPort[port].addCallComp(
63  this,
64  m_p_dataIn_in
65  );
66  this->m_dataIn_InputPort[port].setPortNum(port);
67 
68 #if FW_OBJECT_NAMES == 1
69  Fw::ObjectName portName;
70  portName.format(
71  "%s_dataIn_InputPort[%" PRI_FwIndexType "]",
72  this->m_objName.toChar(),
73  port
74  );
75  this->m_dataIn_InputPort[port].setObjName(portName.toChar());
76 #endif
77  }
78 #endif
79 
80 #if !FW_DIRECT_PORT_CALLS
81  // Connect input port dataReturnIn
82  for (
83  FwIndexType port = 0;
84  port < static_cast<FwIndexType>(this->getNum_dataReturnIn_InputPorts());
85  port++
86  ) {
87  this->m_dataReturnIn_InputPort[port].init();
88  this->m_dataReturnIn_InputPort[port].addCallComp(
89  this,
90  m_p_dataReturnIn_in
91  );
92  this->m_dataReturnIn_InputPort[port].setPortNum(port);
93 
94 #if FW_OBJECT_NAMES == 1
95  Fw::ObjectName portName;
96  portName.format(
97  "%s_dataReturnIn_InputPort[%" PRI_FwIndexType "]",
98  this->m_objName.toChar(),
99  port
100  );
101  this->m_dataReturnIn_InputPort[port].setObjName(portName.toChar());
102 #endif
103  }
104 #endif
105 
106 #if !FW_DIRECT_PORT_CALLS
107  // Connect output port logOut
108  for (
109  FwIndexType port = 0;
110  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
111  port++
112  ) {
113  this->m_logOut_OutputPort[port].init();
114 
115 #if FW_OBJECT_NAMES == 1
116  Fw::ObjectName portName;
117  portName.format(
118  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
119  this->m_objName.toChar(),
120  port
121  );
122  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
123 #endif
124  }
125 #endif
126 
127 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
128  // Connect output port logTextOut
129  for (
130  FwIndexType port = 0;
131  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
132  port++
133  ) {
134  this->m_logTextOut_OutputPort[port].init();
135 
136 #if FW_OBJECT_NAMES == 1
137  Fw::ObjectName portName;
138  portName.format(
139  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
140  this->m_objName.toChar(),
141  port
142  );
143  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
144 #endif
145  }
146 #endif
147 
148 #if !FW_DIRECT_PORT_CALLS
149  // Connect output port prmGetOut
150  for (
151  FwIndexType port = 0;
152  port < static_cast<FwIndexType>(this->getNum_prmGetOut_OutputPorts());
153  port++
154  ) {
155  this->m_prmGetOut_OutputPort[port].init();
156 
157 #if FW_OBJECT_NAMES == 1
158  Fw::ObjectName portName;
159  portName.format(
160  "%s_prmGetOut_OutputPort[%" PRI_FwIndexType "]",
161  this->m_objName.toChar(),
162  port
163  );
164  this->m_prmGetOut_OutputPort[port].setObjName(portName.toChar());
165 #endif
166  }
167 #endif
168 
169 #if !FW_DIRECT_PORT_CALLS
170  // Connect output port prmSetOut
171  for (
172  FwIndexType port = 0;
173  port < static_cast<FwIndexType>(this->getNum_prmSetOut_OutputPorts());
174  port++
175  ) {
176  this->m_prmSetOut_OutputPort[port].init();
177 
178 #if FW_OBJECT_NAMES == 1
179  Fw::ObjectName portName;
180  portName.format(
181  "%s_prmSetOut_OutputPort[%" PRI_FwIndexType "]",
182  this->m_objName.toChar(),
183  port
184  );
185  this->m_prmSetOut_OutputPort[port].setObjName(portName.toChar());
186 #endif
187  }
188 #endif
189 
190 #if !FW_DIRECT_PORT_CALLS
191  // Connect output port timeCaller
192  for (
193  FwIndexType port = 0;
194  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
195  port++
196  ) {
197  this->m_timeCaller_OutputPort[port].init();
198 
199 #if FW_OBJECT_NAMES == 1
200  Fw::ObjectName portName;
201  portName.format(
202  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
203  this->m_objName.toChar(),
204  port
205  );
206  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
207 #endif
208  }
209 #endif
210 
211 #if !FW_DIRECT_PORT_CALLS
212  // Connect output port tlmOut
213  for (
214  FwIndexType port = 0;
215  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
216  port++
217  ) {
218  this->m_tlmOut_OutputPort[port].init();
219 
220 #if FW_OBJECT_NAMES == 1
221  Fw::ObjectName portName;
222  portName.format(
223  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
224  this->m_objName.toChar(),
225  port
226  );
227  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
228 #endif
229  }
230 #endif
231 
232 #if !FW_DIRECT_PORT_CALLS
233  // Connect output port comStatusOut
234  for (
235  FwIndexType port = 0;
236  port < static_cast<FwIndexType>(this->getNum_comStatusOut_OutputPorts());
237  port++
238  ) {
239  this->m_comStatusOut_OutputPort[port].init();
240 
241 #if FW_OBJECT_NAMES == 1
242  Fw::ObjectName portName;
243  portName.format(
244  "%s_comStatusOut_OutputPort[%" PRI_FwIndexType "]",
245  this->m_objName.toChar(),
246  port
247  );
248  this->m_comStatusOut_OutputPort[port].setObjName(portName.toChar());
249 #endif
250  }
251 #endif
252 
253 #if !FW_DIRECT_PORT_CALLS
254  // Connect output port dataOut
255  for (
256  FwIndexType port = 0;
257  port < static_cast<FwIndexType>(this->getNum_dataOut_OutputPorts());
258  port++
259  ) {
260  this->m_dataOut_OutputPort[port].init();
261 
262 #if FW_OBJECT_NAMES == 1
263  Fw::ObjectName portName;
264  portName.format(
265  "%s_dataOut_OutputPort[%" PRI_FwIndexType "]",
266  this->m_objName.toChar(),
267  port
268  );
269  this->m_dataOut_OutputPort[port].setObjName(portName.toChar());
270 #endif
271  }
272 #endif
273 
274 #if !FW_DIRECT_PORT_CALLS
275  // Connect output port dataReturnOut
276  for (
277  FwIndexType port = 0;
278  port < static_cast<FwIndexType>(this->getNum_dataReturnOut_OutputPorts());
279  port++
280  ) {
281  this->m_dataReturnOut_OutputPort[port].init();
282 
283 #if FW_OBJECT_NAMES == 1
284  Fw::ObjectName portName;
285  portName.format(
286  "%s_dataReturnOut_OutputPort[%" PRI_FwIndexType "]",
287  this->m_objName.toChar(),
288  port
289  );
290  this->m_dataReturnOut_OutputPort[port].setObjName(portName.toChar());
291 #endif
292  }
293 #endif
294  }
295 
296 #if !FW_DIRECT_PORT_CALLS
297 
298  // ----------------------------------------------------------------------
299  // Getters for typed input ports
300  // ----------------------------------------------------------------------
301 
304  {
305  FW_ASSERT(
306  (0 <= portNum) && (portNum < this->getNum_comStatusIn_InputPorts()),
307  static_cast<FwAssertArgType>(portNum)
308  );
309 
310  return &this->m_comStatusIn_InputPort[portNum];
311  }
312 
315  {
316  FW_ASSERT(
317  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
318  static_cast<FwAssertArgType>(portNum)
319  );
320 
321  return &this->m_dataIn_InputPort[portNum];
322  }
323 
326  {
327  FW_ASSERT(
328  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
329  static_cast<FwAssertArgType>(portNum)
330  );
331 
332  return &this->m_dataReturnIn_InputPort[portNum];
333  }
334 
335 #endif
336 
337 #if !FW_DIRECT_PORT_CALLS
338 
339  // ----------------------------------------------------------------------
340  // Connect input ports to special output ports
341  // ----------------------------------------------------------------------
342 
345  FwIndexType portNum,
346  Fw::InputLogPort* port
347  )
348  {
349  FW_ASSERT(
350  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
351  static_cast<FwAssertArgType>(portNum)
352  );
353 
354  this->m_logOut_OutputPort[portNum].addCallPort(port);
355  }
356 
357 #if FW_ENABLE_TEXT_LOGGING == 1
358 
359  void AosFramerComponentBase ::
360  set_logTextOut_OutputPort(
361  FwIndexType portNum,
363  )
364  {
365  FW_ASSERT(
366  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
367  static_cast<FwAssertArgType>(portNum)
368  );
369 
370  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
371  }
372 
373 #endif
374 
377  FwIndexType portNum,
378  Fw::InputPrmGetPort* port
379  )
380  {
381  FW_ASSERT(
382  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
383  static_cast<FwAssertArgType>(portNum)
384  );
385 
386  this->m_prmGetOut_OutputPort[portNum].addCallPort(port);
387  }
388 
391  FwIndexType portNum,
392  Fw::InputPrmSetPort* port
393  )
394  {
395  FW_ASSERT(
396  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
397  static_cast<FwAssertArgType>(portNum)
398  );
399 
400  this->m_prmSetOut_OutputPort[portNum].addCallPort(port);
401  }
402 
405  FwIndexType portNum,
406  Fw::InputTimePort* port
407  )
408  {
409  FW_ASSERT(
410  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
411  static_cast<FwAssertArgType>(portNum)
412  );
413 
414  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
415  }
416 
419  FwIndexType portNum,
420  Fw::InputTlmPort* port
421  )
422  {
423  FW_ASSERT(
424  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
425  static_cast<FwAssertArgType>(portNum)
426  );
427 
428  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
429  }
430 
431 #endif
432 
433 #if !FW_DIRECT_PORT_CALLS
434 
435  // ----------------------------------------------------------------------
436  // Connect typed input ports to typed output ports
437  // ----------------------------------------------------------------------
438 
441  FwIndexType portNum,
443  )
444  {
445  FW_ASSERT(
446  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
447  static_cast<FwAssertArgType>(portNum)
448  );
449 
450  this->m_comStatusOut_OutputPort[portNum].addCallPort(port);
451  }
452 
455  FwIndexType portNum,
457  )
458  {
459  FW_ASSERT(
460  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
461  static_cast<FwAssertArgType>(portNum)
462  );
463 
464  this->m_dataOut_OutputPort[portNum].addCallPort(port);
465  }
466 
469  FwIndexType portNum,
471  )
472  {
473  FW_ASSERT(
474  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
475  static_cast<FwAssertArgType>(portNum)
476  );
477 
478  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
479  }
480 
481 #endif
482 
483 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
484 
485  // ----------------------------------------------------------------------
486  // Connect serial input ports to special output ports
487  // ----------------------------------------------------------------------
488 
491  FwIndexType portNum,
492  Fw::InputSerializePort* port
493  )
494  {
495  FW_ASSERT(
496  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
497  static_cast<FwAssertArgType>(portNum)
498  );
499 
500  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
501  }
502 
503 #if FW_ENABLE_TEXT_LOGGING == 1
504 
505  void AosFramerComponentBase ::
506  set_logTextOut_OutputPort(
507  FwIndexType portNum,
508  Fw::InputSerializePort* port
509  )
510  {
511  FW_ASSERT(
512  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
513  static_cast<FwAssertArgType>(portNum)
514  );
515 
516  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
517  }
518 
519 #endif
520 
523  FwIndexType portNum,
524  Fw::InputSerializePort* port
525  )
526  {
527  FW_ASSERT(
528  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
529  static_cast<FwAssertArgType>(portNum)
530  );
531 
532  this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
533  }
534 
537  FwIndexType portNum,
538  Fw::InputSerializePort* port
539  )
540  {
541  FW_ASSERT(
542  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
543  static_cast<FwAssertArgType>(portNum)
544  );
545 
546  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
547  }
548 
551  FwIndexType portNum,
552  Fw::InputSerializePort* port
553  )
554  {
555  FW_ASSERT(
556  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
557  static_cast<FwAssertArgType>(portNum)
558  );
559 
560  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
561  }
562 
563 #endif
564 
565 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
566 
567  // ----------------------------------------------------------------------
568  // Connect serial input ports to typed output ports
569  // ----------------------------------------------------------------------
570 
573  FwIndexType portNum,
574  Fw::InputSerializePort* port
575  )
576  {
577  FW_ASSERT(
578  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
579  static_cast<FwAssertArgType>(portNum)
580  );
581 
582  this->m_comStatusOut_OutputPort[portNum].registerSerialPort(port);
583  }
584 
587  FwIndexType portNum,
588  Fw::InputSerializePort* port
589  )
590  {
591  FW_ASSERT(
592  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
593  static_cast<FwAssertArgType>(portNum)
594  );
595 
596  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
597  }
598 
601  FwIndexType portNum,
602  Fw::InputSerializePort* port
603  )
604  {
605  FW_ASSERT(
606  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
607  static_cast<FwAssertArgType>(portNum)
608  );
609 
610  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
611  }
612 
613 #endif
614 
615  // ----------------------------------------------------------------------
616  // Component construction and destruction
617  // ----------------------------------------------------------------------
618 
620  AosFramerComponentBase(const char* compName) :
621  Fw::PassiveComponentBase(compName)
622  {
623 
624  }
625 
628  {
629 
630  }
631 
632 #if !FW_DIRECT_PORT_CALLS
633 
634  // ----------------------------------------------------------------------
635  // Connection status queries for special output ports
636  // ----------------------------------------------------------------------
637 
640  {
641  FW_ASSERT(
642  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
643  static_cast<FwAssertArgType>(portNum)
644  );
645 
646  return this->m_logOut_OutputPort[portNum].isConnected();
647  }
648 
649 #if FW_ENABLE_TEXT_LOGGING == 1
650 
651  bool AosFramerComponentBase ::
652  isConnected_logTextOut_OutputPort(FwIndexType portNum) const
653  {
654  FW_ASSERT(
655  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
656  static_cast<FwAssertArgType>(portNum)
657  );
658 
659  return this->m_logTextOut_OutputPort[portNum].isConnected();
660  }
661 
662 #endif
663 
666  {
667  FW_ASSERT(
668  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
669  static_cast<FwAssertArgType>(portNum)
670  );
671 
672  return this->m_prmGetOut_OutputPort[portNum].isConnected();
673  }
674 
677  {
678  FW_ASSERT(
679  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
680  static_cast<FwAssertArgType>(portNum)
681  );
682 
683  return this->m_prmSetOut_OutputPort[portNum].isConnected();
684  }
685 
688  {
689  FW_ASSERT(
690  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
691  static_cast<FwAssertArgType>(portNum)
692  );
693 
694  return this->m_timeCaller_OutputPort[portNum].isConnected();
695  }
696 
699  {
700  FW_ASSERT(
701  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
702  static_cast<FwAssertArgType>(portNum)
703  );
704 
705  return this->m_tlmOut_OutputPort[portNum].isConnected();
706  }
707 
708 #endif
709 
710 #if !FW_DIRECT_PORT_CALLS
711 
712  // ----------------------------------------------------------------------
713  // Connection status queries for typed output ports
714  // ----------------------------------------------------------------------
715 
718  {
719  FW_ASSERT(
720  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
721  static_cast<FwAssertArgType>(portNum)
722  );
723 
724  return this->m_comStatusOut_OutputPort[portNum].isConnected();
725  }
726 
729  {
730  FW_ASSERT(
731  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
732  static_cast<FwAssertArgType>(portNum)
733  );
734 
735  return this->m_dataOut_OutputPort[portNum].isConnected();
736  }
737 
740  {
741  FW_ASSERT(
742  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
743  static_cast<FwAssertArgType>(portNum)
744  );
745 
746  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
747  }
748 
749 #endif
750 
751  // ----------------------------------------------------------------------
752  // Port handler base-class functions for typed input ports
753  //
754  // Call these functions directly to bypass the corresponding ports
755  // ----------------------------------------------------------------------
756 
759  FwIndexType portNum,
760  Fw::Success& condition
761  )
762  {
763  // Make sure port number is valid
764  FW_ASSERT(
765  (0 <= portNum) && (portNum < this->getNum_comStatusIn_InputPorts()),
766  static_cast<FwAssertArgType>(portNum)
767  );
768 
769  // Call handler function
770  this->comStatusIn_handler(
771  portNum,
772  condition
773  );
774  }
775 
778  FwIndexType portNum,
779  Fw::Buffer& data,
780  const ComCfg::FrameContext& context
781  )
782  {
783  // Make sure port number is valid
784  FW_ASSERT(
785  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
786  static_cast<FwAssertArgType>(portNum)
787  );
788 
789  // Call handler function
790  this->dataIn_handler(
791  portNum,
792  data,
793  context
794  );
795  }
796 
799  FwIndexType portNum,
800  Fw::Buffer& data,
801  const ComCfg::FrameContext& context
802  )
803  {
804  // Make sure port number is valid
805  FW_ASSERT(
806  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
807  static_cast<FwAssertArgType>(portNum)
808  );
809 
810  // Call handler function
811  this->dataReturnIn_handler(
812  portNum,
813  data,
814  context
815  );
816  }
817 
818 #if !FW_DIRECT_PORT_CALLS
819 
820  // ----------------------------------------------------------------------
821  // Invocation functions for typed output ports
822  // ----------------------------------------------------------------------
823 
826  FwIndexType portNum,
827  Fw::Success& condition
828  ) const
829  {
830  FW_ASSERT(
831  (0 <= portNum) && (portNum < this->getNum_comStatusOut_OutputPorts()),
832  static_cast<FwAssertArgType>(portNum)
833  );
834 
835  FW_ASSERT(
836  this->m_comStatusOut_OutputPort[portNum].isConnected(),
837  static_cast<FwAssertArgType>(portNum)
838  );
839  this->m_comStatusOut_OutputPort[portNum].invoke(
840  condition
841  );
842  }
843 
846  FwIndexType portNum,
847  Fw::Buffer& data,
848  const ComCfg::FrameContext& context
849  ) const
850  {
851  FW_ASSERT(
852  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
853  static_cast<FwAssertArgType>(portNum)
854  );
855 
856  FW_ASSERT(
857  this->m_dataOut_OutputPort[portNum].isConnected(),
858  static_cast<FwAssertArgType>(portNum)
859  );
860  this->m_dataOut_OutputPort[portNum].invoke(
861  data,
862  context
863  );
864  }
865 
868  FwIndexType portNum,
869  Fw::Buffer& data,
870  const ComCfg::FrameContext& context
871  ) const
872  {
873  FW_ASSERT(
874  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
875  static_cast<FwAssertArgType>(portNum)
876  );
877 
878  FW_ASSERT(
879  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
880  static_cast<FwAssertArgType>(portNum)
881  );
882  this->m_dataReturnOut_OutputPort[portNum].invoke(
883  data,
884  context
885  );
886  }
887 
888 #endif
889 
890  // ----------------------------------------------------------------------
891  // Time
892  // ----------------------------------------------------------------------
893 
895  getTime() const
896  {
897  if (this->isConnected_timeCaller_OutputPort(0)) {
898  Fw::Time _time;
899  this->timeCaller_out(0, _time);
900  return _time;
901  }
902  else {
903  return Fw::Time(TimeBase::TB_NONE, 0, 0);
904  }
905  }
906 
907  // ----------------------------------------------------------------------
908  // Calls for messages received on typed input ports
909  // ----------------------------------------------------------------------
910 
911  void AosFramerComponentBase ::
912  m_p_comStatusIn_in(
913  Fw::PassiveComponentBase* callComp,
914  FwIndexType portNum,
915  Fw::Success& condition
916  )
917  {
918  FW_ASSERT(callComp);
919  AosFramerComponentBase* compPtr = static_cast<AosFramerComponentBase*>(callComp);
920  compPtr->comStatusIn_handlerBase(
921  portNum,
922  condition
923  );
924  }
925 
926  void AosFramerComponentBase ::
927  m_p_dataIn_in(
928  Fw::PassiveComponentBase* callComp,
929  FwIndexType portNum,
930  Fw::Buffer& data,
931  const ComCfg::FrameContext& context
932  )
933  {
934  FW_ASSERT(callComp);
935  AosFramerComponentBase* compPtr = static_cast<AosFramerComponentBase*>(callComp);
936  compPtr->dataIn_handlerBase(
937  portNum,
938  data,
939  context
940  );
941  }
942 
943  void AosFramerComponentBase ::
944  m_p_dataReturnIn_in(
945  Fw::PassiveComponentBase* callComp,
946  FwIndexType portNum,
947  Fw::Buffer& data,
948  const ComCfg::FrameContext& context
949  )
950  {
951  FW_ASSERT(callComp);
952  AosFramerComponentBase* compPtr = static_cast<AosFramerComponentBase*>(callComp);
953  compPtr->dataReturnIn_handlerBase(
954  portNum,
955  data,
956  context
957  );
958  }
959 
960 #if !FW_DIRECT_PORT_CALLS
961 
962  // ----------------------------------------------------------------------
963  // Invocation functions for special output ports
964  // ----------------------------------------------------------------------
965 
966  void AosFramerComponentBase ::
967  timeCaller_out(
968  FwIndexType portNum,
969  Fw::Time& time
970  ) const
971  {
972  FW_ASSERT(
973  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
974  static_cast<FwAssertArgType>(portNum)
975  );
976 
977  FW_ASSERT(
978  this->m_timeCaller_OutputPort[portNum].isConnected(),
979  static_cast<FwAssertArgType>(portNum)
980  );
981  this->m_timeCaller_OutputPort[portNum].invoke(
982  time
983  );
984  }
985 
986 #endif
987 
988  }
989 
990 }
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
void set_comStatusOut_OutputPort(FwIndexType portNum, Fw::InputSuccessConditionPort *port)
Connect port to comStatusOut[portNum].
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_comStatusOut_OutputPorts()
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
static constexpr FwIndexType getNum_comStatusIn_InputPorts()
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void comStatusIn_handlerBase(FwIndexType portNum, Fw::Success &condition)
Handler base-class function for input port comStatusIn.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
virtual void comStatusIn_handler(FwIndexType portNum, Fw::Success &condition)=0
Handler for input port comStatusIn.
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
Auto-generated base for AosFramer component.
virtual ~AosFramerComponentBase()
Destroy AosFramerComponentBase object.
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
No time base has been established (Required)
void addCallPort(InputSuccessConditionPort *callPort)
Register an input port.
static constexpr FwIndexType getNum_logOut_OutputPorts()
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
void comStatusOut_out(FwIndexType portNum, Fw::Success &condition) const
Invoke output port comStatusOut.
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:177
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void init()
Object initializer.
Definition: ObjBase.cpp:24
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
Definition: TimePortAc.cpp:151
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
const char * toChar() const
Convert to a C-style char*.
Definition: ObjectName.hpp:50
bool isConnected_comStatusOut_OutputPort(FwIndexType portNum) const
void invoke(Fw::Success &condition) const
Invoke a port connection.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port connection.
void init()
Initialization function.
bool isConnected() const
Definition: PortBase.cpp:38
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
void init()
Initialization function.
Definition: LogPortAc.cpp:180
static constexpr FwIndexType getNum_dataOut_OutputPorts()
void setPortNum(FwIndexType portNum)
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
static constexpr FwIndexType getNum_dataIn_InputPorts()
void init()
Initialization function.
Fw::InputSuccessConditionPort * get_comStatusIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
PlatformIndexType FwIndexType
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
AosFramerComponentBase(const char *compName="")
Construct AosFramerComponentBase object.
Type used to pass context info between components during framing/deframing.
RateGroupDivider component implementation.
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
Implementation of malloc based allocator.
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
void init()
Initialization function.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
Success/Failure.
void init()
Initialization function.