F´ Flight Software - C/C++ Documentation  NASA-v1.5.0
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
CommandDispatcherComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CommandDispatcherComponentAc.cpp
3 // \author Auto-generated
4 // \brief cpp file for CommandDispatcher component base class
5 //
6 // \copyright
7 // Copyright 2009-2015, by the California Institute of Technology.
8 // ALL RIGHTS RESERVED. United States Government Sponsorship
9 // acknowledged.
10 //
11 // ======================================================================
12 
13 #include <stdio.h>
14 #include <FpConfig.hpp>
16 #include <Fw/Types/Assert.hpp>
17 #if FW_ENABLE_TEXT_LOGGING
19 #endif
20 
21 
22 namespace Svc {
23 
24  // ----------------------------------------------------------------------
25  // Anonymous namespace to prevent name collisions
26  // ----------------------------------------------------------------------
27 
28  namespace {
29 
30  typedef enum {
31  COMMANDDISPATCHER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
32  COMPCMDSTAT_CMDRESPONSE,
33  SEQCMDBUFF_COM,
34  PINGIN_PING,
35  CMD_CMD_NO_OP,
36  CMD_CMD_NO_OP_STRING,
37  CMD_CMD_TEST_CMD_1,
38  CMD_CMD_CLEAR_TRACKING
39  } MsgTypeEnum;
40 
41  // Get the max size by doing a union of the input port serialization sizes.
42 
43  typedef union {
48  } BuffUnion;
49 
50  // Define a message buffer class large enough to handle all the
51  // asynchronous inputs to the component
52 
53  class ComponentIpcSerializableBuffer :
55  {
56 
57  public:
58 
59  enum {
60  // Max. message size = size of data + message id + port
61  SERIALIZATION_SIZE =
62  sizeof(BuffUnion) +
63  sizeof(NATIVE_INT_TYPE) +
64  sizeof(NATIVE_INT_TYPE)
65  };
66 
67  NATIVE_UINT_TYPE getBuffCapacity(void) const {
68  return sizeof(m_buff);
69  }
70 
71  U8* getBuffAddr(void) {
72  return m_buff;
73  }
74 
75  const U8* getBuffAddr(void) const {
76  return m_buff;
77  }
78 
79  private:
80  // Should be the max of all the input ports serialized sizes...
81  U8 m_buff[SERIALIZATION_SIZE];
82 
83  };
84 
85  }
86 
87  // ----------------------------------------------------------------------
88  // Getters for numbers of input ports
89  // ----------------------------------------------------------------------
90 
93  {
94  FW_ASSERT(portNum < this->getNum_compCmdReg_InputPorts(),static_cast<AssertArg>(portNum));
95  return &this->m_compCmdReg_InputPort[portNum];
96  }
97 
100  {
101  FW_ASSERT(portNum < this->getNum_compCmdStat_InputPorts(),static_cast<AssertArg>(portNum));
102  return &this->m_compCmdStat_InputPort[portNum];
103  }
104 
107  {
108  FW_ASSERT(portNum < this->getNum_seqCmdBuff_InputPorts(),static_cast<AssertArg>(portNum));
109  return &this->m_seqCmdBuff_InputPort[portNum];
110  }
111 
114  {
115  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
116  return &this->m_pingIn_InputPort[portNum];
117  }
118 
121  {
122  FW_ASSERT(portNum < this->getNum_CmdDisp_InputPorts(),static_cast<AssertArg>(portNum));
123  return &this->m_CmdDisp_InputPort[portNum];
124  }
125 
126  // ----------------------------------------------------------------------
127  // Typed connectors for output ports
128  // ----------------------------------------------------------------------
129 
132  NATIVE_INT_TYPE portNum,
133  Fw::InputCmdPort* port
134  )
135  {
136  FW_ASSERT(portNum < this->getNum_compCmdSend_OutputPorts(),static_cast<AssertArg>(portNum));
137  this->m_compCmdSend_OutputPort[portNum].addCallPort(port);
138  }
139 
142  NATIVE_INT_TYPE portNum,
144  )
145  {
146  FW_ASSERT(portNum < this->getNum_seqCmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
148  }
149 
152  NATIVE_INT_TYPE portNum,
153  Svc::InputPingPort* port
154  )
155  {
156  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
158  }
159 
162  NATIVE_INT_TYPE portNum,
164  )
165  {
166  FW_ASSERT(portNum < this->getNum_CmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
168  }
169 
172  NATIVE_INT_TYPE portNum,
173  Fw::InputCmdRegPort* port
174  )
175  {
176  FW_ASSERT(portNum < this->getNum_CmdReg_OutputPorts(),static_cast<AssertArg>(portNum));
178  }
179 
182  NATIVE_INT_TYPE portNum,
183  Fw::InputTlmPort* port
184  )
185  {
186  FW_ASSERT(portNum < this->getNum_Tlm_OutputPorts(),static_cast<AssertArg>(portNum));
187  this->m_Tlm_OutputPort[portNum].addCallPort(port);
188  }
189 
192  NATIVE_INT_TYPE portNum,
193  Fw::InputTimePort* port
194  )
195  {
196  FW_ASSERT(portNum < this->getNum_Time_OutputPorts(),static_cast<AssertArg>(portNum));
198  }
199 
202  NATIVE_INT_TYPE portNum,
203  Fw::InputLogPort* port
204  )
205  {
206  FW_ASSERT(portNum < this->getNum_Log_OutputPorts(),static_cast<AssertArg>(portNum));
207  this->m_Log_OutputPort[portNum].addCallPort(port);
208  }
209 
210 #if FW_ENABLE_TEXT_LOGGING == 1
211  void CommandDispatcherComponentBase ::
212  set_LogText_OutputPort(
213  NATIVE_INT_TYPE portNum,
215  )
216  {
217  FW_ASSERT(portNum < this->getNum_LogText_OutputPorts(),static_cast<AssertArg>(portNum));
218  this->m_LogText_OutputPort[portNum].addCallPort(port);
219  }
220 #endif
221 
222  // ----------------------------------------------------------------------
223  // Serialization connectors for output ports
224  // ----------------------------------------------------------------------
225 
226 #if FW_PORT_SERIALIZATION
227 
230  NATIVE_INT_TYPE portNum,
231  Fw::InputSerializePort *port
232  )
233  {
234  FW_ASSERT(portNum < this->getNum_compCmdSend_OutputPorts(),static_cast<AssertArg>(portNum));
235  return this->m_compCmdSend_OutputPort[portNum].registerSerialPort(port);
236  }
237 
240  NATIVE_INT_TYPE portNum,
241  Fw::InputSerializePort *port
242  )
243  {
244  FW_ASSERT(portNum < this->getNum_seqCmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
245  return this->m_seqCmdStatus_OutputPort[portNum].registerSerialPort(port);
246  }
247 
250  NATIVE_INT_TYPE portNum,
251  Fw::InputSerializePort *port
252  )
253  {
254  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
255  return this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
256  }
257 
260  NATIVE_INT_TYPE portNum,
261  Fw::InputSerializePort *port
262  )
263  {
264  FW_ASSERT(portNum < this->getNum_CmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
265  return this->m_CmdStatus_OutputPort[portNum].registerSerialPort(port);
266  }
267 
270  NATIVE_INT_TYPE portNum,
271  Fw::InputSerializePort *port
272  )
273  {
274  FW_ASSERT(portNum < this->getNum_CmdReg_OutputPorts(),static_cast<AssertArg>(portNum));
275  return this->m_CmdReg_OutputPort[portNum].registerSerialPort(port);
276  }
277 
280  NATIVE_INT_TYPE portNum,
281  Fw::InputSerializePort *port
282  )
283  {
284  FW_ASSERT(portNum < this->getNum_Tlm_OutputPorts(),static_cast<AssertArg>(portNum));
285  return this->m_Tlm_OutputPort[portNum].registerSerialPort(port);
286  }
287 
290  NATIVE_INT_TYPE portNum,
291  Fw::InputSerializePort *port
292  )
293  {
294  FW_ASSERT(portNum < this->getNum_Time_OutputPorts(),static_cast<AssertArg>(portNum));
295  return this->m_Time_OutputPort[portNum].registerSerialPort(port);
296  }
297 
300  NATIVE_INT_TYPE portNum,
301  Fw::InputSerializePort *port
302  )
303  {
304  FW_ASSERT(portNum < this->getNum_Log_OutputPorts(),static_cast<AssertArg>(portNum));
305  return this->m_Log_OutputPort[portNum].registerSerialPort(port);
306  }
307 
308 #if FW_ENABLE_TEXT_LOGGING == 1
309  void CommandDispatcherComponentBase ::
310  set_LogText_OutputPort(
311  NATIVE_INT_TYPE portNum,
312  Fw::InputSerializePort *port
313  )
314  {
315  FW_ASSERT(portNum < this->getNum_LogText_OutputPorts(),static_cast<AssertArg>(portNum));
316  return this->m_LogText_OutputPort[portNum].registerSerialPort(port);
317  }
318 #endif
319 
320 #endif
321 
322  // ----------------------------------------------------------------------
323  // Command registration
324  // ----------------------------------------------------------------------
325 
327  regCommands(void)
328  {
329  FW_ASSERT(this->m_CmdReg_OutputPort[0].isConnected());
330  this->m_CmdReg_OutputPort[0].invoke(
331  this->getIdBase() + OPCODE_CMD_NO_OP
332  );
333  this->m_CmdReg_OutputPort[0].invoke(
335  );
336  this->m_CmdReg_OutputPort[0].invoke(
338  );
339  this->m_CmdReg_OutputPort[0].invoke(
341  );
342  }
343 
344  // ----------------------------------------------------------------------
345  // Component construction, initialization, and destruction
346  // ----------------------------------------------------------------------
347 
349 #if FW_OBJECT_NAMES == 1
350  CommandDispatcherComponentBase(const char* compName) :
351  Fw::ActiveComponentBase(compName)
352 #else
354  Fw::ActiveComponentBase()
355 #endif
356  {
357 
358  // Initialize telemetry channel CommandsDispatched
359  this->m_first_update_CommandsDispatched = true;
360  this->m_last_CommandsDispatched = 0;
361  // Initialize telemetry channel CommandErrors
362  this->m_first_update_CommandErrors = true;
363  this->m_last_CommandErrors = 0;
364 
365 
366  }
367 
369  init(
370  NATIVE_INT_TYPE queueDepth,
371  NATIVE_INT_TYPE instance
372  )
373  {
374 
375  // Initialize base class
377 
378  // Connect input port compCmdReg
379  for (
380  NATIVE_INT_TYPE port = 0;
381  port < this->getNum_compCmdReg_InputPorts();
382  port++
383  ) {
384 
385  this->m_compCmdReg_InputPort[port].init();
386  this->m_compCmdReg_InputPort[port].addCallComp(
387  this,
388  m_p_compCmdReg_in
389  );
390  this->m_compCmdReg_InputPort[port].setPortNum(port);
391 
392 #if FW_OBJECT_NAMES == 1
393  char portName[120];
394  (void) snprintf(
395  portName,
396  sizeof(portName),
397  "%s_compCmdReg_InputPort[%d]",
398  this->m_objName,
399  port
400  );
401  this->m_compCmdReg_InputPort[port].setObjName(portName);
402 #endif
403 
404  }
405 
406  // Connect input port compCmdStat
407  for (
408  NATIVE_INT_TYPE port = 0;
410  port++
411  ) {
412 
415  this,
417  );
419 
420 #if FW_OBJECT_NAMES == 1
421  char portName[120];
422  (void) snprintf(
423  portName,
424  sizeof(portName),
425  "%s_compCmdStat_InputPort[%d]",
426  this->m_objName,
427  port
428  );
429  this->m_compCmdStat_InputPort[port].setObjName(portName);
430 #endif
431 
432  }
433 
434  // Connect input port seqCmdBuff
435  for (
436  NATIVE_INT_TYPE port = 0;
438  port++
439  ) {
440 
443  this,
445  );
447 
448 #if FW_OBJECT_NAMES == 1
449  char portName[120];
450  (void) snprintf(
451  portName,
452  sizeof(portName),
453  "%s_seqCmdBuff_InputPort[%d]",
454  this->m_objName,
455  port
456  );
457  this->m_seqCmdBuff_InputPort[port].setObjName(portName);
458 #endif
459 
460  }
461 
462  // Connect input port pingIn
463  for (
464  NATIVE_INT_TYPE port = 0;
465  port < this->getNum_pingIn_InputPorts();
466  port++
467  ) {
468 
469  this->m_pingIn_InputPort[port].init();
471  this,
473  );
474  this->m_pingIn_InputPort[port].setPortNum(port);
475 
476 #if FW_OBJECT_NAMES == 1
477  char portName[120];
478  (void) snprintf(
479  portName,
480  sizeof(portName),
481  "%s_pingIn_InputPort[%d]",
482  this->m_objName,
483  port
484  );
485  this->m_pingIn_InputPort[port].setObjName(portName);
486 #endif
487 
488  }
489 
490  // Connect input port CmdDisp
491  for (
492  NATIVE_INT_TYPE port = 0;
494  port++
495  ) {
496 
497  this->m_CmdDisp_InputPort[port].init();
499  this,
501  );
502  this->m_CmdDisp_InputPort[port].setPortNum(port);
503 
504 #if FW_OBJECT_NAMES == 1
505  char portName[120];
506  (void) snprintf(
507  portName,
508  sizeof(portName),
509  "%s_CmdDisp_InputPort[%d]",
510  this->m_objName,
511  port
512  );
513  this->m_CmdDisp_InputPort[port].setObjName(portName);
514 #endif
515 
516  }
517 
518  // Initialize output port compCmdSend
519  for (
520  NATIVE_INT_TYPE port = 0;
521  port < this->getNum_compCmdSend_OutputPorts();
522  port++
523  ) {
524  this->m_compCmdSend_OutputPort[port].init();
525 
526 #if FW_OBJECT_NAMES == 1
527  char portName[120];
528  (void) snprintf(
529  portName,
530  sizeof(portName),
531  "%s_compCmdSend_OutputPort[%d]",
532  this->m_objName,
533  port
534  );
535  this->m_compCmdSend_OutputPort[port].setObjName(portName);
536 #endif
537 
538  }
539 
540  // Initialize output port seqCmdStatus
541  for (
542  NATIVE_INT_TYPE port = 0;
544  port++
545  ) {
547 
548 #if FW_OBJECT_NAMES == 1
549  char portName[120];
550  (void) snprintf(
551  portName,
552  sizeof(portName),
553  "%s_seqCmdStatus_OutputPort[%d]",
554  this->m_objName,
555  port
556  );
557  this->m_seqCmdStatus_OutputPort[port].setObjName(portName);
558 #endif
559 
560  }
561 
562  // Initialize output port pingOut
563  for (
564  NATIVE_INT_TYPE port = 0;
566  port++
567  ) {
568  this->m_pingOut_OutputPort[port].init();
569 
570 #if FW_OBJECT_NAMES == 1
571  char portName[120];
572  (void) snprintf(
573  portName,
574  sizeof(portName),
575  "%s_pingOut_OutputPort[%d]",
576  this->m_objName,
577  port
578  );
579  this->m_pingOut_OutputPort[port].setObjName(portName);
580 #endif
581 
582  }
583 
584  // Initialize output port CmdStatus
585  for (
586  NATIVE_INT_TYPE port = 0;
588  port++
589  ) {
591 
592 #if FW_OBJECT_NAMES == 1
593  char portName[120];
594  (void) snprintf(
595  portName,
596  sizeof(portName),
597  "%s_CmdStatus_OutputPort[%d]",
598  this->m_objName,
599  port
600  );
601  this->m_CmdStatus_OutputPort[port].setObjName(portName);
602 #endif
603 
604  }
605 
606  // Initialize output port CmdReg
607  for (
608  NATIVE_INT_TYPE port = 0;
610  port++
611  ) {
612  this->m_CmdReg_OutputPort[port].init();
613 
614 #if FW_OBJECT_NAMES == 1
615  char portName[120];
616  (void) snprintf(
617  portName,
618  sizeof(portName),
619  "%s_CmdReg_OutputPort[%d]",
620  this->m_objName,
621  port
622  );
623  this->m_CmdReg_OutputPort[port].setObjName(portName);
624 #endif
625 
626  }
627 
628  // Initialize output port Tlm
629  for (
630  NATIVE_INT_TYPE port = 0;
631  port < this->getNum_Tlm_OutputPorts();
632  port++
633  ) {
634  this->m_Tlm_OutputPort[port].init();
635 
636 #if FW_OBJECT_NAMES == 1
637  char portName[120];
638  (void) snprintf(
639  portName,
640  sizeof(portName),
641  "%s_Tlm_OutputPort[%d]",
642  this->m_objName,
643  port
644  );
645  this->m_Tlm_OutputPort[port].setObjName(portName);
646 #endif
647 
648  }
649 
650  // Initialize output port Time
651  for (
652  NATIVE_INT_TYPE port = 0;
653  port < this->getNum_Time_OutputPorts();
654  port++
655  ) {
656  this->m_Time_OutputPort[port].init();
657 
658 #if FW_OBJECT_NAMES == 1
659  char portName[120];
660  (void) snprintf(
661  portName,
662  sizeof(portName),
663  "%s_Time_OutputPort[%d]",
664  this->m_objName,
665  port
666  );
667  this->m_Time_OutputPort[port].setObjName(portName);
668 #endif
669 
670  }
671 
672  // Initialize output port Log
673  for (
674  NATIVE_INT_TYPE port = 0;
675  port < this->getNum_Log_OutputPorts();
676  port++
677  ) {
678  this->m_Log_OutputPort[port].init();
679 
680 #if FW_OBJECT_NAMES == 1
681  char portName[120];
682  (void) snprintf(
683  portName,
684  sizeof(portName),
685  "%s_Log_OutputPort[%d]",
686  this->m_objName,
687  port
688  );
689  this->m_Log_OutputPort[port].setObjName(portName);
690 #endif
691 
692  }
693 
694  // Initialize output port LogText
695 #if FW_ENABLE_TEXT_LOGGING == 1
696  for (
697  NATIVE_INT_TYPE port = 0;
698  port < this->getNum_LogText_OutputPorts();
699  port++
700  ) {
701  this->m_LogText_OutputPort[port].init();
702 
703 #if FW_OBJECT_NAMES == 1
704  char portName[120];
705  (void) snprintf(
706  portName,
707  sizeof(portName),
708  "%s_LogText_OutputPort[%d]",
709  this->m_objName,
710  port
711  );
712  this->m_LogText_OutputPort[port].setObjName(portName);
713 #endif
714 
715  }
716 #endif
717 
718  Os::Queue::QueueStatus qStat =
719  this->createQueue(
720  queueDepth,
721  ComponentIpcSerializableBuffer::SERIALIZATION_SIZE
722  );
723  FW_ASSERT(
724  Os::Queue::QUEUE_OK == qStat,
725  static_cast<AssertArg>(qStat)
726  );
727 
728  }
729 
732 
733  }
734 
735  // ----------------------------------------------------------------------
736  // Invocation functions for output ports
737  // ----------------------------------------------------------------------
738 
739  void CommandDispatcherComponentBase ::
740  compCmdSend_out(
741  NATIVE_INT_TYPE portNum,
742  FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args
743  )
744  {
745  FW_ASSERT(portNum < this->getNum_compCmdSend_OutputPorts(),static_cast<AssertArg>(portNum));
746  this->m_compCmdSend_OutputPort[portNum].invoke(opCode, cmdSeq, args);
747  }
748 
751  NATIVE_INT_TYPE portNum,
752  FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response
753  )
754  {
755  FW_ASSERT(portNum < this->getNum_seqCmdStatus_OutputPorts(),static_cast<AssertArg>(portNum));
757  }
758 
761  NATIVE_INT_TYPE portNum,
762  U32 key
763  )
764  {
765  FW_ASSERT(portNum < this->getNum_pingOut_OutputPorts(),static_cast<AssertArg>(portNum));
766  this->m_pingOut_OutputPort[portNum].invoke(key);
767  }
768 
769  // ----------------------------------------------------------------------
770  // Getters for numbers of ports
771  // ----------------------------------------------------------------------
772 
773  NATIVE_INT_TYPE CommandDispatcherComponentBase ::
774  getNum_compCmdSend_OutputPorts(void)
775  {
777  this->m_compCmdSend_OutputPort
778  );
779  }
780 
781  NATIVE_INT_TYPE CommandDispatcherComponentBase ::
782  getNum_compCmdReg_InputPorts(void)
783  {
785  this->m_compCmdReg_InputPort
786  );
787  }
788 
791  {
794  );
795  }
796 
799  {
802  );
803  }
804 
807  {
810  );
811  }
812 
815  {
817  this->m_pingIn_InputPort
818  );
819  }
820 
823  {
826  );
827  }
828 
831  {
833  this->m_CmdDisp_InputPort
834  );
835  }
836 
839  {
842  );
843  }
844 
847  {
849  this->m_CmdReg_OutputPort
850  );
851  }
852 
855  {
857  this->m_Tlm_OutputPort
858  );
859  }
860 
863  {
865  this->m_Time_OutputPort
866  );
867  }
868 
871  {
873  this->m_Log_OutputPort
874  );
875  }
876 
877 #if FW_ENABLE_TEXT_LOGGING == 1
878  NATIVE_INT_TYPE CommandDispatcherComponentBase ::
879  getNum_LogText_OutputPorts(void)
880  {
882  this->m_LogText_OutputPort
883  );
884  }
885 #endif
886 
887  // ----------------------------------------------------------------------
888  // Port connection status queries
889  // ----------------------------------------------------------------------
890 
891  bool CommandDispatcherComponentBase ::
892  isConnected_compCmdSend_OutputPort(NATIVE_INT_TYPE portNum)
893  {
894  FW_ASSERT(
895  portNum < this->getNum_compCmdSend_OutputPorts(),
896  static_cast<AssertArg>(portNum)
897  );
898  return this->m_compCmdSend_OutputPort[portNum].isConnected();
899  }
900 
903  {
904  FW_ASSERT(
905  portNum < this->getNum_seqCmdStatus_OutputPorts(),
906  static_cast<AssertArg>(portNum)
907  );
909  }
910 
913  {
914  FW_ASSERT(
915  portNum < this->getNum_pingOut_OutputPorts(),
916  static_cast<AssertArg>(portNum)
917  );
918  return this->m_pingOut_OutputPort[portNum].isConnected();
919  }
920 
923  {
924  FW_ASSERT(
925  portNum < this->getNum_CmdStatus_OutputPorts(),
926  static_cast<AssertArg>(portNum)
927  );
929  }
930 
933  {
934  FW_ASSERT(
935  portNum < this->getNum_CmdReg_OutputPorts(),
936  static_cast<AssertArg>(portNum)
937  );
938  return this->m_CmdReg_OutputPort[portNum].isConnected();
939  }
940 
943  {
944  FW_ASSERT(
945  portNum < this->getNum_Tlm_OutputPorts(),
946  static_cast<AssertArg>(portNum)
947  );
948  return this->m_Tlm_OutputPort[portNum].isConnected();
949  }
950 
953  {
954  FW_ASSERT(
955  portNum < this->getNum_Time_OutputPorts(),
956  static_cast<AssertArg>(portNum)
957  );
958  return this->m_Time_OutputPort[portNum].isConnected();
959  }
960 
963  {
964  FW_ASSERT(
965  portNum < this->getNum_Log_OutputPorts(),
966  static_cast<AssertArg>(portNum)
967  );
968  return this->m_Log_OutputPort[portNum].isConnected();
969  }
970 
971 #if FW_ENABLE_TEXT_LOGGING == 1
972  bool CommandDispatcherComponentBase ::
973  isConnected_LogText_OutputPort(NATIVE_INT_TYPE portNum)
974  {
975  FW_ASSERT(
976  portNum < this->getNum_LogText_OutputPorts(),
977  static_cast<AssertArg>(portNum)
978  );
979  return this->m_LogText_OutputPort[portNum].isConnected();
980  }
981 #endif
982 
983  // ----------------------------------------------------------------------
984  // Calls for messages received on command input ports
985  // ----------------------------------------------------------------------
986 
989  Fw::PassiveComponentBase* callComp,
990  NATIVE_INT_TYPE portNum,
991  FwOpcodeType opCode,
992  U32 cmdSeq,
993  Fw::CmdArgBuffer &args
994  )
995  {
996 
997  // Select base class function based on opcode
998  FW_ASSERT(callComp);
1000  (CommandDispatcherComponentBase*) callComp;
1001 
1002  const U32 idBase = callComp->getIdBase();
1003  FW_ASSERT(opCode >= idBase, opCode, idBase);
1004  switch (opCode - idBase) {
1005 
1006  case OPCODE_CMD_NO_OP:
1007  compPtr->CMD_NO_OP_cmdHandlerBase(
1008  opCode,
1009  cmdSeq,
1010  args
1011  );
1012  break;
1013 
1016  opCode,
1017  cmdSeq,
1018  args
1019  );
1020  break;
1021 
1022  case OPCODE_CMD_TEST_CMD_1:
1024  opCode,
1025  cmdSeq,
1026  args
1027  );
1028  break;
1029 
1032  opCode,
1033  cmdSeq,
1034  args
1035  );
1036  break;
1037 
1038  default: {
1039  compPtr->cmdResponse_out(
1040  opCode,cmdSeq,
1042  );
1043  break;
1044  }
1045 
1046  }
1047 
1048  }
1049 
1050  void CommandDispatcherComponentBase ::
1051  cmdResponse_out(
1052  FwOpcodeType opCode,
1053  U32 cmdSeq,
1054  Fw::CommandResponse response
1055  )
1056  {
1057  FW_ASSERT(this->m_CmdStatus_OutputPort[0].isConnected());
1058  this->m_CmdStatus_OutputPort[0].invoke(opCode,cmdSeq,response);
1059  }
1060 
1061  // ----------------------------------------------------------------------
1062  // Base class command functions
1063  // ----------------------------------------------------------------------
1064 
1065  void CommandDispatcherComponentBase ::
1066  CMD_NO_OP_cmdHandlerBase(
1067  FwOpcodeType opCode,
1068  U32 cmdSeq,
1069  Fw::CmdArgBuffer &args
1070  )
1071  {
1072 
1073  // Call pre-message hook
1074  this->CMD_NO_OP_preMsgHook(opCode,cmdSeq);
1075 
1076  // Defer deserializing arguments to the message dispatcher
1077  // to avoid deserializing and reserializing just for IPC
1078  ComponentIpcSerializableBuffer msg;
1080 
1081  // Serialize for IPC
1082  _status = msg.serialize((NATIVE_INT_TYPE)CMD_CMD_NO_OP);
1083  FW_ASSERT (
1084  _status == Fw::FW_SERIALIZE_OK,
1085  static_cast<AssertArg>(_status)
1086  );
1087 
1088  // Fake port number to make message dequeue work
1089  NATIVE_INT_TYPE port = 0;
1090  _status = msg.serialize(port);
1091  FW_ASSERT (
1092  _status == Fw::FW_SERIALIZE_OK,
1093  static_cast<AssertArg>(_status)
1094  );
1095 
1096  _status = msg.serialize(opCode);
1097  FW_ASSERT (
1098  _status == Fw::FW_SERIALIZE_OK,
1099  static_cast<AssertArg>(_status)
1100  );
1101 
1102  _status = msg.serialize(cmdSeq);
1103  FW_ASSERT (
1104  _status == Fw::FW_SERIALIZE_OK,
1105  static_cast<AssertArg>(_status)
1106  );
1107 
1108  _status = msg.serialize(args);
1109  FW_ASSERT (
1110  _status == Fw::FW_SERIALIZE_OK,
1111  static_cast<AssertArg>(_status)
1112  );
1113 
1114  // send message
1115  Os::Queue::QueueBlocking _block =
1117  Os::Queue::QueueStatus qStatus =
1118  this->m_queue.send(msg, 0,_block);
1119  FW_ASSERT(
1120  qStatus == Os::Queue::QUEUE_OK,
1121  static_cast<AssertArg>(qStatus)
1122  );
1123 
1124  }
1125 
1126  void CommandDispatcherComponentBase::
1127  CMD_NO_OP_preMsgHook(
1128  FwOpcodeType opCode,
1129  U32 cmdSeq
1130  )
1131  {
1132  // Defaults to no-op; can be overridden
1133  }
1134 
1137  FwOpcodeType opCode,
1138  U32 cmdSeq,
1139  Fw::CmdArgBuffer &args
1140  )
1141  {
1142 
1143  // Call pre-message hook
1144  this->CMD_NO_OP_STRING_preMsgHook(opCode,cmdSeq);
1145 
1146  // Defer deserializing arguments to the message dispatcher
1147  // to avoid deserializing and reserializing just for IPC
1148  ComponentIpcSerializableBuffer msg;
1150 
1151  // Serialize for IPC
1152  _status = msg.serialize((NATIVE_INT_TYPE)CMD_CMD_NO_OP_STRING);
1153  FW_ASSERT (
1154  _status == Fw::FW_SERIALIZE_OK,
1155  static_cast<AssertArg>(_status)
1156  );
1157 
1158  // Fake port number to make message dequeue work
1159  NATIVE_INT_TYPE port = 0;
1160  _status = msg.serialize(port);
1161  FW_ASSERT (
1162  _status == Fw::FW_SERIALIZE_OK,
1163  static_cast<AssertArg>(_status)
1164  );
1165 
1166  _status = msg.serialize(opCode);
1167  FW_ASSERT (
1168  _status == Fw::FW_SERIALIZE_OK,
1169  static_cast<AssertArg>(_status)
1170  );
1171 
1172  _status = msg.serialize(cmdSeq);
1173  FW_ASSERT (
1174  _status == Fw::FW_SERIALIZE_OK,
1175  static_cast<AssertArg>(_status)
1176  );
1177 
1178  _status = msg.serialize(args);
1179  FW_ASSERT (
1180  _status == Fw::FW_SERIALIZE_OK,
1181  static_cast<AssertArg>(_status)
1182  );
1183 
1184  // send message
1185  Os::Queue::QueueBlocking _block =
1187  Os::Queue::QueueStatus qStatus =
1188  this->m_queue.send(msg, 0,_block);
1189  FW_ASSERT(
1190  qStatus == Os::Queue::QUEUE_OK,
1191  static_cast<AssertArg>(qStatus)
1192  );
1193 
1194  }
1195 
1198  FwOpcodeType opCode,
1199  U32 cmdSeq
1200  )
1201  {
1202  // Defaults to no-op; can be overridden
1203  }
1204 
1207  FwOpcodeType opCode,
1208  U32 cmdSeq,
1209  Fw::CmdArgBuffer &args
1210  )
1211  {
1212 
1213  // Call pre-message hook
1214  this->CMD_TEST_CMD_1_preMsgHook(opCode,cmdSeq);
1215 
1216  // Defer deserializing arguments to the message dispatcher
1217  // to avoid deserializing and reserializing just for IPC
1218  ComponentIpcSerializableBuffer msg;
1220 
1221  // Serialize for IPC
1222  _status = msg.serialize((NATIVE_INT_TYPE)CMD_CMD_TEST_CMD_1);
1223  FW_ASSERT (
1224  _status == Fw::FW_SERIALIZE_OK,
1225  static_cast<AssertArg>(_status)
1226  );
1227 
1228  // Fake port number to make message dequeue work
1229  NATIVE_INT_TYPE port = 0;
1230  _status = msg.serialize(port);
1231  FW_ASSERT (
1232  _status == Fw::FW_SERIALIZE_OK,
1233  static_cast<AssertArg>(_status)
1234  );
1235 
1236  _status = msg.serialize(opCode);
1237  FW_ASSERT (
1238  _status == Fw::FW_SERIALIZE_OK,
1239  static_cast<AssertArg>(_status)
1240  );
1241 
1242  _status = msg.serialize(cmdSeq);
1243  FW_ASSERT (
1244  _status == Fw::FW_SERIALIZE_OK,
1245  static_cast<AssertArg>(_status)
1246  );
1247 
1248  _status = msg.serialize(args);
1249  FW_ASSERT (
1250  _status == Fw::FW_SERIALIZE_OK,
1251  static_cast<AssertArg>(_status)
1252  );
1253 
1254  // send message
1255  Os::Queue::QueueBlocking _block =
1257  Os::Queue::QueueStatus qStatus =
1258  this->m_queue.send(msg, 0,_block);
1259  FW_ASSERT(
1260  qStatus == Os::Queue::QUEUE_OK,
1261  static_cast<AssertArg>(qStatus)
1262  );
1263 
1264  }
1265 
1268  FwOpcodeType opCode,
1269  U32 cmdSeq
1270  )
1271  {
1272  // Defaults to no-op; can be overridden
1273  }
1274 
1277  FwOpcodeType opCode,
1278  U32 cmdSeq,
1279  Fw::CmdArgBuffer &args
1280  )
1281  {
1282 
1283  // Call pre-message hook
1284  this->CMD_CLEAR_TRACKING_preMsgHook(opCode,cmdSeq);
1285 
1286  // Defer deserializing arguments to the message dispatcher
1287  // to avoid deserializing and reserializing just for IPC
1288  ComponentIpcSerializableBuffer msg;
1290 
1291  // Serialize for IPC
1292  _status = msg.serialize((NATIVE_INT_TYPE)CMD_CMD_CLEAR_TRACKING);
1293  FW_ASSERT (
1294  _status == Fw::FW_SERIALIZE_OK,
1295  static_cast<AssertArg>(_status)
1296  );
1297 
1298  // Fake port number to make message dequeue work
1299  NATIVE_INT_TYPE port = 0;
1300  _status = msg.serialize(port);
1301  FW_ASSERT (
1302  _status == Fw::FW_SERIALIZE_OK,
1303  static_cast<AssertArg>(_status)
1304  );
1305 
1306  _status = msg.serialize(opCode);
1307  FW_ASSERT (
1308  _status == Fw::FW_SERIALIZE_OK,
1309  static_cast<AssertArg>(_status)
1310  );
1311 
1312  _status = msg.serialize(cmdSeq);
1313  FW_ASSERT (
1314  _status == Fw::FW_SERIALIZE_OK,
1315  static_cast<AssertArg>(_status)
1316  );
1317 
1318  _status = msg.serialize(args);
1319  FW_ASSERT (
1320  _status == Fw::FW_SERIALIZE_OK,
1321  static_cast<AssertArg>(_status)
1322  );
1323 
1324  // send message
1325  Os::Queue::QueueBlocking _block =
1327  Os::Queue::QueueStatus qStatus =
1328  this->m_queue.send(msg, 0,_block);
1329  FW_ASSERT(
1330  qStatus == Os::Queue::QUEUE_OK,
1331  static_cast<AssertArg>(qStatus)
1332  );
1333 
1334  }
1335 
1338  FwOpcodeType opCode,
1339  U32 cmdSeq
1340  )
1341  {
1342  // Defaults to no-op; can be overridden
1343  }
1344 
1345  // ----------------------------------------------------------------------
1346  // Telemetry write functions
1347  // ----------------------------------------------------------------------
1348 
1349  void CommandDispatcherComponentBase ::
1350  tlmWrite_CommandsDispatched(U32 arg)
1351  {
1352 
1353  // Check to see if it is the first time
1354  if (not this->m_first_update_CommandsDispatched) {
1355  // Check to see if value has changed. If not, don't write it.
1356  if (arg == this->m_last_CommandsDispatched) {
1357  return;
1358  } else {
1359  this->m_last_CommandsDispatched = arg;
1360  }
1361  }
1362  else {
1363  this->m_first_update_CommandsDispatched = false;
1364  this->m_last_CommandsDispatched = arg;
1365  }
1366 
1367  if (this->m_Tlm_OutputPort[0].isConnected()) {
1368  Fw::Time _tlmTime;
1369  if (this->m_Time_OutputPort[0].isConnected()) {
1370  this->m_Time_OutputPort[0].invoke( _tlmTime);
1371  }
1372  Fw::TlmBuffer _tlmBuff;
1373  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1374  FW_ASSERT(
1375  _stat == Fw::FW_SERIALIZE_OK,
1376  static_cast<AssertArg>(_stat)
1377  );
1378 
1379  FwChanIdType _id;
1380 
1381  _id = this->getIdBase() + CHANNELID_COMMANDSDISPATCHED;
1382 
1383  this->m_Tlm_OutputPort[0].invoke(
1384  _id,
1385  _tlmTime,
1386  _tlmBuff
1387  );
1388  }
1389 
1390  }
1391 
1393  tlmWrite_CommandErrors(U32 arg)
1394  {
1395 
1396  // Check to see if it is the first time
1397  if (not this->m_first_update_CommandErrors) {
1398  // Check to see if value has changed. If not, don't write it.
1399  if (arg == this->m_last_CommandErrors) {
1400  return;
1401  } else {
1402  this->m_last_CommandErrors = arg;
1403  }
1404  }
1405  else {
1406  this->m_first_update_CommandErrors = false;
1407  this->m_last_CommandErrors = arg;
1408  }
1409 
1410  if (this->m_Tlm_OutputPort[0].isConnected()) {
1411  Fw::Time _tlmTime;
1412  if (this->m_Time_OutputPort[0].isConnected()) {
1413  this->m_Time_OutputPort[0].invoke( _tlmTime);
1414  }
1415  Fw::TlmBuffer _tlmBuff;
1416  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
1417  FW_ASSERT(
1418  _stat == Fw::FW_SERIALIZE_OK,
1419  static_cast<AssertArg>(_stat)
1420  );
1421 
1422  FwChanIdType _id;
1423 
1424  _id = this->getIdBase() + CHANNELID_COMMANDERRORS;
1425 
1426  this->m_Tlm_OutputPort[0].invoke(
1427  _id,
1428  _tlmTime,
1429  _tlmBuff
1430  );
1431  }
1432 
1433  }
1434 
1435  // ----------------------------------------------------------------------
1436  // Time
1437  // ----------------------------------------------------------------------
1438 
1439  Fw::Time CommandDispatcherComponentBase ::
1440  getTime(void)
1441  {
1442  if (this->m_Time_OutputPort[0].isConnected()) {
1443  Fw::Time _time;
1444  this->m_Time_OutputPort[0].invoke(_time);
1445  return _time;
1446  } else {
1447  return Fw::Time(TB_NONE,0,0);
1448  }
1449  }
1450 
1451  // ----------------------------------------------------------------------
1452  // Event handling functions
1453  // ----------------------------------------------------------------------
1454 
1455  void CommandDispatcherComponentBase ::
1456  log_DIAGNOSTIC_OpCodeRegistered(
1457  U32 Opcode, I32 port, I32 slot
1458  )
1459  {
1460 
1461 
1462  // Get the time
1463  Fw::Time _logTime;
1464  if (this->m_Time_OutputPort[0].isConnected()) {
1465  this->m_Time_OutputPort[0].invoke( _logTime);
1466  }
1467 
1468  FwEventIdType _id = static_cast<FwEventIdType>(0);
1469 
1470  _id = this->getIdBase() + EVENTID_OPCODEREGISTERED;
1471 
1472  // Emit the event on the log port
1473  if (this->m_Log_OutputPort[0].isConnected()) {
1474 
1475  Fw::LogBuffer _logBuff;
1477 
1478 #if FW_AMPCS_COMPATIBLE
1479  // Serialize the number of arguments
1480  _status = _logBuff.serialize(static_cast<U8>(3));
1481  FW_ASSERT(
1482  _status == Fw::FW_SERIALIZE_OK,
1483  static_cast<AssertArg>(_status)
1484  );
1485 #endif
1486 
1487 #if FW_AMPCS_COMPATIBLE
1488  // Serialize the argument size
1489  _status = _logBuff.serialize(
1490  static_cast<U8>(sizeof(Opcode))
1491  );
1492  FW_ASSERT(
1493  _status == Fw::FW_SERIALIZE_OK,
1494  static_cast<AssertArg>(_status)
1495  );
1496 #endif
1497 
1498  _status = _logBuff.serialize(Opcode);
1499  FW_ASSERT(
1500  _status == Fw::FW_SERIALIZE_OK,
1501  static_cast<AssertArg>(_status)
1502  );
1503 
1504 #if FW_AMPCS_COMPATIBLE
1505  // Serialize the argument size
1506  _status = _logBuff.serialize(
1507  static_cast<U8>(sizeof(port))
1508  );
1509  FW_ASSERT(
1510  _status == Fw::FW_SERIALIZE_OK,
1511  static_cast<AssertArg>(_status)
1512  );
1513 #endif
1514 
1515  _status = _logBuff.serialize(port);
1516  FW_ASSERT(
1517  _status == Fw::FW_SERIALIZE_OK,
1518  static_cast<AssertArg>(_status)
1519  );
1520 
1521 #if FW_AMPCS_COMPATIBLE
1522  // Serialize the argument size
1523  _status = _logBuff.serialize(
1524  static_cast<U8>(sizeof(slot))
1525  );
1526  FW_ASSERT(
1527  _status == Fw::FW_SERIALIZE_OK,
1528  static_cast<AssertArg>(_status)
1529  );
1530 #endif
1531 
1532  _status = _logBuff.serialize(slot);
1533  FW_ASSERT(
1534  _status == Fw::FW_SERIALIZE_OK,
1535  static_cast<AssertArg>(_status)
1536  );
1537 
1538 
1539  this->m_Log_OutputPort[0].invoke(
1540  _id,
1541  _logTime,Fw::LOG_DIAGNOSTIC,
1542  _logBuff
1543  );
1544 
1545  }
1546 
1547  // Emit the event on the text log port
1548 #if FW_ENABLE_TEXT_LOGGING
1549  if (this->m_LogText_OutputPort[0].isConnected()) {
1550 
1551 #if FW_OBJECT_NAMES == 1
1552  const char* _formatString =
1553  "(%s) %s: Opcode 0x%04X registered to port %d slot %d";
1554 #else
1555  const char* _formatString =
1556  "%s: Opcode 0x%04X registered to port %d slot %d";
1557 #endif
1558 
1559  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1560 
1561  (void) snprintf(
1562  _textBuffer,
1564  _formatString,
1565 #if FW_OBJECT_NAMES == 1
1566  this->m_objName,
1567 #endif
1568  "OpCodeRegistered "
1569  , Opcode
1570  , port
1571  , slot
1572  );
1573 
1574  // Null terminate
1575  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1576  Fw::TextLogString _logString = _textBuffer;
1577  this->m_LogText_OutputPort[0].invoke(
1578  _id,
1579  _logTime,Fw::TEXT_LOG_DIAGNOSTIC,
1580  _logString
1581  );
1582 
1583  }
1584 #endif
1585 
1586  }
1587 
1588 
1591  U32 Opcode, I32 port
1592  )
1593  {
1594 
1595 
1596  // Get the time
1597  Fw::Time _logTime;
1598  if (this->m_Time_OutputPort[0].isConnected()) {
1599  this->m_Time_OutputPort[0].invoke( _logTime);
1600  }
1601 
1602  FwEventIdType _id = static_cast<FwEventIdType>(0);
1603 
1604  _id = this->getIdBase() + EVENTID_OPCODEDISPATCHED;
1605 
1606  // Emit the event on the log port
1607  if (this->m_Log_OutputPort[0].isConnected()) {
1608 
1609  Fw::LogBuffer _logBuff;
1611 
1612 #if FW_AMPCS_COMPATIBLE
1613  // Serialize the number of arguments
1614  _status = _logBuff.serialize(static_cast<U8>(2));
1615  FW_ASSERT(
1616  _status == Fw::FW_SERIALIZE_OK,
1617  static_cast<AssertArg>(_status)
1618  );
1619 #endif
1620 
1621 #if FW_AMPCS_COMPATIBLE
1622  // Serialize the argument size
1623  _status = _logBuff.serialize(
1624  static_cast<U8>(sizeof(Opcode))
1625  );
1626  FW_ASSERT(
1627  _status == Fw::FW_SERIALIZE_OK,
1628  static_cast<AssertArg>(_status)
1629  );
1630 #endif
1631 
1632  _status = _logBuff.serialize(Opcode);
1633  FW_ASSERT(
1634  _status == Fw::FW_SERIALIZE_OK,
1635  static_cast<AssertArg>(_status)
1636  );
1637 
1638 #if FW_AMPCS_COMPATIBLE
1639  // Serialize the argument size
1640  _status = _logBuff.serialize(
1641  static_cast<U8>(sizeof(port))
1642  );
1643  FW_ASSERT(
1644  _status == Fw::FW_SERIALIZE_OK,
1645  static_cast<AssertArg>(_status)
1646  );
1647 #endif
1648 
1649  _status = _logBuff.serialize(port);
1650  FW_ASSERT(
1651  _status == Fw::FW_SERIALIZE_OK,
1652  static_cast<AssertArg>(_status)
1653  );
1654 
1655 
1656  this->m_Log_OutputPort[0].invoke(
1657  _id,
1658  _logTime,Fw::LOG_COMMAND,
1659  _logBuff
1660  );
1661 
1662  }
1663 
1664  // Emit the event on the text log port
1665 #if FW_ENABLE_TEXT_LOGGING
1666  if (this->m_LogText_OutputPort[0].isConnected()) {
1667 
1668 #if FW_OBJECT_NAMES == 1
1669  const char* _formatString =
1670  "(%s) %s: Opcode 0x%04X dispatched to port %d";
1671 #else
1672  const char* _formatString =
1673  "%s: Opcode 0x%04X dispatched to port %d";
1674 #endif
1675 
1676  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1677 
1678  (void) snprintf(
1679  _textBuffer,
1681  _formatString,
1682 #if FW_OBJECT_NAMES == 1
1683  this->m_objName,
1684 #endif
1685  "OpCodeDispatched "
1686  , Opcode
1687  , port
1688  );
1689 
1690  // Null terminate
1691  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1692  Fw::TextLogString _logString = _textBuffer;
1693  this->m_LogText_OutputPort[0].invoke(
1694  _id,
1695  _logTime,Fw::TEXT_LOG_COMMAND,
1696  _logString
1697  );
1698 
1699  }
1700 #endif
1701 
1702  }
1703 
1704 
1707  U32 Opcode
1708  )
1709  {
1710 
1711 
1712  // Get the time
1713  Fw::Time _logTime;
1714  if (this->m_Time_OutputPort[0].isConnected()) {
1715  this->m_Time_OutputPort[0].invoke( _logTime);
1716  }
1717 
1718  FwEventIdType _id = static_cast<FwEventIdType>(0);
1719 
1720  _id = this->getIdBase() + EVENTID_OPCODECOMPLETED;
1721 
1722  // Emit the event on the log port
1723  if (this->m_Log_OutputPort[0].isConnected()) {
1724 
1725  Fw::LogBuffer _logBuff;
1727 
1728 #if FW_AMPCS_COMPATIBLE
1729  // Serialize the number of arguments
1730  _status = _logBuff.serialize(static_cast<U8>(1));
1731  FW_ASSERT(
1732  _status == Fw::FW_SERIALIZE_OK,
1733  static_cast<AssertArg>(_status)
1734  );
1735 #endif
1736 
1737 #if FW_AMPCS_COMPATIBLE
1738  // Serialize the argument size
1739  _status = _logBuff.serialize(
1740  static_cast<U8>(sizeof(Opcode))
1741  );
1742  FW_ASSERT(
1743  _status == Fw::FW_SERIALIZE_OK,
1744  static_cast<AssertArg>(_status)
1745  );
1746 #endif
1747 
1748  _status = _logBuff.serialize(Opcode);
1749  FW_ASSERT(
1750  _status == Fw::FW_SERIALIZE_OK,
1751  static_cast<AssertArg>(_status)
1752  );
1753 
1754 
1755  this->m_Log_OutputPort[0].invoke(
1756  _id,
1757  _logTime,Fw::LOG_COMMAND,
1758  _logBuff
1759  );
1760 
1761  }
1762 
1763  // Emit the event on the text log port
1764 #if FW_ENABLE_TEXT_LOGGING
1765  if (this->m_LogText_OutputPort[0].isConnected()) {
1766 
1767 #if FW_OBJECT_NAMES == 1
1768  const char* _formatString =
1769  "(%s) %s: Opcode 0x%04X completed";
1770 #else
1771  const char* _formatString =
1772  "%s: Opcode 0x%04X completed";
1773 #endif
1774 
1775  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1776 
1777  (void) snprintf(
1778  _textBuffer,
1780  _formatString,
1781 #if FW_OBJECT_NAMES == 1
1782  this->m_objName,
1783 #endif
1784  "OpCodeCompleted "
1785  , Opcode
1786  );
1787 
1788  // Null terminate
1789  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1790  Fw::TextLogString _logString = _textBuffer;
1791  this->m_LogText_OutputPort[0].invoke(
1792  _id,
1793  _logTime,Fw::TEXT_LOG_COMMAND,
1794  _logString
1795  );
1796 
1797  }
1798 #endif
1799 
1800  }
1801 
1802 
1805  U32 Opcode, ErrorResponse error
1806  )
1807  {
1808 
1809 
1810  // Get the time
1811  Fw::Time _logTime;
1812  if (this->m_Time_OutputPort[0].isConnected()) {
1813  this->m_Time_OutputPort[0].invoke( _logTime);
1814  }
1815 
1816  FwEventIdType _id = static_cast<FwEventIdType>(0);
1817 
1818  _id = this->getIdBase() + EVENTID_OPCODEERROR;
1819 
1820  // Emit the event on the log port
1821  if (this->m_Log_OutputPort[0].isConnected()) {
1822 
1823  Fw::LogBuffer _logBuff;
1825 
1826 #if FW_AMPCS_COMPATIBLE
1827  // Serialize the number of arguments
1828  _status = _logBuff.serialize(static_cast<U8>(2));
1829  FW_ASSERT(
1830  _status == Fw::FW_SERIALIZE_OK,
1831  static_cast<AssertArg>(_status)
1832  );
1833 #endif
1834 
1835 #if FW_AMPCS_COMPATIBLE
1836  // Serialize the argument size
1837  _status = _logBuff.serialize(
1838  static_cast<U8>(sizeof(Opcode))
1839  );
1840  FW_ASSERT(
1841  _status == Fw::FW_SERIALIZE_OK,
1842  static_cast<AssertArg>(_status)
1843  );
1844 #endif
1845 
1846  _status = _logBuff.serialize(Opcode);
1847  FW_ASSERT(
1848  _status == Fw::FW_SERIALIZE_OK,
1849  static_cast<AssertArg>(_status)
1850  );
1851 
1852 #if FW_AMPCS_COMPATIBLE
1853  // Serialize the argument size
1854  _status = _logBuff.serialize(static_cast<U8>(sizeof(FwEnumStoreType)));
1855  FW_ASSERT(
1856  _status == Fw::FW_SERIALIZE_OK,
1857  static_cast<AssertArg>(_status)
1858  );
1859 #endif
1860 
1861  _status = _logBuff.serialize(
1862  static_cast<FwEnumStoreType>(error)
1863  );
1864  FW_ASSERT(
1865  _status == Fw::FW_SERIALIZE_OK,
1866  static_cast<AssertArg>(_status)
1867  );
1868 
1869 
1870  this->m_Log_OutputPort[0].invoke(
1871  _id,
1872  _logTime,Fw::LOG_WARNING_HI,
1873  _logBuff
1874  );
1875 
1876  }
1877 
1878  // Emit the event on the text log port
1879 #if FW_ENABLE_TEXT_LOGGING
1880  if (this->m_LogText_OutputPort[0].isConnected()) {
1881 
1882 #if FW_OBJECT_NAMES == 1
1883  const char* _formatString =
1884  "(%s) %s: Opcode 0x%04X completed with error %d ";
1885 #else
1886  const char* _formatString =
1887  "%s: Opcode 0x%04X completed with error %d ";
1888 #endif
1889 
1890  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1891 
1892  (void) snprintf(
1893  _textBuffer,
1895  _formatString,
1896 #if FW_OBJECT_NAMES == 1
1897  this->m_objName,
1898 #endif
1899  "OpCodeError "
1900  , Opcode
1901  , error
1902  );
1903 
1904  // Null terminate
1905  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
1906  Fw::TextLogString _logString = _textBuffer;
1907  this->m_LogText_OutputPort[0].invoke(
1908  _id,
1909  _logTime,Fw::TEXT_LOG_WARNING_HI,
1910  _logString
1911  );
1912 
1913  }
1914 #endif
1915 
1916  }
1917 
1918 
1922  )
1923  {
1924 
1925 
1926  // Get the time
1927  Fw::Time _logTime;
1928  if (this->m_Time_OutputPort[0].isConnected()) {
1929  this->m_Time_OutputPort[0].invoke( _logTime);
1930  }
1931 
1932  FwEventIdType _id = static_cast<FwEventIdType>(0);
1933 
1934  _id = this->getIdBase() + EVENTID_MALFORMEDCOMMAND;
1935 
1936  // Emit the event on the log port
1937  if (this->m_Log_OutputPort[0].isConnected()) {
1938 
1939  Fw::LogBuffer _logBuff;
1941 
1942 #if FW_AMPCS_COMPATIBLE
1943  // Serialize the number of arguments
1944  _status = _logBuff.serialize(static_cast<U8>(1));
1945  FW_ASSERT(
1946  _status == Fw::FW_SERIALIZE_OK,
1947  static_cast<AssertArg>(_status)
1948  );
1949 #endif
1950 
1951 #if FW_AMPCS_COMPATIBLE
1952  // Serialize the argument size
1953  _status = _logBuff.serialize(static_cast<U8>(sizeof(FwEnumStoreType)));
1954  FW_ASSERT(
1955  _status == Fw::FW_SERIALIZE_OK,
1956  static_cast<AssertArg>(_status)
1957  );
1958 #endif
1959 
1960  _status = _logBuff.serialize(
1961  static_cast<FwEnumStoreType>(Status)
1962  );
1963  FW_ASSERT(
1964  _status == Fw::FW_SERIALIZE_OK,
1965  static_cast<AssertArg>(_status)
1966  );
1967 
1968 
1969  this->m_Log_OutputPort[0].invoke(
1970  _id,
1971  _logTime,Fw::LOG_WARNING_HI,
1972  _logBuff
1973  );
1974 
1975  }
1976 
1977  // Emit the event on the text log port
1978 #if FW_ENABLE_TEXT_LOGGING
1979  if (this->m_LogText_OutputPort[0].isConnected()) {
1980 
1981 #if FW_OBJECT_NAMES == 1
1982  const char* _formatString =
1983  "(%s) %s: Received malformed command packet. Status: %d";
1984 #else
1985  const char* _formatString =
1986  "%s: Received malformed command packet. Status: %d";
1987 #endif
1988 
1989  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
1990 
1991  (void) snprintf(
1992  _textBuffer,
1994  _formatString,
1995 #if FW_OBJECT_NAMES == 1
1996  this->m_objName,
1997 #endif
1998  "MalformedCommand "
1999  , Status
2000  );
2001 
2002  // Null terminate
2003  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2004  Fw::TextLogString _logString = _textBuffer;
2005  this->m_LogText_OutputPort[0].invoke(
2006  _id,
2007  _logTime,Fw::TEXT_LOG_WARNING_HI,
2008  _logString
2009  );
2010 
2011  }
2012 #endif
2013 
2014  }
2015 
2016 
2019  U32 Opcode
2020  )
2021  {
2022 
2023 
2024  // Get the time
2025  Fw::Time _logTime;
2026  if (this->m_Time_OutputPort[0].isConnected()) {
2027  this->m_Time_OutputPort[0].invoke( _logTime);
2028  }
2029 
2030  FwEventIdType _id = static_cast<FwEventIdType>(0);
2031 
2032  _id = this->getIdBase() + EVENTID_INVALIDCOMMAND;
2033 
2034  // Emit the event on the log port
2035  if (this->m_Log_OutputPort[0].isConnected()) {
2036 
2037  Fw::LogBuffer _logBuff;
2039 
2040 #if FW_AMPCS_COMPATIBLE
2041  // Serialize the number of arguments
2042  _status = _logBuff.serialize(static_cast<U8>(1));
2043  FW_ASSERT(
2044  _status == Fw::FW_SERIALIZE_OK,
2045  static_cast<AssertArg>(_status)
2046  );
2047 #endif
2048 
2049 #if FW_AMPCS_COMPATIBLE
2050  // Serialize the argument size
2051  _status = _logBuff.serialize(
2052  static_cast<U8>(sizeof(Opcode))
2053  );
2054  FW_ASSERT(
2055  _status == Fw::FW_SERIALIZE_OK,
2056  static_cast<AssertArg>(_status)
2057  );
2058 #endif
2059 
2060  _status = _logBuff.serialize(Opcode);
2061  FW_ASSERT(
2062  _status == Fw::FW_SERIALIZE_OK,
2063  static_cast<AssertArg>(_status)
2064  );
2065 
2066 
2067  this->m_Log_OutputPort[0].invoke(
2068  _id,
2069  _logTime,Fw::LOG_WARNING_HI,
2070  _logBuff
2071  );
2072 
2073  }
2074 
2075  // Emit the event on the text log port
2076 #if FW_ENABLE_TEXT_LOGGING
2077  if (this->m_LogText_OutputPort[0].isConnected()) {
2078 
2079 #if FW_OBJECT_NAMES == 1
2080  const char* _formatString =
2081  "(%s) %s: Invalid opcode 0x%04X received.";
2082 #else
2083  const char* _formatString =
2084  "%s: Invalid opcode 0x%04X received.";
2085 #endif
2086 
2087  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
2088 
2089  (void) snprintf(
2090  _textBuffer,
2092  _formatString,
2093 #if FW_OBJECT_NAMES == 1
2094  this->m_objName,
2095 #endif
2096  "InvalidCommand "
2097  , Opcode
2098  );
2099 
2100  // Null terminate
2101  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2102  Fw::TextLogString _logString = _textBuffer;
2103  this->m_LogText_OutputPort[0].invoke(
2104  _id,
2105  _logTime,Fw::TEXT_LOG_WARNING_HI,
2106  _logString
2107  );
2108 
2109  }
2110 #endif
2111 
2112  }
2113 
2114 
2117  U32 Opcode
2118  )
2119  {
2120 
2121 
2122  // Get the time
2123  Fw::Time _logTime;
2124  if (this->m_Time_OutputPort[0].isConnected()) {
2125  this->m_Time_OutputPort[0].invoke( _logTime);
2126  }
2127 
2128  FwEventIdType _id = static_cast<FwEventIdType>(0);
2129 
2130  _id = this->getIdBase() + EVENTID_TOOMANYCOMMANDS;
2131 
2132  // Emit the event on the log port
2133  if (this->m_Log_OutputPort[0].isConnected()) {
2134 
2135  Fw::LogBuffer _logBuff;
2137 
2138 #if FW_AMPCS_COMPATIBLE
2139  // Serialize the number of arguments
2140  _status = _logBuff.serialize(static_cast<U8>(1));
2141  FW_ASSERT(
2142  _status == Fw::FW_SERIALIZE_OK,
2143  static_cast<AssertArg>(_status)
2144  );
2145 #endif
2146 
2147 #if FW_AMPCS_COMPATIBLE
2148  // Serialize the argument size
2149  _status = _logBuff.serialize(
2150  static_cast<U8>(sizeof(Opcode))
2151  );
2152  FW_ASSERT(
2153  _status == Fw::FW_SERIALIZE_OK,
2154  static_cast<AssertArg>(_status)
2155  );
2156 #endif
2157 
2158  _status = _logBuff.serialize(Opcode);
2159  FW_ASSERT(
2160  _status == Fw::FW_SERIALIZE_OK,
2161  static_cast<AssertArg>(_status)
2162  );
2163 
2164 
2165  this->m_Log_OutputPort[0].invoke(
2166  _id,
2167  _logTime,Fw::LOG_WARNING_HI,
2168  _logBuff
2169  );
2170 
2171  }
2172 
2173  // Emit the event on the text log port
2174 #if FW_ENABLE_TEXT_LOGGING
2175  if (this->m_LogText_OutputPort[0].isConnected()) {
2176 
2177 #if FW_OBJECT_NAMES == 1
2178  const char* _formatString =
2179  "(%s) %s: Too many outstanding commands. opcode=0x%04X";
2180 #else
2181  const char* _formatString =
2182  "%s: Too many outstanding commands. opcode=0x%04X";
2183 #endif
2184 
2185  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
2186 
2187  (void) snprintf(
2188  _textBuffer,
2190  _formatString,
2191 #if FW_OBJECT_NAMES == 1
2192  this->m_objName,
2193 #endif
2194  "TooManyCommands "
2195  , Opcode
2196  );
2197 
2198  // Null terminate
2199  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2200  Fw::TextLogString _logString = _textBuffer;
2201  this->m_LogText_OutputPort[0].invoke(
2202  _id,
2203  _logTime,Fw::TEXT_LOG_WARNING_HI,
2204  _logString
2205  );
2206 
2207  }
2208 #endif
2209 
2210  }
2211 
2212 
2215  void
2216  )
2217  {
2218 
2219 
2220  // Get the time
2221  Fw::Time _logTime;
2222  if (this->m_Time_OutputPort[0].isConnected()) {
2223  this->m_Time_OutputPort[0].invoke( _logTime);
2224  }
2225 
2226  FwEventIdType _id = static_cast<FwEventIdType>(0);
2227 
2228  _id = this->getIdBase() + EVENTID_NOOPRECEIVED;
2229 
2230  // Emit the event on the log port
2231  if (this->m_Log_OutputPort[0].isConnected()) {
2232 
2233  Fw::LogBuffer _logBuff;
2234 #if FW_AMPCS_COMPATIBLE
2235  // for AMPCS, need to encode zero arguments
2237  _zero_status = _logBuff.serialize(static_cast<U8>(0));
2238  FW_ASSERT(
2239  _zero_status == Fw::FW_SERIALIZE_OK,
2240  static_cast<AssertArg>(_zero_status)
2241  );
2242 #endif
2243 
2244 
2245  this->m_Log_OutputPort[0].invoke(
2246  _id,
2247  _logTime,Fw::LOG_ACTIVITY_HI,
2248  _logBuff
2249  );
2250 
2251  }
2252 
2253  // Emit the event on the text log port
2254 #if FW_ENABLE_TEXT_LOGGING
2255  if (this->m_LogText_OutputPort[0].isConnected()) {
2256 
2257 #if FW_OBJECT_NAMES == 1
2258  const char* _formatString =
2259  "(%s) %s: Received a NO-OP command";
2260 #else
2261  const char* _formatString =
2262  "%s: Received a NO-OP command";
2263 #endif
2264 
2265  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
2266 
2267  (void) snprintf(
2268  _textBuffer,
2270  _formatString,
2271 #if FW_OBJECT_NAMES == 1
2272  this->m_objName,
2273 #endif
2274  "NoOpReceived "
2275  );
2276 
2277  // Null terminate
2278  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2279  Fw::TextLogString _logString = _textBuffer;
2280  this->m_LogText_OutputPort[0].invoke(
2281  _id,
2282  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
2283  _logString
2284  );
2285 
2286  }
2287 #endif
2288 
2289  }
2290 
2291 
2294  Fw::LogStringArg& message
2295  )
2296  {
2297 
2298 
2299  // Get the time
2300  Fw::Time _logTime;
2301  if (this->m_Time_OutputPort[0].isConnected()) {
2302  this->m_Time_OutputPort[0].invoke( _logTime);
2303  }
2304 
2305  FwEventIdType _id = static_cast<FwEventIdType>(0);
2306 
2307  _id = this->getIdBase() + EVENTID_NOOPSTRINGRECEIVED;
2308 
2309  // Emit the event on the log port
2310  if (this->m_Log_OutputPort[0].isConnected()) {
2311 
2312  Fw::LogBuffer _logBuff;
2314 
2315 #if FW_AMPCS_COMPATIBLE
2316  // Serialize the number of arguments
2317  _status = _logBuff.serialize(static_cast<U8>(1));
2318  FW_ASSERT(
2319  _status == Fw::FW_SERIALIZE_OK,
2320  static_cast<AssertArg>(_status)
2321  );
2322 #endif
2323 
2324  message.setMaxSerialize(40);
2325  _status = _logBuff.serialize(message);
2326  FW_ASSERT(
2327  _status == Fw::FW_SERIALIZE_OK,
2328  static_cast<AssertArg>(_status)
2329  );
2330 
2331 
2332  this->m_Log_OutputPort[0].invoke(
2333  _id,
2334  _logTime,Fw::LOG_ACTIVITY_HI,
2335  _logBuff
2336  );
2337 
2338  }
2339 
2340  // Emit the event on the text log port
2341 #if FW_ENABLE_TEXT_LOGGING
2342  if (this->m_LogText_OutputPort[0].isConnected()) {
2343 
2344 #if FW_OBJECT_NAMES == 1
2345  const char* _formatString =
2346  "(%s) %s: Received a NO-OP string=%s";
2347 #else
2348  const char* _formatString =
2349  "%s: Received a NO-OP string=%s";
2350 #endif
2351 
2352  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
2353 
2354  (void) snprintf(
2355  _textBuffer,
2357  _formatString,
2358 #if FW_OBJECT_NAMES == 1
2359  this->m_objName,
2360 #endif
2361  "NoOpStringReceived "
2362  , message.toChar()
2363  );
2364 
2365  // Null terminate
2366  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2367  Fw::TextLogString _logString = _textBuffer;
2368  this->m_LogText_OutputPort[0].invoke(
2369  _id,
2370  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
2371  _logString
2372  );
2373 
2374  }
2375 #endif
2376 
2377  }
2378 
2379 
2382  I32 arg1, F32 arg2, U8 arg3
2383  )
2384  {
2385 
2386 
2387  // Get the time
2388  Fw::Time _logTime;
2389  if (this->m_Time_OutputPort[0].isConnected()) {
2390  this->m_Time_OutputPort[0].invoke( _logTime);
2391  }
2392 
2393  FwEventIdType _id = static_cast<FwEventIdType>(0);
2394 
2395  _id = this->getIdBase() + EVENTID_TESTCMD1ARGS;
2396 
2397  // Emit the event on the log port
2398  if (this->m_Log_OutputPort[0].isConnected()) {
2399 
2400  Fw::LogBuffer _logBuff;
2402 
2403 #if FW_AMPCS_COMPATIBLE
2404  // Serialize the number of arguments
2405  _status = _logBuff.serialize(static_cast<U8>(3));
2406  FW_ASSERT(
2407  _status == Fw::FW_SERIALIZE_OK,
2408  static_cast<AssertArg>(_status)
2409  );
2410 #endif
2411 
2412 #if FW_AMPCS_COMPATIBLE
2413  // Serialize the argument size
2414  _status = _logBuff.serialize(
2415  static_cast<U8>(sizeof(arg1))
2416  );
2417  FW_ASSERT(
2418  _status == Fw::FW_SERIALIZE_OK,
2419  static_cast<AssertArg>(_status)
2420  );
2421 #endif
2422 
2423  _status = _logBuff.serialize(arg1);
2424  FW_ASSERT(
2425  _status == Fw::FW_SERIALIZE_OK,
2426  static_cast<AssertArg>(_status)
2427  );
2428 
2429 #if FW_AMPCS_COMPATIBLE
2430  // Serialize the argument size
2431  _status = _logBuff.serialize(
2432  static_cast<U8>(sizeof(arg2))
2433  );
2434  FW_ASSERT(
2435  _status == Fw::FW_SERIALIZE_OK,
2436  static_cast<AssertArg>(_status)
2437  );
2438 #endif
2439 
2440  _status = _logBuff.serialize(arg2);
2441  FW_ASSERT(
2442  _status == Fw::FW_SERIALIZE_OK,
2443  static_cast<AssertArg>(_status)
2444  );
2445 
2446 #if FW_AMPCS_COMPATIBLE
2447  // Serialize the argument size
2448  _status = _logBuff.serialize(
2449  static_cast<U8>(sizeof(arg3))
2450  );
2451  FW_ASSERT(
2452  _status == Fw::FW_SERIALIZE_OK,
2453  static_cast<AssertArg>(_status)
2454  );
2455 #endif
2456 
2457  _status = _logBuff.serialize(arg3);
2458  FW_ASSERT(
2459  _status == Fw::FW_SERIALIZE_OK,
2460  static_cast<AssertArg>(_status)
2461  );
2462 
2463 
2464  this->m_Log_OutputPort[0].invoke(
2465  _id,
2466  _logTime,Fw::LOG_ACTIVITY_HI,
2467  _logBuff
2468  );
2469 
2470  }
2471 
2472  // Emit the event on the text log port
2473 #if FW_ENABLE_TEXT_LOGGING
2474  if (this->m_LogText_OutputPort[0].isConnected()) {
2475 
2476 #if FW_OBJECT_NAMES == 1
2477  const char* _formatString =
2478  "(%s) %s: TEST_CMD_1 args: I32: %d, F32: %f, U8: %d";
2479 #else
2480  const char* _formatString =
2481  "%s: TEST_CMD_1 args: I32: %d, F32: %f, U8: %d";
2482 #endif
2483 
2484  char _textBuffer[FW_LOG_TEXT_BUFFER_SIZE];
2485 
2486  (void) snprintf(
2487  _textBuffer,
2489  _formatString,
2490 #if FW_OBJECT_NAMES == 1
2491  this->m_objName,
2492 #endif
2493  "TestCmd1Args "
2494  , arg1
2495  , arg2
2496  , arg3
2497  );
2498 
2499  // Null terminate
2500  _textBuffer[FW_LOG_TEXT_BUFFER_SIZE-1] = 0;
2501  Fw::TextLogString _logString = _textBuffer;
2502  this->m_LogText_OutputPort[0].invoke(
2503  _id,
2504  _logTime,Fw::TEXT_LOG_ACTIVITY_HI,
2505  _logString
2506  );
2507 
2508  }
2509 #endif
2510 
2511  }
2512 
2513 
2514  // ----------------------------------------------------------------------
2515  // Mutex functions for guarded ports
2516  // ----------------------------------------------------------------------
2517 
2518  void CommandDispatcherComponentBase ::
2519  lock(void)
2520  {
2521  this->m_guardedPortMutex.lock();
2522  }
2523 
2525  unLock(void)
2526  {
2527  this->m_guardedPortMutex.unLock();
2528  }
2529 
2530  // ----------------------------------------------------------------------
2531  // Calls for invocations received on typed input ports
2532  // ----------------------------------------------------------------------
2533 
2534  void CommandDispatcherComponentBase ::
2535  m_p_compCmdReg_in(
2536  Fw::PassiveComponentBase* callComp,
2537  NATIVE_INT_TYPE portNum,
2538  FwOpcodeType opCode
2539  )
2540  {
2541  FW_ASSERT(callComp);
2543  (CommandDispatcherComponentBase*) callComp;
2544  compPtr->compCmdReg_handlerBase(portNum, opCode);
2545  }
2546 
2549  Fw::PassiveComponentBase* callComp,
2550  NATIVE_INT_TYPE portNum,
2551  FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response
2552  )
2553  {
2554  FW_ASSERT(callComp);
2556  (CommandDispatcherComponentBase*) callComp;
2558  }
2559 
2562  Fw::PassiveComponentBase* callComp,
2563  NATIVE_INT_TYPE portNum,
2564  Fw::ComBuffer &data, U32 context
2565  )
2566  {
2567  FW_ASSERT(callComp);
2569  (CommandDispatcherComponentBase*) callComp;
2570  compPtr->seqCmdBuff_handlerBase(portNum, data, context);
2571  }
2572 
2575  Fw::PassiveComponentBase* callComp,
2576  NATIVE_INT_TYPE portNum,
2577  U32 key
2578  )
2579  {
2580  FW_ASSERT(callComp);
2582  (CommandDispatcherComponentBase*) callComp;
2583  compPtr->pingIn_handlerBase(portNum, key);
2584  }
2585 
2586  // ----------------------------------------------------------------------
2587  // Port handler base-class functions for typed input ports
2588  // ----------------------------------------------------------------------
2589 
2590  void CommandDispatcherComponentBase ::
2591  compCmdReg_handlerBase(
2592  NATIVE_INT_TYPE portNum,
2593  FwOpcodeType opCode
2594  )
2595  {
2596 
2597  // Make sure port number is valid
2598  FW_ASSERT(portNum < this->getNum_compCmdReg_InputPorts(),static_cast<AssertArg>(portNum));
2599 
2600  // Lock guard mutex before calling
2601  this->lock();
2602 
2603  // Down call to pure virtual handler method implemented in Impl class
2604  this->compCmdReg_handler(portNum, opCode);
2605 
2606  // Unlock guard mutex
2607  this->unLock();
2608 
2609  }
2610 
2613  NATIVE_INT_TYPE portNum,
2614  FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response
2615  )
2616  {
2617 
2618  // Make sure port number is valid
2619  FW_ASSERT(portNum < this->getNum_compCmdStat_InputPorts(),static_cast<AssertArg>(portNum));
2620 
2621  // Call pre-message hook
2622  compCmdStat_preMsgHook(
2623  portNum,
2625  );
2626 
2627  ComponentIpcSerializableBuffer msg;
2629 
2630  _status = msg.serialize(
2631  static_cast<NATIVE_INT_TYPE>(COMPCMDSTAT_CMDRESPONSE)
2632  );
2633  FW_ASSERT (
2634  _status == Fw::FW_SERIALIZE_OK,
2635  static_cast<AssertArg>(_status)
2636  );
2637 
2638  _status = msg.serialize(portNum);
2639  FW_ASSERT (
2640  _status == Fw::FW_SERIALIZE_OK,
2641  static_cast<AssertArg>(_status)
2642  );
2643 
2644  // Serialize argument opCode
2645  _status = msg.serialize(opCode);
2646  FW_ASSERT(
2647  _status == Fw::FW_SERIALIZE_OK,
2648  static_cast<AssertArg>(_status)
2649  );
2650 
2651  // Serialize argument cmdSeq
2652  _status = msg.serialize(cmdSeq);
2653  FW_ASSERT(
2654  _status == Fw::FW_SERIALIZE_OK,
2655  static_cast<AssertArg>(_status)
2656  );
2657 
2658  // Serialize argument response
2659  _status = msg.serialize(static_cast<FwEnumStoreType>(response));
2660  FW_ASSERT(
2661  _status == Fw::FW_SERIALIZE_OK,
2662  static_cast<AssertArg>(_status)
2663  );
2664 
2665 
2666  // send message
2667  Os::Queue::QueueBlocking _block =
2669  Os::Queue::QueueStatus qStatus =
2670  this->m_queue.send(msg, 0,_block);
2671  FW_ASSERT(
2672  qStatus == Os::Queue::QUEUE_OK,
2673  static_cast<AssertArg>(qStatus)
2674  );
2675 
2676  }
2677 
2680  NATIVE_INT_TYPE portNum,
2681  Fw::ComBuffer &data, U32 context
2682  )
2683  {
2684 
2685  // Make sure port number is valid
2686  FW_ASSERT(portNum < this->getNum_seqCmdBuff_InputPorts(),static_cast<AssertArg>(portNum));
2687 
2688  // Call pre-message hook
2690  portNum,
2691  data, context
2692  );
2693 
2694  ComponentIpcSerializableBuffer msg;
2696 
2697  _status = msg.serialize(
2698  static_cast<NATIVE_INT_TYPE>(SEQCMDBUFF_COM)
2699  );
2700  FW_ASSERT (
2701  _status == Fw::FW_SERIALIZE_OK,
2702  static_cast<AssertArg>(_status)
2703  );
2704 
2705  _status = msg.serialize(portNum);
2706  FW_ASSERT (
2707  _status == Fw::FW_SERIALIZE_OK,
2708  static_cast<AssertArg>(_status)
2709  );
2710 
2711  // Serialize argument data
2712  _status = msg.serialize(data);
2713  FW_ASSERT(
2714  _status == Fw::FW_SERIALIZE_OK,
2715  static_cast<AssertArg>(_status)
2716  );
2717 
2718  // Serialize argument context
2719  _status = msg.serialize(context);
2720  FW_ASSERT(
2721  _status == Fw::FW_SERIALIZE_OK,
2722  static_cast<AssertArg>(_status)
2723  );
2724 
2725 
2726  // send message
2727  Os::Queue::QueueBlocking _block =
2729  Os::Queue::QueueStatus qStatus =
2730  this->m_queue.send(msg, 0,_block);
2731  FW_ASSERT(
2732  qStatus == Os::Queue::QUEUE_OK,
2733  static_cast<AssertArg>(qStatus)
2734  );
2735 
2736  }
2737 
2740  NATIVE_INT_TYPE portNum,
2741  U32 key
2742  )
2743  {
2744 
2745  // Make sure port number is valid
2746  FW_ASSERT(portNum < this->getNum_pingIn_InputPorts(),static_cast<AssertArg>(portNum));
2747 
2748  // Call pre-message hook
2750  portNum,
2751  key
2752  );
2753 
2754  ComponentIpcSerializableBuffer msg;
2756 
2757  _status = msg.serialize(
2758  static_cast<NATIVE_INT_TYPE>(PINGIN_PING)
2759  );
2760  FW_ASSERT (
2761  _status == Fw::FW_SERIALIZE_OK,
2762  static_cast<AssertArg>(_status)
2763  );
2764 
2765  _status = msg.serialize(portNum);
2766  FW_ASSERT (
2767  _status == Fw::FW_SERIALIZE_OK,
2768  static_cast<AssertArg>(_status)
2769  );
2770 
2771  // Serialize argument key
2772  _status = msg.serialize(key);
2773  FW_ASSERT(
2774  _status == Fw::FW_SERIALIZE_OK,
2775  static_cast<AssertArg>(_status)
2776  );
2777 
2778 
2779  // send message
2780  Os::Queue::QueueBlocking _block =
2782  Os::Queue::QueueStatus qStatus =
2783  this->m_queue.send(msg, 0,_block);
2784  FW_ASSERT(
2785  qStatus == Os::Queue::QUEUE_OK,
2786  static_cast<AssertArg>(qStatus)
2787  );
2788 
2789  }
2790 
2791  // ----------------------------------------------------------------------
2792  // Pre-message hooks for async input ports
2793  // ----------------------------------------------------------------------
2794 
2795  void CommandDispatcherComponentBase ::
2796  compCmdStat_preMsgHook(
2797  NATIVE_INT_TYPE portNum,
2798  FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response
2799  )
2800  {
2801  // Default: no-op
2802  }
2803 
2806  NATIVE_INT_TYPE portNum,
2807  Fw::ComBuffer &data, U32 context
2808  )
2809  {
2810  // Default: no-op
2811  }
2812 
2815  NATIVE_INT_TYPE portNum,
2816  U32 key
2817  )
2818  {
2819  // Default: no-op
2820  }
2821 
2822  // ----------------------------------------------------------------------
2823  // Message dispatch method for active and queued components. Called
2824  // by active component thread or implementation code for queued components
2825  // ----------------------------------------------------------------------
2826 
2828  doDispatch(void)
2829  {
2830  ComponentIpcSerializableBuffer msg;
2831  NATIVE_INT_TYPE priority;
2832 
2833  Os::Queue::QueueStatus msgStatus = this->m_queue.receive(msg,priority,Os::Queue::QUEUE_BLOCKING);
2834  FW_ASSERT(
2835  msgStatus == Os::Queue::QUEUE_OK,
2836  static_cast<AssertArg>(msgStatus)
2837  );
2838 
2839  // Reset to beginning of buffer
2840  msg.resetDeser();
2841 
2842  NATIVE_INT_TYPE desMsg;
2843  Fw::SerializeStatus deserStatus = msg.deserialize(desMsg);
2844  FW_ASSERT(
2845  deserStatus == Fw::FW_SERIALIZE_OK,
2846  static_cast<AssertArg>(deserStatus)
2847  );
2848 
2849  MsgTypeEnum msgType = static_cast<MsgTypeEnum>(desMsg);
2850 
2851  if (msgType == COMMANDDISPATCHER_COMPONENT_EXIT) {
2852  return MSG_DISPATCH_EXIT;
2853  }
2854 
2856  deserStatus = msg.deserialize(portNum);
2857  FW_ASSERT(
2858  deserStatus == Fw::FW_SERIALIZE_OK,
2859  static_cast<AssertArg>(deserStatus)
2860  );
2861 
2862  switch (msgType) {
2863 
2864  // Handle async input port compCmdStat
2865  case COMPCMDSTAT_CMDRESPONSE: {
2866 
2867  // Deserialize argument opCode
2869  deserStatus = msg.deserialize(opCode);
2870  FW_ASSERT(
2871  deserStatus == Fw::FW_SERIALIZE_OK,
2872  static_cast<AssertArg>(deserStatus)
2873  );
2874 
2875  // Deserialize argument cmdSeq
2876  U32 cmdSeq;
2877  deserStatus = msg.deserialize(cmdSeq);
2878  FW_ASSERT(
2879  deserStatus == Fw::FW_SERIALIZE_OK,
2880  static_cast<AssertArg>(deserStatus)
2881  );
2882 
2883  // Deserialize argument response
2885  FwEnumStoreType responseInt;
2886  deserStatus = msg.deserialize(responseInt);
2887  response = (Fw::CommandResponse) responseInt;
2888  FW_ASSERT(
2889  deserStatus == Fw::FW_SERIALIZE_OK,
2890  static_cast<AssertArg>(deserStatus)
2891  );
2892 
2893  // Call handler function
2894  this->compCmdStat_handler(
2895  portNum,
2897  );
2898 
2899  break;
2900 
2901  }
2902 
2903  // Handle async input port seqCmdBuff
2904  case SEQCMDBUFF_COM: {
2905 
2906  // Deserialize argument data
2907  Fw::ComBuffer data;
2908  deserStatus = msg.deserialize(data);
2909  FW_ASSERT(
2910  deserStatus == Fw::FW_SERIALIZE_OK,
2911  static_cast<AssertArg>(deserStatus)
2912  );
2913 
2914  // Deserialize argument context
2915  U32 context;
2916  deserStatus = msg.deserialize(context);
2917  FW_ASSERT(
2918  deserStatus == Fw::FW_SERIALIZE_OK,
2919  static_cast<AssertArg>(deserStatus)
2920  );
2921 
2922  // Call handler function
2923  this->seqCmdBuff_handler(
2924  portNum,
2925  data, context
2926  );
2927 
2928  break;
2929 
2930  }
2931 
2932  // Handle async input port pingIn
2933  case PINGIN_PING: {
2934 
2935  // Deserialize argument key
2936  U32 key;
2937  deserStatus = msg.deserialize(key);
2938  FW_ASSERT(
2939  deserStatus == Fw::FW_SERIALIZE_OK,
2940  static_cast<AssertArg>(deserStatus)
2941  );
2942 
2943  // Call handler function
2944  this->pingIn_handler(
2945  portNum,
2946  key
2947  );
2948 
2949  break;
2950 
2951  }
2952 
2953  // Handle command CMD_NO_OP
2954  case CMD_CMD_NO_OP: {
2955  // Deserialize opcode
2957  deserStatus = msg.deserialize(opCode);
2958  FW_ASSERT (
2959  deserStatus == Fw::FW_SERIALIZE_OK,
2960  static_cast<AssertArg>(deserStatus)
2961  );
2962 
2963  // Deserialize command sequence
2964  U32 cmdSeq;
2965  deserStatus = msg.deserialize(cmdSeq);
2966  FW_ASSERT (
2967  deserStatus == Fw::FW_SERIALIZE_OK,
2968  static_cast<AssertArg>(deserStatus)
2969  );
2970 
2971  // Deserialize command argument buffer
2973  deserStatus = msg.deserialize(args);
2974  FW_ASSERT (
2975  deserStatus == Fw::FW_SERIALIZE_OK,
2976  static_cast<AssertArg>(deserStatus)
2977  );
2978 
2979  // Reset buffer
2980  args.resetDeser();
2981 
2982  // Make sure there was no data left over.
2983  // That means the argument buffer size was incorrect.
2984 #if FW_CMD_CHECK_RESIDUAL
2985  if (args.getBuffLeft() != 0) {
2986  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
2987  this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR);
2988  }
2989  // Don't crash the task if bad arguments were passed from the ground
2990  break;
2991  }
2992 #endif
2993  // Call handler function
2994  this->CMD_NO_OP_cmdHandler(opCode, cmdSeq);
2995 
2996  break;
2997 
2998  }
2999 
3000  // Handle command CMD_NO_OP_STRING
3001  case CMD_CMD_NO_OP_STRING: {
3002  // Deserialize opcode
3004  deserStatus = msg.deserialize(opCode);
3005  FW_ASSERT (
3006  deserStatus == Fw::FW_SERIALIZE_OK,
3007  static_cast<AssertArg>(deserStatus)
3008  );
3009 
3010  // Deserialize command sequence
3011  U32 cmdSeq;
3012  deserStatus = msg.deserialize(cmdSeq);
3013  FW_ASSERT (
3014  deserStatus == Fw::FW_SERIALIZE_OK,
3015  static_cast<AssertArg>(deserStatus)
3016  );
3017 
3018  // Deserialize command argument buffer
3020  deserStatus = msg.deserialize(args);
3021  FW_ASSERT (
3022  deserStatus == Fw::FW_SERIALIZE_OK,
3023  static_cast<AssertArg>(deserStatus)
3024  );
3025 
3026  // Reset buffer
3027  args.resetDeser();
3028 
3029  // Deserialize argument arg1
3030  Fw::CmdStringArg arg1;
3031  deserStatus = args.deserialize(arg1);
3032  if (deserStatus != Fw::FW_SERIALIZE_OK) {
3033  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3034  this->cmdResponse_out(
3035  opCode,
3036  cmdSeq,
3038  );
3039  }
3040  // Don't crash the task if bad arguments were passed from the ground
3041  break;
3042  }
3043 
3044  // Make sure there was no data left over.
3045  // That means the argument buffer size was incorrect.
3046 #if FW_CMD_CHECK_RESIDUAL
3047  if (args.getBuffLeft() != 0) {
3048  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3049  this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR);
3050  }
3051  // Don't crash the task if bad arguments were passed from the ground
3052  break;
3053  }
3054 #endif
3055  // Call handler function
3057  opCode,
3058  cmdSeq,
3059  arg1
3060  );
3061 
3062  break;
3063 
3064  }
3065 
3066  // Handle command CMD_TEST_CMD_1
3067  case CMD_CMD_TEST_CMD_1: {
3068  // Deserialize opcode
3070  deserStatus = msg.deserialize(opCode);
3071  FW_ASSERT (
3072  deserStatus == Fw::FW_SERIALIZE_OK,
3073  static_cast<AssertArg>(deserStatus)
3074  );
3075 
3076  // Deserialize command sequence
3077  U32 cmdSeq;
3078  deserStatus = msg.deserialize(cmdSeq);
3079  FW_ASSERT (
3080  deserStatus == Fw::FW_SERIALIZE_OK,
3081  static_cast<AssertArg>(deserStatus)
3082  );
3083 
3084  // Deserialize command argument buffer
3086  deserStatus = msg.deserialize(args);
3087  FW_ASSERT (
3088  deserStatus == Fw::FW_SERIALIZE_OK,
3089  static_cast<AssertArg>(deserStatus)
3090  );
3091 
3092  // Reset buffer
3093  args.resetDeser();
3094 
3095  // Deserialize argument arg1
3096  I32 arg1;
3097  deserStatus = args.deserialize(arg1);
3098  if (deserStatus != Fw::FW_SERIALIZE_OK) {
3099  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3100  this->cmdResponse_out(
3101  opCode,
3102  cmdSeq,
3104  );
3105  }
3106  // Don't crash the task if bad arguments were passed from the ground
3107  break;
3108  }
3109 
3110  // Deserialize argument arg2
3111  F32 arg2;
3112  deserStatus = args.deserialize(arg2);
3113  if (deserStatus != Fw::FW_SERIALIZE_OK) {
3114  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3115  this->cmdResponse_out(
3116  opCode,
3117  cmdSeq,
3119  );
3120  }
3121  // Don't crash the task if bad arguments were passed from the ground
3122  break;
3123  }
3124 
3125  // Deserialize argument arg3
3126  U8 arg3;
3127  deserStatus = args.deserialize(arg3);
3128  if (deserStatus != Fw::FW_SERIALIZE_OK) {
3129  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3130  this->cmdResponse_out(
3131  opCode,
3132  cmdSeq,
3134  );
3135  }
3136  // Don't crash the task if bad arguments were passed from the ground
3137  break;
3138  }
3139 
3140  // Make sure there was no data left over.
3141  // That means the argument buffer size was incorrect.
3142 #if FW_CMD_CHECK_RESIDUAL
3143  if (args.getBuffLeft() != 0) {
3144  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3145  this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR);
3146  }
3147  // Don't crash the task if bad arguments were passed from the ground
3148  break;
3149  }
3150 #endif
3151  // Call handler function
3153  opCode,
3154  cmdSeq,
3155  arg1, arg2, arg3
3156  );
3157 
3158  break;
3159 
3160  }
3161 
3162  // Handle command CMD_CLEAR_TRACKING
3163  case CMD_CMD_CLEAR_TRACKING: {
3164  // Deserialize opcode
3166  deserStatus = msg.deserialize(opCode);
3167  FW_ASSERT (
3168  deserStatus == Fw::FW_SERIALIZE_OK,
3169  static_cast<AssertArg>(deserStatus)
3170  );
3171 
3172  // Deserialize command sequence
3173  U32 cmdSeq;
3174  deserStatus = msg.deserialize(cmdSeq);
3175  FW_ASSERT (
3176  deserStatus == Fw::FW_SERIALIZE_OK,
3177  static_cast<AssertArg>(deserStatus)
3178  );
3179 
3180  // Deserialize command argument buffer
3182  deserStatus = msg.deserialize(args);
3183  FW_ASSERT (
3184  deserStatus == Fw::FW_SERIALIZE_OK,
3185  static_cast<AssertArg>(deserStatus)
3186  );
3187 
3188  // Reset buffer
3189  args.resetDeser();
3190 
3191  // Make sure there was no data left over.
3192  // That means the argument buffer size was incorrect.
3193 #if FW_CMD_CHECK_RESIDUAL
3194  if (args.getBuffLeft() != 0) {
3195  if (this->m_CmdStatus_OutputPort[0].isConnected()) {
3196  this->cmdResponse_out(opCode,cmdSeq,Fw::COMMAND_FORMAT_ERROR);
3197  }
3198  // Don't crash the task if bad arguments were passed from the ground
3199  break;
3200  }
3201 #endif
3202  // Call handler function
3203  this->CMD_CLEAR_TRACKING_cmdHandler(opCode, cmdSeq);
3204 
3205  break;
3206 
3207  }
3208 
3209  default:
3210  return MSG_DISPATCH_ERROR;
3211 
3212  }
3213 
3214  return MSG_DISPATCH_OK;
3215 
3216  }
3217 
3218 } // end namespace Svc
Svc::CommandDispatcherComponentBase::isConnected_Time_OutputPort
bool isConnected_Time_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:952
Fw::TEXT_LOG_ACTIVITY_HI
@ TEXT_LOG_ACTIVITY_HI
Definition: LogTextPortAc.hpp:31
Svc::CommandDispatcherComponentBase::get_compCmdReg_InputPort
Fw::InputCmdRegPort * get_compCmdReg_InputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:92
Fw::OutputCmdRegPort::init
void init(void)
Definition: CmdRegPortAc.cpp:89
Svc::CommandDispatcherComponentBase::pingOut_out
void pingOut_out(NATIVE_INT_TYPE portNum, U32 key)
Definition: CommandDispatcherComponentAc.cpp:760
Fw::TextLogString
Definition: TextLogString.hpp:11
Fw::InputTimePort
Definition: TimePortAc.hpp:28
Svc::CommandDispatcherComponentBase::m_first_update_CommandErrors
bool m_first_update_CommandErrors
Definition: CommandDispatcherComponentAc.hpp:1130
port2
BYTE port2[Fw::InputComPort::SERIALIZED_SIZE]
Definition: CommandDispatcherComponentAc.cpp:45
Svc::InputPingPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: PingPortAc.hpp:30
Svc::CommandDispatcherComponentBase::CMD_TEST_CMD_1_preMsgHook
virtual void CMD_TEST_CMD_1_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Definition: CommandDispatcherComponentAc.cpp:1267
Svc::CommandDispatcherComponentBase::log_WARNING_HI_MalformedCommand
void log_WARNING_HI_MalformedCommand(CmdSerError Status)
Definition: CommandDispatcherComponentAc.cpp:1920
Fw::InputTlmPort
Definition: TlmPortAc.hpp:29
Svc::CommandDispatcherComponentBase::cmdSeq
PROTECTED FwOpcodeType U32 cmdSeq
Definition: CommandDispatcherComponentAc.hpp:401
Fw::PassiveComponentBase::getIdBase
U32 getIdBase(void) const
Definition: PassiveComponentBase.cpp:40
Svc::CommandDispatcherComponentBase::OPCODE_CMD_NO_OP_STRING
PROTECTED OPCODE_CMD_NO_OP_STRING
Definition: CommandDispatcherComponentAc.hpp:663
Svc::CommandDispatcherComponentBase::set_CmdReg_OutputPort
void set_CmdReg_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdRegPort *port)
Definition: CommandDispatcherComponentAc.cpp:171
Svc::CommandDispatcherComponentBase::getNum_Time_OutputPorts
NATIVE_INT_TYPE getNum_Time_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:862
Svc::CommandDispatcherComponentBase::EVENTID_TESTCMD1ARGS
PROTECTED EVENTID_TESTCMD1ARGS
Definition: CommandDispatcherComponentAc.hpp:813
Fw::Time
Definition: Time.hpp:10
Os::FileSystem::Status
Status
Definition: FileSystem.hpp:15
Fw::QueuedComponentBase::doDispatch
virtual MsgDispatchStatus doDispatch(void)=0
method to dispatch a single message in the queue.
Svc::CommandDispatcherComponentBase::getNum_compCmdStat_InputPorts
NATIVE_INT_TYPE getNum_compCmdStat_InputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:790
Svc::CommandDispatcherComponentBase
Auto-generated base for CommandDispatcher component.
Definition: CommandDispatcherComponentAc.hpp:50
Fw::OutputCmdResponsePort::addCallPort
void addCallPort(InputCmdResponsePort *callPort)
Definition: CmdResponsePortAc.cpp:105
Svc::CommandDispatcherComponentBase::portNum
PRIVATE NATIVE_INT_TYPE portNum
Definition: CommandDispatcherComponentAc.hpp:1057
Fw::SerializeBufferBase
Definition: Serializable.hpp:43
Svc::CommandDispatcherComponentBase::getNum_CmdStatus_OutputPorts
NATIVE_INT_TYPE getNum_CmdStatus_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:838
Fw::SerializeStatus
SerializeStatus
forward declaration for string
Definition: Serializable.hpp:14
Fw::InputComPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: ComPortAc.hpp:31
Svc::CommandDispatcherComponentBase::EVENTID_TOOMANYCOMMANDS
PROTECTED EVENTID_TOOMANYCOMMANDS
Definition: CommandDispatcherComponentAc.hpp:810
Fw::TlmBuffer
Definition: TlmBuffer.hpp:21
Svc::CommandDispatcherComponentBase::EVENTID_NOOPRECEIVED
PROTECTED EVENTID_NOOPRECEIVED
Definition: CommandDispatcherComponentAc.hpp:811
Fw::CommandResponse
CommandResponse
Definition: CmdResponsePortAc.hpp:24
Svc::CommandDispatcherComponentBase::getNum_seqCmdBuff_InputPorts
NATIVE_INT_TYPE getNum_seqCmdBuff_InputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:806
FwChanIdType
#define FwChanIdType
Type representation for a channel id.
Definition: FpConfig.hpp:66
Svc::CommandDispatcherComponentBase::CMD_NO_OP_STRING_cmdHandler
virtual void CMD_NO_OP_STRING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &arg1)=0
Handler for command CMD_NO_OP_STRING.
Fw::SerializeBufferBase::resetDeser
void resetDeser(void)
reset deserialization to beginning
Definition: Serializable.cpp:575
Fw::PortBase::isConnected
bool isConnected(void)
Definition: PortBase.cpp:40
Fw::OutputLogPort::invoke
void invoke(FwEventIdType id, Fw::Time &timeTag, LogSeverity severity, LogBuffer &args)
Definition: LogPortAc.cpp:121
Fw::OutputCmdRegPort::addCallPort
void addCallPort(InputCmdRegPort *callPort)
Definition: CmdRegPortAc.cpp:93
Fw::LOG_WARNING_HI
@ LOG_WARNING_HI
Definition: LogPortAc.hpp:28
FW_OBJECT_NAMES
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects)
Definition: FpConfig.hpp:91
Fw::SerializeBufferBase::serialize
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
Definition: Serializable.cpp:67
Fw::TEXT_LOG_DIAGNOSTIC
@ TEXT_LOG_DIAGNOSTIC
Definition: LogTextPortAc.hpp:33
Svc::CommandDispatcherComponentBase::m_seqCmdStatus_OutputPort
Fw::OutputCmdResponsePort m_seqCmdStatus_OutputPort[NUM_SEQCMDSTATUS_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1015
FW_NUM_ARRAY_ELEMENTS
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.hpp:103
Fw::LogStringArg
Definition: LogString.hpp:11
Fw::LOG_COMMAND
@ LOG_COMMAND
Definition: LogPortAc.hpp:30
U8
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.hpp:76
Svc::CommandDispatcherComponentBase::CMD_TEST_CMD_1_cmdHandler
virtual void CMD_TEST_CMD_1_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, I32 arg1, F32 arg2, U8 arg3)=0
Handler for command CMD_TEST_CMD_1.
Svc::CommandDispatcherComponentBase::EVENTID_NOOPSTRINGRECEIVED
PROTECTED EVENTID_NOOPSTRINGRECEIVED
Definition: CommandDispatcherComponentAc.hpp:812
Fw::InputCmdResponsePort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: CmdResponsePortAc.hpp:40
Svc::CommandDispatcherComponentBase::m_pingOut_OutputPort
Svc::OutputPingPort m_pingOut_OutputPort[NUM_PINGOUT_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1019
Svc::InputPingPort::init
void init(void)
initialization function
Definition: PingPortAc.cpp:38
Fw::TEXT_LOG_COMMAND
@ TEXT_LOG_COMMAND
Definition: LogTextPortAc.hpp:30
FwEnumStoreType
#define FwEnumStoreType
Type representation for an enumeration value.
Definition: FpConfig.hpp:84
Svc::CommandDispatcherComponentBase::m_last_CommandErrors
U32 m_last_CommandErrors
Definition: CommandDispatcherComponentAc.hpp:1144
Fw::InputCmdRegPort
Definition: CmdRegPortAc.hpp:27
Svc::OutputPingPort::init
void init(void)
Definition: PingPortAc.cpp:89
Svc::CommandDispatcherComponentBase::port
PROTECTED I32 port
Definition: CommandDispatcherComponentAc.hpp:852
Svc::CommandDispatcherComponentBase::args
PROTECTED FwOpcodeType U32 Fw::CmdArgBuffer & args
Definition: CommandDispatcherComponentAc.hpp:433
Os::Queue::QueueStatus
QueueStatus
Definition: Queue.hpp:27
Svc::CommandDispatcherComponentBase::pingIn_handler
virtual void pingIn_handler(NATIVE_INT_TYPE portNum, U32 key)=0
Handler for input port pingIn.
Fw::COMMAND_FORMAT_ERROR
@ COMMAND_FORMAT_ERROR
Definition: CmdResponsePortAc.hpp:28
Fw::QueuedComponentBase::m_queue
Os::Queue m_queue
queue object for active component
Definition: QueuedComponentBase.hpp:36
Fw::LogBuffer
Definition: LogBuffer.hpp:22
Svc::CommandDispatcherComponentBase::m_p_seqCmdBuff_in
static void m_p_seqCmdBuff_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Definition: CommandDispatcherComponentAc.cpp:2561
Svc::CommandDispatcherComponentBase::isConnected_CmdReg_OutputPort
bool isConnected_CmdReg_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:932
Svc::CommandDispatcherComponentBase::set_pingOut_OutputPort
void set_pingOut_OutputPort(NATIVE_INT_TYPE portNum, Svc::InputPingPort *port)
Definition: CommandDispatcherComponentAc.cpp:151
Svc::CommandDispatcherComponentBase::set_Log_OutputPort
void set_Log_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputLogPort *port)
Definition: CommandDispatcherComponentAc.cpp:201
Svc::CommandDispatcherComponentBase::isConnected_Tlm_OutputPort
bool isConnected_Tlm_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:942
Fw::InputCmdPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: CmdPortAc.cpp:42
Svc::CommandDispatcherComponentBase::getNum_CmdDisp_InputPorts
NATIVE_INT_TYPE getNum_CmdDisp_InputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:830
Svc::CommandDispatcherComponentBase::getNum_pingOut_OutputPorts
NATIVE_INT_TYPE getNum_pingOut_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:822
Svc::CommandDispatcherComponentBase::m_p_CmdDisp_in
static void m_p_CmdDisp_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Definition: CommandDispatcherComponentAc.cpp:988
Fw::InputCmdResponsePort::init
void init(void)
initialization function
Definition: CmdResponsePortAc.cpp:38
Svc::CommandDispatcherComponentBase::get_pingIn_InputPort
Svc::InputPingPort * get_pingIn_InputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:113
Svc::OutputPingPort::invoke
void invoke(U32 key)
Definition: PingPortAc.cpp:103
Fw::CmdStringArg
Definition: CmdString.hpp:11
Fw::TEXT_LOG_WARNING_HI
@ TEXT_LOG_WARNING_HI
Definition: LogTextPortAc.hpp:28
Svc::CommandDispatcherComponentBase::OPCODE_CMD_CLEAR_TRACKING
PROTECTED OPCODE_CMD_CLEAR_TRACKING
Definition: CommandDispatcherComponentAc.hpp:665
Svc::CommandDispatcherComponentBase::CMD_CLEAR_TRACKING_preMsgHook
virtual void CMD_CLEAR_TRACKING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Definition: CommandDispatcherComponentAc.cpp:1337
Svc::CommandDispatcherComponentBase::log_ACTIVITY_HI_TestCmd1Args
void log_ACTIVITY_HI_TestCmd1Args(I32 arg1, F32 arg2, U8 arg3)
Definition: CommandDispatcherComponentAc.cpp:2381
Svc::CommandDispatcherComponentBase::log_WARNING_HI_OpCodeError
void log_WARNING_HI_OpCodeError(U32 Opcode, ErrorResponse error)
Definition: CommandDispatcherComponentAc.cpp:1804
Assert.hpp
Svc::CommandDispatcherComponentBase::m_CmdReg_OutputPort
Fw::OutputCmdRegPort m_CmdReg_OutputPort[NUM_CMDREG_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1027
Fw::FW_SERIALIZE_OK
@ FW_SERIALIZE_OK
Serialization/Deserialization operation was successful.
Definition: Serializable.hpp:15
Svc::CommandDispatcherComponentBase::seqCmdBuff_preMsgHook
virtual void seqCmdBuff_preMsgHook(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Definition: CommandDispatcherComponentAc.cpp:2805
Os::Queue::send
QueueStatus send(const Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE priority, QueueBlocking block)
send a message
Definition: QueueCommon.cpp:13
Svc::CommandDispatcherComponentBase::m_CmdStatus_OutputPort
Fw::OutputCmdResponsePort m_CmdStatus_OutputPort[NUM_CMDSTATUS_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1023
Svc::CommandDispatcherComponentBase::log_WARNING_HI_InvalidCommand
void log_WARNING_HI_InvalidCommand(U32 Opcode)
Definition: CommandDispatcherComponentAc.cpp:2018
Fw::SerializeBufferBase::getBuffLeft
NATIVE_UINT_TYPE getBuffLeft() const
returns how much deserialization buffer is left
Definition: Serializable.cpp:619
Fw::InputCmdPort::init
void init(void)
initialization function
Definition: CmdPortAc.cpp:38
Fw::LogStringArg::toChar
const char * toChar(void) const
Definition: LogString.cpp:38
Fw::InputComPort
Definition: ComPortAc.hpp:28
Svc::OutputPingPort::addCallPort
void addCallPort(InputPingPort *callPort)
Definition: PingPortAc.cpp:93
EightyCharString.hpp
Svc::CommandDispatcherComponentBase::isConnected_CmdStatus_OutputPort
bool isConnected_CmdStatus_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:922
Fw::PassiveComponentBase
Definition: PassiveComponentBase.hpp:10
Fw::OutputLogPort::init
void init(void)
Definition: LogPortAc.cpp:107
Svc::CommandDispatcherComponentBase::unLock
virtual void unLock(void)
Definition: CommandDispatcherComponentAc.cpp:2525
Svc::CommandDispatcherComponentBase::m_compCmdStat_InputPort
Fw::InputCmdResponsePort m_compCmdStat_InputPort[NUM_COMPCMDSTAT_INPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:989
Fw::OutputTimePort::init
void init(void)
Definition: TimePortAc.cpp:89
Svc::CommandDispatcherComponentBase::EVENTID_OPCODECOMPLETED
PROTECTED EVENTID_OPCODECOMPLETED
Definition: CommandDispatcherComponentAc.hpp:806
Fw::ObjBase::init
void init(void)
Object initializer.
Definition: ObjBase.cpp:26
Os::Queue::QueueBlocking
QueueBlocking
Definition: Queue.hpp:40
Fw::QueuedComponentBase::MSG_DISPATCH_OK
@ MSG_DISPATCH_OK
Dispatch was normal.
Definition: QueuedComponentBase.hpp:26
Svc::CommandDispatcherComponentBase::EVENTID_OPCODEERROR
PROTECTED EVENTID_OPCODEERROR
Definition: CommandDispatcherComponentAc.hpp:807
BYTE
U8 BYTE
byte type
Definition: BasicTypes.hpp:77
Os::Queue::receive
QueueStatus receive(Fw::SerializeBufferBase &buffer, NATIVE_INT_TYPE &priority, QueueBlocking block)
receive a message
Definition: QueueCommon.cpp:22
Svc::CommandDispatcherComponentBase::CMD_TEST_CMD_1_cmdHandlerBase
void CMD_TEST_CMD_1_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Definition: CommandDispatcherComponentAc.cpp:1206
Svc::InputPingPort
Definition: PingPortAc.hpp:27
Fw::OutputTlmPort::addCallPort
void addCallPort(InputTlmPort *callPort)
Definition: TlmPortAc.cpp:105
Svc::CommandDispatcherComponentBase::CHANNELID_COMMANDERRORS
PROTECTED CHANNELID_COMMANDERRORS
Channel ID for CommandErrors.
Definition: CommandDispatcherComponentAc.hpp:941
Fw::OutputCmdRegPort::invoke
void invoke(FwOpcodeType opCode)
Definition: CmdRegPortAc.cpp:103
Svc::CommandDispatcherComponentBase::isConnected_seqCmdStatus_OutputPort
bool isConnected_seqCmdStatus_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:902
Fw::InputComPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: ComPortAc.cpp:42
Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT
@ ACTIVE_COMPONENT_EXIT
message to exit active component task
Definition: ActiveComponentBase.hpp:27
Svc::CommandDispatcherComponentBase::getNum_seqCmdStatus_OutputPorts
NATIVE_INT_TYPE getNum_seqCmdStatus_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:798
Svc::CommandDispatcherComponentBase::log_WARNING_HI_TooManyCommands
void log_WARNING_HI_TooManyCommands(U32 Opcode)
Definition: CommandDispatcherComponentAc.cpp:2116
Svc::CommandDispatcherComponentBase::seqCmdStatus_out
void seqCmdStatus_out(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)
Definition: CommandDispatcherComponentAc.cpp:750
Fw::LOG_DIAGNOSTIC
@ LOG_DIAGNOSTIC
Definition: LogPortAc.hpp:33
Svc::CommandDispatcherComponentBase::log_ACTIVITY_HI_NoOpReceived
void log_ACTIVITY_HI_NoOpReceived(void)
Definition: CommandDispatcherComponentAc.cpp:2214
F32
float F32
32-bit floating point
Definition: BasicTypes.hpp:94
Svc::CommandDispatcherComponentBase::pingIn_preMsgHook
virtual void pingIn_preMsgHook(NATIVE_INT_TYPE portNum, U32 key)
Definition: CommandDispatcherComponentAc.cpp:2814
FwOpcodeType
#define FwOpcodeType
Type representation for a command opcode.
Definition: FpConfig.hpp:62
Svc::CommandDispatcherComponentBase::isConnected_Log_OutputPort
bool isConnected_Log_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:962
Svc::CommandDispatcherComponentBase::EVENTID_OPCODEDISPATCHED
PROTECTED EVENTID_OPCODEDISPATCHED
Definition: CommandDispatcherComponentAc.hpp:805
Fw::QueuedComponentBase::MsgDispatchStatus
MsgDispatchStatus
Definition: QueuedComponentBase.hpp:25
Svc::CommandDispatcherComponentBase::response
PROTECTED FwOpcodeType U32 Fw::CommandResponse response
Definition: CommandDispatcherComponentAc.hpp:403
CommandDispatcherComponentAc.hpp
NATIVE_UINT_TYPE
unsigned int NATIVE_UINT_TYPE
native unsigned integer type declaration
Definition: BasicTypes.hpp:30
Fw::OutputTimePort::invoke
void invoke(Fw::Time &time)
Definition: TimePortAc.cpp:103
Fw::OutputTlmPort::invoke
void invoke(FwChanIdType id, Fw::Time &timeTag, TlmBuffer &val)
Definition: TlmPortAc.cpp:115
Svc::CommandDispatcherComponentBase::m_CmdDisp_InputPort
Fw::InputCmdPort m_CmdDisp_InputPort[NUM_CMDDISP_INPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1001
Fw::CmdArgBuffer
Definition: CmdArgBuffer.hpp:22
Svc::CommandDispatcherComponentBase::log_COMMAND_OpCodeCompleted
void log_COMMAND_OpCodeCompleted(U32 Opcode)
Definition: CommandDispatcherComponentAc.cpp:1706
Svc::CommandDispatcherComponentBase::set_Time_OutputPort
void set_Time_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTimePort *port)
Definition: CommandDispatcherComponentAc.cpp:191
Fw::OutputCmdResponsePort::init
void init(void)
Definition: CmdResponsePortAc.cpp:101
Svc::CommandDispatcherComponentBase::CMD_NO_OP_STRING_cmdHandlerBase
void CMD_NO_OP_STRING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Definition: CommandDispatcherComponentAc.cpp:1136
Fw::COMMAND_INVALID_OPCODE
@ COMMAND_INVALID_OPCODE
Definition: CmdResponsePortAc.hpp:26
FW_ASSERT
#define FW_ASSERT(...)
Definition: Assert.hpp:9
Svc::CommandDispatcherComponentBase::getNum_Tlm_OutputPorts
NATIVE_INT_TYPE getNum_Tlm_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:854
Svc::CommandDispatcherComponentBase::log_ACTIVITY_HI_NoOpStringReceived
void log_ACTIVITY_HI_NoOpStringReceived(Fw::LogStringArg &message)
Definition: CommandDispatcherComponentAc.cpp:2293
Fw::OutputCmdResponsePort::invoke
void invoke(FwOpcodeType opCode, U32 cmdSeq, CommandResponse response)
Definition: CmdResponsePortAc.cpp:115
Fw::QueuedComponentBase::MSG_DISPATCH_ERROR
@ MSG_DISPATCH_ERROR
Errors dispatching messages.
Definition: QueuedComponentBase.hpp:28
Svc::CommandDispatcherComponentBase::regCommands
void regCommands(void)
Register commands with the Command Dispatcher.
Definition: CommandDispatcherComponentAc.cpp:327
Fw::LOG_ACTIVITY_HI
@ LOG_ACTIVITY_HI
Definition: LogPortAc.hpp:31
Svc::CommandDispatcherComponentBase::log_COMMAND_OpCodeDispatched
void log_COMMAND_OpCodeDispatched(U32 Opcode, I32 port)
Definition: CommandDispatcherComponentAc.cpp:1590
Svc::CommandDispatcherComponentBase::CMD_CLEAR_TRACKING_cmdHandlerBase
void CMD_CLEAR_TRACKING_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Definition: CommandDispatcherComponentAc.cpp:1276
Os::Queue::QUEUE_OK
@ QUEUE_OK
message sent/received okay
Definition: Queue.hpp:28
Fw::InputComPort::init
void init(void)
initialization function
Definition: ComPortAc.cpp:38
Svc::CommandDispatcherComponentBase::~CommandDispatcherComponentBase
virtual ~CommandDispatcherComponentBase(void)
Definition: CommandDispatcherComponentAc.cpp:731
Fw::LogStringArg::setMaxSerialize
void setMaxSerialize(NATIVE_UINT_TYPE size)
Definition: LogString.cpp:106
Fw::SerializeBufferBase::deserialize
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
Definition: Serializable.cpp:292
cmdPort
BYTE cmdPort[Fw::InputCmdPort::SERIALIZED_SIZE]
Definition: CommandDispatcherComponentAc.cpp:47
Fw::OutputTlmPort::init
void init(void)
Definition: TlmPortAc.cpp:101
Svc::CommandDispatcherComponentBase::EVENTID_INVALIDCOMMAND
PROTECTED EVENTID_INVALIDCOMMAND
Definition: CommandDispatcherComponentAc.hpp:809
Fw::InputCmdPort
Definition: CmdPortAc.hpp:28
FpConfig.hpp
ISF configuration file.
Fw::InputPortBase::setPortNum
void setPortNum(NATIVE_INT_TYPE portNum)
Definition: InputPortBase.cpp:25
Fw::OutputLogPort::addCallPort
void addCallPort(InputLogPort *callPort)
Definition: LogPortAc.cpp:111
Svc::CommandDispatcherComponentBase::EVENTID_MALFORMEDCOMMAND
PROTECTED EVENTID_MALFORMEDCOMMAND
Definition: CommandDispatcherComponentAc.hpp:808
Svc::CommandDispatcherComponentBase::get_compCmdStat_InputPort
Fw::InputCmdResponsePort * get_compCmdStat_InputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:99
Svc::CommandDispatcherComponentBase::get_CmdDisp_InputPort
Fw::InputCmdPort * get_CmdDisp_InputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:120
Svc::CommandDispatcherComponentBase::m_seqCmdBuff_InputPort
Fw::InputComPort m_seqCmdBuff_InputPort[NUM_SEQCMDBUFF_INPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:993
Fw::QueuedComponentBase::MSG_DISPATCH_EXIT
@ MSG_DISPATCH_EXIT
A message was sent requesting an exit of the loop.
Definition: QueuedComponentBase.hpp:29
Svc::CommandDispatcherComponentBase::set_seqCmdStatus_OutputPort
void set_seqCmdStatus_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdResponsePort *port)
Definition: CommandDispatcherComponentAc.cpp:141
Svc::CommandDispatcherComponentBase::m_p_pingIn_in
static void m_p_pingIn_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, U32 key)
Definition: CommandDispatcherComponentAc.cpp:2574
Svc::CommandDispatcherComponentBase::CmdSerError
CmdSerError
Definition: CommandDispatcherComponentAc.hpp:832
Svc::CommandDispatcherComponentBase::getNum_pingIn_InputPorts
NATIVE_INT_TYPE getNum_pingIn_InputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:814
Svc
Definition: ActiveLoggerComponentAc.cpp:22
Svc::CommandDispatcherComponentBase::m_pingIn_InputPort
Svc::InputPingPort m_pingIn_InputPort[NUM_PINGIN_INPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:997
Svc::CommandDispatcherComponentBase::pingIn_handlerBase
void pingIn_handlerBase(NATIVE_INT_TYPE portNum, U32 key)
Definition: CommandDispatcherComponentAc.cpp:2739
port1
BYTE port1[Fw::InputCmdResponsePort::SERIALIZED_SIZE]
Definition: CommandDispatcherComponentAc.cpp:44
Svc::CommandDispatcherComponentBase::CMD_CLEAR_TRACKING_cmdHandler
virtual void CMD_CLEAR_TRACKING_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Handler for command CMD_CLEAR_TRACKING.
Os::Queue::QUEUE_NONBLOCKING
@ QUEUE_NONBLOCKING
Queue receive always returns even if there is no message.
Definition: Queue.hpp:42
Svc::CommandDispatcherComponentBase::get_seqCmdBuff_InputPort
Fw::InputComPort * get_seqCmdBuff_InputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:106
Fw::InputCmdResponsePort
Definition: CmdResponsePortAc.hpp:37
Svc::CommandDispatcherComponentBase::m_Log_OutputPort
Fw::OutputLogPort m_Log_OutputPort[NUM_LOG_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1039
Svc::CommandDispatcherComponentBase::set_Tlm_OutputPort
void set_Tlm_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputTlmPort *port)
Definition: CommandDispatcherComponentAc.cpp:181
Svc::CommandDispatcherComponentBase::OPCODE_CMD_TEST_CMD_1
PROTECTED OPCODE_CMD_TEST_CMD_1
Definition: CommandDispatcherComponentAc.hpp:664
Svc::CommandDispatcherComponentBase::getNum_CmdReg_OutputPorts
NATIVE_INT_TYPE getNum_CmdReg_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:846
Svc::CommandDispatcherComponentBase::tlmWrite_CommandErrors
void tlmWrite_CommandErrors(U32 arg)
Definition: CommandDispatcherComponentAc.cpp:1393
Fw::InputLogPort
Definition: LogPortAc.hpp:40
Svc::CommandDispatcherComponentBase::compCmdStat_handler
virtual void compCmdStat_handler(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)=0
Handler for input port compCmdStat.
Svc::CommandDispatcherComponentBase::set_CmdStatus_OutputPort
void set_CmdStatus_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdResponsePort *port)
Definition: CommandDispatcherComponentAc.cpp:161
Svc::CommandDispatcherComponentBase::seqCmdBuff_handlerBase
void seqCmdBuff_handlerBase(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)
Definition: CommandDispatcherComponentAc.cpp:2679
port3
BYTE port3[Svc::InputPingPort::SERIALIZED_SIZE]
Definition: CommandDispatcherComponentAc.cpp:46
Svc::CommandDispatcherComponentBase::isConnected_pingOut_OutputPort
bool isConnected_pingOut_OutputPort(NATIVE_INT_TYPE portNum)
Definition: CommandDispatcherComponentAc.cpp:912
FwEventIdType
#define FwEventIdType
Type representation for a event id.
Definition: FpConfig.hpp:70
Svc::CommandDispatcherComponentBase::set_compCmdSend_OutputPort
void set_compCmdSend_OutputPort(NATIVE_INT_TYPE portNum, Fw::InputCmdPort *port)
Definition: CommandDispatcherComponentAc.cpp:131
Svc::CommandDispatcherComponentBase::compCmdStat_handlerBase
void compCmdStat_handlerBase(NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)
Definition: CommandDispatcherComponentAc.cpp:2612
Svc::CommandDispatcherComponentBase::getNum_Log_OutputPorts
NATIVE_INT_TYPE getNum_Log_OutputPorts(void)
Definition: CommandDispatcherComponentAc.cpp:870
NATIVE_INT_TYPE
int NATIVE_INT_TYPE
native integer type declaration
Definition: BasicTypes.hpp:29
Svc::CommandDispatcherComponentBase::slot
PROTECTED I32 I32 slot
Definition: CommandDispatcherComponentAc.hpp:854
AssertArg
#define AssertArg
Definition: FpConfig.hpp:51
Fw::ComBuffer
Definition: ComBuffer.hpp:21
Svc::CommandDispatcherComponentBase::opCode
PROTECTED FwOpcodeType opCode
Definition: CommandDispatcherComponentAc.hpp:321
Svc::CommandDispatcherComponentBase::m_p_compCmdStat_in
static void m_p_compCmdStat_in(Fw::PassiveComponentBase *callComp, NATIVE_INT_TYPE portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CommandResponse response)
Definition: CommandDispatcherComponentAc.cpp:2548
Fw::QueuedComponentBase::createQueue
Os::Queue::QueueStatus createQueue(NATIVE_INT_TYPE depth, NATIVE_INT_TYPE msgSize)
Definition: QueuedComponentBase.cpp:29
TB_NONE
@ TB_NONE
No time base has been established.
Definition: FpConfig.hpp:324
Fw::InputCmdResponsePort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: CmdResponsePortAc.cpp:42
Fw::InputCmdPort::SERIALIZED_SIZE
@ SERIALIZED_SIZE
serialized size of port arguments
Definition: CmdPortAc.hpp:31
Svc::CommandDispatcherComponentBase::seqCmdBuff_handler
virtual void seqCmdBuff_handler(NATIVE_INT_TYPE portNum, Fw::ComBuffer &data, U32 context)=0
Handler for input port seqCmdBuff.
Fw
Definition: BufferGetPortAc.cpp:6
Fw::OutputTimePort::addCallPort
void addCallPort(InputTimePort *callPort)
Definition: TimePortAc.cpp:93
Svc::CommandDispatcherComponentBase::CMD_NO_OP_STRING_preMsgHook
virtual void CMD_NO_OP_STRING_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Definition: CommandDispatcherComponentAc.cpp:1197
FW_LOG_TEXT_BUFFER_SIZE
#define FW_LOG_TEXT_BUFFER_SIZE
Max size of string for text log message.
Definition: FpConfig.hpp:291
Os::Queue::QUEUE_BLOCKING
@ QUEUE_BLOCKING
Queue receive blocks until a message arrives.
Definition: Queue.hpp:41
Svc::CommandDispatcherComponentBase::m_Tlm_OutputPort
Fw::OutputTlmPort m_Tlm_OutputPort[NUM_TLM_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1031
Fw::InputLogTextPort
Definition: LogTextPortAc.hpp:40
Svc::CommandDispatcherComponentBase::m_Time_OutputPort
Fw::OutputTimePort m_Time_OutputPort[NUM_TIME_OUTPUT_PORTS]
Definition: CommandDispatcherComponentAc.hpp:1035
Svc::InputPingPort::addCallComp
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
call to register a component
Definition: PingPortAc.cpp:42