F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
DpManagerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title DpManagerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for DpManager 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 {
17  enum MsgTypeEnum {
18  DPMANAGER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
19  PRODUCTREQUESTIN_DPREQUEST,
20  PRODUCTSENDIN_DPSEND,
21  SCHEDIN_SCHED,
22  CMD_CLEAR_EVENT_THROTTLE,
23  };
24 
25  // Get the max size by constructing a union of the async input, command, and
26  // internal port serialization sizes
27  union BuffUnion {
28  BYTE productRequestInPortSize[Fw::DpRequestPortBuffer::CAPACITY];
29  BYTE productSendInPortSize[Fw::DpSendPortBuffer::CAPACITY];
30  BYTE schedInPortSize[Svc::SchedPortBuffer::CAPACITY];
32  };
33 
34  // Define a message buffer class large enough to handle all the
35  // asynchronous inputs to the component
36  class ComponentIpcSerializableBuffer :
38  {
39 
40  public:
41 
42  enum {
43  // Offset into data in buffer: Size of message ID and port number
44  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
45  // Max data size
46  MAX_DATA_SIZE = sizeof(BuffUnion),
47  // Max message size: Size of message id + size of port + max data size
48  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
49  };
50 
51  ComponentIpcSerializableBuffer() : Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
52 
53  }
54 
55  private:
56  // Should be the max of all the input ports serialized sizes...
57  U8 m_buff[SERIALIZATION_SIZE];
58 
59  };
60  }
61 
62  // ----------------------------------------------------------------------
63  // Component initialization
64  // ----------------------------------------------------------------------
65 
68  FwSizeType queueDepth,
69  FwEnumStoreType instance
70  )
71  {
72  // Initialize base class
74 
75 #if !FW_DIRECT_PORT_CALLS
76  // Connect input port cmdIn
77  for (
78  FwIndexType port = 0;
79  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
80  port++
81  ) {
82  this->m_cmdIn_InputPort[port].init();
83  this->m_cmdIn_InputPort[port].addCallComp(
84  this,
85  m_p_cmdIn_in
86  );
87  this->m_cmdIn_InputPort[port].setPortNum(port);
88 
89 #if FW_OBJECT_NAMES == 1
90  Fw::ObjectName portName;
91  portName.format(
92  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
93  this->m_objName.toChar(),
94  port
95  );
96  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
97 #endif
98  }
99 #endif
100 
101 #if !FW_DIRECT_PORT_CALLS
102  // Connect input port productGetIn
103  for (
104  FwIndexType port = 0;
105  port < static_cast<FwIndexType>(this->getNum_productGetIn_InputPorts());
106  port++
107  ) {
108  this->m_productGetIn_InputPort[port].init();
109  this->m_productGetIn_InputPort[port].addCallComp(
110  this,
111  m_p_productGetIn_in
112  );
113  this->m_productGetIn_InputPort[port].setPortNum(port);
114 
115 #if FW_OBJECT_NAMES == 1
116  Fw::ObjectName portName;
117  portName.format(
118  "%s_productGetIn_InputPort[%" PRI_FwIndexType "]",
119  this->m_objName.toChar(),
120  port
121  );
122  this->m_productGetIn_InputPort[port].setObjName(portName.toChar());
123 #endif
124  }
125 #endif
126 
127 #if !FW_DIRECT_PORT_CALLS
128  // Connect input port productRequestIn
129  for (
130  FwIndexType port = 0;
131  port < static_cast<FwIndexType>(this->getNum_productRequestIn_InputPorts());
132  port++
133  ) {
134  this->m_productRequestIn_InputPort[port].init();
135  this->m_productRequestIn_InputPort[port].addCallComp(
136  this,
137  m_p_productRequestIn_in
138  );
139  this->m_productRequestIn_InputPort[port].setPortNum(port);
140 
141 #if FW_OBJECT_NAMES == 1
142  Fw::ObjectName portName;
143  portName.format(
144  "%s_productRequestIn_InputPort[%" PRI_FwIndexType "]",
145  this->m_objName.toChar(),
146  port
147  );
148  this->m_productRequestIn_InputPort[port].setObjName(portName.toChar());
149 #endif
150  }
151 #endif
152 
153 #if !FW_DIRECT_PORT_CALLS
154  // Connect input port productSendIn
155  for (
156  FwIndexType port = 0;
157  port < static_cast<FwIndexType>(this->getNum_productSendIn_InputPorts());
158  port++
159  ) {
160  this->m_productSendIn_InputPort[port].init();
161  this->m_productSendIn_InputPort[port].addCallComp(
162  this,
163  m_p_productSendIn_in
164  );
165  this->m_productSendIn_InputPort[port].setPortNum(port);
166 
167 #if FW_OBJECT_NAMES == 1
168  Fw::ObjectName portName;
169  portName.format(
170  "%s_productSendIn_InputPort[%" PRI_FwIndexType "]",
171  this->m_objName.toChar(),
172  port
173  );
174  this->m_productSendIn_InputPort[port].setObjName(portName.toChar());
175 #endif
176  }
177 #endif
178 
179 #if !FW_DIRECT_PORT_CALLS
180  // Connect input port schedIn
181  for (
182  FwIndexType port = 0;
183  port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
184  port++
185  ) {
186  this->m_schedIn_InputPort[port].init();
187  this->m_schedIn_InputPort[port].addCallComp(
188  this,
189  m_p_schedIn_in
190  );
191  this->m_schedIn_InputPort[port].setPortNum(port);
192 
193 #if FW_OBJECT_NAMES == 1
194  Fw::ObjectName portName;
195  portName.format(
196  "%s_schedIn_InputPort[%" PRI_FwIndexType "]",
197  this->m_objName.toChar(),
198  port
199  );
200  this->m_schedIn_InputPort[port].setObjName(portName.toChar());
201 #endif
202  }
203 #endif
204 
205 #if !FW_DIRECT_PORT_CALLS
206  // Connect output port cmdRegIn
207  for (
208  FwIndexType port = 0;
209  port < static_cast<FwIndexType>(this->getNum_cmdRegIn_OutputPorts());
210  port++
211  ) {
212  this->m_cmdRegIn_OutputPort[port].init();
213 
214 #if FW_OBJECT_NAMES == 1
215  Fw::ObjectName portName;
216  portName.format(
217  "%s_cmdRegIn_OutputPort[%" PRI_FwIndexType "]",
218  this->m_objName.toChar(),
219  port
220  );
221  this->m_cmdRegIn_OutputPort[port].setObjName(portName.toChar());
222 #endif
223  }
224 #endif
225 
226 #if !FW_DIRECT_PORT_CALLS
227  // Connect output port cmdResponseOut
228  for (
229  FwIndexType port = 0;
230  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
231  port++
232  ) {
233  this->m_cmdResponseOut_OutputPort[port].init();
234 
235 #if FW_OBJECT_NAMES == 1
236  Fw::ObjectName portName;
237  portName.format(
238  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
239  this->m_objName.toChar(),
240  port
241  );
242  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
243 #endif
244  }
245 #endif
246 
247 #if !FW_DIRECT_PORT_CALLS
248  // Connect output port eventOut
249  for (
250  FwIndexType port = 0;
251  port < static_cast<FwIndexType>(this->getNum_eventOut_OutputPorts());
252  port++
253  ) {
254  this->m_eventOut_OutputPort[port].init();
255 
256 #if FW_OBJECT_NAMES == 1
257  Fw::ObjectName portName;
258  portName.format(
259  "%s_eventOut_OutputPort[%" PRI_FwIndexType "]",
260  this->m_objName.toChar(),
261  port
262  );
263  this->m_eventOut_OutputPort[port].setObjName(portName.toChar());
264 #endif
265  }
266 #endif
267 
268 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
269  // Connect output port textEventOut
270  for (
271  FwIndexType port = 0;
272  port < static_cast<FwIndexType>(this->getNum_textEventOut_OutputPorts());
273  port++
274  ) {
275  this->m_textEventOut_OutputPort[port].init();
276 
277 #if FW_OBJECT_NAMES == 1
278  Fw::ObjectName portName;
279  portName.format(
280  "%s_textEventOut_OutputPort[%" PRI_FwIndexType "]",
281  this->m_objName.toChar(),
282  port
283  );
284  this->m_textEventOut_OutputPort[port].setObjName(portName.toChar());
285 #endif
286  }
287 #endif
288 
289 #if !FW_DIRECT_PORT_CALLS
290  // Connect output port timeGetOut
291  for (
292  FwIndexType port = 0;
293  port < static_cast<FwIndexType>(this->getNum_timeGetOut_OutputPorts());
294  port++
295  ) {
296  this->m_timeGetOut_OutputPort[port].init();
297 
298 #if FW_OBJECT_NAMES == 1
299  Fw::ObjectName portName;
300  portName.format(
301  "%s_timeGetOut_OutputPort[%" PRI_FwIndexType "]",
302  this->m_objName.toChar(),
303  port
304  );
305  this->m_timeGetOut_OutputPort[port].setObjName(portName.toChar());
306 #endif
307  }
308 #endif
309 
310 #if !FW_DIRECT_PORT_CALLS
311  // Connect output port tlmOut
312  for (
313  FwIndexType port = 0;
314  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
315  port++
316  ) {
317  this->m_tlmOut_OutputPort[port].init();
318 
319 #if FW_OBJECT_NAMES == 1
320  Fw::ObjectName portName;
321  portName.format(
322  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
323  this->m_objName.toChar(),
324  port
325  );
326  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
327 #endif
328  }
329 #endif
330 
331 #if !FW_DIRECT_PORT_CALLS
332  // Connect output port bufferGetOut
333  for (
334  FwIndexType port = 0;
335  port < static_cast<FwIndexType>(this->getNum_bufferGetOut_OutputPorts());
336  port++
337  ) {
338  this->m_bufferGetOut_OutputPort[port].init();
339 
340 #if FW_OBJECT_NAMES == 1
341  Fw::ObjectName portName;
342  portName.format(
343  "%s_bufferGetOut_OutputPort[%" PRI_FwIndexType "]",
344  this->m_objName.toChar(),
345  port
346  );
347  this->m_bufferGetOut_OutputPort[port].setObjName(portName.toChar());
348 #endif
349  }
350 #endif
351 
352 #if !FW_DIRECT_PORT_CALLS
353  // Connect output port productResponseOut
354  for (
355  FwIndexType port = 0;
356  port < static_cast<FwIndexType>(this->getNum_productResponseOut_OutputPorts());
357  port++
358  ) {
359  this->m_productResponseOut_OutputPort[port].init();
360 
361 #if FW_OBJECT_NAMES == 1
362  Fw::ObjectName portName;
363  portName.format(
364  "%s_productResponseOut_OutputPort[%" PRI_FwIndexType "]",
365  this->m_objName.toChar(),
366  port
367  );
368  this->m_productResponseOut_OutputPort[port].setObjName(portName.toChar());
369 #endif
370  }
371 #endif
372 
373 #if !FW_DIRECT_PORT_CALLS
374  // Connect output port productSendOut
375  for (
376  FwIndexType port = 0;
377  port < static_cast<FwIndexType>(this->getNum_productSendOut_OutputPorts());
378  port++
379  ) {
380  this->m_productSendOut_OutputPort[port].init();
381 
382 #if FW_OBJECT_NAMES == 1
383  Fw::ObjectName portName;
384  portName.format(
385  "%s_productSendOut_OutputPort[%" PRI_FwIndexType "]",
386  this->m_objName.toChar(),
387  port
388  );
389  this->m_productSendOut_OutputPort[port].setObjName(portName.toChar());
390 #endif
391  }
392 #endif
393 
394  // Create the queue
395  Os::Queue::Status qStat = this->createQueue(
396  queueDepth,
397  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
398  );
399  FW_ASSERT(
400  Os::Queue::Status::OP_OK == qStat,
401  static_cast<FwAssertArgType>(qStat)
402  );
403  }
404 
405 #if !FW_DIRECT_PORT_CALLS
406 
407  // ----------------------------------------------------------------------
408  // Getters for special input ports
409  // ----------------------------------------------------------------------
410 
413  {
414  FW_ASSERT(
415  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
416  static_cast<FwAssertArgType>(portNum)
417  );
418 
419  return &this->m_cmdIn_InputPort[portNum];
420  }
421 
422 #endif
423 
424 #if !FW_DIRECT_PORT_CALLS
425 
426  // ----------------------------------------------------------------------
427  // Getters for typed input ports
428  // ----------------------------------------------------------------------
429 
432  {
433  FW_ASSERT(
434  (0 <= portNum) && (portNum < this->getNum_productGetIn_InputPorts()),
435  static_cast<FwAssertArgType>(portNum)
436  );
437 
438  return &this->m_productGetIn_InputPort[portNum];
439  }
440 
443  {
444  FW_ASSERT(
445  (0 <= portNum) && (portNum < this->getNum_productRequestIn_InputPorts()),
446  static_cast<FwAssertArgType>(portNum)
447  );
448 
449  return &this->m_productRequestIn_InputPort[portNum];
450  }
451 
454  {
455  FW_ASSERT(
456  (0 <= portNum) && (portNum < this->getNum_productSendIn_InputPorts()),
457  static_cast<FwAssertArgType>(portNum)
458  );
459 
460  return &this->m_productSendIn_InputPort[portNum];
461  }
462 
465  {
466  FW_ASSERT(
467  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
468  static_cast<FwAssertArgType>(portNum)
469  );
470 
471  return &this->m_schedIn_InputPort[portNum];
472  }
473 
474 #endif
475 
476 #if !FW_DIRECT_PORT_CALLS
477 
478  // ----------------------------------------------------------------------
479  // Connect input ports to special output ports
480  // ----------------------------------------------------------------------
481 
484  FwIndexType portNum,
485  Fw::InputCmdRegPort* port
486  )
487  {
488  FW_ASSERT(
489  (0 <= portNum) && (portNum < this->getNum_cmdRegIn_OutputPorts()),
490  static_cast<FwAssertArgType>(portNum)
491  );
492 
493  this->m_cmdRegIn_OutputPort[portNum].addCallPort(port);
494  }
495 
498  FwIndexType portNum,
500  )
501  {
502  FW_ASSERT(
503  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
504  static_cast<FwAssertArgType>(portNum)
505  );
506 
507  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
508  }
509 
512  FwIndexType portNum,
513  Fw::InputLogPort* port
514  )
515  {
516  FW_ASSERT(
517  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
518  static_cast<FwAssertArgType>(portNum)
519  );
520 
521  this->m_eventOut_OutputPort[portNum].addCallPort(port);
522  }
523 
524 #if FW_ENABLE_TEXT_LOGGING == 1
525 
526  void DpManagerComponentBase ::
527  set_textEventOut_OutputPort(
528  FwIndexType portNum,
530  )
531  {
532  FW_ASSERT(
533  (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
534  static_cast<FwAssertArgType>(portNum)
535  );
536 
537  this->m_textEventOut_OutputPort[portNum].addCallPort(port);
538  }
539 
540 #endif
541 
544  FwIndexType portNum,
545  Fw::InputTimePort* port
546  )
547  {
548  FW_ASSERT(
549  (0 <= portNum) && (portNum < this->getNum_timeGetOut_OutputPorts()),
550  static_cast<FwAssertArgType>(portNum)
551  );
552 
553  this->m_timeGetOut_OutputPort[portNum].addCallPort(port);
554  }
555 
558  FwIndexType portNum,
559  Fw::InputTlmPort* port
560  )
561  {
562  FW_ASSERT(
563  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
564  static_cast<FwAssertArgType>(portNum)
565  );
566 
567  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
568  }
569 
570 #endif
571 
572 #if !FW_DIRECT_PORT_CALLS
573 
574  // ----------------------------------------------------------------------
575  // Connect typed input ports to typed output ports
576  // ----------------------------------------------------------------------
577 
580  FwIndexType portNum,
582  )
583  {
584  FW_ASSERT(
585  (0 <= portNum) && (portNum < this->getNum_bufferGetOut_OutputPorts()),
586  static_cast<FwAssertArgType>(portNum)
587  );
588 
589  this->m_bufferGetOut_OutputPort[portNum].addCallPort(port);
590  }
591 
594  FwIndexType portNum,
596  )
597  {
598  FW_ASSERT(
599  (0 <= portNum) && (portNum < this->getNum_productResponseOut_OutputPorts()),
600  static_cast<FwAssertArgType>(portNum)
601  );
602 
603  this->m_productResponseOut_OutputPort[portNum].addCallPort(port);
604  }
605 
608  FwIndexType portNum,
610  )
611  {
612  FW_ASSERT(
613  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
614  static_cast<FwAssertArgType>(portNum)
615  );
616 
617  this->m_productSendOut_OutputPort[portNum].addCallPort(port);
618  }
619 
620 #endif
621 
622 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
623 
624  // ----------------------------------------------------------------------
625  // Connect serial input ports to special output ports
626  // ----------------------------------------------------------------------
627 
630  FwIndexType portNum,
631  Fw::InputSerializePort* port
632  )
633  {
634  FW_ASSERT(
635  (0 <= portNum) && (portNum < this->getNum_cmdRegIn_OutputPorts()),
636  static_cast<FwAssertArgType>(portNum)
637  );
638 
639  this->m_cmdRegIn_OutputPort[portNum].registerSerialPort(port);
640  }
641 
644  FwIndexType portNum,
645  Fw::InputSerializePort* port
646  )
647  {
648  FW_ASSERT(
649  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
650  static_cast<FwAssertArgType>(portNum)
651  );
652 
653  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
654  }
655 
658  FwIndexType portNum,
659  Fw::InputSerializePort* port
660  )
661  {
662  FW_ASSERT(
663  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
664  static_cast<FwAssertArgType>(portNum)
665  );
666 
667  this->m_eventOut_OutputPort[portNum].registerSerialPort(port);
668  }
669 
670 #if FW_ENABLE_TEXT_LOGGING == 1
671 
672  void DpManagerComponentBase ::
673  set_textEventOut_OutputPort(
674  FwIndexType portNum,
675  Fw::InputSerializePort* port
676  )
677  {
678  FW_ASSERT(
679  (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
680  static_cast<FwAssertArgType>(portNum)
681  );
682 
683  this->m_textEventOut_OutputPort[portNum].registerSerialPort(port);
684  }
685 
686 #endif
687 
690  FwIndexType portNum,
691  Fw::InputSerializePort* port
692  )
693  {
694  FW_ASSERT(
695  (0 <= portNum) && (portNum < this->getNum_timeGetOut_OutputPorts()),
696  static_cast<FwAssertArgType>(portNum)
697  );
698 
699  this->m_timeGetOut_OutputPort[portNum].registerSerialPort(port);
700  }
701 
704  FwIndexType portNum,
705  Fw::InputSerializePort* port
706  )
707  {
708  FW_ASSERT(
709  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
710  static_cast<FwAssertArgType>(portNum)
711  );
712 
713  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
714  }
715 
716 #endif
717 
718 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
719 
720  // ----------------------------------------------------------------------
721  // Connect serial input ports to typed output ports
722  // ----------------------------------------------------------------------
723 
726  FwIndexType portNum,
727  Fw::InputSerializePort* port
728  )
729  {
730  FW_ASSERT(
731  (0 <= portNum) && (portNum < this->getNum_productResponseOut_OutputPorts()),
732  static_cast<FwAssertArgType>(portNum)
733  );
734 
735  this->m_productResponseOut_OutputPort[portNum].registerSerialPort(port);
736  }
737 
740  FwIndexType portNum,
741  Fw::InputSerializePort* port
742  )
743  {
744  FW_ASSERT(
745  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
746  static_cast<FwAssertArgType>(portNum)
747  );
748 
749  this->m_productSendOut_OutputPort[portNum].registerSerialPort(port);
750  }
751 
752 #endif
753 
754  // ----------------------------------------------------------------------
755  // Command registration
756  // ----------------------------------------------------------------------
757 
760  {
762 
763  this->cmdRegIn_out(
764  0,
766  );
767  }
768 
769  // ----------------------------------------------------------------------
770  // Component construction and destruction
771  // ----------------------------------------------------------------------
772 
774  DpManagerComponentBase(const char* compName) :
775  Fw::ActiveComponentBase(compName)
776  {
777  this->m_BufferAllocationFailedThrottle = 0;
778  }
779 
782  {
783 
784  }
785 
786 #if !FW_DIRECT_PORT_CALLS
787 
788  // ----------------------------------------------------------------------
789  // Connection status queries for special output ports
790  // ----------------------------------------------------------------------
791 
794  {
795  FW_ASSERT(
796  (0 <= portNum) && (portNum < this->getNum_cmdRegIn_OutputPorts()),
797  static_cast<FwAssertArgType>(portNum)
798  );
799 
800  return this->m_cmdRegIn_OutputPort[portNum].isConnected();
801  }
802 
805  {
806  FW_ASSERT(
807  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
808  static_cast<FwAssertArgType>(portNum)
809  );
810 
811  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
812  }
813 
816  {
817  FW_ASSERT(
818  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
819  static_cast<FwAssertArgType>(portNum)
820  );
821 
822  return this->m_eventOut_OutputPort[portNum].isConnected();
823  }
824 
825 #if FW_ENABLE_TEXT_LOGGING == 1
826 
827  bool DpManagerComponentBase ::
828  isConnected_textEventOut_OutputPort(FwIndexType portNum) const
829  {
830  FW_ASSERT(
831  (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
832  static_cast<FwAssertArgType>(portNum)
833  );
834 
835  return this->m_textEventOut_OutputPort[portNum].isConnected();
836  }
837 
838 #endif
839 
842  {
843  FW_ASSERT(
844  (0 <= portNum) && (portNum < this->getNum_timeGetOut_OutputPorts()),
845  static_cast<FwAssertArgType>(portNum)
846  );
847 
848  return this->m_timeGetOut_OutputPort[portNum].isConnected();
849  }
850 
853  {
854  FW_ASSERT(
855  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
856  static_cast<FwAssertArgType>(portNum)
857  );
858 
859  return this->m_tlmOut_OutputPort[portNum].isConnected();
860  }
861 
862 #endif
863 
864 #if !FW_DIRECT_PORT_CALLS
865 
866  // ----------------------------------------------------------------------
867  // Connection status queries for typed output ports
868  // ----------------------------------------------------------------------
869 
872  {
873  FW_ASSERT(
874  (0 <= portNum) && (portNum < this->getNum_bufferGetOut_OutputPorts()),
875  static_cast<FwAssertArgType>(portNum)
876  );
877 
878  return this->m_bufferGetOut_OutputPort[portNum].isConnected();
879  }
880 
883  {
884  FW_ASSERT(
885  (0 <= portNum) && (portNum < this->getNum_productResponseOut_OutputPorts()),
886  static_cast<FwAssertArgType>(portNum)
887  );
888 
889  return this->m_productResponseOut_OutputPort[portNum].isConnected();
890  }
891 
894  {
895  FW_ASSERT(
896  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
897  static_cast<FwAssertArgType>(portNum)
898  );
899 
900  return this->m_productSendOut_OutputPort[portNum].isConnected();
901  }
902 
903 #endif
904 
905  // ----------------------------------------------------------------------
906  // Port handler base-class functions for special input ports
907  //
908  // Call these functions directly to bypass the corresponding ports
909  // ----------------------------------------------------------------------
910 
913  FwIndexType portNum,
914  FwOpcodeType opCode,
915  U32 cmdSeq,
916  Fw::CmdArgBuffer& args
917  )
918  {
919 
920  const U32 idBase = this->getIdBase();
921  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
922 
923  // Select base class function based on opcode
924  switch (opCode - idBase) {
927  opCode,
928  cmdSeq,
929  args
930  );
931  break;
932  }
933  default:
934  // Unknown opcode: ignore it
935  break;
936  }
937  }
938 
939  // ----------------------------------------------------------------------
940  // Port handler base-class functions for typed input ports
941  //
942  // Call these functions directly to bypass the corresponding ports
943  // ----------------------------------------------------------------------
944 
947  FwIndexType portNum,
948  FwDpIdType id,
949  FwSizeType dataSize,
950  Fw::Buffer& buffer
951  )
952  {
953  // Make sure port number is valid
954  FW_ASSERT(
955  (0 <= portNum) && (portNum < this->getNum_productGetIn_InputPorts()),
956  static_cast<FwAssertArgType>(portNum)
957  );
958 
959  Fw::Success retVal;
960 
961  // Call handler function
962  retVal = this->productGetIn_handler(
963  portNum,
964  id,
965  dataSize,
966  buffer
967  );
968 
969  return retVal;
970  }
971 
974  FwIndexType portNum,
975  FwDpIdType id,
976  FwSizeType dataSize
977  )
978  {
979  // Make sure port number is valid
980  FW_ASSERT(
981  (0 <= portNum) && (portNum < this->getNum_productRequestIn_InputPorts()),
982  static_cast<FwAssertArgType>(portNum)
983  );
984 
985  // Call pre-message hook
987  portNum,
988  id,
989  dataSize
990  );
991  ComponentIpcSerializableBuffer msg;
993 
994  // Serialize message ID
995  _status = msg.serializeFrom(
996  static_cast<FwEnumStoreType>(PRODUCTREQUESTIN_DPREQUEST)
997  );
998  FW_ASSERT(
999  _status == Fw::FW_SERIALIZE_OK,
1000  static_cast<FwAssertArgType>(_status)
1001  );
1002 
1003  // Serialize port number
1004  _status = msg.serializeFrom(portNum);
1005  FW_ASSERT(
1006  _status == Fw::FW_SERIALIZE_OK,
1007  static_cast<FwAssertArgType>(_status)
1008  );
1009 
1010  // Serialize argument id
1011  _status = msg.serializeFrom(id);
1012  FW_ASSERT(
1013  _status == Fw::FW_SERIALIZE_OK,
1014  static_cast<FwAssertArgType>(_status)
1015  );
1016 
1017  // Serialize argument dataSize
1018  _status = msg.serializeFrom(dataSize);
1019  FW_ASSERT(
1020  _status == Fw::FW_SERIALIZE_OK,
1021  static_cast<FwAssertArgType>(_status)
1022  );
1023 
1024  // Send message
1026  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1027 
1028  FW_ASSERT(
1029  qStatus == Os::Queue::OP_OK,
1030  static_cast<FwAssertArgType>(qStatus)
1031  );
1032  }
1033 
1036  FwIndexType portNum,
1037  FwDpIdType id,
1038  const Fw::Buffer& buffer
1039  )
1040  {
1041  // Make sure port number is valid
1042  FW_ASSERT(
1043  (0 <= portNum) && (portNum < this->getNum_productSendIn_InputPorts()),
1044  static_cast<FwAssertArgType>(portNum)
1045  );
1046 
1047  // Call pre-message hook
1049  portNum,
1050  id,
1051  buffer
1052  );
1053  ComponentIpcSerializableBuffer msg;
1055 
1056  // Serialize message ID
1057  _status = msg.serializeFrom(
1058  static_cast<FwEnumStoreType>(PRODUCTSENDIN_DPSEND)
1059  );
1060  FW_ASSERT(
1061  _status == Fw::FW_SERIALIZE_OK,
1062  static_cast<FwAssertArgType>(_status)
1063  );
1064 
1065  // Serialize port number
1066  _status = msg.serializeFrom(portNum);
1067  FW_ASSERT(
1068  _status == Fw::FW_SERIALIZE_OK,
1069  static_cast<FwAssertArgType>(_status)
1070  );
1071 
1072  // Serialize argument id
1073  _status = msg.serializeFrom(id);
1074  FW_ASSERT(
1075  _status == Fw::FW_SERIALIZE_OK,
1076  static_cast<FwAssertArgType>(_status)
1077  );
1078 
1079  // Serialize argument buffer
1080  _status = msg.serializeFrom(buffer);
1081  FW_ASSERT(
1082  _status == Fw::FW_SERIALIZE_OK,
1083  static_cast<FwAssertArgType>(_status)
1084  );
1085 
1086  // Send message
1088  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1089 
1090  FW_ASSERT(
1091  qStatus == Os::Queue::OP_OK,
1092  static_cast<FwAssertArgType>(qStatus)
1093  );
1094  }
1095 
1098  FwIndexType portNum,
1099  U32 context
1100  )
1101  {
1102  // Make sure port number is valid
1103  FW_ASSERT(
1104  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
1105  static_cast<FwAssertArgType>(portNum)
1106  );
1107 
1108  // Call pre-message hook
1110  portNum,
1111  context
1112  );
1113  ComponentIpcSerializableBuffer msg;
1115 
1116  // Serialize message ID
1117  _status = msg.serializeFrom(
1118  static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1119  );
1120  FW_ASSERT(
1121  _status == Fw::FW_SERIALIZE_OK,
1122  static_cast<FwAssertArgType>(_status)
1123  );
1124 
1125  // Serialize port number
1126  _status = msg.serializeFrom(portNum);
1127  FW_ASSERT(
1128  _status == Fw::FW_SERIALIZE_OK,
1129  static_cast<FwAssertArgType>(_status)
1130  );
1131 
1132  // Serialize argument context
1133  _status = msg.serializeFrom(context);
1134  FW_ASSERT(
1135  _status == Fw::FW_SERIALIZE_OK,
1136  static_cast<FwAssertArgType>(_status)
1137  );
1138 
1139  // Send message
1141  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1142 
1143  FW_ASSERT(
1144  qStatus == Os::Queue::OP_OK,
1145  static_cast<FwAssertArgType>(qStatus)
1146  );
1147  }
1148 
1149  // ----------------------------------------------------------------------
1150  // Pre-message hooks for typed async input ports
1151  //
1152  // Each of these functions is invoked just before processing a message
1153  // on the corresponding port. By default, they do nothing. You can
1154  // override them to provide specific pre-message behavior.
1155  // ----------------------------------------------------------------------
1156 
1159  FwIndexType portNum,
1160  FwDpIdType id,
1161  FwSizeType dataSize
1162  )
1163  {
1164  // Default: no-op
1165  }
1166 
1169  FwIndexType portNum,
1170  FwDpIdType id,
1171  const Fw::Buffer& buffer
1172  )
1173  {
1174  // Default: no-op
1175  }
1176 
1179  FwIndexType portNum,
1180  U32 context
1181  )
1182  {
1183  // Default: no-op
1184  }
1185 
1186 #if !FW_DIRECT_PORT_CALLS
1187 
1188  // ----------------------------------------------------------------------
1189  // Invocation functions for typed output ports
1190  // ----------------------------------------------------------------------
1191 
1194  FwIndexType portNum,
1195  FwSizeType size
1196  ) const
1197  {
1198  FW_ASSERT(
1199  (0 <= portNum) && (portNum < this->getNum_bufferGetOut_OutputPorts()),
1200  static_cast<FwAssertArgType>(portNum)
1201  );
1202 
1203  FW_ASSERT(
1204  this->m_bufferGetOut_OutputPort[portNum].isConnected(),
1205  static_cast<FwAssertArgType>(portNum)
1206  );
1207  return this->m_bufferGetOut_OutputPort[portNum].invoke(
1208  size
1209  );
1210  }
1211 
1214  FwIndexType portNum,
1215  FwDpIdType id,
1216  const Fw::Buffer& buffer,
1217  const Fw::Success& status
1218  ) const
1219  {
1220  FW_ASSERT(
1221  (0 <= portNum) && (portNum < this->getNum_productResponseOut_OutputPorts()),
1222  static_cast<FwAssertArgType>(portNum)
1223  );
1224 
1225  FW_ASSERT(
1226  this->m_productResponseOut_OutputPort[portNum].isConnected(),
1227  static_cast<FwAssertArgType>(portNum)
1228  );
1229  this->m_productResponseOut_OutputPort[portNum].invoke(
1230  id,
1231  buffer,
1232  status
1233  );
1234  }
1235 
1238  FwIndexType portNum,
1239  Fw::Buffer& fwBuffer
1240  ) const
1241  {
1242  FW_ASSERT(
1243  (0 <= portNum) && (portNum < this->getNum_productSendOut_OutputPorts()),
1244  static_cast<FwAssertArgType>(portNum)
1245  );
1246 
1247  FW_ASSERT(
1248  this->m_productSendOut_OutputPort[portNum].isConnected(),
1249  static_cast<FwAssertArgType>(portNum)
1250  );
1251  this->m_productSendOut_OutputPort[portNum].invoke(
1252  fwBuffer
1253  );
1254  }
1255 
1256 #endif
1257 
1258  // ----------------------------------------------------------------------
1259  // Command response
1260  // ----------------------------------------------------------------------
1261 
1264  FwOpcodeType opCode,
1265  U32 cmdSeq,
1266  Fw::CmdResponse response
1267  )
1268  {
1270  this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1271  }
1272 
1273  // ----------------------------------------------------------------------
1274  // Command handler base-class functions
1275  //
1276  // Call these functions directly to bypass the command input port
1277  // ----------------------------------------------------------------------
1278 
1281  FwOpcodeType opCode,
1282  U32 cmdSeq,
1283  Fw::CmdArgBuffer& args
1284  )
1285  {
1286  // Call pre-message hook
1287  this->CLEAR_EVENT_THROTTLE_preMsgHook(opCode,cmdSeq);
1288 
1289  // Defer deserializing arguments to the message dispatcher
1290  // to avoid deserializing and reserializing just for IPC
1291  ComponentIpcSerializableBuffer msg;
1293 
1294  // Serialize for IPC
1295  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CLEAR_EVENT_THROTTLE));
1296  FW_ASSERT (
1297  _status == Fw::FW_SERIALIZE_OK,
1298  static_cast<FwAssertArgType>(_status)
1299  );
1300 
1301  // Fake port number to make message dequeue work
1302  FwIndexType port = 0;
1303 
1304  _status = msg.serializeFrom(port);
1305  FW_ASSERT (
1306  _status == Fw::FW_SERIALIZE_OK,
1307  static_cast<FwAssertArgType>(_status)
1308  );
1309 
1310  _status = msg.serializeFrom(opCode);
1311  FW_ASSERT (
1312  _status == Fw::FW_SERIALIZE_OK,
1313  static_cast<FwAssertArgType>(_status)
1314  );
1315 
1316  _status = msg.serializeFrom(cmdSeq);
1317  FW_ASSERT (
1318  _status == Fw::FW_SERIALIZE_OK,
1319  static_cast<FwAssertArgType>(_status)
1320  );
1321 
1322  _status = msg.serializeFrom(args);
1323  FW_ASSERT (
1324  _status == Fw::FW_SERIALIZE_OK,
1325  static_cast<FwAssertArgType>(_status)
1326  );
1327 
1328  // Send message
1330  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1331 
1332  FW_ASSERT(
1333  qStatus == Os::Queue::OP_OK,
1334  static_cast<FwAssertArgType>(qStatus)
1335  );
1336  }
1337 
1338  // ----------------------------------------------------------------------
1339  // Pre-message hooks for async commands
1340  //
1341  // Each of these functions is invoked just before processing the
1342  // corresponding command. By default they do nothing. You can
1343  // override them to provide specific pre-command behavior.
1344  // ----------------------------------------------------------------------
1345 
1348  FwOpcodeType opCode,
1349  U32 cmdSeq
1350  )
1351  {
1352  // Defaults to no-op; can be overridden
1353  (void) opCode;
1354  (void) cmdSeq;
1355  }
1356 
1357  // ----------------------------------------------------------------------
1358  // Event logging functions
1359  // ----------------------------------------------------------------------
1360 
1363  {
1364  // Check throttle value
1365  if (this->m_BufferAllocationFailedThrottle >= EVENTID_BUFFERALLOCATIONFAILED_THROTTLE) {
1366  return;
1367  }
1368  else {
1369  this->m_BufferAllocationFailedThrottle++;
1370  }
1371 
1372  // Get the time
1373  Fw::Time _logTime;
1374  if (this->isConnected_timeGetOut_OutputPort(0)) {
1375  this->timeGetOut_out(0, _logTime);
1376  }
1377 
1379 
1380  // Emit the event on the log port
1381  if (this->isConnected_eventOut_OutputPort(0)) {
1382  Fw::LogBuffer _logBuff;
1384 
1385 #if FW_AMPCS_COMPATIBLE
1386  // Serialize the number of arguments
1387  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1388  FW_ASSERT(
1389  _status == Fw::FW_SERIALIZE_OK,
1390  static_cast<FwAssertArgType>(_status)
1391  );
1392 #endif
1393 
1394 #if FW_AMPCS_COMPATIBLE
1395  // Serialize the argument size
1396  _status = _logBuff.serializeFrom(
1397  static_cast<U8>(sizeof(FwDpIdType))
1398  );
1399  FW_ASSERT(
1400  _status == Fw::FW_SERIALIZE_OK,
1401  static_cast<FwAssertArgType>(_status)
1402  );
1403 #endif
1404  _status = _logBuff.serializeFrom(id);
1405  FW_ASSERT(
1406  _status == Fw::FW_SERIALIZE_OK,
1407  static_cast<FwAssertArgType>(_status)
1408  );
1409 
1410  this->eventOut_out(
1411  0,
1412  _id,
1413  _logTime,
1415  _logBuff
1416  );
1417  }
1418 
1419  // Emit the event on the text log port
1420 #if FW_ENABLE_TEXT_LOGGING
1421  if (this->isConnected_textEventOut_OutputPort(0)) {
1422 #if FW_OBJECT_NAMES == 1
1423  const char* _formatString =
1424  "(%s) %s: Buffer allocation failed for container id %" PRIu32 "";
1425 #else
1426  const char* _formatString =
1427  "%s: Buffer allocation failed for container id %" PRIu32 "";
1428 #endif
1429 
1430  Fw::TextLogString _logString;
1431  (void) _logString.format(
1432  _formatString,
1433 #if FW_OBJECT_NAMES == 1
1434  this->m_objName.toChar(),
1435 #endif
1436  "BufferAllocationFailed ",
1437  id
1438  );
1439 
1440  this->textEventOut_out(
1441  0,
1442  _id,
1443  _logTime,
1445  _logString
1446  );
1447  }
1448 #endif
1449  }
1450 
1451  // ----------------------------------------------------------------------
1452  // Event throttle reset functions
1453  // ----------------------------------------------------------------------
1454 
1457  {
1458  // Reset throttle counter
1459  this->m_BufferAllocationFailedThrottle = 0;
1460  }
1461 
1462  // ----------------------------------------------------------------------
1463  // Telemetry serialized write
1464  // ----------------------------------------------------------------------
1465 
1468  FwChanIdType id,
1469  Fw::TlmBuffer& _tlmBuff,
1470  Fw::Time _tlmTime
1471  ) const
1472  {
1473  if (this->isConnected_tlmOut_OutputPort(0)) {
1474  if (
1476  (_tlmTime == Fw::ZERO_TIME)
1477  ) {
1478  this->timeGetOut_out(0, _tlmTime);
1479  }
1480 
1481  FwChanIdType _id;
1482  _id = this->getIdBase() + id;
1483 
1484  this->tlmOut_out(
1485  0,
1486  _id,
1487  _tlmTime,
1488  _tlmBuff
1489  );
1490  }
1491  }
1492 
1493  // ----------------------------------------------------------------------
1494  // Telemetry write functions
1495  // ----------------------------------------------------------------------
1496 
1499  U32 arg,
1500  Fw::Time _tlmTime
1501  )
1502  {
1503  // Check to see if it is the first time
1504  if (not this->m_first_update_NumSuccessfulAllocations) {
1505  // Check to see if value has changed. If not, don't write it.
1506  if (arg == this->m_last_NumSuccessfulAllocations) {
1507  return;
1508  }
1509  else {
1510  this->m_last_NumSuccessfulAllocations = arg;
1511  }
1512  }
1513  else {
1514  this->m_first_update_NumSuccessfulAllocations = false;
1515  this->m_last_NumSuccessfulAllocations = arg;
1516  }
1517 
1518  if (this->isConnected_tlmOut_OutputPort(0)) {
1519  Fw::TlmBuffer _tlmBuff;
1520  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
1521  FW_ASSERT(
1522  _stat == Fw::FW_SERIALIZE_OK,
1523  static_cast<FwAssertArgType>(_stat)
1524  );
1525 
1526  this->tlmWrite(
1528  _tlmBuff,
1529  _tlmTime
1530  );
1531  }
1532  }
1533 
1536  U32 arg,
1537  Fw::Time _tlmTime
1538  )
1539  {
1540  // Check to see if it is the first time
1541  if (not this->m_first_update_NumFailedAllocations) {
1542  // Check to see if value has changed. If not, don't write it.
1543  if (arg == this->m_last_NumFailedAllocations) {
1544  return;
1545  }
1546  else {
1547  this->m_last_NumFailedAllocations = arg;
1548  }
1549  }
1550  else {
1551  this->m_first_update_NumFailedAllocations = false;
1552  this->m_last_NumFailedAllocations = arg;
1553  }
1554 
1555  if (this->isConnected_tlmOut_OutputPort(0)) {
1556  Fw::TlmBuffer _tlmBuff;
1557  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
1558  FW_ASSERT(
1559  _stat == Fw::FW_SERIALIZE_OK,
1560  static_cast<FwAssertArgType>(_stat)
1561  );
1562 
1563  this->tlmWrite(
1565  _tlmBuff,
1566  _tlmTime
1567  );
1568  }
1569  }
1570 
1573  U32 arg,
1574  Fw::Time _tlmTime
1575  )
1576  {
1577  // Check to see if it is the first time
1578  if (not this->m_first_update_NumDataProducts) {
1579  // Check to see if value has changed. If not, don't write it.
1580  if (arg == this->m_last_NumDataProducts) {
1581  return;
1582  }
1583  else {
1584  this->m_last_NumDataProducts = arg;
1585  }
1586  }
1587  else {
1588  this->m_first_update_NumDataProducts = false;
1589  this->m_last_NumDataProducts = arg;
1590  }
1591 
1592  if (this->isConnected_tlmOut_OutputPort(0)) {
1593  Fw::TlmBuffer _tlmBuff;
1594  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
1595  FW_ASSERT(
1596  _stat == Fw::FW_SERIALIZE_OK,
1597  static_cast<FwAssertArgType>(_stat)
1598  );
1599 
1600  this->tlmWrite(
1602  _tlmBuff,
1603  _tlmTime
1604  );
1605  }
1606  }
1607 
1610  U64 arg,
1611  Fw::Time _tlmTime
1612  )
1613  {
1614  // Check to see if it is the first time
1615  if (not this->m_first_update_NumBytes) {
1616  // Check to see if value has changed. If not, don't write it.
1617  if (arg == this->m_last_NumBytes) {
1618  return;
1619  }
1620  else {
1621  this->m_last_NumBytes = arg;
1622  }
1623  }
1624  else {
1625  this->m_first_update_NumBytes = false;
1626  this->m_last_NumBytes = arg;
1627  }
1628 
1629  if (this->isConnected_tlmOut_OutputPort(0)) {
1630  Fw::TlmBuffer _tlmBuff;
1631  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
1632  FW_ASSERT(
1633  _stat == Fw::FW_SERIALIZE_OK,
1634  static_cast<FwAssertArgType>(_stat)
1635  );
1636 
1637  this->tlmWrite(
1639  _tlmBuff,
1640  _tlmTime
1641  );
1642  }
1643  }
1644 
1645  // ----------------------------------------------------------------------
1646  // Time
1647  // ----------------------------------------------------------------------
1648 
1650  getTime() const
1651  {
1652  if (this->isConnected_timeGetOut_OutputPort(0)) {
1653  Fw::Time _time;
1654  this->timeGetOut_out(0, _time);
1655  return _time;
1656  }
1657  else {
1658  return Fw::Time(TimeBase::TB_NONE, 0, 0);
1659  }
1660  }
1661 
1662  // ----------------------------------------------------------------------
1663  // Message dispatch functions
1664  // ----------------------------------------------------------------------
1665 
1666  Fw::QueuedComponentBase::MsgDispatchStatus DpManagerComponentBase ::
1667  doDispatch()
1668  {
1669  ComponentIpcSerializableBuffer _msg;
1670  FwQueuePriorityType _priority = 0;
1671 
1672  Os::Queue::Status _msgStatus = this->m_queue.receive(
1673  _msg,
1675  _priority
1676  );
1677  FW_ASSERT(
1678  _msgStatus == Os::Queue::OP_OK,
1679  static_cast<FwAssertArgType>(_msgStatus)
1680  );
1681 
1682  // Reset to beginning of buffer
1683  _msg.resetDeser();
1684 
1685  FwEnumStoreType _desMsg = 0;
1686  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
1687  FW_ASSERT(
1688  _deserStatus == Fw::FW_SERIALIZE_OK,
1689  static_cast<FwAssertArgType>(_deserStatus)
1690  );
1691 
1692  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
1693 
1694  if (_msgType == DPMANAGER_COMPONENT_EXIT) {
1695  return MSG_DISPATCH_EXIT;
1696  }
1697 
1698  FwIndexType portNum = 0;
1699  _deserStatus = _msg.deserializeTo(portNum);
1700  FW_ASSERT(
1701  _deserStatus == Fw::FW_SERIALIZE_OK,
1702  static_cast<FwAssertArgType>(_deserStatus)
1703  );
1704 
1705  switch (_msgType) {
1706  // Handle async input port productRequestIn
1707  case PRODUCTREQUESTIN_DPREQUEST: {
1708  // Deserialize argument id
1709  FwDpIdType id;
1710  _deserStatus = _msg.deserializeTo(id);
1711  FW_ASSERT(
1712  _deserStatus == Fw::FW_SERIALIZE_OK,
1713  static_cast<FwAssertArgType>(_deserStatus)
1714  );
1715 
1716  // Deserialize argument dataSize
1717  FwSizeType dataSize;
1718  _deserStatus = _msg.deserializeTo(dataSize);
1719  FW_ASSERT(
1720  _deserStatus == Fw::FW_SERIALIZE_OK,
1721  static_cast<FwAssertArgType>(_deserStatus)
1722  );
1723  // Call handler function
1725  portNum,
1726  id,
1727  dataSize
1728  );
1729 
1730  break;
1731  }
1732 
1733  // Handle async input port productSendIn
1734  case PRODUCTSENDIN_DPSEND: {
1735  // Deserialize argument id
1736  FwDpIdType id;
1737  _deserStatus = _msg.deserializeTo(id);
1738  FW_ASSERT(
1739  _deserStatus == Fw::FW_SERIALIZE_OK,
1740  static_cast<FwAssertArgType>(_deserStatus)
1741  );
1742 
1743  // Deserialize argument buffer
1744  Fw::Buffer buffer;
1745  _deserStatus = _msg.deserializeTo(buffer);
1746  FW_ASSERT(
1747  _deserStatus == Fw::FW_SERIALIZE_OK,
1748  static_cast<FwAssertArgType>(_deserStatus)
1749  );
1750  // Call handler function
1751  this->productSendIn_handler(
1752  portNum,
1753  id,
1754  buffer
1755  );
1756 
1757  break;
1758  }
1759 
1760  // Handle async input port schedIn
1761  case SCHEDIN_SCHED: {
1762  // Deserialize argument context
1763  U32 context;
1764  _deserStatus = _msg.deserializeTo(context);
1765  FW_ASSERT(
1766  _deserStatus == Fw::FW_SERIALIZE_OK,
1767  static_cast<FwAssertArgType>(_deserStatus)
1768  );
1769  // Call handler function
1770  this->schedIn_handler(
1771  portNum,
1772  context
1773  );
1774 
1775  break;
1776  }
1777 
1778  // Handle command CLEAR_EVENT_THROTTLE
1779  case CMD_CLEAR_EVENT_THROTTLE: {
1780  // Deserialize opcode
1781  FwOpcodeType _opCode = 0;
1782  _deserStatus = _msg.deserializeTo(_opCode);
1783  FW_ASSERT (
1784  _deserStatus == Fw::FW_SERIALIZE_OK,
1785  static_cast<FwAssertArgType>(_deserStatus)
1786  );
1787 
1788  // Deserialize command sequence
1789  U32 _cmdSeq = 0;
1790  _deserStatus = _msg.deserializeTo(_cmdSeq);
1791  FW_ASSERT (
1792  _deserStatus == Fw::FW_SERIALIZE_OK,
1793  static_cast<FwAssertArgType>(_deserStatus)
1794  );
1795 
1796  // Deserialize command argument buffer
1797  Fw::CmdArgBuffer args;
1798  _deserStatus = _msg.deserializeTo(args);
1799  FW_ASSERT (
1800  _deserStatus == Fw::FW_SERIALIZE_OK,
1801  static_cast<FwAssertArgType>(_deserStatus)
1802  );
1803 
1804  // Reset buffer
1805  args.resetDeser();
1806 
1807  // Make sure there was no data left over.
1808  // That means the argument buffer size was incorrect.
1809 #if FW_CMD_CHECK_RESIDUAL
1810  if (args.getDeserializeSizeLeft() != 0) {
1812  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
1813  }
1814  // Don't crash the task if bad arguments were passed from the ground
1815  break;
1816  }
1817 #endif
1818 
1819  // Call handler function
1820  this->CLEAR_EVENT_THROTTLE_cmdHandler(_opCode, _cmdSeq);
1821 
1822  break;
1823  }
1824 
1825  default:
1826  return MSG_DISPATCH_ERROR;
1827  }
1828 
1829  return MSG_DISPATCH_OK;
1830  }
1831 
1832  // ----------------------------------------------------------------------
1833  // Calls for messages received on special input ports
1834  // ----------------------------------------------------------------------
1835 
1836  void DpManagerComponentBase ::
1837  m_p_cmdIn_in(
1838  Fw::PassiveComponentBase* callComp,
1839  FwIndexType portNum,
1840  FwOpcodeType opCode,
1841  U32 cmdSeq,
1842  Fw::CmdArgBuffer& args
1843  )
1844  {
1845  FW_ASSERT(callComp != nullptr);
1846  DpManagerComponentBase* compPtr = static_cast<DpManagerComponentBase*>(callComp);
1847  compPtr->cmdIn_handlerBase(
1848  portNum,
1849  opCode,
1850  cmdSeq,
1851  args
1852  );
1853  }
1854 
1855  // ----------------------------------------------------------------------
1856  // Calls for messages received on typed input ports
1857  // ----------------------------------------------------------------------
1858 
1859  Fw::Success DpManagerComponentBase ::
1860  m_p_productGetIn_in(
1861  Fw::PassiveComponentBase* callComp,
1862  FwIndexType portNum,
1863  FwDpIdType id,
1864  FwSizeType dataSize,
1865  Fw::Buffer& buffer
1866  )
1867  {
1868  FW_ASSERT(callComp != nullptr);
1869  DpManagerComponentBase* compPtr = static_cast<DpManagerComponentBase*>(callComp);
1870  return compPtr->productGetIn_handlerBase(
1871  portNum,
1872  id,
1873  dataSize,
1874  buffer
1875  );
1876  }
1877 
1878  void DpManagerComponentBase ::
1879  m_p_productRequestIn_in(
1880  Fw::PassiveComponentBase* callComp,
1881  FwIndexType portNum,
1882  FwDpIdType id,
1883  FwSizeType dataSize
1884  )
1885  {
1886  FW_ASSERT(callComp != nullptr);
1887  DpManagerComponentBase* compPtr = static_cast<DpManagerComponentBase*>(callComp);
1888  compPtr->productRequestIn_handlerBase(
1889  portNum,
1890  id,
1891  dataSize
1892  );
1893  }
1894 
1895  void DpManagerComponentBase ::
1896  m_p_productSendIn_in(
1897  Fw::PassiveComponentBase* callComp,
1898  FwIndexType portNum,
1899  FwDpIdType id,
1900  const Fw::Buffer& buffer
1901  )
1902  {
1903  FW_ASSERT(callComp != nullptr);
1904  DpManagerComponentBase* compPtr = static_cast<DpManagerComponentBase*>(callComp);
1905  compPtr->productSendIn_handlerBase(
1906  portNum,
1907  id,
1908  buffer
1909  );
1910  }
1911 
1912  void DpManagerComponentBase ::
1913  m_p_schedIn_in(
1914  Fw::PassiveComponentBase* callComp,
1915  FwIndexType portNum,
1916  U32 context
1917  )
1918  {
1919  FW_ASSERT(callComp != nullptr);
1920  DpManagerComponentBase* compPtr = static_cast<DpManagerComponentBase*>(callComp);
1921  compPtr->schedIn_handlerBase(
1922  portNum,
1923  context
1924  );
1925  }
1926 
1927 #if !FW_DIRECT_PORT_CALLS
1928 
1929  // ----------------------------------------------------------------------
1930  // Invocation functions for special output ports
1931  // ----------------------------------------------------------------------
1932 
1933  void DpManagerComponentBase ::
1934  cmdRegIn_out(
1935  FwIndexType portNum,
1936  FwOpcodeType opCode
1937  ) const
1938  {
1939  FW_ASSERT(
1940  (0 <= portNum) && (portNum < this->getNum_cmdRegIn_OutputPorts()),
1941  static_cast<FwAssertArgType>(portNum)
1942  );
1943 
1944  FW_ASSERT(
1945  this->m_cmdRegIn_OutputPort[portNum].isConnected(),
1946  static_cast<FwAssertArgType>(portNum)
1947  );
1948  this->m_cmdRegIn_OutputPort[portNum].invoke(
1949  opCode
1950  );
1951  }
1952 
1953  void DpManagerComponentBase ::
1954  cmdResponseOut_out(
1955  FwIndexType portNum,
1956  FwOpcodeType opCode,
1957  U32 cmdSeq,
1958  const Fw::CmdResponse& response
1959  ) const
1960  {
1961  FW_ASSERT(
1962  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1963  static_cast<FwAssertArgType>(portNum)
1964  );
1965 
1966  FW_ASSERT(
1967  this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
1968  static_cast<FwAssertArgType>(portNum)
1969  );
1970  this->m_cmdResponseOut_OutputPort[portNum].invoke(
1971  opCode,
1972  cmdSeq,
1973  response
1974  );
1975  }
1976 
1977  void DpManagerComponentBase ::
1978  eventOut_out(
1979  FwIndexType portNum,
1980  FwEventIdType id,
1981  Fw::Time& timeTag,
1982  const Fw::LogSeverity& severity,
1983  Fw::LogBuffer& args
1984  ) const
1985  {
1986  FW_ASSERT(
1987  (0 <= portNum) && (portNum < this->getNum_eventOut_OutputPorts()),
1988  static_cast<FwAssertArgType>(portNum)
1989  );
1990 
1991  FW_ASSERT(
1992  this->m_eventOut_OutputPort[portNum].isConnected(),
1993  static_cast<FwAssertArgType>(portNum)
1994  );
1995  this->m_eventOut_OutputPort[portNum].invoke(
1996  id,
1997  timeTag,
1998  severity,
1999  args
2000  );
2001  }
2002 
2003 #if FW_ENABLE_TEXT_LOGGING
2004 
2005  void DpManagerComponentBase ::
2006  textEventOut_out(
2007  FwIndexType portNum,
2008  FwEventIdType id,
2009  Fw::Time& timeTag,
2010  const Fw::LogSeverity& severity,
2011  Fw::TextLogString& text
2012  ) const
2013  {
2014  FW_ASSERT(
2015  (0 <= portNum) && (portNum < this->getNum_textEventOut_OutputPorts()),
2016  static_cast<FwAssertArgType>(portNum)
2017  );
2018 
2019  FW_ASSERT(
2020  this->m_textEventOut_OutputPort[portNum].isConnected(),
2021  static_cast<FwAssertArgType>(portNum)
2022  );
2023  this->m_textEventOut_OutputPort[portNum].invoke(
2024  id,
2025  timeTag,
2026  severity,
2027  text
2028  );
2029  }
2030 
2031 #endif
2032 
2033  void DpManagerComponentBase ::
2034  timeGetOut_out(
2035  FwIndexType portNum,
2036  Fw::Time& time
2037  ) const
2038  {
2039  FW_ASSERT(
2040  (0 <= portNum) && (portNum < this->getNum_timeGetOut_OutputPorts()),
2041  static_cast<FwAssertArgType>(portNum)
2042  );
2043 
2044  FW_ASSERT(
2045  this->m_timeGetOut_OutputPort[portNum].isConnected(),
2046  static_cast<FwAssertArgType>(portNum)
2047  );
2048  this->m_timeGetOut_OutputPort[portNum].invoke(
2049  time
2050  );
2051  }
2052 
2053  void DpManagerComponentBase ::
2054  tlmOut_out(
2055  FwIndexType portNum,
2056  FwChanIdType id,
2057  Fw::Time& timeTag,
2058  Fw::TlmBuffer& val
2059  ) const
2060  {
2061  FW_ASSERT(
2062  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
2063  static_cast<FwAssertArgType>(portNum)
2064  );
2065 
2066  FW_ASSERT(
2067  this->m_tlmOut_OutputPort[portNum].isConnected(),
2068  static_cast<FwAssertArgType>(portNum)
2069  );
2070  this->m_tlmOut_OutputPort[portNum].invoke(
2071  id,
2072  timeTag,
2073  val
2074  );
2075  }
2076 
2077 #endif
2078 
2079 }
Serialization/Deserialization operation was successful.
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
static constexpr FwIndexType getNum_cmdIn_InputPorts()
void set_productSendOut_OutputPort(FwIndexType portNum, Fw::InputBufferSendPort *port)
Connect port to productSendOut[portNum].
static constexpr FwIndexType getNum_productGetIn_InputPorts()
static constexpr FwSizeType CAPACITY
Definition: CmdPortAc.hpp:36
static constexpr FwIndexType getNum_productRequestIn_InputPorts()
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:27
static constexpr FwIndexType getNum_eventOut_OutputPorts()
static constexpr FwIndexType getNum_bufferGetOut_OutputPorts()
void log_WARNING_HI_BufferAllocationFailed_ThrottleClear()
Reset throttle value for BufferAllocationFailed.
PlatformSizeType FwSizeType
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Definition: Queue.cpp:71
I32 FwEnumStoreType
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: DpGetPortAc.cpp:37
Status
status returned from the queue send function
Definition: Queue.hpp:30
void init()
Initialization function.
void init()
Initialization function.
Definition: SchedPortAc.cpp:73
void set_timeGetOut_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeGetOut[portNum].
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
message to exit active component task
bool isConnected_productResponseOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
Definition: CmdPortAc.cpp:89
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
static constexpr FwIndexType getNum_productSendOut_OutputPorts()
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
bool isConnected_bufferGetOut_OutputPort(FwIndexType portNum) const
const Time ZERO_TIME
Definition: Time.cpp:5
virtual ~DpManagerComponentBase()
Destroy DpManagerComponentBase object.
void addCallPort(InputDpResponsePort *callPort)
Register an input port.
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
void productRequestIn_handlerBase(FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)
Handler base-class function for input port productRequestIn.
static constexpr FwSizeType CAPACITY
Enum representing a command response.
void tlmWrite_NumSuccessfulAllocations(U32 arg, Fw::Time _tlmTime=Fw::Time())
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void tlmWrite_NumFailedAllocations(U32 arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_cmdRegIn_OutputPort(FwIndexType portNum) const
Os::Queue m_queue
queue object for active component
void productSendIn_handlerBase(FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer)
Handler base-class function for input port productSendIn.
void invoke(FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status) const
Invoke a port connection.
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:177
void init()
Object initializer.
Definition: ObjBase.cpp:24
Fw::InputDpGetPort * get_productGetIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_productResponseOut_OutputPorts()
SerializeStatus
forward declaration for string
virtual void productSendIn_handler(FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer)=0
Handler for input port productSendIn.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:95
void addCallPort(InputBufferGetPort *callPort)
Register an input port.
Message will block until space is available.
Definition: Queue.hpp:47
virtual Fw::Success productGetIn_handler(FwIndexType portNum, FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)=0
Handler for input port productGetIn.
void init()
Initialization function.
FwIdType FwEventIdType
The type of an event identifier.
virtual void productSendIn_preMsgHook(FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer)
Pre-message hook for async input port productSendIn.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
Fw::InputDpSendPort * get_productSendIn_InputPort(FwIndexType portNum)
void init()
Initialization function.
Definition: TimePortAc.cpp:151
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void invoke(Fw::Buffer &fwBuffer) const
Invoke a port connection.
void addCallPort(InputBufferSendPort *callPort)
Register an input port.
void productResponseOut_out(FwIndexType portNum, FwDpIdType id, const Fw::Buffer &buffer, const Fw::Success &status) const
Invoke output port productResponseOut.
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
void tlmWrite_NumDataProducts(U32 arg, Fw::Time _tlmTime=Fw::Time())
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
static constexpr FwIndexType getNum_cmdRegIn_OutputPorts()
virtual void CLEAR_EVENT_THROTTLE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
void CLEAR_EVENT_THROTTLE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
A serious but recoverable event.
static constexpr FwIndexType getNum_schedIn_InputPorts()
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.
static constexpr FwIndexType getNum_timeGetOut_OutputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
#define PRI_FwIndexType
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:58
void init()
Initialization function.
Definition: LogPortAc.cpp:180
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void setPortNum(FwIndexType portNum)
bool isConnected_eventOut_OutputPort(FwIndexType portNum) const
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
BlockingType
message type
Definition: Queue.hpp:46
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
void init()
Initialization function.
Fw::Buffer invoke(FwSizeType size) const
static constexpr FwIndexType getNum_productSendIn_InputPorts()
virtual void productRequestIn_handler(FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)=0
Handler for input port productRequestIn.
Command failed to deserialize.
Fw::Buffer bufferGetOut_out(FwIndexType portNum, FwSizeType size) const
Invoke output port bufferGetOut.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void log_WARNING_HI_BufferAllocationFailed(FwDpIdType id)
void init()
Initialization function.
FwIdType FwDpIdType
The type of a data product identifier.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: SchedPortAc.cpp:79
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
void productSendOut_out(FwIndexType portNum, Fw::Buffer &fwBuffer) const
Invoke output port productSendOut.
void set_productResponseOut_OutputPort(FwIndexType portNum, Fw::InputDpResponsePort *port)
Connect port to productResponseOut[portNum].
A message was sent requesting an exit of the loop.
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
PlatformIndexType FwIndexType
virtual void productRequestIn_preMsgHook(FwIndexType portNum, FwDpIdType id, FwSizeType dataSize)
Pre-message hook for async input port productRequestIn.
DpManagerComponentBase(const char *compName="")
Construct DpManagerComponentBase object.
Fw::InputDpRequestPort * get_productRequestIn_InputPort(FwIndexType portNum)
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
bool isConnected_productSendOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
void regCommands()
Register commands with the Command Dispatcher.
void init()
Initialization function.
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
RateGroupDivider component implementation.
void set_bufferGetOut_OutputPort(FwIndexType portNum, Fw::InputBufferGetPort *port)
Connect port to bufferGetOut[portNum].
bool isConnected_timeGetOut_OutputPort(FwIndexType portNum) const
message sent/received okay
Definition: Queue.hpp:31
U8 BYTE
byte type
Definition: BasicTypes.h:57
Fw::Success productGetIn_handlerBase(FwIndexType portNum, FwDpIdType id, FwSizeType dataSize, Fw::Buffer &buffer)
Handler base-class function for input port productGetIn.
virtual void CLEAR_EVENT_THROTTLE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CLEAR_EVENT_THROTTLE.
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
Implementation of malloc based allocator.
static constexpr FwSizeType CAPACITY
void set_eventOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to eventOut[portNum].
void init()
Initialization function.
void set_cmdRegIn_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegIn[portNum].
void tlmWrite_NumBytes(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
#define FW_ASSERT(...)
Definition: Assert.hpp:14
static constexpr FwSizeType CAPACITY
Definition: SchedPortAc.hpp:34
Success/Failure.
void init()
Initialization function.
Definition: DpGetPortAc.cpp:31
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]