F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
AosDeframerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title AosDeframerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for AosDeframer 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 dataIn
30  for (
31  FwIndexType port = 0;
32  port < static_cast<FwIndexType>(this->getNum_dataIn_InputPorts());
33  port++
34  ) {
35  this->m_dataIn_InputPort[port].init();
36  this->m_dataIn_InputPort[port].addCallComp(
37  this,
38  m_p_dataIn_in
39  );
40  this->m_dataIn_InputPort[port].setPortNum(port);
41 
42 #if FW_OBJECT_NAMES == 1
43  Fw::ObjectName portName;
44  portName.format(
45  "%s_dataIn_InputPort[%" PRI_FwIndexType "]",
46  this->m_objName.toChar(),
47  port
48  );
49  this->m_dataIn_InputPort[port].setObjName(portName.toChar());
50 #endif
51  }
52 #endif
53 
54 #if !FW_DIRECT_PORT_CALLS
55  // Connect input port dataReturnIn
56  for (
57  FwIndexType port = 0;
58  port < static_cast<FwIndexType>(this->getNum_dataReturnIn_InputPorts());
59  port++
60  ) {
61  this->m_dataReturnIn_InputPort[port].init();
62  this->m_dataReturnIn_InputPort[port].addCallComp(
63  this,
64  m_p_dataReturnIn_in
65  );
66  this->m_dataReturnIn_InputPort[port].setPortNum(port);
67 
68 #if FW_OBJECT_NAMES == 1
69  Fw::ObjectName portName;
70  portName.format(
71  "%s_dataReturnIn_InputPort[%" PRI_FwIndexType "]",
72  this->m_objName.toChar(),
73  port
74  );
75  this->m_dataReturnIn_InputPort[port].setObjName(portName.toChar());
76 #endif
77  }
78 #endif
79 
80 #if !FW_DIRECT_PORT_CALLS
81  // Connect output port logOut
82  for (
83  FwIndexType port = 0;
84  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
85  port++
86  ) {
87  this->m_logOut_OutputPort[port].init();
88 
89 #if FW_OBJECT_NAMES == 1
90  Fw::ObjectName portName;
91  portName.format(
92  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
93  this->m_objName.toChar(),
94  port
95  );
96  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
97 #endif
98  }
99 #endif
100 
101 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
102  // Connect output port logTextOut
103  for (
104  FwIndexType port = 0;
105  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
106  port++
107  ) {
108  this->m_logTextOut_OutputPort[port].init();
109 
110 #if FW_OBJECT_NAMES == 1
111  Fw::ObjectName portName;
112  portName.format(
113  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
114  this->m_objName.toChar(),
115  port
116  );
117  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
118 #endif
119  }
120 #endif
121 
122 #if !FW_DIRECT_PORT_CALLS
123  // Connect output port prmGetOut
124  for (
125  FwIndexType port = 0;
126  port < static_cast<FwIndexType>(this->getNum_prmGetOut_OutputPorts());
127  port++
128  ) {
129  this->m_prmGetOut_OutputPort[port].init();
130 
131 #if FW_OBJECT_NAMES == 1
132  Fw::ObjectName portName;
133  portName.format(
134  "%s_prmGetOut_OutputPort[%" PRI_FwIndexType "]",
135  this->m_objName.toChar(),
136  port
137  );
138  this->m_prmGetOut_OutputPort[port].setObjName(portName.toChar());
139 #endif
140  }
141 #endif
142 
143 #if !FW_DIRECT_PORT_CALLS
144  // Connect output port prmSetOut
145  for (
146  FwIndexType port = 0;
147  port < static_cast<FwIndexType>(this->getNum_prmSetOut_OutputPorts());
148  port++
149  ) {
150  this->m_prmSetOut_OutputPort[port].init();
151 
152 #if FW_OBJECT_NAMES == 1
153  Fw::ObjectName portName;
154  portName.format(
155  "%s_prmSetOut_OutputPort[%" PRI_FwIndexType "]",
156  this->m_objName.toChar(),
157  port
158  );
159  this->m_prmSetOut_OutputPort[port].setObjName(portName.toChar());
160 #endif
161  }
162 #endif
163 
164 #if !FW_DIRECT_PORT_CALLS
165  // Connect output port timeCaller
166  for (
167  FwIndexType port = 0;
168  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
169  port++
170  ) {
171  this->m_timeCaller_OutputPort[port].init();
172 
173 #if FW_OBJECT_NAMES == 1
174  Fw::ObjectName portName;
175  portName.format(
176  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
177  this->m_objName.toChar(),
178  port
179  );
180  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
181 #endif
182  }
183 #endif
184 
185 #if !FW_DIRECT_PORT_CALLS
186  // Connect output port tlmOut
187  for (
188  FwIndexType port = 0;
189  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
190  port++
191  ) {
192  this->m_tlmOut_OutputPort[port].init();
193 
194 #if FW_OBJECT_NAMES == 1
195  Fw::ObjectName portName;
196  portName.format(
197  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
198  this->m_objName.toChar(),
199  port
200  );
201  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
202 #endif
203  }
204 #endif
205 
206 #if !FW_DIRECT_PORT_CALLS
207  // Connect output port allocate
208  for (
209  FwIndexType port = 0;
210  port < static_cast<FwIndexType>(this->getNum_allocate_OutputPorts());
211  port++
212  ) {
213  this->m_allocate_OutputPort[port].init();
214 
215 #if FW_OBJECT_NAMES == 1
216  Fw::ObjectName portName;
217  portName.format(
218  "%s_allocate_OutputPort[%" PRI_FwIndexType "]",
219  this->m_objName.toChar(),
220  port
221  );
222  this->m_allocate_OutputPort[port].setObjName(portName.toChar());
223 #endif
224  }
225 #endif
226 
227 #if !FW_DIRECT_PORT_CALLS
228  // Connect output port dataOut
229  for (
230  FwIndexType port = 0;
231  port < static_cast<FwIndexType>(this->getNum_dataOut_OutputPorts());
232  port++
233  ) {
234  this->m_dataOut_OutputPort[port].init();
235 
236 #if FW_OBJECT_NAMES == 1
237  Fw::ObjectName portName;
238  portName.format(
239  "%s_dataOut_OutputPort[%" PRI_FwIndexType "]",
240  this->m_objName.toChar(),
241  port
242  );
243  this->m_dataOut_OutputPort[port].setObjName(portName.toChar());
244 #endif
245  }
246 #endif
247 
248 #if !FW_DIRECT_PORT_CALLS
249  // Connect output port dataReturnOut
250  for (
251  FwIndexType port = 0;
252  port < static_cast<FwIndexType>(this->getNum_dataReturnOut_OutputPorts());
253  port++
254  ) {
255  this->m_dataReturnOut_OutputPort[port].init();
256 
257 #if FW_OBJECT_NAMES == 1
258  Fw::ObjectName portName;
259  portName.format(
260  "%s_dataReturnOut_OutputPort[%" PRI_FwIndexType "]",
261  this->m_objName.toChar(),
262  port
263  );
264  this->m_dataReturnOut_OutputPort[port].setObjName(portName.toChar());
265 #endif
266  }
267 #endif
268 
269 #if !FW_DIRECT_PORT_CALLS
270  // Connect output port deallocate
271  for (
272  FwIndexType port = 0;
273  port < static_cast<FwIndexType>(this->getNum_deallocate_OutputPorts());
274  port++
275  ) {
276  this->m_deallocate_OutputPort[port].init();
277 
278 #if FW_OBJECT_NAMES == 1
279  Fw::ObjectName portName;
280  portName.format(
281  "%s_deallocate_OutputPort[%" PRI_FwIndexType "]",
282  this->m_objName.toChar(),
283  port
284  );
285  this->m_deallocate_OutputPort[port].setObjName(portName.toChar());
286 #endif
287  }
288 #endif
289 
290 #if !FW_DIRECT_PORT_CALLS
291  // Connect output port errorNotify
292  for (
293  FwIndexType port = 0;
294  port < static_cast<FwIndexType>(this->getNum_errorNotify_OutputPorts());
295  port++
296  ) {
297  this->m_errorNotify_OutputPort[port].init();
298 
299 #if FW_OBJECT_NAMES == 1
300  Fw::ObjectName portName;
301  portName.format(
302  "%s_errorNotify_OutputPort[%" PRI_FwIndexType "]",
303  this->m_objName.toChar(),
304  port
305  );
306  this->m_errorNotify_OutputPort[port].setObjName(portName.toChar());
307 #endif
308  }
309 #endif
310  }
311 
312 #if !FW_DIRECT_PORT_CALLS
313 
314  // ----------------------------------------------------------------------
315  // Getters for typed input ports
316  // ----------------------------------------------------------------------
317 
320  {
321  FW_ASSERT(
322  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
323  static_cast<FwAssertArgType>(portNum)
324  );
325 
326  return &this->m_dataIn_InputPort[portNum];
327  }
328 
331  {
332  FW_ASSERT(
333  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
334  static_cast<FwAssertArgType>(portNum)
335  );
336 
337  return &this->m_dataReturnIn_InputPort[portNum];
338  }
339 
340 #endif
341 
342 #if !FW_DIRECT_PORT_CALLS
343 
344  // ----------------------------------------------------------------------
345  // Connect input ports to special output ports
346  // ----------------------------------------------------------------------
347 
350  FwIndexType portNum,
351  Fw::InputLogPort* port
352  )
353  {
354  FW_ASSERT(
355  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
356  static_cast<FwAssertArgType>(portNum)
357  );
358 
359  this->m_logOut_OutputPort[portNum].addCallPort(port);
360  }
361 
362 #if FW_ENABLE_TEXT_LOGGING == 1
363 
364  void AosDeframerComponentBase ::
365  set_logTextOut_OutputPort(
366  FwIndexType portNum,
368  )
369  {
370  FW_ASSERT(
371  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
372  static_cast<FwAssertArgType>(portNum)
373  );
374 
375  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
376  }
377 
378 #endif
379 
382  FwIndexType portNum,
383  Fw::InputPrmGetPort* port
384  )
385  {
386  FW_ASSERT(
387  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
388  static_cast<FwAssertArgType>(portNum)
389  );
390 
391  this->m_prmGetOut_OutputPort[portNum].addCallPort(port);
392  }
393 
396  FwIndexType portNum,
397  Fw::InputPrmSetPort* port
398  )
399  {
400  FW_ASSERT(
401  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
402  static_cast<FwAssertArgType>(portNum)
403  );
404 
405  this->m_prmSetOut_OutputPort[portNum].addCallPort(port);
406  }
407 
410  FwIndexType portNum,
411  Fw::InputTimePort* port
412  )
413  {
414  FW_ASSERT(
415  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
416  static_cast<FwAssertArgType>(portNum)
417  );
418 
419  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
420  }
421 
424  FwIndexType portNum,
425  Fw::InputTlmPort* port
426  )
427  {
428  FW_ASSERT(
429  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
430  static_cast<FwAssertArgType>(portNum)
431  );
432 
433  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
434  }
435 
436 #endif
437 
438 #if !FW_DIRECT_PORT_CALLS
439 
440  // ----------------------------------------------------------------------
441  // Connect typed input ports to typed output ports
442  // ----------------------------------------------------------------------
443 
446  FwIndexType portNum,
448  )
449  {
450  FW_ASSERT(
451  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
452  static_cast<FwAssertArgType>(portNum)
453  );
454 
455  this->m_allocate_OutputPort[portNum].addCallPort(port);
456  }
457 
460  FwIndexType portNum,
462  )
463  {
464  FW_ASSERT(
465  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
466  static_cast<FwAssertArgType>(portNum)
467  );
468 
469  this->m_dataOut_OutputPort[portNum].addCallPort(port);
470  }
471 
474  FwIndexType portNum,
476  )
477  {
478  FW_ASSERT(
479  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
480  static_cast<FwAssertArgType>(portNum)
481  );
482 
483  this->m_dataReturnOut_OutputPort[portNum].addCallPort(port);
484  }
485 
488  FwIndexType portNum,
490  )
491  {
492  FW_ASSERT(
493  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
494  static_cast<FwAssertArgType>(portNum)
495  );
496 
497  this->m_deallocate_OutputPort[portNum].addCallPort(port);
498  }
499 
502  FwIndexType portNum,
504  )
505  {
506  FW_ASSERT(
507  (0 <= portNum) && (portNum < this->getNum_errorNotify_OutputPorts()),
508  static_cast<FwAssertArgType>(portNum)
509  );
510 
511  this->m_errorNotify_OutputPort[portNum].addCallPort(port);
512  }
513 
514 #endif
515 
516 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
517 
518  // ----------------------------------------------------------------------
519  // Connect serial input ports to special output ports
520  // ----------------------------------------------------------------------
521 
524  FwIndexType portNum,
525  Fw::InputSerializePort* port
526  )
527  {
528  FW_ASSERT(
529  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
530  static_cast<FwAssertArgType>(portNum)
531  );
532 
533  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
534  }
535 
536 #if FW_ENABLE_TEXT_LOGGING == 1
537 
538  void AosDeframerComponentBase ::
539  set_logTextOut_OutputPort(
540  FwIndexType portNum,
541  Fw::InputSerializePort* port
542  )
543  {
544  FW_ASSERT(
545  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
546  static_cast<FwAssertArgType>(portNum)
547  );
548 
549  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
550  }
551 
552 #endif
553 
556  FwIndexType portNum,
557  Fw::InputSerializePort* port
558  )
559  {
560  FW_ASSERT(
561  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
562  static_cast<FwAssertArgType>(portNum)
563  );
564 
565  this->m_prmSetOut_OutputPort[portNum].registerSerialPort(port);
566  }
567 
570  FwIndexType portNum,
571  Fw::InputSerializePort* port
572  )
573  {
574  FW_ASSERT(
575  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
576  static_cast<FwAssertArgType>(portNum)
577  );
578 
579  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
580  }
581 
584  FwIndexType portNum,
585  Fw::InputSerializePort* port
586  )
587  {
588  FW_ASSERT(
589  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
590  static_cast<FwAssertArgType>(portNum)
591  );
592 
593  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
594  }
595 
596 #endif
597 
598 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
599 
600  // ----------------------------------------------------------------------
601  // Connect serial input ports to typed output ports
602  // ----------------------------------------------------------------------
603 
606  FwIndexType portNum,
607  Fw::InputSerializePort* port
608  )
609  {
610  FW_ASSERT(
611  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
612  static_cast<FwAssertArgType>(portNum)
613  );
614 
615  this->m_dataOut_OutputPort[portNum].registerSerialPort(port);
616  }
617 
620  FwIndexType portNum,
621  Fw::InputSerializePort* port
622  )
623  {
624  FW_ASSERT(
625  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
626  static_cast<FwAssertArgType>(portNum)
627  );
628 
629  this->m_dataReturnOut_OutputPort[portNum].registerSerialPort(port);
630  }
631 
634  FwIndexType portNum,
635  Fw::InputSerializePort* port
636  )
637  {
638  FW_ASSERT(
639  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
640  static_cast<FwAssertArgType>(portNum)
641  );
642 
643  this->m_deallocate_OutputPort[portNum].registerSerialPort(port);
644  }
645 
648  FwIndexType portNum,
649  Fw::InputSerializePort* port
650  )
651  {
652  FW_ASSERT(
653  (0 <= portNum) && (portNum < this->getNum_errorNotify_OutputPorts()),
654  static_cast<FwAssertArgType>(portNum)
655  );
656 
657  this->m_errorNotify_OutputPort[portNum].registerSerialPort(port);
658  }
659 
660 #endif
661 
662  // ----------------------------------------------------------------------
663  // Component construction and destruction
664  // ----------------------------------------------------------------------
665 
667  AosDeframerComponentBase(const char* compName) :
668  Fw::PassiveComponentBase(compName)
669  {
670 
671  }
672 
675  {
676 
677  }
678 
679 #if !FW_DIRECT_PORT_CALLS
680 
681  // ----------------------------------------------------------------------
682  // Connection status queries for special output ports
683  // ----------------------------------------------------------------------
684 
687  {
688  FW_ASSERT(
689  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
690  static_cast<FwAssertArgType>(portNum)
691  );
692 
693  return this->m_logOut_OutputPort[portNum].isConnected();
694  }
695 
696 #if FW_ENABLE_TEXT_LOGGING == 1
697 
698  bool AosDeframerComponentBase ::
699  isConnected_logTextOut_OutputPort(FwIndexType portNum) const
700  {
701  FW_ASSERT(
702  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
703  static_cast<FwAssertArgType>(portNum)
704  );
705 
706  return this->m_logTextOut_OutputPort[portNum].isConnected();
707  }
708 
709 #endif
710 
713  {
714  FW_ASSERT(
715  (0 <= portNum) && (portNum < this->getNum_prmGetOut_OutputPorts()),
716  static_cast<FwAssertArgType>(portNum)
717  );
718 
719  return this->m_prmGetOut_OutputPort[portNum].isConnected();
720  }
721 
724  {
725  FW_ASSERT(
726  (0 <= portNum) && (portNum < this->getNum_prmSetOut_OutputPorts()),
727  static_cast<FwAssertArgType>(portNum)
728  );
729 
730  return this->m_prmSetOut_OutputPort[portNum].isConnected();
731  }
732 
735  {
736  FW_ASSERT(
737  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
738  static_cast<FwAssertArgType>(portNum)
739  );
740 
741  return this->m_timeCaller_OutputPort[portNum].isConnected();
742  }
743 
746  {
747  FW_ASSERT(
748  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
749  static_cast<FwAssertArgType>(portNum)
750  );
751 
752  return this->m_tlmOut_OutputPort[portNum].isConnected();
753  }
754 
755 #endif
756 
757 #if !FW_DIRECT_PORT_CALLS
758 
759  // ----------------------------------------------------------------------
760  // Connection status queries for typed output ports
761  // ----------------------------------------------------------------------
762 
765  {
766  FW_ASSERT(
767  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
768  static_cast<FwAssertArgType>(portNum)
769  );
770 
771  return this->m_allocate_OutputPort[portNum].isConnected();
772  }
773 
776  {
777  FW_ASSERT(
778  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
779  static_cast<FwAssertArgType>(portNum)
780  );
781 
782  return this->m_dataOut_OutputPort[portNum].isConnected();
783  }
784 
787  {
788  FW_ASSERT(
789  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
790  static_cast<FwAssertArgType>(portNum)
791  );
792 
793  return this->m_dataReturnOut_OutputPort[portNum].isConnected();
794  }
795 
798  {
799  FW_ASSERT(
800  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
801  static_cast<FwAssertArgType>(portNum)
802  );
803 
804  return this->m_deallocate_OutputPort[portNum].isConnected();
805  }
806 
809  {
810  FW_ASSERT(
811  (0 <= portNum) && (portNum < this->getNum_errorNotify_OutputPorts()),
812  static_cast<FwAssertArgType>(portNum)
813  );
814 
815  return this->m_errorNotify_OutputPort[portNum].isConnected();
816  }
817 
818 #endif
819 
820  // ----------------------------------------------------------------------
821  // Port handler base-class functions for typed input ports
822  //
823  // Call these functions directly to bypass the corresponding ports
824  // ----------------------------------------------------------------------
825 
828  FwIndexType portNum,
829  Fw::Buffer& data,
830  const ComCfg::FrameContext& context
831  )
832  {
833  // Make sure port number is valid
834  FW_ASSERT(
835  (0 <= portNum) && (portNum < this->getNum_dataIn_InputPorts()),
836  static_cast<FwAssertArgType>(portNum)
837  );
838 
839  // Lock guard mutex before calling
840  this->lock();
841 
842  // Call handler function
843  this->dataIn_handler(
844  portNum,
845  data,
846  context
847  );
848 
849  // Unlock guard mutex
850  this->unLock();
851  }
852 
855  FwIndexType portNum,
856  Fw::Buffer& data,
857  const ComCfg::FrameContext& context
858  )
859  {
860  // Make sure port number is valid
861  FW_ASSERT(
862  (0 <= portNum) && (portNum < this->getNum_dataReturnIn_InputPorts()),
863  static_cast<FwAssertArgType>(portNum)
864  );
865 
866  // Call handler function
867  this->dataReturnIn_handler(
868  portNum,
869  data,
870  context
871  );
872  }
873 
874 #if !FW_DIRECT_PORT_CALLS
875 
876  // ----------------------------------------------------------------------
877  // Invocation functions for typed output ports
878  // ----------------------------------------------------------------------
879 
882  FwIndexType portNum,
883  FwSizeType size
884  ) const
885  {
886  FW_ASSERT(
887  (0 <= portNum) && (portNum < this->getNum_allocate_OutputPorts()),
888  static_cast<FwAssertArgType>(portNum)
889  );
890 
891  FW_ASSERT(
892  this->m_allocate_OutputPort[portNum].isConnected(),
893  static_cast<FwAssertArgType>(portNum)
894  );
895  return this->m_allocate_OutputPort[portNum].invoke(
896  size
897  );
898  }
899 
902  FwIndexType portNum,
903  Fw::Buffer& data,
904  const ComCfg::FrameContext& context
905  ) const
906  {
907  FW_ASSERT(
908  (0 <= portNum) && (portNum < this->getNum_dataOut_OutputPorts()),
909  static_cast<FwAssertArgType>(portNum)
910  );
911 
912  FW_ASSERT(
913  this->m_dataOut_OutputPort[portNum].isConnected(),
914  static_cast<FwAssertArgType>(portNum)
915  );
916  this->m_dataOut_OutputPort[portNum].invoke(
917  data,
918  context
919  );
920  }
921 
924  FwIndexType portNum,
925  Fw::Buffer& data,
926  const ComCfg::FrameContext& context
927  ) const
928  {
929  FW_ASSERT(
930  (0 <= portNum) && (portNum < this->getNum_dataReturnOut_OutputPorts()),
931  static_cast<FwAssertArgType>(portNum)
932  );
933 
934  FW_ASSERT(
935  this->m_dataReturnOut_OutputPort[portNum].isConnected(),
936  static_cast<FwAssertArgType>(portNum)
937  );
938  this->m_dataReturnOut_OutputPort[portNum].invoke(
939  data,
940  context
941  );
942  }
943 
946  FwIndexType portNum,
947  Fw::Buffer& fwBuffer
948  ) const
949  {
950  FW_ASSERT(
951  (0 <= portNum) && (portNum < this->getNum_deallocate_OutputPorts()),
952  static_cast<FwAssertArgType>(portNum)
953  );
954 
955  FW_ASSERT(
956  this->m_deallocate_OutputPort[portNum].isConnected(),
957  static_cast<FwAssertArgType>(portNum)
958  );
959  this->m_deallocate_OutputPort[portNum].invoke(
960  fwBuffer
961  );
962  }
963 
966  FwIndexType portNum,
967  const Svc::Ccsds::FrameError& errorCode
968  ) const
969  {
970  FW_ASSERT(
971  (0 <= portNum) && (portNum < this->getNum_errorNotify_OutputPorts()),
972  static_cast<FwAssertArgType>(portNum)
973  );
974 
975  FW_ASSERT(
976  this->m_errorNotify_OutputPort[portNum].isConnected(),
977  static_cast<FwAssertArgType>(portNum)
978  );
979  this->m_errorNotify_OutputPort[portNum].invoke(
980  errorCode
981  );
982  }
983 
984 #endif
985 
986  // ----------------------------------------------------------------------
987  // Event logging functions
988  // ----------------------------------------------------------------------
989 
992  U16 transmitted,
993  U16 configured
994  ) const
995  {
996  // Get the time
997  Fw::Time _logTime;
998  if (this->isConnected_timeCaller_OutputPort(0)) {
999  this->timeCaller_out(0, _logTime);
1000  }
1001 
1002  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDSPACECRAFTID;
1003 
1004  // Emit the event on the log port
1005  if (this->isConnected_logOut_OutputPort(0)) {
1006  Fw::LogBuffer _logBuff;
1008 
1009 #if FW_AMPCS_COMPATIBLE
1010  // Serialize the number of arguments
1011  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1012  FW_ASSERT(
1013  _status == Fw::FW_SERIALIZE_OK,
1014  static_cast<FwAssertArgType>(_status)
1015  );
1016 #endif
1017 
1018 #if FW_AMPCS_COMPATIBLE
1019  // Serialize the argument size
1020  _status = _logBuff.serializeFrom(
1021  static_cast<U8>(sizeof(U16))
1022  );
1023  FW_ASSERT(
1024  _status == Fw::FW_SERIALIZE_OK,
1025  static_cast<FwAssertArgType>(_status)
1026  );
1027 #endif
1028  _status = _logBuff.serializeFrom(transmitted);
1029  FW_ASSERT(
1030  _status == Fw::FW_SERIALIZE_OK,
1031  static_cast<FwAssertArgType>(_status)
1032  );
1033 
1034 #if FW_AMPCS_COMPATIBLE
1035  // Serialize the argument size
1036  _status = _logBuff.serializeFrom(
1037  static_cast<U8>(sizeof(U16))
1038  );
1039  FW_ASSERT(
1040  _status == Fw::FW_SERIALIZE_OK,
1041  static_cast<FwAssertArgType>(_status)
1042  );
1043 #endif
1044  _status = _logBuff.serializeFrom(configured);
1045  FW_ASSERT(
1046  _status == Fw::FW_SERIALIZE_OK,
1047  static_cast<FwAssertArgType>(_status)
1048  );
1049 
1050  this->logOut_out(
1051  0,
1052  _id,
1053  _logTime,
1055  _logBuff
1056  );
1057  }
1058 
1059  // Emit the event on the text log port
1060 #if FW_ENABLE_TEXT_LOGGING
1061  if (this->isConnected_logTextOut_OutputPort(0)) {
1062 #if FW_OBJECT_NAMES == 1
1063  const char* _formatString =
1064  "(%s) %s: Invalid Spacecraft ID Received. Received: %" PRIu16 " | Deframer configured with: %" PRIu16 "";
1065 #else
1066  const char* _formatString =
1067  "%s: Invalid Spacecraft ID Received. Received: %" PRIu16 " | Deframer configured with: %" PRIu16 "";
1068 #endif
1069 
1070  Fw::TextLogString _logString;
1071  _logString.format(
1072  _formatString,
1073 #if FW_OBJECT_NAMES == 1
1074  this->m_objName.toChar(),
1075 #endif
1076  "InvalidSpacecraftId ",
1077  transmitted,
1078  configured
1079  );
1080 
1081  this->logTextOut_out(
1082  0,
1083  _id,
1084  _logTime,
1086  _logString
1087  );
1088  }
1089 #endif
1090  }
1091 
1094  FwSizeType actual,
1095  U32 expected
1096  ) const
1097  {
1098  // Get the time
1099  Fw::Time _logTime;
1100  if (this->isConnected_timeCaller_OutputPort(0)) {
1101  this->timeCaller_out(0, _logTime);
1102  }
1103 
1104  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDFRAMELENGTH;
1105 
1106  // Emit the event on the log port
1107  if (this->isConnected_logOut_OutputPort(0)) {
1108  Fw::LogBuffer _logBuff;
1110 
1111 #if FW_AMPCS_COMPATIBLE
1112  // Serialize the number of arguments
1113  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1114  FW_ASSERT(
1115  _status == Fw::FW_SERIALIZE_OK,
1116  static_cast<FwAssertArgType>(_status)
1117  );
1118 #endif
1119 
1120 #if FW_AMPCS_COMPATIBLE
1121  // Serialize the argument size
1122  _status = _logBuff.serializeFrom(
1123  static_cast<U8>(sizeof(FwSizeType))
1124  );
1125  FW_ASSERT(
1126  _status == Fw::FW_SERIALIZE_OK,
1127  static_cast<FwAssertArgType>(_status)
1128  );
1129 #endif
1130  _status = _logBuff.serializeFrom(actual);
1131  FW_ASSERT(
1132  _status == Fw::FW_SERIALIZE_OK,
1133  static_cast<FwAssertArgType>(_status)
1134  );
1135 
1136 #if FW_AMPCS_COMPATIBLE
1137  // Serialize the argument size
1138  _status = _logBuff.serializeFrom(
1139  static_cast<U8>(sizeof(U32))
1140  );
1141  FW_ASSERT(
1142  _status == Fw::FW_SERIALIZE_OK,
1143  static_cast<FwAssertArgType>(_status)
1144  );
1145 #endif
1146  _status = _logBuff.serializeFrom(expected);
1147  FW_ASSERT(
1148  _status == Fw::FW_SERIALIZE_OK,
1149  static_cast<FwAssertArgType>(_status)
1150  );
1151 
1152  this->logOut_out(
1153  0,
1154  _id,
1155  _logTime,
1157  _logBuff
1158  );
1159  }
1160 
1161  // Emit the event on the text log port
1162 #if FW_ENABLE_TEXT_LOGGING
1163  if (this->isConnected_logTextOut_OutputPort(0)) {
1164 #if FW_OBJECT_NAMES == 1
1165  const char* _formatString =
1166  "(%s) %s: Frame length mismatch. Received: %" PRIu64 " | Expected: %" PRIu32 " ";
1167 #else
1168  const char* _formatString =
1169  "%s: Frame length mismatch. Received: %" PRIu64 " | Expected: %" PRIu32 " ";
1170 #endif
1171 
1172  Fw::TextLogString _logString;
1173  _logString.format(
1174  _formatString,
1175 #if FW_OBJECT_NAMES == 1
1176  this->m_objName.toChar(),
1177 #endif
1178  "InvalidFrameLength ",
1179  actual,
1180  expected
1181  );
1182 
1183  this->logTextOut_out(
1184  0,
1185  _id,
1186  _logTime,
1188  _logString
1189  );
1190  }
1191 #endif
1192  }
1193 
1196  U8 transmitted,
1197  U8 configured
1198  ) const
1199  {
1200  // Get the time
1201  Fw::Time _logTime;
1202  if (this->isConnected_timeCaller_OutputPort(0)) {
1203  this->timeCaller_out(0, _logTime);
1204  }
1205 
1206  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDVCID;
1207 
1208  // Emit the event on the log port
1209  if (this->isConnected_logOut_OutputPort(0)) {
1210  Fw::LogBuffer _logBuff;
1212 
1213 #if FW_AMPCS_COMPATIBLE
1214  // Serialize the number of arguments
1215  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1216  FW_ASSERT(
1217  _status == Fw::FW_SERIALIZE_OK,
1218  static_cast<FwAssertArgType>(_status)
1219  );
1220 #endif
1221 
1222 #if FW_AMPCS_COMPATIBLE
1223  // Serialize the argument size
1224  _status = _logBuff.serializeFrom(
1225  static_cast<U8>(sizeof(U8))
1226  );
1227  FW_ASSERT(
1228  _status == Fw::FW_SERIALIZE_OK,
1229  static_cast<FwAssertArgType>(_status)
1230  );
1231 #endif
1232  _status = _logBuff.serializeFrom(transmitted);
1233  FW_ASSERT(
1234  _status == Fw::FW_SERIALIZE_OK,
1235  static_cast<FwAssertArgType>(_status)
1236  );
1237 
1238 #if FW_AMPCS_COMPATIBLE
1239  // Serialize the argument size
1240  _status = _logBuff.serializeFrom(
1241  static_cast<U8>(sizeof(U8))
1242  );
1243  FW_ASSERT(
1244  _status == Fw::FW_SERIALIZE_OK,
1245  static_cast<FwAssertArgType>(_status)
1246  );
1247 #endif
1248  _status = _logBuff.serializeFrom(configured);
1249  FW_ASSERT(
1250  _status == Fw::FW_SERIALIZE_OK,
1251  static_cast<FwAssertArgType>(_status)
1252  );
1253 
1254  this->logOut_out(
1255  0,
1256  _id,
1257  _logTime,
1259  _logBuff
1260  );
1261  }
1262 
1263  // Emit the event on the text log port
1264 #if FW_ENABLE_TEXT_LOGGING
1265  if (this->isConnected_logTextOut_OutputPort(0)) {
1266 #if FW_OBJECT_NAMES == 1
1267  const char* _formatString =
1268  "(%s) %s: Invalid Virtual Channel ID. Frame contained: %" PRIu8 " | Accepted VCIDs: %" PRIu8 "";
1269 #else
1270  const char* _formatString =
1271  "%s: Invalid Virtual Channel ID. Frame contained: %" PRIu8 " | Accepted VCIDs: %" PRIu8 "";
1272 #endif
1273 
1274  Fw::TextLogString _logString;
1275  _logString.format(
1276  _formatString,
1277 #if FW_OBJECT_NAMES == 1
1278  this->m_objName.toChar(),
1279 #endif
1280  "InvalidVcId ",
1281  transmitted,
1282  configured
1283  );
1284 
1285  this->logTextOut_out(
1286  0,
1287  _id,
1288  _logTime,
1290  _logString
1291  );
1292  }
1293 #endif
1294  }
1295 
1298  U16 transmitted,
1299  U16 computed
1300  ) const
1301  {
1302  // Get the time
1303  Fw::Time _logTime;
1304  if (this->isConnected_timeCaller_OutputPort(0)) {
1305  this->timeCaller_out(0, _logTime);
1306  }
1307 
1308  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDFECF;
1309 
1310  // Emit the event on the log port
1311  if (this->isConnected_logOut_OutputPort(0)) {
1312  Fw::LogBuffer _logBuff;
1314 
1315 #if FW_AMPCS_COMPATIBLE
1316  // Serialize the number of arguments
1317  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1318  FW_ASSERT(
1319  _status == Fw::FW_SERIALIZE_OK,
1320  static_cast<FwAssertArgType>(_status)
1321  );
1322 #endif
1323 
1324 #if FW_AMPCS_COMPATIBLE
1325  // Serialize the argument size
1326  _status = _logBuff.serializeFrom(
1327  static_cast<U8>(sizeof(U16))
1328  );
1329  FW_ASSERT(
1330  _status == Fw::FW_SERIALIZE_OK,
1331  static_cast<FwAssertArgType>(_status)
1332  );
1333 #endif
1334  _status = _logBuff.serializeFrom(transmitted);
1335  FW_ASSERT(
1336  _status == Fw::FW_SERIALIZE_OK,
1337  static_cast<FwAssertArgType>(_status)
1338  );
1339 
1340 #if FW_AMPCS_COMPATIBLE
1341  // Serialize the argument size
1342  _status = _logBuff.serializeFrom(
1343  static_cast<U8>(sizeof(U16))
1344  );
1345  FW_ASSERT(
1346  _status == Fw::FW_SERIALIZE_OK,
1347  static_cast<FwAssertArgType>(_status)
1348  );
1349 #endif
1350  _status = _logBuff.serializeFrom(computed);
1351  FW_ASSERT(
1352  _status == Fw::FW_SERIALIZE_OK,
1353  static_cast<FwAssertArgType>(_status)
1354  );
1355 
1356  this->logOut_out(
1357  0,
1358  _id,
1359  _logTime,
1361  _logBuff
1362  );
1363  }
1364 
1365  // Emit the event on the text log port
1366 #if FW_ENABLE_TEXT_LOGGING
1367  if (this->isConnected_logTextOut_OutputPort(0)) {
1368 #if FW_OBJECT_NAMES == 1
1369  const char* _formatString =
1370  "(%s) %s: Invalid FECF (CRC) received. Trailer specified: %" PRIu16 " | Computed on board: %" PRIu16 "";
1371 #else
1372  const char* _formatString =
1373  "%s: Invalid FECF (CRC) received. Trailer specified: %" PRIu16 " | Computed on board: %" PRIu16 "";
1374 #endif
1375 
1376  Fw::TextLogString _logString;
1377  _logString.format(
1378  _formatString,
1379 #if FW_OBJECT_NAMES == 1
1380  this->m_objName.toChar(),
1381 #endif
1382  "InvalidFecf ",
1383  transmitted,
1384  computed
1385  );
1386 
1387  this->logTextOut_out(
1388  0,
1389  _id,
1390  _logTime,
1392  _logString
1393  );
1394  }
1395 #endif
1396  }
1397 
1400  U8 transmitted,
1401  U8 expected
1402  ) const
1403  {
1404  // Get the time
1405  Fw::Time _logTime;
1406  if (this->isConnected_timeCaller_OutputPort(0)) {
1407  this->timeCaller_out(0, _logTime);
1408  }
1409 
1410  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDTFVN;
1411 
1412  // Emit the event on the log port
1413  if (this->isConnected_logOut_OutputPort(0)) {
1414  Fw::LogBuffer _logBuff;
1416 
1417 #if FW_AMPCS_COMPATIBLE
1418  // Serialize the number of arguments
1419  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1420  FW_ASSERT(
1421  _status == Fw::FW_SERIALIZE_OK,
1422  static_cast<FwAssertArgType>(_status)
1423  );
1424 #endif
1425 
1426 #if FW_AMPCS_COMPATIBLE
1427  // Serialize the argument size
1428  _status = _logBuff.serializeFrom(
1429  static_cast<U8>(sizeof(U8))
1430  );
1431  FW_ASSERT(
1432  _status == Fw::FW_SERIALIZE_OK,
1433  static_cast<FwAssertArgType>(_status)
1434  );
1435 #endif
1436  _status = _logBuff.serializeFrom(transmitted);
1437  FW_ASSERT(
1438  _status == Fw::FW_SERIALIZE_OK,
1439  static_cast<FwAssertArgType>(_status)
1440  );
1441 
1442 #if FW_AMPCS_COMPATIBLE
1443  // Serialize the argument size
1444  _status = _logBuff.serializeFrom(
1445  static_cast<U8>(sizeof(U8))
1446  );
1447  FW_ASSERT(
1448  _status == Fw::FW_SERIALIZE_OK,
1449  static_cast<FwAssertArgType>(_status)
1450  );
1451 #endif
1452  _status = _logBuff.serializeFrom(expected);
1453  FW_ASSERT(
1454  _status == Fw::FW_SERIALIZE_OK,
1455  static_cast<FwAssertArgType>(_status)
1456  );
1457 
1458  this->logOut_out(
1459  0,
1460  _id,
1461  _logTime,
1463  _logBuff
1464  );
1465  }
1466 
1467  // Emit the event on the text log port
1468 #if FW_ENABLE_TEXT_LOGGING
1469  if (this->isConnected_logTextOut_OutputPort(0)) {
1470 #if FW_OBJECT_NAMES == 1
1471  const char* _formatString =
1472  "(%s) %s: Invalid CCSDS Transfer Frame Version Number. Received: %" PRIu8 " | Expected: %" PRIu8 "";
1473 #else
1474  const char* _formatString =
1475  "%s: Invalid CCSDS Transfer Frame Version Number. Received: %" PRIu8 " | Expected: %" PRIu8 "";
1476 #endif
1477 
1478  Fw::TextLogString _logString;
1479  _logString.format(
1480  _formatString,
1481 #if FW_OBJECT_NAMES == 1
1482  this->m_objName.toChar(),
1483 #endif
1484  "InvalidTfvn ",
1485  transmitted,
1486  expected
1487  );
1488 
1489  this->logTextOut_out(
1490  0,
1491  _id,
1492  _logTime,
1494  _logString
1495  );
1496  }
1497 #endif
1498  }
1499 
1502  U8 vcId,
1503  U8 pvn
1504  ) const
1505  {
1506  // Get the time
1507  Fw::Time _logTime;
1508  if (this->isConnected_timeCaller_OutputPort(0)) {
1509  this->timeCaller_out(0, _logTime);
1510  }
1511 
1512  const FwEventIdType _id = this->getIdBase() + EVENTID_DISABLEDPVN;
1513 
1514  // Emit the event on the log port
1515  if (this->isConnected_logOut_OutputPort(0)) {
1516  Fw::LogBuffer _logBuff;
1518 
1519 #if FW_AMPCS_COMPATIBLE
1520  // Serialize the number of arguments
1521  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1522  FW_ASSERT(
1523  _status == Fw::FW_SERIALIZE_OK,
1524  static_cast<FwAssertArgType>(_status)
1525  );
1526 #endif
1527 
1528 #if FW_AMPCS_COMPATIBLE
1529  // Serialize the argument size
1530  _status = _logBuff.serializeFrom(
1531  static_cast<U8>(sizeof(U8))
1532  );
1533  FW_ASSERT(
1534  _status == Fw::FW_SERIALIZE_OK,
1535  static_cast<FwAssertArgType>(_status)
1536  );
1537 #endif
1538  _status = _logBuff.serializeFrom(vcId);
1539  FW_ASSERT(
1540  _status == Fw::FW_SERIALIZE_OK,
1541  static_cast<FwAssertArgType>(_status)
1542  );
1543 
1544 #if FW_AMPCS_COMPATIBLE
1545  // Serialize the argument size
1546  _status = _logBuff.serializeFrom(
1547  static_cast<U8>(sizeof(U8))
1548  );
1549  FW_ASSERT(
1550  _status == Fw::FW_SERIALIZE_OK,
1551  static_cast<FwAssertArgType>(_status)
1552  );
1553 #endif
1554  _status = _logBuff.serializeFrom(pvn);
1555  FW_ASSERT(
1556  _status == Fw::FW_SERIALIZE_OK,
1557  static_cast<FwAssertArgType>(_status)
1558  );
1559 
1560  this->logOut_out(
1561  0,
1562  _id,
1563  _logTime,
1565  _logBuff
1566  );
1567  }
1568 
1569  // Emit the event on the text log port
1570 #if FW_ENABLE_TEXT_LOGGING
1571  if (this->isConnected_logTextOut_OutputPort(0)) {
1572 #if FW_OBJECT_NAMES == 1
1573  const char* _formatString =
1574  "(%s) %s: Packet version number %" PRIu8 " encountered on VC %" PRIu8 " but it is invalid or disabled by configuration";
1575 #else
1576  const char* _formatString =
1577  "%s: Packet version number %" PRIu8 " encountered on VC %" PRIu8 " but it is invalid or disabled by configuration";
1578 #endif
1579 
1580  Fw::TextLogString _logString;
1581  _logString.format(
1582  _formatString,
1583 #if FW_OBJECT_NAMES == 1
1584  this->m_objName.toChar(),
1585 #endif
1586  "DisabledPvn ",
1587  vcId,
1588  pvn
1589  );
1590 
1591  this->logTextOut_out(
1592  0,
1593  _id,
1594  _logTime,
1596  _logString
1597  );
1598  }
1599 #endif
1600  }
1601 
1604  {
1605  // Get the time
1606  Fw::Time _logTime;
1607  if (this->isConnected_timeCaller_OutputPort(0)) {
1608  this->timeCaller_out(0, _logTime);
1609  }
1610 
1611  const FwEventIdType _id = this->getIdBase() + EVENTID_IDLEFRAME;
1612 
1613  // Emit the event on the log port
1614  if (this->isConnected_logOut_OutputPort(0)) {
1615  Fw::LogBuffer _logBuff;
1617 
1618 #if FW_AMPCS_COMPATIBLE
1619  // Serialize the number of arguments
1620  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1621  FW_ASSERT(
1622  _status == Fw::FW_SERIALIZE_OK,
1623  static_cast<FwAssertArgType>(_status)
1624  );
1625 #endif
1626 
1627 #if FW_AMPCS_COMPATIBLE
1628  // Serialize the argument size
1629  _status = _logBuff.serializeFrom(
1630  static_cast<U8>(sizeof(U8))
1631  );
1632  FW_ASSERT(
1633  _status == Fw::FW_SERIALIZE_OK,
1634  static_cast<FwAssertArgType>(_status)
1635  );
1636 #endif
1637  _status = _logBuff.serializeFrom(vcId);
1638  FW_ASSERT(
1639  _status == Fw::FW_SERIALIZE_OK,
1640  static_cast<FwAssertArgType>(_status)
1641  );
1642 
1643  this->logOut_out(
1644  0,
1645  _id,
1646  _logTime,
1648  _logBuff
1649  );
1650  }
1651 
1652  // Emit the event on the text log port
1653 #if FW_ENABLE_TEXT_LOGGING
1654  if (this->isConnected_logTextOut_OutputPort(0)) {
1655 #if FW_OBJECT_NAMES == 1
1656  const char* _formatString =
1657  "(%s) %s: Received frame containing only idle data on VC %" PRIu8 "";
1658 #else
1659  const char* _formatString =
1660  "%s: Received frame containing only idle data on VC %" PRIu8 "";
1661 #endif
1662 
1663  Fw::TextLogString _logString;
1664  _logString.format(
1665  _formatString,
1666 #if FW_OBJECT_NAMES == 1
1667  this->m_objName.toChar(),
1668 #endif
1669  "IdleFrame ",
1670  vcId
1671  );
1672 
1673  this->logTextOut_out(
1674  0,
1675  _id,
1676  _logTime,
1678  _logString
1679  );
1680  }
1681 #endif
1682  }
1683 
1686  U8 vcId,
1687  ComCfg::Pvn pvn,
1688  FwSizeType packetSize
1689  ) const
1690  {
1691  // Get the time
1692  Fw::Time _logTime;
1693  if (this->isConnected_timeCaller_OutputPort(0)) {
1694  this->timeCaller_out(0, _logTime);
1695  }
1696 
1698 
1699  // Emit the event on the log port
1700  if (this->isConnected_logOut_OutputPort(0)) {
1701  Fw::LogBuffer _logBuff;
1703 
1704 #if FW_AMPCS_COMPATIBLE
1705  // Serialize the number of arguments
1706  _status = _logBuff.serializeFrom(static_cast<U8>(3));
1707  FW_ASSERT(
1708  _status == Fw::FW_SERIALIZE_OK,
1709  static_cast<FwAssertArgType>(_status)
1710  );
1711 #endif
1712 
1713 #if FW_AMPCS_COMPATIBLE
1714  // Serialize the argument size
1715  _status = _logBuff.serializeFrom(
1716  static_cast<U8>(sizeof(U8))
1717  );
1718  FW_ASSERT(
1719  _status == Fw::FW_SERIALIZE_OK,
1720  static_cast<FwAssertArgType>(_status)
1721  );
1722 #endif
1723  _status = _logBuff.serializeFrom(vcId);
1724  FW_ASSERT(
1725  _status == Fw::FW_SERIALIZE_OK,
1726  static_cast<FwAssertArgType>(_status)
1727  );
1728 
1729 #if FW_AMPCS_COMPATIBLE
1730  // Serialize the argument size
1731  _status = _logBuff.serializeFrom(
1732  static_cast<U8>(ComCfg::Pvn::SERIALIZED_SIZE)
1733  );
1734  FW_ASSERT(
1735  _status == Fw::FW_SERIALIZE_OK,
1736  static_cast<FwAssertArgType>(_status)
1737  );
1738 #endif
1739  _status = _logBuff.serializeFrom(pvn);
1740  FW_ASSERT(
1741  _status == Fw::FW_SERIALIZE_OK,
1742  static_cast<FwAssertArgType>(_status)
1743  );
1744 
1745 #if FW_AMPCS_COMPATIBLE
1746  // Serialize the argument size
1747  _status = _logBuff.serializeFrom(
1748  static_cast<U8>(sizeof(FwSizeType))
1749  );
1750  FW_ASSERT(
1751  _status == Fw::FW_SERIALIZE_OK,
1752  static_cast<FwAssertArgType>(_status)
1753  );
1754 #endif
1755  _status = _logBuff.serializeFrom(packetSize);
1756  FW_ASSERT(
1757  _status == Fw::FW_SERIALIZE_OK,
1758  static_cast<FwAssertArgType>(_status)
1759  );
1760 
1761  this->logOut_out(
1762  0,
1763  _id,
1764  _logTime,
1766  _logBuff
1767  );
1768  }
1769 
1770  // Emit the event on the text log port
1771 #if FW_ENABLE_TEXT_LOGGING
1772  if (this->isConnected_logTextOut_OutputPort(0)) {
1773 #if FW_OBJECT_NAMES == 1
1774  const char* _formatString =
1775  "(%s) %s: Spanning packet allocation failed on VC %" PRIu8 " for %s packet of %" PRIu64 " bytes; packet dropped";
1776 #else
1777  const char* _formatString =
1778  "%s: Spanning packet allocation failed on VC %" PRIu8 " for %s packet of %" PRIu64 " bytes; packet dropped";
1779 #endif
1780 
1781  Fw::String pvnStr;
1782  pvn.toString(pvnStr);
1783 
1784  Fw::TextLogString _logString;
1785  _logString.format(
1786  _formatString,
1787 #if FW_OBJECT_NAMES == 1
1788  this->m_objName.toChar(),
1789 #endif
1790  "SpanningPacketAllocFailed ",
1791  vcId,
1792  pvnStr.toChar(),
1793  packetSize
1794  );
1795 
1796  this->logTextOut_out(
1797  0,
1798  _id,
1799  _logTime,
1801  _logString
1802  );
1803  }
1804 #endif
1805  }
1806 
1809  U8 vcId,
1810  U32 received,
1811  U32 expected
1812  ) const
1813  {
1814  // Get the time
1815  Fw::Time _logTime;
1816  if (this->isConnected_timeCaller_OutputPort(0)) {
1817  this->timeCaller_out(0, _logTime);
1818  }
1819 
1820  const FwEventIdType _id = this->getIdBase() + EVENTID_VCFRAMECOUNTGAP;
1821 
1822  // Emit the event on the log port
1823  if (this->isConnected_logOut_OutputPort(0)) {
1824  Fw::LogBuffer _logBuff;
1826 
1827 #if FW_AMPCS_COMPATIBLE
1828  // Serialize the number of arguments
1829  _status = _logBuff.serializeFrom(static_cast<U8>(3));
1830  FW_ASSERT(
1831  _status == Fw::FW_SERIALIZE_OK,
1832  static_cast<FwAssertArgType>(_status)
1833  );
1834 #endif
1835 
1836 #if FW_AMPCS_COMPATIBLE
1837  // Serialize the argument size
1838  _status = _logBuff.serializeFrom(
1839  static_cast<U8>(sizeof(U8))
1840  );
1841  FW_ASSERT(
1842  _status == Fw::FW_SERIALIZE_OK,
1843  static_cast<FwAssertArgType>(_status)
1844  );
1845 #endif
1846  _status = _logBuff.serializeFrom(vcId);
1847  FW_ASSERT(
1848  _status == Fw::FW_SERIALIZE_OK,
1849  static_cast<FwAssertArgType>(_status)
1850  );
1851 
1852 #if FW_AMPCS_COMPATIBLE
1853  // Serialize the argument size
1854  _status = _logBuff.serializeFrom(
1855  static_cast<U8>(sizeof(U32))
1856  );
1857  FW_ASSERT(
1858  _status == Fw::FW_SERIALIZE_OK,
1859  static_cast<FwAssertArgType>(_status)
1860  );
1861 #endif
1862  _status = _logBuff.serializeFrom(received);
1863  FW_ASSERT(
1864  _status == Fw::FW_SERIALIZE_OK,
1865  static_cast<FwAssertArgType>(_status)
1866  );
1867 
1868 #if FW_AMPCS_COMPATIBLE
1869  // Serialize the argument size
1870  _status = _logBuff.serializeFrom(
1871  static_cast<U8>(sizeof(U32))
1872  );
1873  FW_ASSERT(
1874  _status == Fw::FW_SERIALIZE_OK,
1875  static_cast<FwAssertArgType>(_status)
1876  );
1877 #endif
1878  _status = _logBuff.serializeFrom(expected);
1879  FW_ASSERT(
1880  _status == Fw::FW_SERIALIZE_OK,
1881  static_cast<FwAssertArgType>(_status)
1882  );
1883 
1884  this->logOut_out(
1885  0,
1886  _id,
1887  _logTime,
1889  _logBuff
1890  );
1891  }
1892 
1893  // Emit the event on the text log port
1894 #if FW_ENABLE_TEXT_LOGGING
1895  if (this->isConnected_logTextOut_OutputPort(0)) {
1896 #if FW_OBJECT_NAMES == 1
1897  const char* _formatString =
1898  "(%s) %s: VC frame count gap on VC %" PRIu8 ". Received %" PRIu32 " | Expected next count %" PRIu32 "";
1899 #else
1900  const char* _formatString =
1901  "%s: VC frame count gap on VC %" PRIu8 ". Received %" PRIu32 " | Expected next count %" PRIu32 "";
1902 #endif
1903 
1904  Fw::TextLogString _logString;
1905  _logString.format(
1906  _formatString,
1907 #if FW_OBJECT_NAMES == 1
1908  this->m_objName.toChar(),
1909 #endif
1910  "VcFrameCountGap ",
1911  vcId,
1912  received,
1913  expected
1914  );
1915 
1916  this->logTextOut_out(
1917  0,
1918  _id,
1919  _logTime,
1921  _logString
1922  );
1923  }
1924 #endif
1925  }
1926 
1929  U8 vcId,
1930  ComCfg::Pvn pvn,
1931  FwSizeType bytesReceived,
1932  FwSizeType bytesExpected
1933  ) const
1934  {
1935  // Get the time
1936  Fw::Time _logTime;
1937  if (this->isConnected_timeCaller_OutputPort(0)) {
1938  this->timeCaller_out(0, _logTime);
1939  }
1940 
1942 
1943  // Emit the event on the log port
1944  if (this->isConnected_logOut_OutputPort(0)) {
1945  Fw::LogBuffer _logBuff;
1947 
1948 #if FW_AMPCS_COMPATIBLE
1949  // Serialize the number of arguments
1950  _status = _logBuff.serializeFrom(static_cast<U8>(4));
1951  FW_ASSERT(
1952  _status == Fw::FW_SERIALIZE_OK,
1953  static_cast<FwAssertArgType>(_status)
1954  );
1955 #endif
1956 
1957 #if FW_AMPCS_COMPATIBLE
1958  // Serialize the argument size
1959  _status = _logBuff.serializeFrom(
1960  static_cast<U8>(sizeof(U8))
1961  );
1962  FW_ASSERT(
1963  _status == Fw::FW_SERIALIZE_OK,
1964  static_cast<FwAssertArgType>(_status)
1965  );
1966 #endif
1967  _status = _logBuff.serializeFrom(vcId);
1968  FW_ASSERT(
1969  _status == Fw::FW_SERIALIZE_OK,
1970  static_cast<FwAssertArgType>(_status)
1971  );
1972 
1973 #if FW_AMPCS_COMPATIBLE
1974  // Serialize the argument size
1975  _status = _logBuff.serializeFrom(
1976  static_cast<U8>(ComCfg::Pvn::SERIALIZED_SIZE)
1977  );
1978  FW_ASSERT(
1979  _status == Fw::FW_SERIALIZE_OK,
1980  static_cast<FwAssertArgType>(_status)
1981  );
1982 #endif
1983  _status = _logBuff.serializeFrom(pvn);
1984  FW_ASSERT(
1985  _status == Fw::FW_SERIALIZE_OK,
1986  static_cast<FwAssertArgType>(_status)
1987  );
1988 
1989 #if FW_AMPCS_COMPATIBLE
1990  // Serialize the argument size
1991  _status = _logBuff.serializeFrom(
1992  static_cast<U8>(sizeof(FwSizeType))
1993  );
1994  FW_ASSERT(
1995  _status == Fw::FW_SERIALIZE_OK,
1996  static_cast<FwAssertArgType>(_status)
1997  );
1998 #endif
1999  _status = _logBuff.serializeFrom(bytesReceived);
2000  FW_ASSERT(
2001  _status == Fw::FW_SERIALIZE_OK,
2002  static_cast<FwAssertArgType>(_status)
2003  );
2004 
2005 #if FW_AMPCS_COMPATIBLE
2006  // Serialize the argument size
2007  _status = _logBuff.serializeFrom(
2008  static_cast<U8>(sizeof(FwSizeType))
2009  );
2010  FW_ASSERT(
2011  _status == Fw::FW_SERIALIZE_OK,
2012  static_cast<FwAssertArgType>(_status)
2013  );
2014 #endif
2015  _status = _logBuff.serializeFrom(bytesExpected);
2016  FW_ASSERT(
2017  _status == Fw::FW_SERIALIZE_OK,
2018  static_cast<FwAssertArgType>(_status)
2019  );
2020 
2021  this->logOut_out(
2022  0,
2023  _id,
2024  _logTime,
2026  _logBuff
2027  );
2028  }
2029 
2030  // Emit the event on the text log port
2031 #if FW_ENABLE_TEXT_LOGGING
2032  if (this->isConnected_logTextOut_OutputPort(0)) {
2033 #if FW_OBJECT_NAMES == 1
2034  const char* _formatString =
2035  "(%s) %s: Spanning packet on VC %" PRIu8 " (%s) abandoned after receiving %" PRIu64 " of %" PRIu64 " expected bytes";
2036 #else
2037  const char* _formatString =
2038  "%s: Spanning packet on VC %" PRIu8 " (%s) abandoned after receiving %" PRIu64 " of %" PRIu64 " expected bytes";
2039 #endif
2040 
2041  Fw::String pvnStr;
2042  pvn.toString(pvnStr);
2043 
2044  Fw::TextLogString _logString;
2045  _logString.format(
2046  _formatString,
2047 #if FW_OBJECT_NAMES == 1
2048  this->m_objName.toChar(),
2049 #endif
2050  "SpanningPacketAbandoned ",
2051  vcId,
2052  pvnStr.toChar(),
2053  bytesReceived,
2054  bytesExpected
2055  );
2056 
2057  this->logTextOut_out(
2058  0,
2059  _id,
2060  _logTime,
2062  _logString
2063  );
2064  }
2065 #endif
2066  }
2067 
2070  U8 vcId,
2071  FwSizeType fhpReceived,
2072  FwSizeType dataZoneSize
2073  ) const
2074  {
2075  // Get the time
2076  Fw::Time _logTime;
2077  if (this->isConnected_timeCaller_OutputPort(0)) {
2078  this->timeCaller_out(0, _logTime);
2079  }
2080 
2081  const FwEventIdType _id = this->getIdBase() + EVENTID_INVALIDFHP;
2082 
2083  // Emit the event on the log port
2084  if (this->isConnected_logOut_OutputPort(0)) {
2085  Fw::LogBuffer _logBuff;
2087 
2088 #if FW_AMPCS_COMPATIBLE
2089  // Serialize the number of arguments
2090  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2091  FW_ASSERT(
2092  _status == Fw::FW_SERIALIZE_OK,
2093  static_cast<FwAssertArgType>(_status)
2094  );
2095 #endif
2096 
2097 #if FW_AMPCS_COMPATIBLE
2098  // Serialize the argument size
2099  _status = _logBuff.serializeFrom(
2100  static_cast<U8>(sizeof(U8))
2101  );
2102  FW_ASSERT(
2103  _status == Fw::FW_SERIALIZE_OK,
2104  static_cast<FwAssertArgType>(_status)
2105  );
2106 #endif
2107  _status = _logBuff.serializeFrom(vcId);
2108  FW_ASSERT(
2109  _status == Fw::FW_SERIALIZE_OK,
2110  static_cast<FwAssertArgType>(_status)
2111  );
2112 
2113 #if FW_AMPCS_COMPATIBLE
2114  // Serialize the argument size
2115  _status = _logBuff.serializeFrom(
2116  static_cast<U8>(sizeof(FwSizeType))
2117  );
2118  FW_ASSERT(
2119  _status == Fw::FW_SERIALIZE_OK,
2120  static_cast<FwAssertArgType>(_status)
2121  );
2122 #endif
2123  _status = _logBuff.serializeFrom(fhpReceived);
2124  FW_ASSERT(
2125  _status == Fw::FW_SERIALIZE_OK,
2126  static_cast<FwAssertArgType>(_status)
2127  );
2128 
2129 #if FW_AMPCS_COMPATIBLE
2130  // Serialize the argument size
2131  _status = _logBuff.serializeFrom(
2132  static_cast<U8>(sizeof(FwSizeType))
2133  );
2134  FW_ASSERT(
2135  _status == Fw::FW_SERIALIZE_OK,
2136  static_cast<FwAssertArgType>(_status)
2137  );
2138 #endif
2139  _status = _logBuff.serializeFrom(dataZoneSize);
2140  FW_ASSERT(
2141  _status == Fw::FW_SERIALIZE_OK,
2142  static_cast<FwAssertArgType>(_status)
2143  );
2144 
2145  this->logOut_out(
2146  0,
2147  _id,
2148  _logTime,
2150  _logBuff
2151  );
2152  }
2153 
2154  // Emit the event on the text log port
2155 #if FW_ENABLE_TEXT_LOGGING
2156  if (this->isConnected_logTextOut_OutputPort(0)) {
2157 #if FW_OBJECT_NAMES == 1
2158  const char* _formatString =
2159  "(%s) %s: Invalid First Header Pointer (FHP) received on VC %" PRIu8 ": FHP was %" PRIu64 " bytes, data zone is only %" PRIu64 " bytes";
2160 #else
2161  const char* _formatString =
2162  "%s: Invalid First Header Pointer (FHP) received on VC %" PRIu8 ": FHP was %" PRIu64 " bytes, data zone is only %" PRIu64 " bytes";
2163 #endif
2164 
2165  Fw::TextLogString _logString;
2166  _logString.format(
2167  _formatString,
2168 #if FW_OBJECT_NAMES == 1
2169  this->m_objName.toChar(),
2170 #endif
2171  "InvalidFhp ",
2172  vcId,
2173  fhpReceived,
2174  dataZoneSize
2175  );
2176 
2177  this->logTextOut_out(
2178  0,
2179  _id,
2180  _logTime,
2182  _logString
2183  );
2184  }
2185 #endif
2186  }
2187 
2188  // ----------------------------------------------------------------------
2189  // Telemetry serialized write
2190  // ----------------------------------------------------------------------
2191 
2194  FwChanIdType id,
2195  Fw::TlmBuffer& _tlmBuff,
2196  Fw::Time _tlmTime
2197  ) const
2198  {
2199  if (this->isConnected_tlmOut_OutputPort(0)) {
2200  if (
2202  (_tlmTime == Fw::ZERO_TIME)
2203  ) {
2204  this->timeCaller_out(0, _tlmTime);
2205  }
2206 
2207  FwChanIdType _id;
2208  _id = this->getIdBase() + id;
2209 
2210  this->tlmOut_out(
2211  0,
2212  _id,
2213  _tlmTime,
2214  _tlmBuff
2215  );
2216  }
2217  }
2218 
2219  // ----------------------------------------------------------------------
2220  // Telemetry write functions
2221  // ----------------------------------------------------------------------
2222 
2225  U32 arg,
2226  Fw::Time _tlmTime
2227  ) const
2228  {
2229  if (this->isConnected_tlmOut_OutputPort(0)) {
2230  Fw::TlmBuffer _tlmBuff;
2231  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
2232  FW_ASSERT(
2233  _stat == Fw::FW_SERIALIZE_OK,
2234  static_cast<FwAssertArgType>(_stat)
2235  );
2236 
2237  this->tlmWrite(
2239  _tlmBuff,
2240  _tlmTime
2241  );
2242  }
2243  }
2244 
2247  U32 arg,
2248  Fw::Time _tlmTime
2249  ) const
2250  {
2251  if (this->isConnected_tlmOut_OutputPort(0)) {
2252  Fw::TlmBuffer _tlmBuff;
2253  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
2254  FW_ASSERT(
2255  _stat == Fw::FW_SERIALIZE_OK,
2256  static_cast<FwAssertArgType>(_stat)
2257  );
2258 
2259  this->tlmWrite(
2261  _tlmBuff,
2262  _tlmTime
2263  );
2264  }
2265  }
2266 
2269  U32 arg,
2270  Fw::Time _tlmTime
2271  ) const
2272  {
2273  if (this->isConnected_tlmOut_OutputPort(0)) {
2274  Fw::TlmBuffer _tlmBuff;
2275  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
2276  FW_ASSERT(
2277  _stat == Fw::FW_SERIALIZE_OK,
2278  static_cast<FwAssertArgType>(_stat)
2279  );
2280 
2281  this->tlmWrite(
2283  _tlmBuff,
2284  _tlmTime
2285  );
2286  }
2287  }
2288 
2291  U32 arg,
2292  Fw::Time _tlmTime
2293  ) const
2294  {
2295  if (this->isConnected_tlmOut_OutputPort(0)) {
2296  Fw::TlmBuffer _tlmBuff;
2297  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
2298  FW_ASSERT(
2299  _stat == Fw::FW_SERIALIZE_OK,
2300  static_cast<FwAssertArgType>(_stat)
2301  );
2302 
2303  this->tlmWrite(
2305  _tlmBuff,
2306  _tlmTime
2307  );
2308  }
2309  }
2310 
2311  // ----------------------------------------------------------------------
2312  // Time
2313  // ----------------------------------------------------------------------
2314 
2316  getTime() const
2317  {
2318  if (this->isConnected_timeCaller_OutputPort(0)) {
2319  Fw::Time _time;
2320  this->timeCaller_out(0, _time);
2321  return _time;
2322  }
2323  else {
2324  return Fw::Time(TimeBase::TB_NONE, 0, 0);
2325  }
2326  }
2327 
2328  // ----------------------------------------------------------------------
2329  // Mutex operations for guarded ports
2330  //
2331  // You can override these operations to provide more sophisticated
2332  // synchronization
2333  // ----------------------------------------------------------------------
2334 
2337  {
2338  this->m_guardedPortMutex.lock();
2339  }
2340 
2343  {
2344  this->m_guardedPortMutex.unLock();
2345  }
2346 
2347  // ----------------------------------------------------------------------
2348  // Calls for messages received on typed input ports
2349  // ----------------------------------------------------------------------
2350 
2351  void AosDeframerComponentBase ::
2352  m_p_dataIn_in(
2353  Fw::PassiveComponentBase* callComp,
2354  FwIndexType portNum,
2355  Fw::Buffer& data,
2356  const ComCfg::FrameContext& context
2357  )
2358  {
2359  FW_ASSERT(callComp);
2360  AosDeframerComponentBase* compPtr = static_cast<AosDeframerComponentBase*>(callComp);
2361  compPtr->dataIn_handlerBase(
2362  portNum,
2363  data,
2364  context
2365  );
2366  }
2367 
2368  void AosDeframerComponentBase ::
2369  m_p_dataReturnIn_in(
2370  Fw::PassiveComponentBase* callComp,
2371  FwIndexType portNum,
2372  Fw::Buffer& data,
2373  const ComCfg::FrameContext& context
2374  )
2375  {
2376  FW_ASSERT(callComp);
2377  AosDeframerComponentBase* compPtr = static_cast<AosDeframerComponentBase*>(callComp);
2378  compPtr->dataReturnIn_handlerBase(
2379  portNum,
2380  data,
2381  context
2382  );
2383  }
2384 
2385 #if !FW_DIRECT_PORT_CALLS
2386 
2387  // ----------------------------------------------------------------------
2388  // Invocation functions for special output ports
2389  // ----------------------------------------------------------------------
2390 
2391  void AosDeframerComponentBase ::
2392  logOut_out(
2393  FwIndexType portNum,
2394  FwEventIdType id,
2395  Fw::Time& timeTag,
2396  const Fw::LogSeverity& severity,
2397  Fw::LogBuffer& args
2398  ) const
2399  {
2400  FW_ASSERT(
2401  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
2402  static_cast<FwAssertArgType>(portNum)
2403  );
2404 
2405  FW_ASSERT(
2406  this->m_logOut_OutputPort[portNum].isConnected(),
2407  static_cast<FwAssertArgType>(portNum)
2408  );
2409  this->m_logOut_OutputPort[portNum].invoke(
2410  id,
2411  timeTag,
2412  severity,
2413  args
2414  );
2415  }
2416 
2417 #if FW_ENABLE_TEXT_LOGGING
2418 
2419  void AosDeframerComponentBase ::
2420  logTextOut_out(
2421  FwIndexType portNum,
2422  FwEventIdType id,
2423  Fw::Time& timeTag,
2424  const Fw::LogSeverity& severity,
2425  Fw::TextLogString& text
2426  ) const
2427  {
2428  FW_ASSERT(
2429  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
2430  static_cast<FwAssertArgType>(portNum)
2431  );
2432 
2433  FW_ASSERT(
2434  this->m_logTextOut_OutputPort[portNum].isConnected(),
2435  static_cast<FwAssertArgType>(portNum)
2436  );
2437  this->m_logTextOut_OutputPort[portNum].invoke(
2438  id,
2439  timeTag,
2440  severity,
2441  text
2442  );
2443  }
2444 
2445 #endif
2446 
2447  void AosDeframerComponentBase ::
2448  timeCaller_out(
2449  FwIndexType portNum,
2450  Fw::Time& time
2451  ) const
2452  {
2453  FW_ASSERT(
2454  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
2455  static_cast<FwAssertArgType>(portNum)
2456  );
2457 
2458  FW_ASSERT(
2459  this->m_timeCaller_OutputPort[portNum].isConnected(),
2460  static_cast<FwAssertArgType>(portNum)
2461  );
2462  this->m_timeCaller_OutputPort[portNum].invoke(
2463  time
2464  );
2465  }
2466 
2467  void AosDeframerComponentBase ::
2468  tlmOut_out(
2469  FwIndexType portNum,
2470  FwChanIdType id,
2471  Fw::Time& timeTag,
2472  Fw::TlmBuffer& val
2473  ) const
2474  {
2475  FW_ASSERT(
2476  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
2477  static_cast<FwAssertArgType>(portNum)
2478  );
2479 
2480  FW_ASSERT(
2481  this->m_tlmOut_OutputPort[portNum].isConnected(),
2482  static_cast<FwAssertArgType>(portNum)
2483  );
2484  this->m_tlmOut_OutputPort[portNum].invoke(
2485  id,
2486  timeTag,
2487  val
2488  );
2489  }
2490 
2491 #endif
2492 
2493  }
2494 
2495 }
Serialization/Deserialization operation was successful.
static constexpr FwIndexType getNum_dataOut_OutputPorts()
static constexpr FwIndexType getNum_prmGetOut_OutputPorts()
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
virtual void dataReturnIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataReturnIn.
void log_WARNING_HI_InvalidFhp(U8 vcId, FwSizeType fhpReceived, FwSizeType dataZoneSize) const
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
static constexpr FwIndexType getNum_allocate_OutputPorts()
void dataOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataOut.
static constexpr FwIndexType getNum_dataIn_InputPorts()
PlatformSizeType FwSizeType
void set_errorNotify_OutputPort(FwIndexType portNum, Svc::Ccsds::InputErrorNotifyPort *port)
Connect port to errorNotify[portNum].
I32 FwEnumStoreType
void init()
Initialization function.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void unLock()
unlock the mutex and assert success
Definition: Mutex.cpp:41
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
An invalid First Header Pointer (FHP) was received.
void set_allocate_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to allocate[portNum].
const Time ZERO_TIME
Definition: Time.cpp:5
void dataReturnIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataReturnIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
void tlmWrite_CrcErrorCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
bool isConnected_errorNotify_OutputPort(FwIndexType portNum) const
No time base has been established (Required)
Auto-generated base for AosDeframer component.
Svc::InputComDataWithContextPort * get_dataReturnIn_InputPort(FwIndexType portNum)
Deframing received an invalid checksum (CCSDS 732.0-B-5 Section 4.1.6)
static constexpr FwIndexType getNum_errorNotify_OutputPorts()
void init()
Initialization function.
void addCallPort(InputComDataWithContextPort *callPort)
Register an input port.
void log_WARNING_LO_InvalidSpacecraftId(U16 transmitted, U16 configured) const
bool isConnected_prmGetOut_OutputPort(FwIndexType portNum) const
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
SerializeStatus
forward declaration for string
static constexpr FwIndexType getNum_deallocate_OutputPorts()
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
Frame was received with idle-only data on a virtual channel (CCSDS 732.0-B-5 Section 4...
Deframing detected a gap/discontinuity in the AOS VC frame count sequence.
void addCallPort(InputErrorNotifyPort *callPort)
Register an input port.
bool isConnected_allocate_OutputPort(FwIndexType portNum) const
FwIdType FwEventIdType
The type of an event identifier.
virtual void lock()
Lock the guarded mutex.
void tlmWrite_FramesProcessed(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_dataReturnIn_InputPorts()
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
void set_deallocate_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to deallocate[portNum].
Spanning packet buffer allocation failed; packet dropped.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
void set_dataReturnOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataReturnOut[portNum].
void init()
Initialization function.
Definition: TimePortAc.cpp:151
void invoke(const Svc::Ccsds::FrameError &errorCode) const
Invoke a port connection.
void log_WARNING_HI_InvalidFrameLength(FwSizeType actual, U32 expected) const
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Less important informational events.
A less serious but recoverable event.
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
The size of the serial representation.
Definition: PvnEnumAc.hpp:51
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
virtual void unLock()
Unlock the guarded mutex.
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
void set_prmGetOut_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGetOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
virtual ~AosDeframerComponentBase()
Destroy AosDeframerComponentBase object.
void invoke(Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke a port connection.
void deallocate_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port deallocate.
void log_WARNING_HI_SpanningPacketAbandoned(U8 vcId, ComCfg::Pvn pvn, FwSizeType bytesReceived, FwSizeType bytesExpected) const
A serious but recoverable event.
void init()
Initialization function.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
Definition: TlmPortAc.cpp:190
const char * toChar() const
Convert to a C-style char*.
bool isConnected() const
Definition: PortBase.cpp:38
Enum representing event severity.
AosDeframerComponentBase(const char *compName="")
Construct AosDeframerComponentBase object.
Packet Version Numbers are 3 bits with only 2 currently valid values.
Definition: PvnEnumAc.hpp:17
#define PRI_FwIndexType
bool isConnected_deallocate_OutputPort(FwIndexType portNum) const
void tlmWrite_LatestVcFrameCount(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
void init()
Initialization function.
Definition: LogPortAc.cpp:180
Fw::Buffer allocate_out(FwIndexType portNum, FwSizeType size) const
Invoke output port allocate.
static constexpr FwIndexType getNum_prmSetOut_OutputPorts()
A spanning packet was abandoned before receiving all expected bytes.
void setPortNum(FwIndexType portNum)
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
Deframing encountered a packet version number that is not enabled by configuration.
void dataIn_handlerBase(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)
Handler base-class function for input port dataIn.
Fw::Buffer invoke(FwSizeType size) const
void errorNotify_out(FwIndexType portNum, const Svc::Ccsds::FrameError &errorCode) const
Invoke output port errorNotify.
Deframing received an invalid SCID (CCSDS 732.0-B-5 Section 4.1.2.2)
void init()
Initialization function.
void init()
Initialization function.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
virtual void dataIn_handler(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context)=0
Handler for input port dataIn.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
void log_WARNING_HI_DisabledPvn(U8 vcId, U8 pvn) const
bool isConnected_dataReturnOut_OutputPort(FwIndexType portNum) const
bool isConnected_prmSetOut_OutputPort(FwIndexType portNum) const
Svc::InputComDataWithContextPort * get_dataIn_InputPort(FwIndexType portNum)
Deframing received an invalid CCSDS Transfer Frame Version Number (CCSDS 732.0-B-5 Section 4...
void set_dataOut_OutputPort(FwIndexType portNum, Svc::InputComDataWithContextPort *port)
Connect port to dataOut[portNum].
PlatformIndexType FwIndexType
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
void log_ACTIVITY_LO_InvalidVcId(U8 transmitted, U8 configured) const
void log_WARNING_HI_SpanningPacketAllocFailed(U8 vcId, ComCfg::Pvn pvn, FwSizeType packetSize) const
Type used to pass context info between components during framing/deframing.
void init()
Initialization function.
RateGroupDivider component implementation.
static constexpr FwIndexType getNum_logOut_OutputPorts()
void set_prmSetOut_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSetOut[portNum].
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
void dataReturnOut_out(FwIndexType portNum, Fw::Buffer &data, const ComCfg::FrameContext &context) const
Invoke output port dataReturnOut.
void log_WARNING_HI_InvalidFecf(U16 transmitted, U16 computed) const
Implementation of malloc based allocator.
void init()
Initialization function.
void tlmWrite_PacketsExtracted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
static constexpr FwIndexType getNum_dataReturnOut_OutputPorts()
bool isConnected_dataOut_OutputPort(FwIndexType portNum) const
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
#define FW_ASSERT(...)
Definition: Assert.hpp:14
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
Deframing received a VCID not in the accepted set (CCSDS 732.0-B-5 Section 4.1.2.3) ...
void log_WARNING_HI_InvalidTfvn(U8 transmitted, U8 expected) const
void lock()
lock the mutex and assert success
Definition: Mutex.cpp:34
void log_WARNING_HI_VcFrameCountGap(U8 vcId, U32 received, U32 expected) const