F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FrameAccumulatorComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FrameAccumulatorComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for FrameAccumulator 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 output port logOut
75  for (
76  FwIndexType port = 0;
77  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
78  port++
79  ) {
80  this->m_logOut_OutputPort[port].init();
81 
82 #if FW_OBJECT_NAMES == 1
83  Fw::ObjectName portName;
84  portName.format(
85  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
86  this->m_objName.toChar(),
87  port
88  );
89  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
90 #endif
91  }
92 
93 #if FW_ENABLE_TEXT_LOGGING == 1
94  // Connect output port logTextOut
95  for (
96  FwIndexType port = 0;
97  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
98  port++
99  ) {
100  this->m_logTextOut_OutputPort[port].init();
101 
102 #if FW_OBJECT_NAMES == 1
103  Fw::ObjectName portName;
104  portName.format(
105  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
106  this->m_objName.toChar(),
107  port
108  );
109  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
110 #endif
111  }
112 #endif
113 
114  // Connect output port timeCaller
115  for (
116  FwIndexType port = 0;
117  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
118  port++
119  ) {
120  this->m_timeCaller_OutputPort[port].init();
121 
122 #if FW_OBJECT_NAMES == 1
123  Fw::ObjectName portName;
124  portName.format(
125  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
126  this->m_objName.toChar(),
127  port
128  );
129  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
130 #endif
131  }
132 
133  // Connect output port bufferAllocate
134  for (
135  FwIndexType port = 0;
136  port < static_cast<FwIndexType>(this->getNum_bufferAllocate_OutputPorts());
137  port++
138  ) {
139  this->m_bufferAllocate_OutputPort[port].init();
140 
141 #if FW_OBJECT_NAMES == 1
142  Fw::ObjectName portName;
143  portName.format(
144  "%s_bufferAllocate_OutputPort[%" PRI_FwIndexType "]",
145  this->m_objName.toChar(),
146  port
147  );
148  this->m_bufferAllocate_OutputPort[port].setObjName(portName.toChar());
149 #endif
150  }
151 
152  // Connect output port bufferDeallocate
153  for (
154  FwIndexType port = 0;
155  port < static_cast<FwIndexType>(this->getNum_bufferDeallocate_OutputPorts());
156  port++
157  ) {
158  this->m_bufferDeallocate_OutputPort[port].init();
159 
160 #if FW_OBJECT_NAMES == 1
161  Fw::ObjectName portName;
162  portName.format(
163  "%s_bufferDeallocate_OutputPort[%" PRI_FwIndexType "]",
164  this->m_objName.toChar(),
165  port
166  );
167  this->m_bufferDeallocate_OutputPort[port].setObjName(portName.toChar());
168 #endif
169  }
170 
171  // Connect output port dataOut
172  for (
173  FwIndexType port = 0;
174  port < static_cast<FwIndexType>(this->getNum_dataOut_OutputPorts());
175  port++
176  ) {
177  this->m_dataOut_OutputPort[port].init();
178 
179 #if FW_OBJECT_NAMES == 1
180  Fw::ObjectName portName;
181  portName.format(
182  "%s_dataOut_OutputPort[%" PRI_FwIndexType "]",
183  this->m_objName.toChar(),
184  port
185  );
186  this->m_dataOut_OutputPort[port].setObjName(portName.toChar());
187 #endif
188  }
189 
190  // Connect output port dataReturnOut
191  for (
192  FwIndexType port = 0;
193  port < static_cast<FwIndexType>(this->getNum_dataReturnOut_OutputPorts());
194  port++
195  ) {
196  this->m_dataReturnOut_OutputPort[port].init();
197 
198 #if FW_OBJECT_NAMES == 1
199  Fw::ObjectName portName;
200  portName.format(
201  "%s_dataReturnOut_OutputPort[%" PRI_FwIndexType "]",
202  this->m_objName.toChar(),
203  port
204  );
205  this->m_dataReturnOut_OutputPort[port].setObjName(portName.toChar());
206 #endif
207  }
208  }
209 
210  // ----------------------------------------------------------------------
211  // Getters for typed input ports
212  // ----------------------------------------------------------------------
213 
216  {
217  FW_ASSERT(
218  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
219  static_cast<FwAssertArgType>(portNum)
220  );
221 
222  return &this->m_dataIn_InputPort[portNum];
223  }
224 
227  {
228  FW_ASSERT(
229  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
230  static_cast<FwAssertArgType>(portNum)
231  );
232 
233  return &this->m_dataReturnIn_InputPort[portNum];
234  }
235 
236  // ----------------------------------------------------------------------
237  // Connect input ports to special output ports
238  // ----------------------------------------------------------------------
239 
242  FwIndexType portNum,
243  Fw::InputLogPort* port
244  )
245  {
246  FW_ASSERT(
247  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
248  static_cast<FwAssertArgType>(portNum)
249  );
250 
251  this->m_logOut_OutputPort[portNum].addCallPort(port);
252  }
253 
254 #if FW_ENABLE_TEXT_LOGGING == 1
255 
256  void FrameAccumulatorComponentBase ::
257  set_logTextOut_OutputPort(
258  FwIndexType portNum,
260  )
261  {
262  FW_ASSERT(
263  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
264  static_cast<FwAssertArgType>(portNum)
265  );
266 
267  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
268  }
269 
270 #endif
271 
274  FwIndexType portNum,
275  Fw::InputTimePort* port
276  )
277  {
278  FW_ASSERT(
279  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
280  static_cast<FwAssertArgType>(portNum)
281  );
282 
283  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
284  }
285 
286  // ----------------------------------------------------------------------
287  // Connect typed input ports to typed output ports
288  // ----------------------------------------------------------------------
289 
292  FwIndexType portNum,
294  )
295  {
296  FW_ASSERT(
297  (0 <= portNum) && (portNum < this->getNum_bufferAllocate_OutputPorts()),
298  static_cast<FwAssertArgType>(portNum)
299  );
300 
301  this->m_bufferAllocate_OutputPort[portNum].addCallPort(port);
302  }
303 
306  FwIndexType portNum,
308  )
309  {
310  FW_ASSERT(
311  (0 <= portNum) && (portNum < this->getNum_bufferDeallocate_OutputPorts()),
312  static_cast<FwAssertArgType>(portNum)
313  );
314 
315  this->m_bufferDeallocate_OutputPort[portNum].addCallPort(port);
316  }
317 
320  FwIndexType portNum,
322  )
323  {
324  FW_ASSERT(
325  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
326  static_cast<FwAssertArgType>(portNum)
327  );
328 
329  this->m_dataOut_OutputPort[portNum].addCallPort(port);
330  }
331 
334  FwIndexType portNum,
336  )
337  {
338  FW_ASSERT(
339  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
340  static_cast<FwAssertArgType>(portNum)
341  );
342 
343  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
344  }
345 
346 #if FW_PORT_SERIALIZATION
347 
348  // ----------------------------------------------------------------------
349  // Connect serial input ports to special output ports
350  // ----------------------------------------------------------------------
351 
354  FwIndexType portNum,
355  Fw::InputSerializePort* port
356  )
357  {
358  FW_ASSERT(
359  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
360  static_cast<FwAssertArgType>(portNum)
361  );
362 
363  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
364  }
365 
366 #if FW_ENABLE_TEXT_LOGGING == 1
367 
368  void FrameAccumulatorComponentBase ::
369  set_logTextOut_OutputPort(
370  FwIndexType portNum,
371  Fw::InputSerializePort* port
372  )
373  {
374  FW_ASSERT(
375  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
376  static_cast<FwAssertArgType>(portNum)
377  );
378 
379  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
380  }
381 
382 #endif
383 
386  FwIndexType portNum,
387  Fw::InputSerializePort* port
388  )
389  {
390  FW_ASSERT(
391  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
392  static_cast<FwAssertArgType>(portNum)
393  );
394 
395  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
396  }
397 
398 #endif
399 
400 #if FW_PORT_SERIALIZATION
401 
402  // ----------------------------------------------------------------------
403  // Connect serial input ports to typed output ports
404  // ----------------------------------------------------------------------
405 
408  FwIndexType portNum,
409  Fw::InputSerializePort* port
410  )
411  {
412  FW_ASSERT(
413  (0 <= portNum) && (portNum < this->getNum_bufferDeallocate_OutputPorts()),
414  static_cast<FwAssertArgType>(portNum)
415  );
416 
417  this->m_bufferDeallocate_OutputPort[portNum].registerSerialPort(port);
418  }
419 
422  FwIndexType portNum,
423  Fw::InputSerializePort* port
424  )
425  {
426  FW_ASSERT(
427  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
428  static_cast<FwAssertArgType>(portNum)
429  );
430 
431  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
432  }
433 
436  FwIndexType portNum,
437  Fw::InputSerializePort* port
438  )
439  {
440  FW_ASSERT(
441  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
442  static_cast<FwAssertArgType>(portNum)
443  );
444 
445  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
446  }
447 
448 #endif
449 
450  // ----------------------------------------------------------------------
451  // Component construction and destruction
452  // ----------------------------------------------------------------------
453 
455  FrameAccumulatorComponentBase(const char* compName) :
456  Fw::PassiveComponentBase(compName)
457  {
458 
459  }
460 
463  {
464 
465  }
466 
467  // ----------------------------------------------------------------------
468  // Getters for numbers of typed input ports
469  // ----------------------------------------------------------------------
470 
473  {
474  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataIn_InputPort));
475  }
476 
479  {
480  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnIn_InputPort));
481  }
482 
483  // ----------------------------------------------------------------------
484  // Getters for numbers of special output ports
485  // ----------------------------------------------------------------------
486 
489  {
490  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logOut_OutputPort));
491  }
492 
493 #if FW_ENABLE_TEXT_LOGGING == 1
494 
495  FwIndexType FrameAccumulatorComponentBase ::
496  getNum_logTextOut_OutputPorts() const
497  {
498  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logTextOut_OutputPort));
499  }
500 
501 #endif
502 
505  {
506  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_timeCaller_OutputPort));
507  }
508 
509  // ----------------------------------------------------------------------
510  // Getters for numbers of typed output ports
511  // ----------------------------------------------------------------------
512 
515  {
516  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_bufferAllocate_OutputPort));
517  }
518 
521  {
522  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_bufferDeallocate_OutputPort));
523  }
524 
527  {
528  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataOut_OutputPort));
529  }
530 
533  {
534  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_dataReturnOut_OutputPort));
535  }
536 
537  // ----------------------------------------------------------------------
538  // Connection status queries for special output ports
539  // ----------------------------------------------------------------------
540 
543  {
544  FW_ASSERT(
545  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
546  static_cast<FwAssertArgType>(portNum)
547  );
548 
549  return this->m_logOut_OutputPort[portNum].isConnected();
550  }
551 
552 #if FW_ENABLE_TEXT_LOGGING == 1
553 
554  bool FrameAccumulatorComponentBase ::
555  isConnected_logTextOut_OutputPort(FwIndexType portNum)
556  {
557  FW_ASSERT(
558  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
559  static_cast<FwAssertArgType>(portNum)
560  );
561 
562  return this->m_logTextOut_OutputPort[portNum].isConnected();
563  }
564 
565 #endif
566 
569  {
570  FW_ASSERT(
571  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
572  static_cast<FwAssertArgType>(portNum)
573  );
574 
575  return this->m_timeCaller_OutputPort[portNum].isConnected();
576  }
577 
578  // ----------------------------------------------------------------------
579  // Connection status queries for typed output ports
580  // ----------------------------------------------------------------------
581 
584  {
585  FW_ASSERT(
586  (0 <= portNum) && (portNum < this->getNum_bufferAllocate_OutputPorts()),
587  static_cast<FwAssertArgType>(portNum)
588  );
589 
590  return this->m_bufferAllocate_OutputPort[portNum].isConnected();
591  }
592 
595  {
596  FW_ASSERT(
597  (0 <= portNum) && (portNum < this->getNum_bufferDeallocate_OutputPorts()),
598  static_cast<FwAssertArgType>(portNum)
599  );
600 
601  return this->m_bufferDeallocate_OutputPort[portNum].isConnected();
602  }
603 
606  {
607  FW_ASSERT(
608  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
609  static_cast<FwAssertArgType>(portNum)
610  );
611 
612  return this->m_dataOut_OutputPort[portNum].isConnected();
613  }
614 
617  {
618  FW_ASSERT(
619  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
620  static_cast<FwAssertArgType>(portNum)
621  );
622 
623  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
624  }
625 
626  // ----------------------------------------------------------------------
627  // Port handler base-class functions for typed input ports
628  //
629  // Call these functions directly to bypass the corresponding ports
630  // ----------------------------------------------------------------------
631 
634  FwIndexType portNum,
635  Fw::Buffer& data,
636  const ComCfg::FrameContext& context
637  )
638  {
639  // Make sure port number is valid
640  FW_ASSERT(
641  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
642  static_cast<FwAssertArgType>(portNum)
643  );
644 
645  // Lock guard mutex before calling
646  this->lock();
647 
648  // Call handler function
649  this->dataIn_handler(
650  portNum,
651  data,
652  context
653  );
654 
655  // Unlock guard mutex
656  this->unLock();
657  }
658 
661  FwIndexType portNum,
662  Fw::Buffer& data,
663  const ComCfg::FrameContext& context
664  )
665  {
666  // Make sure port number is valid
667  FW_ASSERT(
668  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
669  static_cast<FwAssertArgType>(portNum)
670  );
671 
672  // Call handler function
673  this->dataReturnIn_handler(
674  portNum,
675  data,
676  context
677  );
678  }
679 
680  // ----------------------------------------------------------------------
681  // Invocation functions for typed output ports
682  // ----------------------------------------------------------------------
683 
686  FwIndexType portNum,
687  U32 size
688  )
689  {
690  FW_ASSERT(
691  (0 <= portNum) && (portNum < this->getNum_bufferAllocate_OutputPorts()),
692  static_cast<FwAssertArgType>(portNum)
693  );
694 
695  FW_ASSERT(
696  this->m_bufferAllocate_OutputPort[portNum].isConnected(),
697  static_cast<FwAssertArgType>(portNum)
698  );
699  return this->m_bufferAllocate_OutputPort[portNum].invoke(
700  size
701  );
702  }
703 
706  FwIndexType portNum,
707  Fw::Buffer& fwBuffer
708  )
709  {
710  FW_ASSERT(
711  (0 <= portNum) && (portNum < this->getNum_bufferDeallocate_OutputPorts()),
712  static_cast<FwAssertArgType>(portNum)
713  );
714 
715  FW_ASSERT(
716  this->m_bufferDeallocate_OutputPort[portNum].isConnected(),
717  static_cast<FwAssertArgType>(portNum)
718  );
719  this->m_bufferDeallocate_OutputPort[portNum].invoke(
720  fwBuffer
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 
768  // ----------------------------------------------------------------------
769  // Event logging functions
770  // ----------------------------------------------------------------------
771 
774  {
775  // Get the time
776  Fw::Time _logTime;
777  if (this->m_timeCaller_OutputPort[0].isConnected()) {
778  this->m_timeCaller_OutputPort[0].invoke(_logTime);
779  }
780 
781  FwEventIdType _id = static_cast<FwEventIdType>(0);
782 
783  _id = this->getIdBase() + EVENTID_NOBUFFERAVAILABLE;
784 
785  // Emit the event on the log port
786  if (this->m_logOut_OutputPort[0].isConnected()) {
787  Fw::LogBuffer _logBuff;
788 
789 #if FW_AMPCS_COMPATIBLE
791  // Serialize the number of arguments
792  _status = _logBuff.serialize(static_cast<U8>(0));
793  FW_ASSERT(
794  _status == Fw::FW_SERIALIZE_OK,
795  static_cast<FwAssertArgType>(_status)
796  );
797 #endif
798 
799  this->m_logOut_OutputPort[0].invoke(
800  _id,
801  _logTime,
803  _logBuff
804  );
805  }
806 
807  // Emit the event on the text log port
808 #if FW_ENABLE_TEXT_LOGGING
809  if (this->m_logTextOut_OutputPort[0].isConnected()) {
810 #if FW_OBJECT_NAMES == 1
811  const char* _formatString =
812  "(%s) %s: Could not allocate a valid buffer to fit the detected frame";
813 #else
814  const char* _formatString =
815  "%s: Could not allocate a valid buffer to fit the detected frame";
816 #endif
817 
818  Fw::TextLogString _logString;
819  _logString.format(
820  _formatString,
821 #if FW_OBJECT_NAMES == 1
822  this->m_objName.toChar(),
823 #endif
824  "NoBufferAvailable "
825  );
826 
827  this->m_logTextOut_OutputPort[0].invoke(
828  _id,
829  _logTime,
831  _logString
832  );
833  }
834 #endif
835  }
836 
837  // ----------------------------------------------------------------------
838  // Time
839  // ----------------------------------------------------------------------
840 
842  getTime() const
843  {
844  if (this->m_timeCaller_OutputPort[0].isConnected()) {
845  Fw::Time _time;
846  this->m_timeCaller_OutputPort[0].invoke(_time);
847  return _time;
848  }
849  else {
850  return Fw::Time(TB_NONE, 0, 0);
851  }
852  }
853 
854  // ----------------------------------------------------------------------
855  // Mutex operations for guarded ports
856  //
857  // You can override these operations to provide more sophisticated
858  // synchronization
859  // ----------------------------------------------------------------------
860 
863  {
864  this->m_guardedPortMutex.lock();
865  }
866 
869  {
870  this->m_guardedPortMutex.unLock();
871  }
872 
873  // ----------------------------------------------------------------------
874  // Calls for messages received on typed input ports
875  // ----------------------------------------------------------------------
876 
877  void FrameAccumulatorComponentBase ::
878  m_p_dataIn_in(
879  Fw::PassiveComponentBase* callComp,
880  FwIndexType portNum,
881  Fw::Buffer& data,
882  const ComCfg::FrameContext& context
883  )
884  {
885  FW_ASSERT(callComp);
886  FrameAccumulatorComponentBase* compPtr = static_cast<FrameAccumulatorComponentBase*>(callComp);
887  compPtr->dataIn_handlerBase(
888  portNum,
889  data,
890  context
891  );
892  }
893 
894  void FrameAccumulatorComponentBase ::
895  m_p_dataReturnIn_in(
896  Fw::PassiveComponentBase* callComp,
897  FwIndexType portNum,
898  Fw::Buffer& data,
899  const ComCfg::FrameContext& context
900  )
901  {
902  FW_ASSERT(callComp);
903  FrameAccumulatorComponentBase* compPtr = static_cast<FrameAccumulatorComponentBase*>(callComp);
904  compPtr->dataReturnIn_handlerBase(
905  portNum,
906  data,
907  context
908  );
909  }
910 
911 }
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
virtual void unLock()
Unlock the guarded mutex.
Definition: Time.hpp:9
Fw::Buffer bufferAllocate_out(FwIndexType portNum, U32 size)
Invoke output port bufferAllocate.
bool isConnected_bufferAllocate_OutputPort(FwIndexType portNum)
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
I32 FwEnumStoreType
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum)
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Fw::Buffer invoke(U32 size) const
Invoke a port interface.
void unLock()
unlock the mutex and assert success
Definition: Mutex.cpp:40
void set_bufferAllocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to bufferAllocate[portNum].
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataReturnOut.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void init()
Object initializer.
Definition: ObjBase.cpp:26
SerializeStatus
forward declaration for string
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
FwIdType FwEventIdType
The type of an event identifier.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:53
void init()
Initialization function.
Definition: TimePortAc.cpp:128
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port interface.
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Invoke output port dataOut.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
const char * toChar() const
Definition: ObjectName.hpp:50
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port interface.
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
A serious but recoverable event.
void bufferDeallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer)
Invoke output port bufferDeallocate.
void init()
Initialization function.
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 init()
Initialization function.
Definition: LogPortAc.cpp:151
void setPortNum(FwIndexType portNum)
virtual void lock()
Lock the guarded mutex.
void init()
Initialization function.
void init()
Initialization function.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Definition: LogPortAc.cpp:170
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
bool isConnected_logOut_OutputPort(FwIndexType portNum)
No time base has been established.
Definition: FpConfig.h:30
PlatformIndexType FwIndexType
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
#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.
Auto-generated base for FrameAccumulator component.
void init()
Initialization function.
RateGroupDivider component implementation.
void set_bufferDeallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to bufferDeallocate[portNum].
FrameAccumulatorComponentBase(const char *compName="")
Construct FrameAccumulatorComponentBase object.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
bool isConnected_dataOut_OutputPort(FwIndexType portNum)
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
virtual ~FrameAccumulatorComponentBase()
Destroy FrameAccumulatorComponentBase object.
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void lock()
lock the mutex and assert success
Definition: Mutex.cpp:34
bool isConnected_bufferDeallocate_OutputPort(FwIndexType portNum)