F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
EventManagerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title EventManagerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for EventManager 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  EVENTMANAGER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
19  PINGIN_PING,
20  CMD_SET_ID_FILTER,
21  CMD_DUMP_FILTER_STATE,
22  INT_IF_LOQQUEUE,
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 pingInPortSize[Svc::PingPortBuffer::CAPACITY];
29  BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY];
30  // Size of loqQueue argument list
31  BYTE loqQueueIntIfSize[
32  sizeof(FwEventIdType) +
36  ];
37  };
38 
39  // Define a message buffer class large enough to handle all the
40  // asynchronous inputs to the component
41  class ComponentIpcSerializableBuffer :
43  {
44 
45  public:
46 
47  enum {
48  // Offset into data in buffer: Size of message ID and port number
49  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
50  // Max data size
51  MAX_DATA_SIZE = sizeof(BuffUnion),
52  // Max message size: Size of message id + size of port + max data size
53  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
54  };
55 
56  Fw::Serializable::SizeType getCapacity() const {
57  return sizeof(m_buff);
58  }
59 
60  U8* getBuffAddr() {
61  return m_buff;
62  }
63 
64  const U8* getBuffAddr() const {
65  return m_buff;
66  }
67 
68  private:
69  // Should be the max of all the input ports serialized sizes...
70  U8 m_buff[SERIALIZATION_SIZE];
71 
72  };
73  }
74 
75  // ----------------------------------------------------------------------
76  // Component initialization
77  // ----------------------------------------------------------------------
78 
81  FwSizeType queueDepth,
82  FwEnumStoreType instance
83  )
84  {
85  // Initialize base class
87 
88 #if !FW_DIRECT_PORT_CALLS
89  // Connect input port CmdDisp
90  for (
91  FwIndexType port = 0;
92  port < static_cast<FwIndexType>(this->getNum_CmdDisp_InputPorts());
93  port++
94  ) {
95  this->m_CmdDisp_InputPort[port].init();
96  this->m_CmdDisp_InputPort[port].addCallComp(
97  this,
98  m_p_CmdDisp_in
99  );
100  this->m_CmdDisp_InputPort[port].setPortNum(port);
101 
102 #if FW_OBJECT_NAMES == 1
103  Fw::ObjectName portName;
104  portName.format(
105  "%s_CmdDisp_InputPort[%" PRI_FwIndexType "]",
106  this->m_objName.toChar(),
107  port
108  );
109  this->m_CmdDisp_InputPort[port].setObjName(portName.toChar());
110 #endif
111  }
112 #endif
113 
114 #if !FW_DIRECT_PORT_CALLS
115  // Connect input port LogRecv
116  for (
117  FwIndexType port = 0;
118  port < static_cast<FwIndexType>(this->getNum_LogRecv_InputPorts());
119  port++
120  ) {
121  this->m_LogRecv_InputPort[port].init();
122  this->m_LogRecv_InputPort[port].addCallComp(
123  this,
124  m_p_LogRecv_in
125  );
126  this->m_LogRecv_InputPort[port].setPortNum(port);
127 
128 #if FW_OBJECT_NAMES == 1
129  Fw::ObjectName portName;
130  portName.format(
131  "%s_LogRecv_InputPort[%" PRI_FwIndexType "]",
132  this->m_objName.toChar(),
133  port
134  );
135  this->m_LogRecv_InputPort[port].setObjName(portName.toChar());
136 #endif
137  }
138 #endif
139 
140 #if !FW_DIRECT_PORT_CALLS
141  // Connect input port pingIn
142  for (
143  FwIndexType port = 0;
144  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
145  port++
146  ) {
147  this->m_pingIn_InputPort[port].init();
148  this->m_pingIn_InputPort[port].addCallComp(
149  this,
150  m_p_pingIn_in
151  );
152  this->m_pingIn_InputPort[port].setPortNum(port);
153 
154 #if FW_OBJECT_NAMES == 1
155  Fw::ObjectName portName;
156  portName.format(
157  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
158  this->m_objName.toChar(),
159  port
160  );
161  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
162 #endif
163  }
164 #endif
165 
166 #if !FW_DIRECT_PORT_CALLS
167  // Connect output port CmdReg
168  for (
169  FwIndexType port = 0;
170  port < static_cast<FwIndexType>(this->getNum_CmdReg_OutputPorts());
171  port++
172  ) {
173  this->m_CmdReg_OutputPort[port].init();
174 
175 #if FW_OBJECT_NAMES == 1
176  Fw::ObjectName portName;
177  portName.format(
178  "%s_CmdReg_OutputPort[%" PRI_FwIndexType "]",
179  this->m_objName.toChar(),
180  port
181  );
182  this->m_CmdReg_OutputPort[port].setObjName(portName.toChar());
183 #endif
184  }
185 #endif
186 
187 #if !FW_DIRECT_PORT_CALLS
188  // Connect output port CmdStatus
189  for (
190  FwIndexType port = 0;
191  port < static_cast<FwIndexType>(this->getNum_CmdStatus_OutputPorts());
192  port++
193  ) {
194  this->m_CmdStatus_OutputPort[port].init();
195 
196 #if FW_OBJECT_NAMES == 1
197  Fw::ObjectName portName;
198  portName.format(
199  "%s_CmdStatus_OutputPort[%" PRI_FwIndexType "]",
200  this->m_objName.toChar(),
201  port
202  );
203  this->m_CmdStatus_OutputPort[port].setObjName(portName.toChar());
204 #endif
205  }
206 #endif
207 
208 #if !FW_DIRECT_PORT_CALLS
209  // Connect output port Log
210  for (
211  FwIndexType port = 0;
212  port < static_cast<FwIndexType>(this->getNum_Log_OutputPorts());
213  port++
214  ) {
215  this->m_Log_OutputPort[port].init();
216 
217 #if FW_OBJECT_NAMES == 1
218  Fw::ObjectName portName;
219  portName.format(
220  "%s_Log_OutputPort[%" PRI_FwIndexType "]",
221  this->m_objName.toChar(),
222  port
223  );
224  this->m_Log_OutputPort[port].setObjName(portName.toChar());
225 #endif
226  }
227 #endif
228 
229 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
230  // Connect output port LogText
231  for (
232  FwIndexType port = 0;
233  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
234  port++
235  ) {
236  this->m_LogText_OutputPort[port].init();
237 
238 #if FW_OBJECT_NAMES == 1
239  Fw::ObjectName portName;
240  portName.format(
241  "%s_LogText_OutputPort[%" PRI_FwIndexType "]",
242  this->m_objName.toChar(),
243  port
244  );
245  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
246 #endif
247  }
248 #endif
249 
250 #if !FW_DIRECT_PORT_CALLS
251  // Connect output port Time
252  for (
253  FwIndexType port = 0;
254  port < static_cast<FwIndexType>(this->getNum_Time_OutputPorts());
255  port++
256  ) {
257  this->m_Time_OutputPort[port].init();
258 
259 #if FW_OBJECT_NAMES == 1
260  Fw::ObjectName portName;
261  portName.format(
262  "%s_Time_OutputPort[%" PRI_FwIndexType "]",
263  this->m_objName.toChar(),
264  port
265  );
266  this->m_Time_OutputPort[port].setObjName(portName.toChar());
267 #endif
268  }
269 #endif
270 
271 #if !FW_DIRECT_PORT_CALLS
272  // Connect output port FatalAnnounce
273  for (
274  FwIndexType port = 0;
275  port < static_cast<FwIndexType>(this->getNum_FatalAnnounce_OutputPorts());
276  port++
277  ) {
278  this->m_FatalAnnounce_OutputPort[port].init();
279 
280 #if FW_OBJECT_NAMES == 1
281  Fw::ObjectName portName;
282  portName.format(
283  "%s_FatalAnnounce_OutputPort[%" PRI_FwIndexType "]",
284  this->m_objName.toChar(),
285  port
286  );
287  this->m_FatalAnnounce_OutputPort[port].setObjName(portName.toChar());
288 #endif
289  }
290 #endif
291 
292 #if !FW_DIRECT_PORT_CALLS
293  // Connect output port PktSend
294  for (
295  FwIndexType port = 0;
296  port < static_cast<FwIndexType>(this->getNum_PktSend_OutputPorts());
297  port++
298  ) {
299  this->m_PktSend_OutputPort[port].init();
300 
301 #if FW_OBJECT_NAMES == 1
302  Fw::ObjectName portName;
303  portName.format(
304  "%s_PktSend_OutputPort[%" PRI_FwIndexType "]",
305  this->m_objName.toChar(),
306  port
307  );
308  this->m_PktSend_OutputPort[port].setObjName(portName.toChar());
309 #endif
310  }
311 #endif
312 
313 #if !FW_DIRECT_PORT_CALLS
314  // Connect output port pingOut
315  for (
316  FwIndexType port = 0;
317  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
318  port++
319  ) {
320  this->m_pingOut_OutputPort[port].init();
321 
322 #if FW_OBJECT_NAMES == 1
323  Fw::ObjectName portName;
324  portName.format(
325  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
326  this->m_objName.toChar(),
327  port
328  );
329  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
330 #endif
331  }
332 #endif
333 
334  // Create the queue
335  Os::Queue::Status qStat = this->createQueue(
336  queueDepth,
337  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
338  );
339  FW_ASSERT(
340  Os::Queue::Status::OP_OK == qStat,
341  static_cast<FwAssertArgType>(qStat)
342  );
343  }
344 
345 #if !FW_DIRECT_PORT_CALLS
346 
347  // ----------------------------------------------------------------------
348  // Getters for special input ports
349  // ----------------------------------------------------------------------
350 
353  {
354  FW_ASSERT(
355  (0 <= portNum) && (portNum < this->getNum_CmdDisp_InputPorts()),
356  static_cast<FwAssertArgType>(portNum)
357  );
358 
359  return &this->m_CmdDisp_InputPort[portNum];
360  }
361 
362 #endif
363 
364 #if !FW_DIRECT_PORT_CALLS
365 
366  // ----------------------------------------------------------------------
367  // Getters for typed input ports
368  // ----------------------------------------------------------------------
369 
372  {
373  FW_ASSERT(
374  (0 <= portNum) && (portNum < this->getNum_LogRecv_InputPorts()),
375  static_cast<FwAssertArgType>(portNum)
376  );
377 
378  return &this->m_LogRecv_InputPort[portNum];
379  }
380 
383  {
384  FW_ASSERT(
385  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
386  static_cast<FwAssertArgType>(portNum)
387  );
388 
389  return &this->m_pingIn_InputPort[portNum];
390  }
391 
392 #endif
393 
394 #if !FW_DIRECT_PORT_CALLS
395 
396  // ----------------------------------------------------------------------
397  // Connect input ports to special output ports
398  // ----------------------------------------------------------------------
399 
402  FwIndexType portNum,
403  Fw::InputCmdRegPort* port
404  )
405  {
406  FW_ASSERT(
407  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
408  static_cast<FwAssertArgType>(portNum)
409  );
410 
411  this->m_CmdReg_OutputPort[portNum].addCallPort(port);
412  }
413 
416  FwIndexType portNum,
418  )
419  {
420  FW_ASSERT(
421  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
422  static_cast<FwAssertArgType>(portNum)
423  );
424 
425  this->m_CmdStatus_OutputPort[portNum].addCallPort(port);
426  }
427 
430  FwIndexType portNum,
431  Fw::InputLogPort* port
432  )
433  {
434  FW_ASSERT(
435  (0 <= portNum) && (portNum < this->getNum_Log_OutputPorts()),
436  static_cast<FwAssertArgType>(portNum)
437  );
438 
439  this->m_Log_OutputPort[portNum].addCallPort(port);
440  }
441 
442 #if FW_ENABLE_TEXT_LOGGING == 1
443 
444  void EventManagerComponentBase ::
445  set_LogText_OutputPort(
446  FwIndexType portNum,
448  )
449  {
450  FW_ASSERT(
451  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
452  static_cast<FwAssertArgType>(portNum)
453  );
454 
455  this->m_LogText_OutputPort[portNum].addCallPort(port);
456  }
457 
458 #endif
459 
462  FwIndexType portNum,
463  Fw::InputTimePort* port
464  )
465  {
466  FW_ASSERT(
467  (0 <= portNum) && (portNum < this->getNum_Time_OutputPorts()),
468  static_cast<FwAssertArgType>(portNum)
469  );
470 
471  this->m_Time_OutputPort[portNum].addCallPort(port);
472  }
473 
474 #endif
475 
476 #if !FW_DIRECT_PORT_CALLS
477 
478  // ----------------------------------------------------------------------
479  // Connect typed input ports to typed output ports
480  // ----------------------------------------------------------------------
481 
484  FwIndexType portNum,
486  )
487  {
488  FW_ASSERT(
489  (0 <= portNum) && (portNum < this->getNum_FatalAnnounce_OutputPorts()),
490  static_cast<FwAssertArgType>(portNum)
491  );
492 
493  this->m_FatalAnnounce_OutputPort[portNum].addCallPort(port);
494  }
495 
498  FwIndexType portNum,
499  Fw::InputComPort* port
500  )
501  {
502  FW_ASSERT(
503  (0 <= portNum) && (portNum < this->getNum_PktSend_OutputPorts()),
504  static_cast<FwAssertArgType>(portNum)
505  );
506 
507  this->m_PktSend_OutputPort[portNum].addCallPort(port);
508  }
509 
512  FwIndexType portNum,
513  Svc::InputPingPort* port
514  )
515  {
516  FW_ASSERT(
517  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
518  static_cast<FwAssertArgType>(portNum)
519  );
520 
521  this->m_pingOut_OutputPort[portNum].addCallPort(port);
522  }
523 
524 #endif
525 
526 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
527 
528  // ----------------------------------------------------------------------
529  // Connect serial input ports to special output ports
530  // ----------------------------------------------------------------------
531 
534  FwIndexType portNum,
535  Fw::InputSerializePort* port
536  )
537  {
538  FW_ASSERT(
539  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
540  static_cast<FwAssertArgType>(portNum)
541  );
542 
543  this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
544  }
545 
548  FwIndexType portNum,
549  Fw::InputSerializePort* port
550  )
551  {
552  FW_ASSERT(
553  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
554  static_cast<FwAssertArgType>(portNum)
555  );
556 
557  this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
558  }
559 
562  FwIndexType portNum,
563  Fw::InputSerializePort* port
564  )
565  {
566  FW_ASSERT(
567  (0 <= portNum) && (portNum < this->getNum_Log_OutputPorts()),
568  static_cast<FwAssertArgType>(portNum)
569  );
570 
571  this->m_Log_OutputPort[portNum].registerSerialPort(port);
572  }
573 
574 #if FW_ENABLE_TEXT_LOGGING == 1
575 
576  void EventManagerComponentBase ::
577  set_LogText_OutputPort(
578  FwIndexType portNum,
579  Fw::InputSerializePort* port
580  )
581  {
582  FW_ASSERT(
583  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
584  static_cast<FwAssertArgType>(portNum)
585  );
586 
587  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
588  }
589 
590 #endif
591 
594  FwIndexType portNum,
595  Fw::InputSerializePort* port
596  )
597  {
598  FW_ASSERT(
599  (0 <= portNum) && (portNum < this->getNum_Time_OutputPorts()),
600  static_cast<FwAssertArgType>(portNum)
601  );
602 
603  this->m_Time_OutputPort[portNum].registerSerialPort(port);
604  }
605 
606 #endif
607 
608 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
609 
610  // ----------------------------------------------------------------------
611  // Connect serial input ports to typed output ports
612  // ----------------------------------------------------------------------
613 
616  FwIndexType portNum,
617  Fw::InputSerializePort* port
618  )
619  {
620  FW_ASSERT(
621  (0 <= portNum) && (portNum < this->getNum_FatalAnnounce_OutputPorts()),
622  static_cast<FwAssertArgType>(portNum)
623  );
624 
625  this->m_FatalAnnounce_OutputPort[portNum].registerSerialPort(port);
626  }
627 
630  FwIndexType portNum,
631  Fw::InputSerializePort* port
632  )
633  {
634  FW_ASSERT(
635  (0 <= portNum) && (portNum < this->getNum_PktSend_OutputPorts()),
636  static_cast<FwAssertArgType>(portNum)
637  );
638 
639  this->m_PktSend_OutputPort[portNum].registerSerialPort(port);
640  }
641 
644  FwIndexType portNum,
645  Fw::InputSerializePort* port
646  )
647  {
648  FW_ASSERT(
649  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
650  static_cast<FwAssertArgType>(portNum)
651  );
652 
653  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
654  }
655 
656 #endif
657 
658  // ----------------------------------------------------------------------
659  // Command registration
660  // ----------------------------------------------------------------------
661 
664  {
666 
667  this->CmdReg_out(
668  0,
670  );
671 
672  this->CmdReg_out(
673  0,
675  );
676 
677  this->CmdReg_out(
678  0,
680  );
681  }
682 
683  // ----------------------------------------------------------------------
684  // Component construction and destruction
685  // ----------------------------------------------------------------------
686 
688  EventManagerComponentBase(const char* compName) :
689  Fw::ActiveComponentBase(compName)
690  {
691 
692  }
693 
696  {
697 
698  }
699 
700 #if !FW_DIRECT_PORT_CALLS
701 
702  // ----------------------------------------------------------------------
703  // Connection status queries for special output ports
704  // ----------------------------------------------------------------------
705 
708  {
709  FW_ASSERT(
710  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
711  static_cast<FwAssertArgType>(portNum)
712  );
713 
714  return this->m_CmdReg_OutputPort[portNum].isConnected();
715  }
716 
719  {
720  FW_ASSERT(
721  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
722  static_cast<FwAssertArgType>(portNum)
723  );
724 
725  return this->m_CmdStatus_OutputPort[portNum].isConnected();
726  }
727 
730  {
731  FW_ASSERT(
732  (0 <= portNum) && (portNum < this->getNum_Log_OutputPorts()),
733  static_cast<FwAssertArgType>(portNum)
734  );
735 
736  return this->m_Log_OutputPort[portNum].isConnected();
737  }
738 
739 #if FW_ENABLE_TEXT_LOGGING == 1
740 
741  bool EventManagerComponentBase ::
742  isConnected_LogText_OutputPort(FwIndexType portNum) const
743  {
744  FW_ASSERT(
745  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
746  static_cast<FwAssertArgType>(portNum)
747  );
748 
749  return this->m_LogText_OutputPort[portNum].isConnected();
750  }
751 
752 #endif
753 
756  {
757  FW_ASSERT(
758  (0 <= portNum) && (portNum < this->getNum_Time_OutputPorts()),
759  static_cast<FwAssertArgType>(portNum)
760  );
761 
762  return this->m_Time_OutputPort[portNum].isConnected();
763  }
764 
765 #endif
766 
767 #if !FW_DIRECT_PORT_CALLS
768 
769  // ----------------------------------------------------------------------
770  // Connection status queries for typed output ports
771  // ----------------------------------------------------------------------
772 
775  {
776  FW_ASSERT(
777  (0 <= portNum) && (portNum < this->getNum_FatalAnnounce_OutputPorts()),
778  static_cast<FwAssertArgType>(portNum)
779  );
780 
781  return this->m_FatalAnnounce_OutputPort[portNum].isConnected();
782  }
783 
786  {
787  FW_ASSERT(
788  (0 <= portNum) && (portNum < this->getNum_PktSend_OutputPorts()),
789  static_cast<FwAssertArgType>(portNum)
790  );
791 
792  return this->m_PktSend_OutputPort[portNum].isConnected();
793  }
794 
797  {
798  FW_ASSERT(
799  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
800  static_cast<FwAssertArgType>(portNum)
801  );
802 
803  return this->m_pingOut_OutputPort[portNum].isConnected();
804  }
805 
806 #endif
807 
808  // ----------------------------------------------------------------------
809  // Port handler base-class functions for special input ports
810  //
811  // Call these functions directly to bypass the corresponding ports
812  // ----------------------------------------------------------------------
813 
816  FwIndexType portNum,
817  FwOpcodeType opCode,
818  U32 cmdSeq,
819  Fw::CmdArgBuffer& args
820  )
821  {
822 
823  const U32 idBase = this->getIdBase();
824  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
825 
826  // Select base class function based on opcode
827  switch (opCode - idBase) {
830  opCode,
831  cmdSeq,
832  args
833  );
834  break;
835  }
836 
837  case OPCODE_SET_ID_FILTER: {
839  opCode,
840  cmdSeq,
841  args
842  );
843  break;
844  }
845 
848  opCode,
849  cmdSeq,
850  args
851  );
852  break;
853  }
854  default:
855  // Unknown opcode: ignore it
856  break;
857  }
858  }
859 
860  // ----------------------------------------------------------------------
861  // Port handler base-class functions for typed input ports
862  //
863  // Call these functions directly to bypass the corresponding ports
864  // ----------------------------------------------------------------------
865 
868  FwIndexType portNum,
869  FwEventIdType id,
870  Fw::Time& timeTag,
871  const Fw::LogSeverity& severity,
872  Fw::LogBuffer& args
873  )
874  {
875  // Make sure port number is valid
876  FW_ASSERT(
877  (0 <= portNum) && (portNum < this->getNum_LogRecv_InputPorts()),
878  static_cast<FwAssertArgType>(portNum)
879  );
880 
881  // Call handler function
882  this->LogRecv_handler(
883  portNum,
884  id,
885  timeTag,
886  severity,
887  args
888  );
889  }
890 
893  FwIndexType portNum,
894  U32 key
895  )
896  {
897  // Make sure port number is valid
898  FW_ASSERT(
899  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
900  static_cast<FwAssertArgType>(portNum)
901  );
902 
903  // Call pre-message hook
905  portNum,
906  key
907  );
908  ComponentIpcSerializableBuffer msg;
910 
911  // Serialize message ID
912  _status = msg.serializeFrom(
913  static_cast<FwEnumStoreType>(PINGIN_PING)
914  );
915  FW_ASSERT(
916  _status == Fw::FW_SERIALIZE_OK,
917  static_cast<FwAssertArgType>(_status)
918  );
919 
920  // Serialize port number
921  _status = msg.serializeFrom(portNum);
922  FW_ASSERT(
923  _status == Fw::FW_SERIALIZE_OK,
924  static_cast<FwAssertArgType>(_status)
925  );
926 
927  // Serialize argument key
928  _status = msg.serializeFrom(key);
929  FW_ASSERT(
930  _status == Fw::FW_SERIALIZE_OK,
931  static_cast<FwAssertArgType>(_status)
932  );
933 
934  // Send message
936  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
937 
938  FW_ASSERT(
939  qStatus == Os::Queue::OP_OK,
940  static_cast<FwAssertArgType>(qStatus)
941  );
942  }
943 
944  // ----------------------------------------------------------------------
945  // Pre-message hooks for typed async input ports
946  //
947  // Each of these functions is invoked just before processing a message
948  // on the corresponding port. By default, they do nothing. You can
949  // override them to provide specific pre-message behavior.
950  // ----------------------------------------------------------------------
951 
954  FwIndexType portNum,
955  U32 key
956  )
957  {
958  // Default: no-op
959  }
960 
961 #if !FW_DIRECT_PORT_CALLS
962 
963  // ----------------------------------------------------------------------
964  // Invocation functions for typed output ports
965  // ----------------------------------------------------------------------
966 
969  FwIndexType portNum,
970  FwEventIdType Id
971  ) const
972  {
973  FW_ASSERT(
974  (0 <= portNum) && (portNum < this->getNum_FatalAnnounce_OutputPorts()),
975  static_cast<FwAssertArgType>(portNum)
976  );
977 
978  FW_ASSERT(
979  this->m_FatalAnnounce_OutputPort[portNum].isConnected(),
980  static_cast<FwAssertArgType>(portNum)
981  );
982  this->m_FatalAnnounce_OutputPort[portNum].invoke(
983  Id
984  );
985  }
986 
989  FwIndexType portNum,
990  Fw::ComBuffer& data,
991  U32 context
992  ) const
993  {
994  FW_ASSERT(
995  (0 <= portNum) && (portNum < this->getNum_PktSend_OutputPorts()),
996  static_cast<FwAssertArgType>(portNum)
997  );
998 
999  FW_ASSERT(
1000  this->m_PktSend_OutputPort[portNum].isConnected(),
1001  static_cast<FwAssertArgType>(portNum)
1002  );
1003  this->m_PktSend_OutputPort[portNum].invoke(
1004  data,
1005  context
1006  );
1007  }
1008 
1011  FwIndexType portNum,
1012  U32 key
1013  ) const
1014  {
1015  FW_ASSERT(
1016  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1017  static_cast<FwAssertArgType>(portNum)
1018  );
1019 
1020  FW_ASSERT(
1021  this->m_pingOut_OutputPort[portNum].isConnected(),
1022  static_cast<FwAssertArgType>(portNum)
1023  );
1024  this->m_pingOut_OutputPort[portNum].invoke(
1025  key
1026  );
1027  }
1028 
1029 #endif
1030 
1031  // ----------------------------------------------------------------------
1032  // Internal interface base-class functions
1033  // ----------------------------------------------------------------------
1034 
1037  FwEventIdType id,
1038  const Fw::Time& timeTag,
1039  const Fw::LogSeverity& severity,
1040  const Fw::LogBuffer& args
1041  )
1042  {
1043  ComponentIpcSerializableBuffer msg;
1045 
1046  // Serialize the message ID
1047  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(INT_IF_LOQQUEUE));
1048  FW_ASSERT (
1049  _status == Fw::FW_SERIALIZE_OK,
1050  static_cast<FwAssertArgType>(_status)
1051  );
1052 
1053  // Fake port number to make message dequeue work
1054  _status = msg.serializeFrom(static_cast<FwIndexType>(0));
1055  FW_ASSERT (
1056  _status == Fw::FW_SERIALIZE_OK,
1057  static_cast<FwAssertArgType>(_status)
1058  );
1059 
1060  _status = msg.serializeFrom(id);
1061  FW_ASSERT(
1062  _status == Fw::FW_SERIALIZE_OK,
1063  static_cast<FwAssertArgType>(_status)
1064  );
1065 
1066  _status = msg.serializeFrom(timeTag);
1067  FW_ASSERT(
1068  _status == Fw::FW_SERIALIZE_OK,
1069  static_cast<FwAssertArgType>(_status)
1070  );
1071 
1072  _status = msg.serializeFrom(severity);
1073  FW_ASSERT(
1074  _status == Fw::FW_SERIALIZE_OK,
1075  static_cast<FwAssertArgType>(_status)
1076  );
1077 
1078  _status = msg.serializeFrom(args);
1079  FW_ASSERT(
1080  _status == Fw::FW_SERIALIZE_OK,
1081  static_cast<FwAssertArgType>(_status)
1082  );
1083 
1084  // Send message
1086  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1087 
1088  if (qStatus == Os::Queue::Status::FULL) {
1089  this->incNumMsgDropped();
1090  return;
1091  }
1092 
1093  FW_ASSERT(
1094  qStatus == Os::Queue::OP_OK,
1095  static_cast<FwAssertArgType>(qStatus)
1096  );
1097  }
1098 
1099  // ----------------------------------------------------------------------
1100  // Command response
1101  // ----------------------------------------------------------------------
1102 
1105  FwOpcodeType opCode,
1106  U32 cmdSeq,
1107  Fw::CmdResponse response
1108  )
1109  {
1111  this->CmdStatus_out(0, opCode, cmdSeq, response);
1112  }
1113 
1114  // ----------------------------------------------------------------------
1115  // Command handler base-class functions
1116  //
1117  // Call these functions directly to bypass the command input port
1118  // ----------------------------------------------------------------------
1119 
1122  FwOpcodeType opCode,
1123  U32 cmdSeq,
1124  Fw::CmdArgBuffer& args
1125  )
1126  {
1127  // Deserialize the arguments
1129 
1130  // Reset the buffer
1131  args.resetDeser();
1132 
1134  _status = args.deserializeTo(filterLevel);
1135  if (_status != Fw::FW_SERIALIZE_OK) {
1136  if (this->isConnected_CmdStatus_OutputPort(0)) {
1137  this->CmdStatus_out(
1138  0,
1139  opCode,
1140  cmdSeq,
1142  );
1143  }
1144  return;
1145  }
1146 
1147  Svc::EventManager_Enabled filterEnabled;
1148  _status = args.deserializeTo(filterEnabled);
1149  if (_status != Fw::FW_SERIALIZE_OK) {
1150  if (this->isConnected_CmdStatus_OutputPort(0)) {
1151  this->CmdStatus_out(
1152  0,
1153  opCode,
1154  cmdSeq,
1156  );
1157  }
1158  return;
1159  }
1160 
1161 #if FW_CMD_CHECK_RESIDUAL
1162  // Make sure there was no data left over.
1163  // That means the argument buffer size was incorrect.
1164  if (args.getDeserializeSizeLeft() != 0) {
1165  if (this->isConnected_CmdStatus_OutputPort(0)) {
1166  this->CmdStatus_out(
1167  0,
1168  opCode,
1169  cmdSeq,
1171  );
1172  }
1173  return;
1174  }
1175 #endif
1176 
1178  opCode, cmdSeq,
1179  filterLevel,
1180  filterEnabled
1181  );
1182  }
1183 
1186  FwOpcodeType opCode,
1187  U32 cmdSeq,
1188  Fw::CmdArgBuffer& args
1189  )
1190  {
1191  // Call pre-message hook
1192  this->SET_ID_FILTER_preMsgHook(opCode,cmdSeq);
1193 
1194  // Defer deserializing arguments to the message dispatcher
1195  // to avoid deserializing and reserializing just for IPC
1196  ComponentIpcSerializableBuffer msg;
1198 
1199  // Serialize for IPC
1200  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_SET_ID_FILTER));
1201  FW_ASSERT (
1202  _status == Fw::FW_SERIALIZE_OK,
1203  static_cast<FwAssertArgType>(_status)
1204  );
1205 
1206  // Fake port number to make message dequeue work
1207  FwIndexType port = 0;
1208 
1209  _status = msg.serializeFrom(port);
1210  FW_ASSERT (
1211  _status == Fw::FW_SERIALIZE_OK,
1212  static_cast<FwAssertArgType>(_status)
1213  );
1214 
1215  _status = msg.serializeFrom(opCode);
1216  FW_ASSERT (
1217  _status == Fw::FW_SERIALIZE_OK,
1218  static_cast<FwAssertArgType>(_status)
1219  );
1220 
1221  _status = msg.serializeFrom(cmdSeq);
1222  FW_ASSERT (
1223  _status == Fw::FW_SERIALIZE_OK,
1224  static_cast<FwAssertArgType>(_status)
1225  );
1226 
1227  _status = msg.serializeFrom(args);
1228  FW_ASSERT (
1229  _status == Fw::FW_SERIALIZE_OK,
1230  static_cast<FwAssertArgType>(_status)
1231  );
1232 
1233  // Send message
1235  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1236 
1237  FW_ASSERT(
1238  qStatus == Os::Queue::OP_OK,
1239  static_cast<FwAssertArgType>(qStatus)
1240  );
1241  }
1242 
1245  FwOpcodeType opCode,
1246  U32 cmdSeq,
1247  Fw::CmdArgBuffer& args
1248  )
1249  {
1250  // Call pre-message hook
1251  this->DUMP_FILTER_STATE_preMsgHook(opCode,cmdSeq);
1252 
1253  // Defer deserializing arguments to the message dispatcher
1254  // to avoid deserializing and reserializing just for IPC
1255  ComponentIpcSerializableBuffer msg;
1257 
1258  // Serialize for IPC
1259  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_DUMP_FILTER_STATE));
1260  FW_ASSERT (
1261  _status == Fw::FW_SERIALIZE_OK,
1262  static_cast<FwAssertArgType>(_status)
1263  );
1264 
1265  // Fake port number to make message dequeue work
1266  FwIndexType port = 0;
1267 
1268  _status = msg.serializeFrom(port);
1269  FW_ASSERT (
1270  _status == Fw::FW_SERIALIZE_OK,
1271  static_cast<FwAssertArgType>(_status)
1272  );
1273 
1274  _status = msg.serializeFrom(opCode);
1275  FW_ASSERT (
1276  _status == Fw::FW_SERIALIZE_OK,
1277  static_cast<FwAssertArgType>(_status)
1278  );
1279 
1280  _status = msg.serializeFrom(cmdSeq);
1281  FW_ASSERT (
1282  _status == Fw::FW_SERIALIZE_OK,
1283  static_cast<FwAssertArgType>(_status)
1284  );
1285 
1286  _status = msg.serializeFrom(args);
1287  FW_ASSERT (
1288  _status == Fw::FW_SERIALIZE_OK,
1289  static_cast<FwAssertArgType>(_status)
1290  );
1291 
1292  // Send message
1294  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1295 
1296  FW_ASSERT(
1297  qStatus == Os::Queue::OP_OK,
1298  static_cast<FwAssertArgType>(qStatus)
1299  );
1300  }
1301 
1302  // ----------------------------------------------------------------------
1303  // Pre-message hooks for async commands
1304  //
1305  // Each of these functions is invoked just before processing the
1306  // corresponding command. By default they do nothing. You can
1307  // override them to provide specific pre-command behavior.
1308  // ----------------------------------------------------------------------
1309 
1312  FwOpcodeType opCode,
1313  U32 cmdSeq
1314  )
1315  {
1316  // Defaults to no-op; can be overridden
1317  (void) opCode;
1318  (void) cmdSeq;
1319  }
1320 
1323  FwOpcodeType opCode,
1324  U32 cmdSeq
1325  )
1326  {
1327  // Defaults to no-op; can be overridden
1328  (void) opCode;
1329  (void) cmdSeq;
1330  }
1331 
1332  // ----------------------------------------------------------------------
1333  // Event logging functions
1334  // ----------------------------------------------------------------------
1335 
1339  bool enabled
1340  ) const
1341  {
1342  // Get the time
1343  Fw::Time _logTime;
1344  if (this->isConnected_Time_OutputPort(0)) {
1345  this->Time_out(0, _logTime);
1346  }
1347 
1349 
1350  // Emit the event on the log port
1351  if (this->isConnected_Log_OutputPort(0)) {
1352  Fw::LogBuffer _logBuff;
1354 
1355 #if FW_AMPCS_COMPATIBLE
1356  // Serialize the number of arguments
1357  _status = _logBuff.serializeFrom(static_cast<U8>(2));
1358  FW_ASSERT(
1359  _status == Fw::FW_SERIALIZE_OK,
1360  static_cast<FwAssertArgType>(_status)
1361  );
1362 #endif
1363 
1364 #if FW_AMPCS_COMPATIBLE
1365  // Serialize the argument size
1366  _status = _logBuff.serializeFrom(
1368  );
1369  FW_ASSERT(
1370  _status == Fw::FW_SERIALIZE_OK,
1371  static_cast<FwAssertArgType>(_status)
1372  );
1373 #endif
1374  _status = _logBuff.serializeFrom(severity);
1375  FW_ASSERT(
1376  _status == Fw::FW_SERIALIZE_OK,
1377  static_cast<FwAssertArgType>(_status)
1378  );
1379 
1380 #if FW_AMPCS_COMPATIBLE
1381  // Serialize the argument size
1382  _status = _logBuff.serializeFrom(
1383  static_cast<U8>(sizeof(U8))
1384  );
1385  FW_ASSERT(
1386  _status == Fw::FW_SERIALIZE_OK,
1387  static_cast<FwAssertArgType>(_status)
1388  );
1389 #endif
1390  _status = _logBuff.serializeFrom(enabled);
1391  FW_ASSERT(
1392  _status == Fw::FW_SERIALIZE_OK,
1393  static_cast<FwAssertArgType>(_status)
1394  );
1395 
1396  this->Log_out(
1397  0,
1398  _id,
1399  _logTime,
1401  _logBuff
1402  );
1403  }
1404 
1405  // Emit the event on the text log port
1406 #if FW_ENABLE_TEXT_LOGGING
1407  if (this->isConnected_LogText_OutputPort(0)) {
1408 #if FW_OBJECT_NAMES == 1
1409  const char* _formatString =
1410  "(%s) %s: %s filter state. %d";
1411 #else
1412  const char* _formatString =
1413  "%s: %s filter state. %d";
1414 #endif
1415 
1416  Fw::String severityStr;
1417  severity.toString(severityStr);
1418 
1419  Fw::TextLogString _logString;
1420  _logString.format(
1421  _formatString,
1422 #if FW_OBJECT_NAMES == 1
1423  this->m_objName.toChar(),
1424 #endif
1425  "SEVERITY_FILTER_STATE ",
1426  severityStr.toChar(),
1427  enabled
1428  );
1429 
1430  this->LogText_out(
1431  0,
1432  _id,
1433  _logTime,
1435  _logString
1436  );
1437  }
1438 #endif
1439  }
1440 
1443  {
1444  // Get the time
1445  Fw::Time _logTime;
1446  if (this->isConnected_Time_OutputPort(0)) {
1447  this->Time_out(0, _logTime);
1448  }
1449 
1450  const FwEventIdType _id = this->getIdBase() + EVENTID_ID_FILTER_ENABLED;
1451 
1452  // Emit the event on the log port
1453  if (this->isConnected_Log_OutputPort(0)) {
1454  Fw::LogBuffer _logBuff;
1456 
1457 #if FW_AMPCS_COMPATIBLE
1458  // Serialize the number of arguments
1459  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1460  FW_ASSERT(
1461  _status == Fw::FW_SERIALIZE_OK,
1462  static_cast<FwAssertArgType>(_status)
1463  );
1464 #endif
1465 
1466 #if FW_AMPCS_COMPATIBLE
1467  // Serialize the argument size
1468  _status = _logBuff.serializeFrom(
1469  static_cast<U8>(sizeof(FwEventIdType))
1470  );
1471  FW_ASSERT(
1472  _status == Fw::FW_SERIALIZE_OK,
1473  static_cast<FwAssertArgType>(_status)
1474  );
1475 #endif
1476  _status = _logBuff.serializeFrom(ID);
1477  FW_ASSERT(
1478  _status == Fw::FW_SERIALIZE_OK,
1479  static_cast<FwAssertArgType>(_status)
1480  );
1481 
1482  this->Log_out(
1483  0,
1484  _id,
1485  _logTime,
1487  _logBuff
1488  );
1489  }
1490 
1491  // Emit the event on the text log port
1492 #if FW_ENABLE_TEXT_LOGGING
1493  if (this->isConnected_LogText_OutputPort(0)) {
1494 #if FW_OBJECT_NAMES == 1
1495  const char* _formatString =
1496  "(%s) %s: ID %" PRIu32 " is filtered.";
1497 #else
1498  const char* _formatString =
1499  "%s: ID %" PRIu32 " is filtered.";
1500 #endif
1501 
1502  Fw::TextLogString _logString;
1503  _logString.format(
1504  _formatString,
1505 #if FW_OBJECT_NAMES == 1
1506  this->m_objName.toChar(),
1507 #endif
1508  "ID_FILTER_ENABLED ",
1509  ID
1510  );
1511 
1512  this->LogText_out(
1513  0,
1514  _id,
1515  _logTime,
1517  _logString
1518  );
1519  }
1520 #endif
1521  }
1522 
1525  {
1526  // Get the time
1527  Fw::Time _logTime;
1528  if (this->isConnected_Time_OutputPort(0)) {
1529  this->Time_out(0, _logTime);
1530  }
1531 
1532  const FwEventIdType _id = this->getIdBase() + EVENTID_ID_FILTER_LIST_FULL;
1533 
1534  // Emit the event on the log port
1535  if (this->isConnected_Log_OutputPort(0)) {
1536  Fw::LogBuffer _logBuff;
1538 
1539 #if FW_AMPCS_COMPATIBLE
1540  // Serialize the number of arguments
1541  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1542  FW_ASSERT(
1543  _status == Fw::FW_SERIALIZE_OK,
1544  static_cast<FwAssertArgType>(_status)
1545  );
1546 #endif
1547 
1548 #if FW_AMPCS_COMPATIBLE
1549  // Serialize the argument size
1550  _status = _logBuff.serializeFrom(
1551  static_cast<U8>(sizeof(FwEventIdType))
1552  );
1553  FW_ASSERT(
1554  _status == Fw::FW_SERIALIZE_OK,
1555  static_cast<FwAssertArgType>(_status)
1556  );
1557 #endif
1558  _status = _logBuff.serializeFrom(ID);
1559  FW_ASSERT(
1560  _status == Fw::FW_SERIALIZE_OK,
1561  static_cast<FwAssertArgType>(_status)
1562  );
1563 
1564  this->Log_out(
1565  0,
1566  _id,
1567  _logTime,
1569  _logBuff
1570  );
1571  }
1572 
1573  // Emit the event on the text log port
1574 #if FW_ENABLE_TEXT_LOGGING
1575  if (this->isConnected_LogText_OutputPort(0)) {
1576 #if FW_OBJECT_NAMES == 1
1577  const char* _formatString =
1578  "(%s) %s: ID filter list is full. Cannot filter %" PRIu32 " .";
1579 #else
1580  const char* _formatString =
1581  "%s: ID filter list is full. Cannot filter %" PRIu32 " .";
1582 #endif
1583 
1584  Fw::TextLogString _logString;
1585  _logString.format(
1586  _formatString,
1587 #if FW_OBJECT_NAMES == 1
1588  this->m_objName.toChar(),
1589 #endif
1590  "ID_FILTER_LIST_FULL ",
1591  ID
1592  );
1593 
1594  this->LogText_out(
1595  0,
1596  _id,
1597  _logTime,
1599  _logString
1600  );
1601  }
1602 #endif
1603  }
1604 
1607  {
1608  // Get the time
1609  Fw::Time _logTime;
1610  if (this->isConnected_Time_OutputPort(0)) {
1611  this->Time_out(0, _logTime);
1612  }
1613 
1614  const FwEventIdType _id = this->getIdBase() + EVENTID_ID_FILTER_REMOVED;
1615 
1616  // Emit the event on the log port
1617  if (this->isConnected_Log_OutputPort(0)) {
1618  Fw::LogBuffer _logBuff;
1620 
1621 #if FW_AMPCS_COMPATIBLE
1622  // Serialize the number of arguments
1623  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1624  FW_ASSERT(
1625  _status == Fw::FW_SERIALIZE_OK,
1626  static_cast<FwAssertArgType>(_status)
1627  );
1628 #endif
1629 
1630 #if FW_AMPCS_COMPATIBLE
1631  // Serialize the argument size
1632  _status = _logBuff.serializeFrom(
1633  static_cast<U8>(sizeof(FwEventIdType))
1634  );
1635  FW_ASSERT(
1636  _status == Fw::FW_SERIALIZE_OK,
1637  static_cast<FwAssertArgType>(_status)
1638  );
1639 #endif
1640  _status = _logBuff.serializeFrom(ID);
1641  FW_ASSERT(
1642  _status == Fw::FW_SERIALIZE_OK,
1643  static_cast<FwAssertArgType>(_status)
1644  );
1645 
1646  this->Log_out(
1647  0,
1648  _id,
1649  _logTime,
1651  _logBuff
1652  );
1653  }
1654 
1655  // Emit the event on the text log port
1656 #if FW_ENABLE_TEXT_LOGGING
1657  if (this->isConnected_LogText_OutputPort(0)) {
1658 #if FW_OBJECT_NAMES == 1
1659  const char* _formatString =
1660  "(%s) %s: ID filter ID %" PRIu32 " removed.";
1661 #else
1662  const char* _formatString =
1663  "%s: ID filter ID %" PRIu32 " removed.";
1664 #endif
1665 
1666  Fw::TextLogString _logString;
1667  _logString.format(
1668  _formatString,
1669 #if FW_OBJECT_NAMES == 1
1670  this->m_objName.toChar(),
1671 #endif
1672  "ID_FILTER_REMOVED ",
1673  ID
1674  );
1675 
1676  this->LogText_out(
1677  0,
1678  _id,
1679  _logTime,
1681  _logString
1682  );
1683  }
1684 #endif
1685  }
1686 
1689  {
1690  // Get the time
1691  Fw::Time _logTime;
1692  if (this->isConnected_Time_OutputPort(0)) {
1693  this->Time_out(0, _logTime);
1694  }
1695 
1696  const FwEventIdType _id = this->getIdBase() + EVENTID_ID_FILTER_NOT_FOUND;
1697 
1698  // Emit the event on the log port
1699  if (this->isConnected_Log_OutputPort(0)) {
1700  Fw::LogBuffer _logBuff;
1702 
1703 #if FW_AMPCS_COMPATIBLE
1704  // Serialize the number of arguments
1705  _status = _logBuff.serializeFrom(static_cast<U8>(1));
1706  FW_ASSERT(
1707  _status == Fw::FW_SERIALIZE_OK,
1708  static_cast<FwAssertArgType>(_status)
1709  );
1710 #endif
1711 
1712 #if FW_AMPCS_COMPATIBLE
1713  // Serialize the argument size
1714  _status = _logBuff.serializeFrom(
1715  static_cast<U8>(sizeof(FwEventIdType))
1716  );
1717  FW_ASSERT(
1718  _status == Fw::FW_SERIALIZE_OK,
1719  static_cast<FwAssertArgType>(_status)
1720  );
1721 #endif
1722  _status = _logBuff.serializeFrom(ID);
1723  FW_ASSERT(
1724  _status == Fw::FW_SERIALIZE_OK,
1725  static_cast<FwAssertArgType>(_status)
1726  );
1727 
1728  this->Log_out(
1729  0,
1730  _id,
1731  _logTime,
1733  _logBuff
1734  );
1735  }
1736 
1737  // Emit the event on the text log port
1738 #if FW_ENABLE_TEXT_LOGGING
1739  if (this->isConnected_LogText_OutputPort(0)) {
1740 #if FW_OBJECT_NAMES == 1
1741  const char* _formatString =
1742  "(%s) %s: ID filter ID %" PRIu32 " not found.";
1743 #else
1744  const char* _formatString =
1745  "%s: ID filter ID %" PRIu32 " not found.";
1746 #endif
1747 
1748  Fw::TextLogString _logString;
1749  _logString.format(
1750  _formatString,
1751 #if FW_OBJECT_NAMES == 1
1752  this->m_objName.toChar(),
1753 #endif
1754  "ID_FILTER_NOT_FOUND ",
1755  ID
1756  );
1757 
1758  this->LogText_out(
1759  0,
1760  _id,
1761  _logTime,
1763  _logString
1764  );
1765  }
1766 #endif
1767  }
1768 
1769  // ----------------------------------------------------------------------
1770  // Time
1771  // ----------------------------------------------------------------------
1772 
1774  getTime() const
1775  {
1776  if (this->isConnected_Time_OutputPort(0)) {
1777  Fw::Time _time;
1778  this->Time_out(0, _time);
1779  return _time;
1780  }
1781  else {
1782  return Fw::Time(TimeBase::TB_NONE, 0, 0);
1783  }
1784  }
1785 
1786  // ----------------------------------------------------------------------
1787  // Message dispatch functions
1788  // ----------------------------------------------------------------------
1789 
1790  Fw::QueuedComponentBase::MsgDispatchStatus EventManagerComponentBase ::
1791  doDispatch()
1792  {
1793  ComponentIpcSerializableBuffer _msg;
1794  FwQueuePriorityType _priority = 0;
1795 
1796  Os::Queue::Status _msgStatus = this->m_queue.receive(
1797  _msg,
1799  _priority
1800  );
1801  FW_ASSERT(
1802  _msgStatus == Os::Queue::OP_OK,
1803  static_cast<FwAssertArgType>(_msgStatus)
1804  );
1805 
1806  // Reset to beginning of buffer
1807  _msg.resetDeser();
1808 
1809  FwEnumStoreType _desMsg = 0;
1810  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
1811  FW_ASSERT(
1812  _deserStatus == Fw::FW_SERIALIZE_OK,
1813  static_cast<FwAssertArgType>(_deserStatus)
1814  );
1815 
1816  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
1817 
1818  if (_msgType == EVENTMANAGER_COMPONENT_EXIT) {
1819  return MSG_DISPATCH_EXIT;
1820  }
1821 
1822  FwIndexType portNum = 0;
1823  _deserStatus = _msg.deserializeTo(portNum);
1824  FW_ASSERT(
1825  _deserStatus == Fw::FW_SERIALIZE_OK,
1826  static_cast<FwAssertArgType>(_deserStatus)
1827  );
1828 
1829  switch (_msgType) {
1830  // Handle async input port pingIn
1831  case PINGIN_PING: {
1832  // Deserialize argument key
1833  U32 key;
1834  _deserStatus = _msg.deserializeTo(key);
1835  FW_ASSERT(
1836  _deserStatus == Fw::FW_SERIALIZE_OK,
1837  static_cast<FwAssertArgType>(_deserStatus)
1838  );
1839  // Call handler function
1840  this->pingIn_handler(
1841  portNum,
1842  key
1843  );
1844 
1845  break;
1846  }
1847 
1848  // Handle command SET_ID_FILTER
1849  case CMD_SET_ID_FILTER: {
1850  // Deserialize opcode
1851  FwOpcodeType _opCode = 0;
1852  _deserStatus = _msg.deserializeTo(_opCode);
1853  FW_ASSERT (
1854  _deserStatus == Fw::FW_SERIALIZE_OK,
1855  static_cast<FwAssertArgType>(_deserStatus)
1856  );
1857 
1858  // Deserialize command sequence
1859  U32 _cmdSeq = 0;
1860  _deserStatus = _msg.deserializeTo(_cmdSeq);
1861  FW_ASSERT (
1862  _deserStatus == Fw::FW_SERIALIZE_OK,
1863  static_cast<FwAssertArgType>(_deserStatus)
1864  );
1865 
1866  // Deserialize command argument buffer
1867  Fw::CmdArgBuffer args;
1868  _deserStatus = _msg.deserializeTo(args);
1869  FW_ASSERT (
1870  _deserStatus == Fw::FW_SERIALIZE_OK,
1871  static_cast<FwAssertArgType>(_deserStatus)
1872  );
1873 
1874  // Reset buffer
1875  args.resetDeser();
1876 
1877  // Deserialize argument ID
1878  FwEventIdType ID;
1879  _deserStatus = args.deserializeTo(ID);
1880  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
1881  if (this->isConnected_CmdStatus_OutputPort(0)) {
1882  this->cmdResponse_out(
1883  _opCode,
1884  _cmdSeq,
1886  );
1887  }
1888  // Don't crash the task if bad arguments were passed from the ground
1889  break;
1890  }
1891 
1892  // Deserialize argument idFilterEnabled
1893  Svc::EventManager_Enabled idFilterEnabled;
1894  _deserStatus = args.deserializeTo(idFilterEnabled);
1895  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
1896  if (this->isConnected_CmdStatus_OutputPort(0)) {
1897  this->cmdResponse_out(
1898  _opCode,
1899  _cmdSeq,
1901  );
1902  }
1903  // Don't crash the task if bad arguments were passed from the ground
1904  break;
1905  }
1906 
1907  // Make sure there was no data left over.
1908  // That means the argument buffer size was incorrect.
1909 #if FW_CMD_CHECK_RESIDUAL
1910  if (args.getDeserializeSizeLeft() != 0) {
1911  if (this->isConnected_CmdStatus_OutputPort(0)) {
1912  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
1913  }
1914  // Don't crash the task if bad arguments were passed from the ground
1915  break;
1916  }
1917 #endif
1918 
1919  // Call handler function
1921  _opCode, _cmdSeq,
1922  ID,
1923  idFilterEnabled
1924  );
1925 
1926  break;
1927  }
1928 
1929  // Handle command DUMP_FILTER_STATE
1930  case CMD_DUMP_FILTER_STATE: {
1931  // Deserialize opcode
1932  FwOpcodeType _opCode = 0;
1933  _deserStatus = _msg.deserializeTo(_opCode);
1934  FW_ASSERT (
1935  _deserStatus == Fw::FW_SERIALIZE_OK,
1936  static_cast<FwAssertArgType>(_deserStatus)
1937  );
1938 
1939  // Deserialize command sequence
1940  U32 _cmdSeq = 0;
1941  _deserStatus = _msg.deserializeTo(_cmdSeq);
1942  FW_ASSERT (
1943  _deserStatus == Fw::FW_SERIALIZE_OK,
1944  static_cast<FwAssertArgType>(_deserStatus)
1945  );
1946 
1947  // Deserialize command argument buffer
1948  Fw::CmdArgBuffer args;
1949  _deserStatus = _msg.deserializeTo(args);
1950  FW_ASSERT (
1951  _deserStatus == Fw::FW_SERIALIZE_OK,
1952  static_cast<FwAssertArgType>(_deserStatus)
1953  );
1954 
1955  // Reset buffer
1956  args.resetDeser();
1957 
1958  // Make sure there was no data left over.
1959  // That means the argument buffer size was incorrect.
1960 #if FW_CMD_CHECK_RESIDUAL
1961  if (args.getDeserializeSizeLeft() != 0) {
1962  if (this->isConnected_CmdStatus_OutputPort(0)) {
1963  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
1964  }
1965  // Don't crash the task if bad arguments were passed from the ground
1966  break;
1967  }
1968 #endif
1969 
1970  // Call handler function
1971  this->DUMP_FILTER_STATE_cmdHandler(_opCode, _cmdSeq);
1972 
1973  break;
1974  }
1975 
1976  // Handle internal interface loqQueue
1977  case INT_IF_LOQQUEUE: {
1978  FwEventIdType id;
1979  _deserStatus = _msg.deserializeTo(id);
1980 
1981  // Internal interface should always deserialize
1982  FW_ASSERT(
1983  Fw::FW_SERIALIZE_OK == _deserStatus,
1984  static_cast<FwAssertArgType>(_deserStatus)
1985  );
1986 
1987  Fw::Time timeTag;
1988  _deserStatus = _msg.deserializeTo(timeTag);
1989 
1990  // Internal interface should always deserialize
1991  FW_ASSERT(
1992  Fw::FW_SERIALIZE_OK == _deserStatus,
1993  static_cast<FwAssertArgType>(_deserStatus)
1994  );
1995 
1996  Fw::LogSeverity severity;
1997  _deserStatus = _msg.deserializeTo(severity);
1998 
1999  // Internal interface should always deserialize
2000  FW_ASSERT(
2001  Fw::FW_SERIALIZE_OK == _deserStatus,
2002  static_cast<FwAssertArgType>(_deserStatus)
2003  );
2004 
2005  Fw::LogBuffer args;
2006  _deserStatus = _msg.deserializeTo(args);
2007 
2008  // Internal interface should always deserialize
2009  FW_ASSERT(
2010  Fw::FW_SERIALIZE_OK == _deserStatus,
2011  static_cast<FwAssertArgType>(_deserStatus)
2012  );
2013 
2014  // Make sure there was no data left over.
2015  // That means the buffer size was incorrect.
2016  FW_ASSERT(
2017  _msg.getDeserializeSizeLeft() == 0,
2018  static_cast<FwAssertArgType>(_msg.getDeserializeSizeLeft())
2019  );
2020 
2021  // Call handler function
2023  id,
2024  timeTag,
2025  severity,
2026  args
2027  );
2028 
2029  break;
2030  }
2031 
2032  default:
2033  return MSG_DISPATCH_ERROR;
2034  }
2035 
2036  return MSG_DISPATCH_OK;
2037  }
2038 
2039  // ----------------------------------------------------------------------
2040  // Calls for messages received on special input ports
2041  // ----------------------------------------------------------------------
2042 
2043  void EventManagerComponentBase ::
2044  m_p_CmdDisp_in(
2045  Fw::PassiveComponentBase* callComp,
2046  FwIndexType portNum,
2047  FwOpcodeType opCode,
2048  U32 cmdSeq,
2049  Fw::CmdArgBuffer& args
2050  )
2051  {
2052  FW_ASSERT(callComp);
2053  EventManagerComponentBase* compPtr = static_cast<EventManagerComponentBase*>(callComp);
2054  compPtr->CmdDisp_handlerBase(
2055  portNum,
2056  opCode,
2057  cmdSeq,
2058  args
2059  );
2060  }
2061 
2062  // ----------------------------------------------------------------------
2063  // Calls for messages received on typed input ports
2064  // ----------------------------------------------------------------------
2065 
2066  void EventManagerComponentBase ::
2067  m_p_LogRecv_in(
2068  Fw::PassiveComponentBase* callComp,
2069  FwIndexType portNum,
2070  FwEventIdType id,
2071  Fw::Time& timeTag,
2072  const Fw::LogSeverity& severity,
2073  Fw::LogBuffer& args
2074  )
2075  {
2076  FW_ASSERT(callComp);
2077  EventManagerComponentBase* compPtr = static_cast<EventManagerComponentBase*>(callComp);
2078  compPtr->LogRecv_handlerBase(
2079  portNum,
2080  id,
2081  timeTag,
2082  severity,
2083  args
2084  );
2085  }
2086 
2087  void EventManagerComponentBase ::
2088  m_p_pingIn_in(
2089  Fw::PassiveComponentBase* callComp,
2090  FwIndexType portNum,
2091  U32 key
2092  )
2093  {
2094  FW_ASSERT(callComp);
2095  EventManagerComponentBase* compPtr = static_cast<EventManagerComponentBase*>(callComp);
2096  compPtr->pingIn_handlerBase(
2097  portNum,
2098  key
2099  );
2100  }
2101 
2102 #if !FW_DIRECT_PORT_CALLS
2103 
2104  // ----------------------------------------------------------------------
2105  // Invocation functions for special output ports
2106  // ----------------------------------------------------------------------
2107 
2108  void EventManagerComponentBase ::
2109  CmdReg_out(
2110  FwIndexType portNum,
2111  FwOpcodeType opCode
2112  ) const
2113  {
2114  FW_ASSERT(
2115  (0 <= portNum) && (portNum < this->getNum_CmdReg_OutputPorts()),
2116  static_cast<FwAssertArgType>(portNum)
2117  );
2118 
2119  FW_ASSERT(
2120  this->m_CmdReg_OutputPort[portNum].isConnected(),
2121  static_cast<FwAssertArgType>(portNum)
2122  );
2123  this->m_CmdReg_OutputPort[portNum].invoke(
2124  opCode
2125  );
2126  }
2127 
2128  void EventManagerComponentBase ::
2129  CmdStatus_out(
2130  FwIndexType portNum,
2131  FwOpcodeType opCode,
2132  U32 cmdSeq,
2133  const Fw::CmdResponse& response
2134  ) const
2135  {
2136  FW_ASSERT(
2137  (0 <= portNum) && (portNum < this->getNum_CmdStatus_OutputPorts()),
2138  static_cast<FwAssertArgType>(portNum)
2139  );
2140 
2141  FW_ASSERT(
2142  this->m_CmdStatus_OutputPort[portNum].isConnected(),
2143  static_cast<FwAssertArgType>(portNum)
2144  );
2145  this->m_CmdStatus_OutputPort[portNum].invoke(
2146  opCode,
2147  cmdSeq,
2148  response
2149  );
2150  }
2151 
2152  void EventManagerComponentBase ::
2153  Log_out(
2154  FwIndexType portNum,
2155  FwEventIdType id,
2156  Fw::Time& timeTag,
2157  const Fw::LogSeverity& severity,
2158  Fw::LogBuffer& args
2159  ) const
2160  {
2161  FW_ASSERT(
2162  (0 <= portNum) && (portNum < this->getNum_Log_OutputPorts()),
2163  static_cast<FwAssertArgType>(portNum)
2164  );
2165 
2166  FW_ASSERT(
2167  this->m_Log_OutputPort[portNum].isConnected(),
2168  static_cast<FwAssertArgType>(portNum)
2169  );
2170  this->m_Log_OutputPort[portNum].invoke(
2171  id,
2172  timeTag,
2173  severity,
2174  args
2175  );
2176  }
2177 
2178 #if FW_ENABLE_TEXT_LOGGING
2179 
2180  void EventManagerComponentBase ::
2181  LogText_out(
2182  FwIndexType portNum,
2183  FwEventIdType id,
2184  Fw::Time& timeTag,
2185  const Fw::LogSeverity& severity,
2186  Fw::TextLogString& text
2187  ) const
2188  {
2189  FW_ASSERT(
2190  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
2191  static_cast<FwAssertArgType>(portNum)
2192  );
2193 
2194  FW_ASSERT(
2195  this->m_LogText_OutputPort[portNum].isConnected(),
2196  static_cast<FwAssertArgType>(portNum)
2197  );
2198  this->m_LogText_OutputPort[portNum].invoke(
2199  id,
2200  timeTag,
2201  severity,
2202  text
2203  );
2204  }
2205 
2206 #endif
2207 
2208  void EventManagerComponentBase ::
2209  Time_out(
2210  FwIndexType portNum,
2211  Fw::Time& time
2212  ) const
2213  {
2214  FW_ASSERT(
2215  (0 <= portNum) && (portNum < this->getNum_Time_OutputPorts()),
2216  static_cast<FwAssertArgType>(portNum)
2217  );
2218 
2219  FW_ASSERT(
2220  this->m_Time_OutputPort[portNum].isConnected(),
2221  static_cast<FwAssertArgType>(portNum)
2222  );
2223  this->m_Time_OutputPort[portNum].invoke(
2224  time
2225  );
2226  }
2227 
2228 #endif
2229 
2230 }
Serialization/Deserialization operation was successful.
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
void invoke(Fw::ComBuffer &data, U32 context) const
Invoke a port connection.
Definition: ComPortAc.cpp:181
void set_CmdReg_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to CmdReg[portNum].
void init()
Initialization function.
Definition: ComPortAc.cpp:162
static constexpr FwSizeType CAPACITY
Definition: CmdPortAc.hpp:36
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
Enabled and disabled state.
void LogRecv_handlerBase(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)
Handler base-class function for input port LogRecv.
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.
PlatformSizeType FwSizeType
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
Status
status returned from the queue send function
Definition: Queue.hpp:30
const char * toChar() const
Convert to a C-style char*.
Definition: String.hpp:50
void init()
Initialization function.
Definition: CmdPortAc.cpp:89
bool isConnected_CmdStatus_OutputPort(FwIndexType portNum) const
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void invoke(U32 key) const
Invoke a port connection.
Definition: PingPortAc.cpp:170
bool isConnected_PktSend_OutputPort(FwIndexType portNum) const
bool isConnected_FatalAnnounce_OutputPort(FwIndexType portNum) const
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
static constexpr FwIndexType getNum_CmdReg_OutputPorts()
void CmdDisp_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port CmdDisp.
static constexpr FwIndexType getNum_LogRecv_InputPorts()
Fw::InputCmdPort * get_CmdDisp_InputPort(FwIndexType portNum)
Enum representing a command response.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
void invoke(FwEventIdType Id) const
Invoke a port connection.
No time base has been established (Required)
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void set_PktSend_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to PktSend[portNum].
Os::Queue m_queue
queue object for active component
void init()
Object initializer.
Definition: ObjBase.cpp:24
static constexpr FwIndexType getNum_CmdStatus_OutputPorts()
void regCommands()
Register commands with the Command Dispatcher.
SerializeStatus
forward declaration for string
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:95
Message will block until space is available.
Definition: Queue.hpp:47
static constexpr FwIndexType getNum_pingIn_InputPorts()
FwIdType FwEventIdType
The type of an event identifier.
The size of the serial representation.
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
static constexpr FwSizeType CAPACITY
Definition: PingPortAc.hpp:34
void init()
Initialization function.
Definition: LogPortAc.cpp:97
void SET_EVENT_FILTER_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void addCallPort(InputFatalEventPort *callPort)
Register an input port.
void log_ACTIVITY_HI_ID_FILTER_ENABLED(FwEventIdType ID) const
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
virtual void SET_ID_FILTER_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command SET_ID_FILTER.
virtual void DUMP_FILTER_STATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DUMP_FILTER_STATE.
void init()
Initialization function.
Definition: TimePortAc.cpp:151
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void log_WARNING_LO_ID_FILTER_LIST_FULL(FwEventIdType ID) const
A less serious but recoverable event.
bool isConnected_Log_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
Definition: PingPortAc.cpp:151
static constexpr FwIndexType getNum_FatalAnnounce_OutputPorts()
static constexpr FwIndexType getNum_PktSend_OutputPorts()
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void set_Time_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to Time[portNum].
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.
FwSizeType SizeType
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:157
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
void FatalAnnounce_out(FwIndexType portNum, FwEventIdType Id) const
Invoke output port FatalAnnounce.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
bool isConnected() const
Definition: PortBase.cpp:38
Enum representing event severity.
bool isConnected_Time_OutputPort(FwIndexType portNum) const
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:39
void init()
Initialization function.
Definition: LogPortAc.cpp:180
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: LogPortAc.cpp:103
void setPortNum(FwIndexType portNum)
virtual void SET_EVENT_FILTER_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::EventManager_FilterSeverity filterLevel, Svc::EventManager_Enabled filterEnabled)=0
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:53
void set_Log_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to Log[portNum].
BlockingType
message type
Definition: Queue.hpp:46
void log_WARNING_LO_ID_FILTER_NOT_FOUND(FwEventIdType ID) const
bool isConnected_CmdReg_OutputPort(FwIndexType portNum) const
void loqQueue_internalInterfaceInvoke(FwEventIdType id, const Fw::Time &timeTag, const Fw::LogSeverity &severity, const Fw::LogBuffer &args)
Internal interface base-class function for loqQueue.
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Important informational events.
Set filter for reporting events. Events are not stored in component.
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
void set_CmdStatus_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to CmdStatus[portNum].
void SET_ID_FILTER_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
virtual void LogRecv_handler(FwIndexType portNum, FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args)=0
Handler for input port LogRecv.
A message was sent requesting an exit of the loop.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
PlatformIndexType FwIndexType
void DUMP_FILTER_STATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
virtual void DUMP_FILTER_STATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void init()
Initialization function.
void incNumMsgDropped()
increment the number of messages dropped
void init()
Initialization function.
Definition: PingPortAc.cpp:73
static constexpr FwIndexType getNum_Time_OutputPorts()
static constexpr FwIndexType getNum_CmdDisp_InputPorts()
virtual void loqQueue_internalInterfaceHandler(FwEventIdType id, const Fw::Time &timeTag, const Fw::LogSeverity &severity, const Fw::LogBuffer &args)=0
Internal interface handler for loqQueue.
RateGroupDivider component implementation.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
message sent/received okay
Definition: Queue.hpp:31
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
U8 BYTE
byte type
Definition: BasicTypes.h:56
static constexpr FwIndexType getNum_Log_OutputPorts()
void log_ACTIVITY_LO_SEVERITY_FILTER_STATE(Svc::EventManager_FilterSeverity severity, bool enabled) const
void addCallPort(InputComPort *callPort)
Register an input port.
Definition: ComPortAc.cpp:168
void PktSend_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port PktSend.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:79
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
void init()
Initialization function.
Implementation of malloc based allocator.
virtual ~EventManagerComponentBase()
Destroy EventManagerComponentBase object.
void init()
Initialization function.
EventManagerComponentBase(const char *compName="")
Construct EventManagerComponentBase object.
void set_FatalAnnounce_OutputPort(FwIndexType portNum, Svc::InputFatalEventPort *port)
Connect port to FatalAnnounce[portNum].
Fw::InputLogPort * get_LogRecv_InputPort(FwIndexType portNum)
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void log_ACTIVITY_HI_ID_FILTER_REMOVED(FwEventIdType ID) const
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
message to exit active component task
virtual void SET_ID_FILTER_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, FwEventIdType ID, Svc::EventManager_Enabled idFilterEnabled)=0