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