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