F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
CmdSequencerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title CmdSequencerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for CmdSequencer component base class
5 // ======================================================================
6 
7 #include "Fw/Types/Assert.hpp"
9 #if FW_ENABLE_TEXT_LOGGING
10 #include "Fw/Types/String.hpp"
11 #endif
13 
14 namespace Svc {
15 
16  namespace {
17  enum MsgTypeEnum {
18  CMDSEQUENCER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
19  CMDRESPONSEIN_CMDRESPONSE,
20  PINGIN_PING,
21  SCHEDIN_SCHED,
22  SEQCANCELIN_CMDSEQCANCEL,
23  SEQDISPATCHIN_FILEDISPATCH,
24  SEQRUNIN_CMDSEQIN,
25  CMD_CS_RUN,
26  CMD_CS_VALIDATE,
27  CMD_CS_CANCEL,
28  CMD_CS_START,
29  CMD_CS_STEP,
30  CMD_CS_AUTO,
31  CMD_CS_MANUAL,
32  CMD_CS_JOIN_WAIT,
33  };
34 
35  // Get the max size by constructing a union of the async input, command, and
36  // internal port serialization sizes
37  union BuffUnion {
38  BYTE cmdResponseInPortSize[Fw::CmdResponsePortBuffer::CAPACITY];
40  BYTE schedInPortSize[Svc::SchedPortBuffer::CAPACITY];
41  BYTE seqDispatchInPortSize[Svc::FileDispatchPortBuffer::CAPACITY];
42  BYTE seqRunInPortSize[Svc::CmdSeqInPortBuffer::CAPACITY];
44  };
45 
46  // Define a message buffer class large enough to handle all the
47  // asynchronous inputs to the component
48  class ComponentIpcSerializableBuffer :
50  {
51 
52  public:
53 
54  enum {
55  // Offset into data in buffer: Size of message ID and port number
56  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
57  // Max data size
58  MAX_DATA_SIZE = sizeof(BuffUnion),
59  // Max message size: Size of message id + size of port + max data size
60  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
61  };
62 
63  ComponentIpcSerializableBuffer() : Fw::LinearBufferBase(m_buff, sizeof(m_buff)) {
64 
65  }
66 
67  private:
68  // Should be the max of all the input ports serialized sizes...
69  U8 m_buff[SERIALIZATION_SIZE];
70 
71  };
72  }
73 
74  // ----------------------------------------------------------------------
75  // Component initialization
76  // ----------------------------------------------------------------------
77 
80  FwSizeType queueDepth,
81  FwEnumStoreType instance
82  )
83  {
84  // Initialize base class
86 
87 #if !FW_DIRECT_PORT_CALLS
88  // Connect input port cmdIn
89  for (
90  FwIndexType port = 0;
91  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
92  port++
93  ) {
94  this->m_cmdIn_InputPort[port].init();
95  this->m_cmdIn_InputPort[port].addCallComp(
96  this,
97  m_p_cmdIn_in
98  );
99  this->m_cmdIn_InputPort[port].setPortNum(port);
100 
101 #if FW_OBJECT_NAMES == 1
102  Fw::ObjectName portName;
103  portName.format(
104  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
105  this->m_objName.toChar(),
106  port
107  );
108  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
109 #endif
110  }
111 #endif
112 
113 #if !FW_DIRECT_PORT_CALLS
114  // Connect input port cmdResponseIn
115  for (
116  FwIndexType port = 0;
117  port < static_cast<FwIndexType>(this->getNum_cmdResponseIn_InputPorts());
118  port++
119  ) {
120  this->m_cmdResponseIn_InputPort[port].init();
121  this->m_cmdResponseIn_InputPort[port].addCallComp(
122  this,
123  m_p_cmdResponseIn_in
124  );
125  this->m_cmdResponseIn_InputPort[port].setPortNum(port);
126 
127 #if FW_OBJECT_NAMES == 1
128  Fw::ObjectName portName;
129  portName.format(
130  "%s_cmdResponseIn_InputPort[%" PRI_FwIndexType "]",
131  this->m_objName.toChar(),
132  port
133  );
134  this->m_cmdResponseIn_InputPort[port].setObjName(portName.toChar());
135 #endif
136  }
137 #endif
138 
139 #if !FW_DIRECT_PORT_CALLS
140  // Connect input port pingIn
141  for (
142  FwIndexType port = 0;
143  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
144  port++
145  ) {
146  this->m_pingIn_InputPort[port].init();
147  this->m_pingIn_InputPort[port].addCallComp(
148  this,
149  m_p_pingIn_in
150  );
151  this->m_pingIn_InputPort[port].setPortNum(port);
152 
153 #if FW_OBJECT_NAMES == 1
154  Fw::ObjectName portName;
155  portName.format(
156  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
157  this->m_objName.toChar(),
158  port
159  );
160  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
161 #endif
162  }
163 #endif
164 
165 #if !FW_DIRECT_PORT_CALLS
166  // Connect input port schedIn
167  for (
168  FwIndexType port = 0;
169  port < static_cast<FwIndexType>(this->getNum_schedIn_InputPorts());
170  port++
171  ) {
172  this->m_schedIn_InputPort[port].init();
173  this->m_schedIn_InputPort[port].addCallComp(
174  this,
175  m_p_schedIn_in
176  );
177  this->m_schedIn_InputPort[port].setPortNum(port);
178 
179 #if FW_OBJECT_NAMES == 1
180  Fw::ObjectName portName;
181  portName.format(
182  "%s_schedIn_InputPort[%" PRI_FwIndexType "]",
183  this->m_objName.toChar(),
184  port
185  );
186  this->m_schedIn_InputPort[port].setObjName(portName.toChar());
187 #endif
188  }
189 #endif
190 
191 #if !FW_DIRECT_PORT_CALLS
192  // Connect input port seqCancelIn
193  for (
194  FwIndexType port = 0;
195  port < static_cast<FwIndexType>(this->getNum_seqCancelIn_InputPorts());
196  port++
197  ) {
198  this->m_seqCancelIn_InputPort[port].init();
199  this->m_seqCancelIn_InputPort[port].addCallComp(
200  this,
201  m_p_seqCancelIn_in
202  );
203  this->m_seqCancelIn_InputPort[port].setPortNum(port);
204 
205 #if FW_OBJECT_NAMES == 1
206  Fw::ObjectName portName;
207  portName.format(
208  "%s_seqCancelIn_InputPort[%" PRI_FwIndexType "]",
209  this->m_objName.toChar(),
210  port
211  );
212  this->m_seqCancelIn_InputPort[port].setObjName(portName.toChar());
213 #endif
214  }
215 #endif
216 
217 #if !FW_DIRECT_PORT_CALLS
218  // Connect input port seqDispatchIn
219  for (
220  FwIndexType port = 0;
221  port < static_cast<FwIndexType>(this->getNum_seqDispatchIn_InputPorts());
222  port++
223  ) {
224  this->m_seqDispatchIn_InputPort[port].init();
225  this->m_seqDispatchIn_InputPort[port].addCallComp(
226  this,
227  m_p_seqDispatchIn_in
228  );
229  this->m_seqDispatchIn_InputPort[port].setPortNum(port);
230 
231 #if FW_OBJECT_NAMES == 1
232  Fw::ObjectName portName;
233  portName.format(
234  "%s_seqDispatchIn_InputPort[%" PRI_FwIndexType "]",
235  this->m_objName.toChar(),
236  port
237  );
238  this->m_seqDispatchIn_InputPort[port].setObjName(portName.toChar());
239 #endif
240  }
241 #endif
242 
243 #if !FW_DIRECT_PORT_CALLS
244  // Connect input port seqRunIn
245  for (
246  FwIndexType port = 0;
247  port < static_cast<FwIndexType>(this->getNum_seqRunIn_InputPorts());
248  port++
249  ) {
250  this->m_seqRunIn_InputPort[port].init();
251  this->m_seqRunIn_InputPort[port].addCallComp(
252  this,
253  m_p_seqRunIn_in
254  );
255  this->m_seqRunIn_InputPort[port].setPortNum(port);
256 
257 #if FW_OBJECT_NAMES == 1
258  Fw::ObjectName portName;
259  portName.format(
260  "%s_seqRunIn_InputPort[%" PRI_FwIndexType "]",
261  this->m_objName.toChar(),
262  port
263  );
264  this->m_seqRunIn_InputPort[port].setObjName(portName.toChar());
265 #endif
266  }
267 #endif
268 
269 #if !FW_DIRECT_PORT_CALLS && FW_ENABLE_TEXT_LOGGING
270  // Connect output port LogText
271  for (
272  FwIndexType port = 0;
273  port < static_cast<FwIndexType>(this->getNum_LogText_OutputPorts());
274  port++
275  ) {
276  this->m_LogText_OutputPort[port].init();
277 
278 #if FW_OBJECT_NAMES == 1
279  Fw::ObjectName portName;
280  portName.format(
281  "%s_LogText_OutputPort[%" PRI_FwIndexType "]",
282  this->m_objName.toChar(),
283  port
284  );
285  this->m_LogText_OutputPort[port].setObjName(portName.toChar());
286 #endif
287  }
288 #endif
289 
290 #if !FW_DIRECT_PORT_CALLS
291  // Connect output port cmdRegOut
292  for (
293  FwIndexType port = 0;
294  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
295  port++
296  ) {
297  this->m_cmdRegOut_OutputPort[port].init();
298 
299 #if FW_OBJECT_NAMES == 1
300  Fw::ObjectName portName;
301  portName.format(
302  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
303  this->m_objName.toChar(),
304  port
305  );
306  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
307 #endif
308  }
309 #endif
310 
311 #if !FW_DIRECT_PORT_CALLS
312  // Connect output port cmdResponseOut
313  for (
314  FwIndexType port = 0;
315  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
316  port++
317  ) {
318  this->m_cmdResponseOut_OutputPort[port].init();
319 
320 #if FW_OBJECT_NAMES == 1
321  Fw::ObjectName portName;
322  portName.format(
323  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
324  this->m_objName.toChar(),
325  port
326  );
327  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
328 #endif
329  }
330 #endif
331 
332 #if !FW_DIRECT_PORT_CALLS
333  // Connect output port logOut
334  for (
335  FwIndexType port = 0;
336  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
337  port++
338  ) {
339  this->m_logOut_OutputPort[port].init();
340 
341 #if FW_OBJECT_NAMES == 1
342  Fw::ObjectName portName;
343  portName.format(
344  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
345  this->m_objName.toChar(),
346  port
347  );
348  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
349 #endif
350  }
351 #endif
352 
353 #if !FW_DIRECT_PORT_CALLS
354  // Connect output port timeCaller
355  for (
356  FwIndexType port = 0;
357  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
358  port++
359  ) {
360  this->m_timeCaller_OutputPort[port].init();
361 
362 #if FW_OBJECT_NAMES == 1
363  Fw::ObjectName portName;
364  portName.format(
365  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
366  this->m_objName.toChar(),
367  port
368  );
369  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
370 #endif
371  }
372 #endif
373 
374 #if !FW_DIRECT_PORT_CALLS
375  // Connect output port tlmOut
376  for (
377  FwIndexType port = 0;
378  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
379  port++
380  ) {
381  this->m_tlmOut_OutputPort[port].init();
382 
383 #if FW_OBJECT_NAMES == 1
384  Fw::ObjectName portName;
385  portName.format(
386  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
387  this->m_objName.toChar(),
388  port
389  );
390  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
391 #endif
392  }
393 #endif
394 
395 #if !FW_DIRECT_PORT_CALLS
396  // Connect output port comCmdOut
397  for (
398  FwIndexType port = 0;
399  port < static_cast<FwIndexType>(this->getNum_comCmdOut_OutputPorts());
400  port++
401  ) {
402  this->m_comCmdOut_OutputPort[port].init();
403 
404 #if FW_OBJECT_NAMES == 1
405  Fw::ObjectName portName;
406  portName.format(
407  "%s_comCmdOut_OutputPort[%" PRI_FwIndexType "]",
408  this->m_objName.toChar(),
409  port
410  );
411  this->m_comCmdOut_OutputPort[port].setObjName(portName.toChar());
412 #endif
413  }
414 #endif
415 
416 #if !FW_DIRECT_PORT_CALLS
417  // Connect output port pingOut
418  for (
419  FwIndexType port = 0;
420  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
421  port++
422  ) {
423  this->m_pingOut_OutputPort[port].init();
424 
425 #if FW_OBJECT_NAMES == 1
426  Fw::ObjectName portName;
427  portName.format(
428  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
429  this->m_objName.toChar(),
430  port
431  );
432  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
433 #endif
434  }
435 #endif
436 
437 #if !FW_DIRECT_PORT_CALLS
438  // Connect output port seqDone
439  for (
440  FwIndexType port = 0;
441  port < static_cast<FwIndexType>(this->getNum_seqDone_OutputPorts());
442  port++
443  ) {
444  this->m_seqDone_OutputPort[port].init();
445 
446 #if FW_OBJECT_NAMES == 1
447  Fw::ObjectName portName;
448  portName.format(
449  "%s_seqDone_OutputPort[%" PRI_FwIndexType "]",
450  this->m_objName.toChar(),
451  port
452  );
453  this->m_seqDone_OutputPort[port].setObjName(portName.toChar());
454 #endif
455  }
456 #endif
457 
458 #if !FW_DIRECT_PORT_CALLS
459  // Connect output port seqStartOut
460  for (
461  FwIndexType port = 0;
462  port < static_cast<FwIndexType>(this->getNum_seqStartOut_OutputPorts());
463  port++
464  ) {
465  this->m_seqStartOut_OutputPort[port].init();
466 
467 #if FW_OBJECT_NAMES == 1
468  Fw::ObjectName portName;
469  portName.format(
470  "%s_seqStartOut_OutputPort[%" PRI_FwIndexType "]",
471  this->m_objName.toChar(),
472  port
473  );
474  this->m_seqStartOut_OutputPort[port].setObjName(portName.toChar());
475 #endif
476  }
477 #endif
478 
479  // Create the queue
480  Os::Queue::Status qStat = this->createQueue(
481  queueDepth,
482  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
483  );
484  FW_ASSERT(
485  Os::Queue::Status::OP_OK == qStat,
486  static_cast<FwAssertArgType>(qStat)
487  );
488  }
489 
490 #if !FW_DIRECT_PORT_CALLS
491 
492  // ----------------------------------------------------------------------
493  // Getters for special input ports
494  // ----------------------------------------------------------------------
495 
498  {
499  FW_ASSERT(
500  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
501  static_cast<FwAssertArgType>(portNum)
502  );
503 
504  return &this->m_cmdIn_InputPort[portNum];
505  }
506 
507 #endif
508 
509 #if !FW_DIRECT_PORT_CALLS
510 
511  // ----------------------------------------------------------------------
512  // Getters for typed input ports
513  // ----------------------------------------------------------------------
514 
517  {
518  FW_ASSERT(
519  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
520  static_cast<FwAssertArgType>(portNum)
521  );
522 
523  return &this->m_cmdResponseIn_InputPort[portNum];
524  }
525 
528  {
529  FW_ASSERT(
530  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
531  static_cast<FwAssertArgType>(portNum)
532  );
533 
534  return &this->m_pingIn_InputPort[portNum];
535  }
536 
539  {
540  FW_ASSERT(
541  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
542  static_cast<FwAssertArgType>(portNum)
543  );
544 
545  return &this->m_schedIn_InputPort[portNum];
546  }
547 
550  {
551  FW_ASSERT(
552  (0 <= portNum) && (portNum < this->getNum_seqCancelIn_InputPorts()),
553  static_cast<FwAssertArgType>(portNum)
554  );
555 
556  return &this->m_seqCancelIn_InputPort[portNum];
557  }
558 
561  {
562  FW_ASSERT(
563  (0 <= portNum) && (portNum < this->getNum_seqDispatchIn_InputPorts()),
564  static_cast<FwAssertArgType>(portNum)
565  );
566 
567  return &this->m_seqDispatchIn_InputPort[portNum];
568  }
569 
572  {
573  FW_ASSERT(
574  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
575  static_cast<FwAssertArgType>(portNum)
576  );
577 
578  return &this->m_seqRunIn_InputPort[portNum];
579  }
580 
581 #endif
582 
583 #if !FW_DIRECT_PORT_CALLS
584 
585  // ----------------------------------------------------------------------
586  // Connect input ports to special output ports
587  // ----------------------------------------------------------------------
588 
589 #if FW_ENABLE_TEXT_LOGGING == 1
590 
591  void CmdSequencerComponentBase ::
592  set_LogText_OutputPort(
593  FwIndexType portNum,
595  )
596  {
597  FW_ASSERT(
598  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
599  static_cast<FwAssertArgType>(portNum)
600  );
601 
602  this->m_LogText_OutputPort[portNum].addCallPort(port);
603  }
604 
605 #endif
606 
609  FwIndexType portNum,
610  Fw::InputCmdRegPort* port
611  )
612  {
613  FW_ASSERT(
614  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
615  static_cast<FwAssertArgType>(portNum)
616  );
617 
618  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
619  }
620 
623  FwIndexType portNum,
625  )
626  {
627  FW_ASSERT(
628  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
629  static_cast<FwAssertArgType>(portNum)
630  );
631 
632  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
633  }
634 
637  FwIndexType portNum,
638  Fw::InputLogPort* port
639  )
640  {
641  FW_ASSERT(
642  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
643  static_cast<FwAssertArgType>(portNum)
644  );
645 
646  this->m_logOut_OutputPort[portNum].addCallPort(port);
647  }
648 
651  FwIndexType portNum,
652  Fw::InputTimePort* port
653  )
654  {
655  FW_ASSERT(
656  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
657  static_cast<FwAssertArgType>(portNum)
658  );
659 
660  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
661  }
662 
665  FwIndexType portNum,
666  Fw::InputTlmPort* port
667  )
668  {
669  FW_ASSERT(
670  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
671  static_cast<FwAssertArgType>(portNum)
672  );
673 
674  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
675  }
676 
677 #endif
678 
679 #if !FW_DIRECT_PORT_CALLS
680 
681  // ----------------------------------------------------------------------
682  // Connect typed input ports to typed output ports
683  // ----------------------------------------------------------------------
684 
687  FwIndexType portNum,
688  Fw::InputComPort* port
689  )
690  {
691  FW_ASSERT(
692  (0 <= portNum) && (portNum < this->getNum_comCmdOut_OutputPorts()),
693  static_cast<FwAssertArgType>(portNum)
694  );
695 
696  this->m_comCmdOut_OutputPort[portNum].addCallPort(port);
697  }
698 
701  FwIndexType portNum,
702  Svc::InputPingPort* port
703  )
704  {
705  FW_ASSERT(
706  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
707  static_cast<FwAssertArgType>(portNum)
708  );
709 
710  this->m_pingOut_OutputPort[portNum].addCallPort(port);
711  }
712 
715  FwIndexType portNum,
717  )
718  {
719  FW_ASSERT(
720  (0 <= portNum) && (portNum < this->getNum_seqDone_OutputPorts()),
721  static_cast<FwAssertArgType>(portNum)
722  );
723 
724  this->m_seqDone_OutputPort[portNum].addCallPort(port);
725  }
726 
729  FwIndexType portNum,
731  )
732  {
733  FW_ASSERT(
734  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
735  static_cast<FwAssertArgType>(portNum)
736  );
737 
738  this->m_seqStartOut_OutputPort[portNum].addCallPort(port);
739  }
740 
741 #endif
742 
743 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
744 
745  // ----------------------------------------------------------------------
746  // Connect serial input ports to special output ports
747  // ----------------------------------------------------------------------
748 
749 #if FW_ENABLE_TEXT_LOGGING == 1
750 
751  void CmdSequencerComponentBase ::
752  set_LogText_OutputPort(
753  FwIndexType portNum,
754  Fw::InputSerializePort* port
755  )
756  {
757  FW_ASSERT(
758  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
759  static_cast<FwAssertArgType>(portNum)
760  );
761 
762  this->m_LogText_OutputPort[portNum].registerSerialPort(port);
763  }
764 
765 #endif
766 
769  FwIndexType portNum,
770  Fw::InputSerializePort* port
771  )
772  {
773  FW_ASSERT(
774  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
775  static_cast<FwAssertArgType>(portNum)
776  );
777 
778  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
779  }
780 
783  FwIndexType portNum,
784  Fw::InputSerializePort* port
785  )
786  {
787  FW_ASSERT(
788  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
789  static_cast<FwAssertArgType>(portNum)
790  );
791 
792  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
793  }
794 
797  FwIndexType portNum,
798  Fw::InputSerializePort* port
799  )
800  {
801  FW_ASSERT(
802  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
803  static_cast<FwAssertArgType>(portNum)
804  );
805 
806  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
807  }
808 
811  FwIndexType portNum,
812  Fw::InputSerializePort* port
813  )
814  {
815  FW_ASSERT(
816  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
817  static_cast<FwAssertArgType>(portNum)
818  );
819 
820  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
821  }
822 
825  FwIndexType portNum,
826  Fw::InputSerializePort* port
827  )
828  {
829  FW_ASSERT(
830  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
831  static_cast<FwAssertArgType>(portNum)
832  );
833 
834  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
835  }
836 
837 #endif
838 
839 #if !FW_DIRECT_PORT_CALLS && FW_PORT_SERIALIZATION
840 
841  // ----------------------------------------------------------------------
842  // Connect serial input ports to typed output ports
843  // ----------------------------------------------------------------------
844 
847  FwIndexType portNum,
848  Fw::InputSerializePort* port
849  )
850  {
851  FW_ASSERT(
852  (0 <= portNum) && (portNum < this->getNum_comCmdOut_OutputPorts()),
853  static_cast<FwAssertArgType>(portNum)
854  );
855 
856  this->m_comCmdOut_OutputPort[portNum].registerSerialPort(port);
857  }
858 
861  FwIndexType portNum,
862  Fw::InputSerializePort* port
863  )
864  {
865  FW_ASSERT(
866  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
867  static_cast<FwAssertArgType>(portNum)
868  );
869 
870  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
871  }
872 
875  FwIndexType portNum,
876  Fw::InputSerializePort* port
877  )
878  {
879  FW_ASSERT(
880  (0 <= portNum) && (portNum < this->getNum_seqDone_OutputPorts()),
881  static_cast<FwAssertArgType>(portNum)
882  );
883 
884  this->m_seqDone_OutputPort[portNum].registerSerialPort(port);
885  }
886 
889  FwIndexType portNum,
890  Fw::InputSerializePort* port
891  )
892  {
893  FW_ASSERT(
894  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
895  static_cast<FwAssertArgType>(portNum)
896  );
897 
898  this->m_seqStartOut_OutputPort[portNum].registerSerialPort(port);
899  }
900 
901 #endif
902 
903  // ----------------------------------------------------------------------
904  // Command registration
905  // ----------------------------------------------------------------------
906 
909  {
911 
912  this->cmdRegOut_out(
913  0,
914  this->getIdBase() + OPCODE_CS_RUN
915  );
916 
917  this->cmdRegOut_out(
918  0,
919  this->getIdBase() + OPCODE_CS_VALIDATE
920  );
921 
922  this->cmdRegOut_out(
923  0,
924  this->getIdBase() + OPCODE_CS_CANCEL
925  );
926 
927  this->cmdRegOut_out(
928  0,
929  this->getIdBase() + OPCODE_CS_START
930  );
931 
932  this->cmdRegOut_out(
933  0,
934  this->getIdBase() + OPCODE_CS_STEP
935  );
936 
937  this->cmdRegOut_out(
938  0,
939  this->getIdBase() + OPCODE_CS_AUTO
940  );
941 
942  this->cmdRegOut_out(
943  0,
944  this->getIdBase() + OPCODE_CS_MANUAL
945  );
946 
947  this->cmdRegOut_out(
948  0,
950  );
951  }
952 
953  // ----------------------------------------------------------------------
954  // Component construction and destruction
955  // ----------------------------------------------------------------------
956 
958  CmdSequencerComponentBase(const char* compName) :
959  Fw::ActiveComponentBase(compName)
960  {
961 
962  }
963 
966  {
967 
968  }
969 
970 #if !FW_DIRECT_PORT_CALLS
971 
972  // ----------------------------------------------------------------------
973  // Connection status queries for special output ports
974  // ----------------------------------------------------------------------
975 
976 #if FW_ENABLE_TEXT_LOGGING == 1
977 
978  bool CmdSequencerComponentBase ::
979  isConnected_LogText_OutputPort(FwIndexType portNum) const
980  {
981  FW_ASSERT(
982  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
983  static_cast<FwAssertArgType>(portNum)
984  );
985 
986  return this->m_LogText_OutputPort[portNum].isConnected();
987  }
988 
989 #endif
990 
993  {
994  FW_ASSERT(
995  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
996  static_cast<FwAssertArgType>(portNum)
997  );
998 
999  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
1000  }
1001 
1004  {
1005  FW_ASSERT(
1006  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1007  static_cast<FwAssertArgType>(portNum)
1008  );
1009 
1010  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
1011  }
1012 
1015  {
1016  FW_ASSERT(
1017  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1018  static_cast<FwAssertArgType>(portNum)
1019  );
1020 
1021  return this->m_logOut_OutputPort[portNum].isConnected();
1022  }
1023 
1026  {
1027  FW_ASSERT(
1028  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1029  static_cast<FwAssertArgType>(portNum)
1030  );
1031 
1032  return this->m_timeCaller_OutputPort[portNum].isConnected();
1033  }
1034 
1037  {
1038  FW_ASSERT(
1039  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1040  static_cast<FwAssertArgType>(portNum)
1041  );
1042 
1043  return this->m_tlmOut_OutputPort[portNum].isConnected();
1044  }
1045 
1046 #endif
1047 
1048 #if !FW_DIRECT_PORT_CALLS
1049 
1050  // ----------------------------------------------------------------------
1051  // Connection status queries for typed output ports
1052  // ----------------------------------------------------------------------
1053 
1056  {
1057  FW_ASSERT(
1058  (0 <= portNum) && (portNum < this->getNum_comCmdOut_OutputPorts()),
1059  static_cast<FwAssertArgType>(portNum)
1060  );
1061 
1062  return this->m_comCmdOut_OutputPort[portNum].isConnected();
1063  }
1064 
1067  {
1068  FW_ASSERT(
1069  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1070  static_cast<FwAssertArgType>(portNum)
1071  );
1072 
1073  return this->m_pingOut_OutputPort[portNum].isConnected();
1074  }
1075 
1078  {
1079  FW_ASSERT(
1080  (0 <= portNum) && (portNum < this->getNum_seqDone_OutputPorts()),
1081  static_cast<FwAssertArgType>(portNum)
1082  );
1083 
1084  return this->m_seqDone_OutputPort[portNum].isConnected();
1085  }
1086 
1089  {
1090  FW_ASSERT(
1091  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1092  static_cast<FwAssertArgType>(portNum)
1093  );
1094 
1095  return this->m_seqStartOut_OutputPort[portNum].isConnected();
1096  }
1097 
1098 #endif
1099 
1100  // ----------------------------------------------------------------------
1101  // Port handler base-class functions for special input ports
1102  //
1103  // Call these functions directly to bypass the corresponding ports
1104  // ----------------------------------------------------------------------
1105 
1108  FwIndexType portNum,
1109  FwOpcodeType opCode,
1110  U32 cmdSeq,
1111  Fw::CmdArgBuffer& args
1112  )
1113  {
1114 
1115  const U32 idBase = this->getIdBase();
1116  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
1117 
1118  // Select base class function based on opcode
1119  switch (opCode - idBase) {
1120  case OPCODE_CS_RUN: {
1121  this->CS_RUN_cmdHandlerBase(
1122  opCode,
1123  cmdSeq,
1124  args
1125  );
1126  break;
1127  }
1128 
1129  case OPCODE_CS_VALIDATE: {
1131  opCode,
1132  cmdSeq,
1133  args
1134  );
1135  break;
1136  }
1137 
1138  case OPCODE_CS_CANCEL: {
1140  opCode,
1141  cmdSeq,
1142  args
1143  );
1144  break;
1145  }
1146 
1147  case OPCODE_CS_START: {
1149  opCode,
1150  cmdSeq,
1151  args
1152  );
1153  break;
1154  }
1155 
1156  case OPCODE_CS_STEP: {
1157  this->CS_STEP_cmdHandlerBase(
1158  opCode,
1159  cmdSeq,
1160  args
1161  );
1162  break;
1163  }
1164 
1165  case OPCODE_CS_AUTO: {
1166  this->CS_AUTO_cmdHandlerBase(
1167  opCode,
1168  cmdSeq,
1169  args
1170  );
1171  break;
1172  }
1173 
1174  case OPCODE_CS_MANUAL: {
1176  opCode,
1177  cmdSeq,
1178  args
1179  );
1180  break;
1181  }
1182 
1183  case OPCODE_CS_JOIN_WAIT: {
1185  opCode,
1186  cmdSeq,
1187  args
1188  );
1189  break;
1190  }
1191  default:
1192  // Unknown opcode: ignore it
1193  break;
1194  }
1195  }
1196 
1197  // ----------------------------------------------------------------------
1198  // Port handler base-class functions for typed input ports
1199  //
1200  // Call these functions directly to bypass the corresponding ports
1201  // ----------------------------------------------------------------------
1202 
1205  FwIndexType portNum,
1206  FwOpcodeType opCode,
1207  U32 cmdSeq,
1208  const Fw::CmdResponse& response
1209  )
1210  {
1211  // Make sure port number is valid
1212  FW_ASSERT(
1213  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
1214  static_cast<FwAssertArgType>(portNum)
1215  );
1216 
1217  // Call pre-message hook
1219  portNum,
1220  opCode,
1221  cmdSeq,
1222  response
1223  );
1224  ComponentIpcSerializableBuffer msg;
1226 
1227  // Serialize message ID
1228  _status = msg.serializeFrom(
1229  static_cast<FwEnumStoreType>(CMDRESPONSEIN_CMDRESPONSE)
1230  );
1231  FW_ASSERT(
1232  _status == Fw::FW_SERIALIZE_OK,
1233  static_cast<FwAssertArgType>(_status)
1234  );
1235 
1236  // Serialize port number
1237  _status = msg.serializeFrom(portNum);
1238  FW_ASSERT(
1239  _status == Fw::FW_SERIALIZE_OK,
1240  static_cast<FwAssertArgType>(_status)
1241  );
1242 
1243  // Serialize argument opCode
1244  _status = msg.serializeFrom(opCode);
1245  FW_ASSERT(
1246  _status == Fw::FW_SERIALIZE_OK,
1247  static_cast<FwAssertArgType>(_status)
1248  );
1249 
1250  // Serialize argument cmdSeq
1251  _status = msg.serializeFrom(cmdSeq);
1252  FW_ASSERT(
1253  _status == Fw::FW_SERIALIZE_OK,
1254  static_cast<FwAssertArgType>(_status)
1255  );
1256 
1257  // Serialize argument response
1258  _status = msg.serializeFrom(response);
1259  FW_ASSERT(
1260  _status == Fw::FW_SERIALIZE_OK,
1261  static_cast<FwAssertArgType>(_status)
1262  );
1263 
1264  // Send message
1266  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1267 
1268  FW_ASSERT(
1269  qStatus == Os::Queue::OP_OK,
1270  static_cast<FwAssertArgType>(qStatus)
1271  );
1272  }
1273 
1276  FwIndexType portNum,
1277  U32 key
1278  )
1279  {
1280  // Make sure port number is valid
1281  FW_ASSERT(
1282  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
1283  static_cast<FwAssertArgType>(portNum)
1284  );
1285 
1286  // Call pre-message hook
1288  portNum,
1289  key
1290  );
1291  ComponentIpcSerializableBuffer msg;
1293 
1294  // Serialize message ID
1295  _status = msg.serializeFrom(
1296  static_cast<FwEnumStoreType>(PINGIN_PING)
1297  );
1298  FW_ASSERT(
1299  _status == Fw::FW_SERIALIZE_OK,
1300  static_cast<FwAssertArgType>(_status)
1301  );
1302 
1303  // Serialize port number
1304  _status = msg.serializeFrom(portNum);
1305  FW_ASSERT(
1306  _status == Fw::FW_SERIALIZE_OK,
1307  static_cast<FwAssertArgType>(_status)
1308  );
1309 
1310  // Serialize argument key
1311  _status = msg.serializeFrom(key);
1312  FW_ASSERT(
1313  _status == Fw::FW_SERIALIZE_OK,
1314  static_cast<FwAssertArgType>(_status)
1315  );
1316 
1317  // Send message
1319  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1320 
1321  FW_ASSERT(
1322  qStatus == Os::Queue::OP_OK,
1323  static_cast<FwAssertArgType>(qStatus)
1324  );
1325  }
1326 
1329  FwIndexType portNum,
1330  U32 context
1331  )
1332  {
1333  // Make sure port number is valid
1334  FW_ASSERT(
1335  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
1336  static_cast<FwAssertArgType>(portNum)
1337  );
1338 
1339  // Call pre-message hook
1341  portNum,
1342  context
1343  );
1344  ComponentIpcSerializableBuffer msg;
1346 
1347  // Serialize message ID
1348  _status = msg.serializeFrom(
1349  static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1350  );
1351  FW_ASSERT(
1352  _status == Fw::FW_SERIALIZE_OK,
1353  static_cast<FwAssertArgType>(_status)
1354  );
1355 
1356  // Serialize port number
1357  _status = msg.serializeFrom(portNum);
1358  FW_ASSERT(
1359  _status == Fw::FW_SERIALIZE_OK,
1360  static_cast<FwAssertArgType>(_status)
1361  );
1362 
1363  // Serialize argument context
1364  _status = msg.serializeFrom(context);
1365  FW_ASSERT(
1366  _status == Fw::FW_SERIALIZE_OK,
1367  static_cast<FwAssertArgType>(_status)
1368  );
1369 
1370  // Send message
1372  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1373 
1374  FW_ASSERT(
1375  qStatus == Os::Queue::OP_OK,
1376  static_cast<FwAssertArgType>(qStatus)
1377  );
1378  }
1379 
1382  {
1383  // Make sure port number is valid
1384  FW_ASSERT(
1385  (0 <= portNum) && (portNum < this->getNum_seqCancelIn_InputPorts()),
1386  static_cast<FwAssertArgType>(portNum)
1387  );
1388 
1389  // Call pre-message hook
1390  seqCancelIn_preMsgHook(portNum);
1391  ComponentIpcSerializableBuffer msg;
1393 
1394  // Serialize message ID
1395  _status = msg.serializeFrom(
1396  static_cast<FwEnumStoreType>(SEQCANCELIN_CMDSEQCANCEL)
1397  );
1398  FW_ASSERT(
1399  _status == Fw::FW_SERIALIZE_OK,
1400  static_cast<FwAssertArgType>(_status)
1401  );
1402 
1403  // Serialize port number
1404  _status = msg.serializeFrom(portNum);
1405  FW_ASSERT(
1406  _status == Fw::FW_SERIALIZE_OK,
1407  static_cast<FwAssertArgType>(_status)
1408  );
1409 
1410  // Send message
1412  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1413 
1414  FW_ASSERT(
1415  qStatus == Os::Queue::OP_OK,
1416  static_cast<FwAssertArgType>(qStatus)
1417  );
1418  }
1419 
1422  FwIndexType portNum,
1423  Fw::StringBase& file_name
1424  )
1425  {
1426  // Make sure port number is valid
1427  FW_ASSERT(
1428  (0 <= portNum) && (portNum < this->getNum_seqDispatchIn_InputPorts()),
1429  static_cast<FwAssertArgType>(portNum)
1430  );
1431 
1432  // Call pre-message hook
1434  portNum,
1435  file_name
1436  );
1437  ComponentIpcSerializableBuffer msg;
1439 
1440  // Serialize message ID
1441  _status = msg.serializeFrom(
1442  static_cast<FwEnumStoreType>(SEQDISPATCHIN_FILEDISPATCH)
1443  );
1444  FW_ASSERT(
1445  _status == Fw::FW_SERIALIZE_OK,
1446  static_cast<FwAssertArgType>(_status)
1447  );
1448 
1449  // Serialize port number
1450  _status = msg.serializeFrom(portNum);
1451  FW_ASSERT(
1452  _status == Fw::FW_SERIALIZE_OK,
1453  static_cast<FwAssertArgType>(_status)
1454  );
1455 
1456  // Serialize argument file_name
1457  _status = file_name.serializeTo(msg, static_cast<FwSizeType>(FW_FIXED_LENGTH_STRING_SIZE));
1458  FW_ASSERT(
1459  _status == Fw::FW_SERIALIZE_OK,
1460  static_cast<FwAssertArgType>(_status)
1461  );
1462 
1463  // Send message
1465  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1466 
1467  FW_ASSERT(
1468  qStatus == Os::Queue::OP_OK,
1469  static_cast<FwAssertArgType>(qStatus)
1470  );
1471  }
1472 
1475  FwIndexType portNum,
1476  const Fw::StringBase& filename,
1477  const Svc::SeqArgs& args
1478  )
1479  {
1480  // Make sure port number is valid
1481  FW_ASSERT(
1482  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
1483  static_cast<FwAssertArgType>(portNum)
1484  );
1485 
1486  // Call pre-message hook
1488  portNum,
1489  filename,
1490  args
1491  );
1492  ComponentIpcSerializableBuffer msg;
1494 
1495  // Serialize message ID
1496  _status = msg.serializeFrom(
1497  static_cast<FwEnumStoreType>(SEQRUNIN_CMDSEQIN)
1498  );
1499  FW_ASSERT(
1500  _status == Fw::FW_SERIALIZE_OK,
1501  static_cast<FwAssertArgType>(_status)
1502  );
1503 
1504  // Serialize port number
1505  _status = msg.serializeFrom(portNum);
1506  FW_ASSERT(
1507  _status == Fw::FW_SERIALIZE_OK,
1508  static_cast<FwAssertArgType>(_status)
1509  );
1510 
1511  // Serialize argument filename
1512  _status = filename.serializeTo(msg, 240);
1513  FW_ASSERT(
1514  _status == Fw::FW_SERIALIZE_OK,
1515  static_cast<FwAssertArgType>(_status)
1516  );
1517 
1518  // Serialize argument args
1519  _status = msg.serializeFrom(args);
1520  FW_ASSERT(
1521  _status == Fw::FW_SERIALIZE_OK,
1522  static_cast<FwAssertArgType>(_status)
1523  );
1524 
1525  // Send message
1527  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1528 
1529  FW_ASSERT(
1530  qStatus == Os::Queue::OP_OK,
1531  static_cast<FwAssertArgType>(qStatus)
1532  );
1533  }
1534 
1535  // ----------------------------------------------------------------------
1536  // Pre-message hooks for typed async input ports
1537  //
1538  // Each of these functions is invoked just before processing a message
1539  // on the corresponding port. By default, they do nothing. You can
1540  // override them to provide specific pre-message behavior.
1541  // ----------------------------------------------------------------------
1542 
1545  FwIndexType portNum,
1546  FwOpcodeType opCode,
1547  U32 cmdSeq,
1548  const Fw::CmdResponse& response
1549  )
1550  {
1551  // Default: no-op
1552  }
1553 
1556  FwIndexType portNum,
1557  U32 key
1558  )
1559  {
1560  // Default: no-op
1561  }
1562 
1565  FwIndexType portNum,
1566  U32 context
1567  )
1568  {
1569  // Default: no-op
1570  }
1571 
1574  {
1575  // Default: no-op
1576  }
1577 
1580  FwIndexType portNum,
1581  Fw::StringBase& file_name
1582  )
1583  {
1584  // Default: no-op
1585  }
1586 
1589  FwIndexType portNum,
1590  const Fw::StringBase& filename,
1591  const Svc::SeqArgs& args
1592  )
1593  {
1594  // Default: no-op
1595  }
1596 
1597 #if !FW_DIRECT_PORT_CALLS
1598 
1599  // ----------------------------------------------------------------------
1600  // Invocation functions for typed output ports
1601  // ----------------------------------------------------------------------
1602 
1605  FwIndexType portNum,
1606  Fw::ComBuffer& data,
1607  U32 context
1608  ) const
1609  {
1610  FW_ASSERT(
1611  (0 <= portNum) && (portNum < this->getNum_comCmdOut_OutputPorts()),
1612  static_cast<FwAssertArgType>(portNum)
1613  );
1614 
1615  FW_ASSERT(
1616  this->m_comCmdOut_OutputPort[portNum].isConnected(),
1617  static_cast<FwAssertArgType>(portNum)
1618  );
1619  this->m_comCmdOut_OutputPort[portNum].invoke(
1620  data,
1621  context
1622  );
1623  }
1624 
1627  FwIndexType portNum,
1628  U32 key
1629  ) const
1630  {
1631  FW_ASSERT(
1632  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1633  static_cast<FwAssertArgType>(portNum)
1634  );
1635 
1636  FW_ASSERT(
1637  this->m_pingOut_OutputPort[portNum].isConnected(),
1638  static_cast<FwAssertArgType>(portNum)
1639  );
1640  this->m_pingOut_OutputPort[portNum].invoke(
1641  key
1642  );
1643  }
1644 
1647  FwIndexType portNum,
1648  FwOpcodeType opCode,
1649  U32 cmdSeq,
1650  const Fw::CmdResponse& response
1651  ) const
1652  {
1653  FW_ASSERT(
1654  (0 <= portNum) && (portNum < this->getNum_seqDone_OutputPorts()),
1655  static_cast<FwAssertArgType>(portNum)
1656  );
1657 
1658  FW_ASSERT(
1659  this->m_seqDone_OutputPort[portNum].isConnected(),
1660  static_cast<FwAssertArgType>(portNum)
1661  );
1662  this->m_seqDone_OutputPort[portNum].invoke(
1663  opCode,
1664  cmdSeq,
1665  response
1666  );
1667  }
1668 
1671  FwIndexType portNum,
1672  const Fw::StringBase& filename,
1673  const Svc::SeqArgs& args
1674  ) const
1675  {
1676  FW_ASSERT(
1677  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1678  static_cast<FwAssertArgType>(portNum)
1679  );
1680 
1681  FW_ASSERT(
1682  this->m_seqStartOut_OutputPort[portNum].isConnected(),
1683  static_cast<FwAssertArgType>(portNum)
1684  );
1685  this->m_seqStartOut_OutputPort[portNum].invoke(
1686  filename,
1687  args
1688  );
1689  }
1690 
1691 #endif
1692 
1693  // ----------------------------------------------------------------------
1694  // Command response
1695  // ----------------------------------------------------------------------
1696 
1699  FwOpcodeType opCode,
1700  U32 cmdSeq,
1701  Fw::CmdResponse response
1702  )
1703  {
1705  this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1706  }
1707 
1708  // ----------------------------------------------------------------------
1709  // Command handler base-class functions
1710  //
1711  // Call these functions directly to bypass the command input port
1712  // ----------------------------------------------------------------------
1713 
1716  FwOpcodeType opCode,
1717  U32 cmdSeq,
1718  Fw::CmdArgBuffer& args
1719  )
1720  {
1721  // Call pre-message hook
1722  this->CS_RUN_preMsgHook(opCode,cmdSeq);
1723 
1724  // Defer deserializing arguments to the message dispatcher
1725  // to avoid deserializing and reserializing just for IPC
1726  ComponentIpcSerializableBuffer msg;
1728 
1729  // Serialize for IPC
1730  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_RUN));
1731  FW_ASSERT (
1732  _status == Fw::FW_SERIALIZE_OK,
1733  static_cast<FwAssertArgType>(_status)
1734  );
1735 
1736  // Fake port number to make message dequeue work
1737  FwIndexType port = 0;
1738 
1739  _status = msg.serializeFrom(port);
1740  FW_ASSERT (
1741  _status == Fw::FW_SERIALIZE_OK,
1742  static_cast<FwAssertArgType>(_status)
1743  );
1744 
1745  _status = msg.serializeFrom(opCode);
1746  FW_ASSERT (
1747  _status == Fw::FW_SERIALIZE_OK,
1748  static_cast<FwAssertArgType>(_status)
1749  );
1750 
1751  _status = msg.serializeFrom(cmdSeq);
1752  FW_ASSERT (
1753  _status == Fw::FW_SERIALIZE_OK,
1754  static_cast<FwAssertArgType>(_status)
1755  );
1756 
1757  _status = msg.serializeFrom(args);
1758  FW_ASSERT (
1759  _status == Fw::FW_SERIALIZE_OK,
1760  static_cast<FwAssertArgType>(_status)
1761  );
1762 
1763  // Send message
1765  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1766 
1767  FW_ASSERT(
1768  qStatus == Os::Queue::OP_OK,
1769  static_cast<FwAssertArgType>(qStatus)
1770  );
1771  }
1772 
1775  FwOpcodeType opCode,
1776  U32 cmdSeq,
1777  Fw::CmdArgBuffer& args
1778  )
1779  {
1780  // Call pre-message hook
1781  this->CS_VALIDATE_preMsgHook(opCode,cmdSeq);
1782 
1783  // Defer deserializing arguments to the message dispatcher
1784  // to avoid deserializing and reserializing just for IPC
1785  ComponentIpcSerializableBuffer msg;
1787 
1788  // Serialize for IPC
1789  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_VALIDATE));
1790  FW_ASSERT (
1791  _status == Fw::FW_SERIALIZE_OK,
1792  static_cast<FwAssertArgType>(_status)
1793  );
1794 
1795  // Fake port number to make message dequeue work
1796  FwIndexType port = 0;
1797 
1798  _status = msg.serializeFrom(port);
1799  FW_ASSERT (
1800  _status == Fw::FW_SERIALIZE_OK,
1801  static_cast<FwAssertArgType>(_status)
1802  );
1803 
1804  _status = msg.serializeFrom(opCode);
1805  FW_ASSERT (
1806  _status == Fw::FW_SERIALIZE_OK,
1807  static_cast<FwAssertArgType>(_status)
1808  );
1809 
1810  _status = msg.serializeFrom(cmdSeq);
1811  FW_ASSERT (
1812  _status == Fw::FW_SERIALIZE_OK,
1813  static_cast<FwAssertArgType>(_status)
1814  );
1815 
1816  _status = msg.serializeFrom(args);
1817  FW_ASSERT (
1818  _status == Fw::FW_SERIALIZE_OK,
1819  static_cast<FwAssertArgType>(_status)
1820  );
1821 
1822  // Send message
1824  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1825 
1826  FW_ASSERT(
1827  qStatus == Os::Queue::OP_OK,
1828  static_cast<FwAssertArgType>(qStatus)
1829  );
1830  }
1831 
1834  FwOpcodeType opCode,
1835  U32 cmdSeq,
1836  Fw::CmdArgBuffer& args
1837  )
1838  {
1839  // Call pre-message hook
1840  this->CS_CANCEL_preMsgHook(opCode,cmdSeq);
1841 
1842  // Defer deserializing arguments to the message dispatcher
1843  // to avoid deserializing and reserializing just for IPC
1844  ComponentIpcSerializableBuffer msg;
1846 
1847  // Serialize for IPC
1848  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_CANCEL));
1849  FW_ASSERT (
1850  _status == Fw::FW_SERIALIZE_OK,
1851  static_cast<FwAssertArgType>(_status)
1852  );
1853 
1854  // Fake port number to make message dequeue work
1855  FwIndexType port = 0;
1856 
1857  _status = msg.serializeFrom(port);
1858  FW_ASSERT (
1859  _status == Fw::FW_SERIALIZE_OK,
1860  static_cast<FwAssertArgType>(_status)
1861  );
1862 
1863  _status = msg.serializeFrom(opCode);
1864  FW_ASSERT (
1865  _status == Fw::FW_SERIALIZE_OK,
1866  static_cast<FwAssertArgType>(_status)
1867  );
1868 
1869  _status = msg.serializeFrom(cmdSeq);
1870  FW_ASSERT (
1871  _status == Fw::FW_SERIALIZE_OK,
1872  static_cast<FwAssertArgType>(_status)
1873  );
1874 
1875  _status = msg.serializeFrom(args);
1876  FW_ASSERT (
1877  _status == Fw::FW_SERIALIZE_OK,
1878  static_cast<FwAssertArgType>(_status)
1879  );
1880 
1881  // Send message
1883  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1884 
1885  FW_ASSERT(
1886  qStatus == Os::Queue::OP_OK,
1887  static_cast<FwAssertArgType>(qStatus)
1888  );
1889  }
1890 
1893  FwOpcodeType opCode,
1894  U32 cmdSeq,
1895  Fw::CmdArgBuffer& args
1896  )
1897  {
1898  // Call pre-message hook
1899  this->CS_START_preMsgHook(opCode,cmdSeq);
1900 
1901  // Defer deserializing arguments to the message dispatcher
1902  // to avoid deserializing and reserializing just for IPC
1903  ComponentIpcSerializableBuffer msg;
1905 
1906  // Serialize for IPC
1907  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_START));
1908  FW_ASSERT (
1909  _status == Fw::FW_SERIALIZE_OK,
1910  static_cast<FwAssertArgType>(_status)
1911  );
1912 
1913  // Fake port number to make message dequeue work
1914  FwIndexType port = 0;
1915 
1916  _status = msg.serializeFrom(port);
1917  FW_ASSERT (
1918  _status == Fw::FW_SERIALIZE_OK,
1919  static_cast<FwAssertArgType>(_status)
1920  );
1921 
1922  _status = msg.serializeFrom(opCode);
1923  FW_ASSERT (
1924  _status == Fw::FW_SERIALIZE_OK,
1925  static_cast<FwAssertArgType>(_status)
1926  );
1927 
1928  _status = msg.serializeFrom(cmdSeq);
1929  FW_ASSERT (
1930  _status == Fw::FW_SERIALIZE_OK,
1931  static_cast<FwAssertArgType>(_status)
1932  );
1933 
1934  _status = msg.serializeFrom(args);
1935  FW_ASSERT (
1936  _status == Fw::FW_SERIALIZE_OK,
1937  static_cast<FwAssertArgType>(_status)
1938  );
1939 
1940  // Send message
1942  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1943 
1944  FW_ASSERT(
1945  qStatus == Os::Queue::OP_OK,
1946  static_cast<FwAssertArgType>(qStatus)
1947  );
1948  }
1949 
1952  FwOpcodeType opCode,
1953  U32 cmdSeq,
1954  Fw::CmdArgBuffer& args
1955  )
1956  {
1957  // Call pre-message hook
1958  this->CS_STEP_preMsgHook(opCode,cmdSeq);
1959 
1960  // Defer deserializing arguments to the message dispatcher
1961  // to avoid deserializing and reserializing just for IPC
1962  ComponentIpcSerializableBuffer msg;
1964 
1965  // Serialize for IPC
1966  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_STEP));
1967  FW_ASSERT (
1968  _status == Fw::FW_SERIALIZE_OK,
1969  static_cast<FwAssertArgType>(_status)
1970  );
1971 
1972  // Fake port number to make message dequeue work
1973  FwIndexType port = 0;
1974 
1975  _status = msg.serializeFrom(port);
1976  FW_ASSERT (
1977  _status == Fw::FW_SERIALIZE_OK,
1978  static_cast<FwAssertArgType>(_status)
1979  );
1980 
1981  _status = msg.serializeFrom(opCode);
1982  FW_ASSERT (
1983  _status == Fw::FW_SERIALIZE_OK,
1984  static_cast<FwAssertArgType>(_status)
1985  );
1986 
1987  _status = msg.serializeFrom(cmdSeq);
1988  FW_ASSERT (
1989  _status == Fw::FW_SERIALIZE_OK,
1990  static_cast<FwAssertArgType>(_status)
1991  );
1992 
1993  _status = msg.serializeFrom(args);
1994  FW_ASSERT (
1995  _status == Fw::FW_SERIALIZE_OK,
1996  static_cast<FwAssertArgType>(_status)
1997  );
1998 
1999  // Send message
2001  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2002 
2003  FW_ASSERT(
2004  qStatus == Os::Queue::OP_OK,
2005  static_cast<FwAssertArgType>(qStatus)
2006  );
2007  }
2008 
2011  FwOpcodeType opCode,
2012  U32 cmdSeq,
2013  Fw::CmdArgBuffer& args
2014  )
2015  {
2016  // Call pre-message hook
2017  this->CS_AUTO_preMsgHook(opCode,cmdSeq);
2018 
2019  // Defer deserializing arguments to the message dispatcher
2020  // to avoid deserializing and reserializing just for IPC
2021  ComponentIpcSerializableBuffer msg;
2023 
2024  // Serialize for IPC
2025  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_AUTO));
2026  FW_ASSERT (
2027  _status == Fw::FW_SERIALIZE_OK,
2028  static_cast<FwAssertArgType>(_status)
2029  );
2030 
2031  // Fake port number to make message dequeue work
2032  FwIndexType port = 0;
2033 
2034  _status = msg.serializeFrom(port);
2035  FW_ASSERT (
2036  _status == Fw::FW_SERIALIZE_OK,
2037  static_cast<FwAssertArgType>(_status)
2038  );
2039 
2040  _status = msg.serializeFrom(opCode);
2041  FW_ASSERT (
2042  _status == Fw::FW_SERIALIZE_OK,
2043  static_cast<FwAssertArgType>(_status)
2044  );
2045 
2046  _status = msg.serializeFrom(cmdSeq);
2047  FW_ASSERT (
2048  _status == Fw::FW_SERIALIZE_OK,
2049  static_cast<FwAssertArgType>(_status)
2050  );
2051 
2052  _status = msg.serializeFrom(args);
2053  FW_ASSERT (
2054  _status == Fw::FW_SERIALIZE_OK,
2055  static_cast<FwAssertArgType>(_status)
2056  );
2057 
2058  // Send message
2060  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2061 
2062  FW_ASSERT(
2063  qStatus == Os::Queue::OP_OK,
2064  static_cast<FwAssertArgType>(qStatus)
2065  );
2066  }
2067 
2070  FwOpcodeType opCode,
2071  U32 cmdSeq,
2072  Fw::CmdArgBuffer& args
2073  )
2074  {
2075  // Call pre-message hook
2076  this->CS_MANUAL_preMsgHook(opCode,cmdSeq);
2077 
2078  // Defer deserializing arguments to the message dispatcher
2079  // to avoid deserializing and reserializing just for IPC
2080  ComponentIpcSerializableBuffer msg;
2082 
2083  // Serialize for IPC
2084  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_MANUAL));
2085  FW_ASSERT (
2086  _status == Fw::FW_SERIALIZE_OK,
2087  static_cast<FwAssertArgType>(_status)
2088  );
2089 
2090  // Fake port number to make message dequeue work
2091  FwIndexType port = 0;
2092 
2093  _status = msg.serializeFrom(port);
2094  FW_ASSERT (
2095  _status == Fw::FW_SERIALIZE_OK,
2096  static_cast<FwAssertArgType>(_status)
2097  );
2098 
2099  _status = msg.serializeFrom(opCode);
2100  FW_ASSERT (
2101  _status == Fw::FW_SERIALIZE_OK,
2102  static_cast<FwAssertArgType>(_status)
2103  );
2104 
2105  _status = msg.serializeFrom(cmdSeq);
2106  FW_ASSERT (
2107  _status == Fw::FW_SERIALIZE_OK,
2108  static_cast<FwAssertArgType>(_status)
2109  );
2110 
2111  _status = msg.serializeFrom(args);
2112  FW_ASSERT (
2113  _status == Fw::FW_SERIALIZE_OK,
2114  static_cast<FwAssertArgType>(_status)
2115  );
2116 
2117  // Send message
2119  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2120 
2121  FW_ASSERT(
2122  qStatus == Os::Queue::OP_OK,
2123  static_cast<FwAssertArgType>(qStatus)
2124  );
2125  }
2126 
2129  FwOpcodeType opCode,
2130  U32 cmdSeq,
2131  Fw::CmdArgBuffer& args
2132  )
2133  {
2134  // Call pre-message hook
2135  this->CS_JOIN_WAIT_preMsgHook(opCode,cmdSeq);
2136 
2137  // Defer deserializing arguments to the message dispatcher
2138  // to avoid deserializing and reserializing just for IPC
2139  ComponentIpcSerializableBuffer msg;
2141 
2142  // Serialize for IPC
2143  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_JOIN_WAIT));
2144  FW_ASSERT (
2145  _status == Fw::FW_SERIALIZE_OK,
2146  static_cast<FwAssertArgType>(_status)
2147  );
2148 
2149  // Fake port number to make message dequeue work
2150  FwIndexType port = 0;
2151 
2152  _status = msg.serializeFrom(port);
2153  FW_ASSERT (
2154  _status == Fw::FW_SERIALIZE_OK,
2155  static_cast<FwAssertArgType>(_status)
2156  );
2157 
2158  _status = msg.serializeFrom(opCode);
2159  FW_ASSERT (
2160  _status == Fw::FW_SERIALIZE_OK,
2161  static_cast<FwAssertArgType>(_status)
2162  );
2163 
2164  _status = msg.serializeFrom(cmdSeq);
2165  FW_ASSERT (
2166  _status == Fw::FW_SERIALIZE_OK,
2167  static_cast<FwAssertArgType>(_status)
2168  );
2169 
2170  _status = msg.serializeFrom(args);
2171  FW_ASSERT (
2172  _status == Fw::FW_SERIALIZE_OK,
2173  static_cast<FwAssertArgType>(_status)
2174  );
2175 
2176  // Send message
2178  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2179 
2180  FW_ASSERT(
2181  qStatus == Os::Queue::OP_OK,
2182  static_cast<FwAssertArgType>(qStatus)
2183  );
2184  }
2185 
2186  // ----------------------------------------------------------------------
2187  // Pre-message hooks for async commands
2188  //
2189  // Each of these functions is invoked just before processing the
2190  // corresponding command. By default they do nothing. You can
2191  // override them to provide specific pre-command behavior.
2192  // ----------------------------------------------------------------------
2193 
2196  FwOpcodeType opCode,
2197  U32 cmdSeq
2198  )
2199  {
2200  // Defaults to no-op; can be overridden
2201  (void) opCode;
2202  (void) cmdSeq;
2203  }
2204 
2207  FwOpcodeType opCode,
2208  U32 cmdSeq
2209  )
2210  {
2211  // Defaults to no-op; can be overridden
2212  (void) opCode;
2213  (void) cmdSeq;
2214  }
2215 
2218  FwOpcodeType opCode,
2219  U32 cmdSeq
2220  )
2221  {
2222  // Defaults to no-op; can be overridden
2223  (void) opCode;
2224  (void) cmdSeq;
2225  }
2226 
2229  FwOpcodeType opCode,
2230  U32 cmdSeq
2231  )
2232  {
2233  // Defaults to no-op; can be overridden
2234  (void) opCode;
2235  (void) cmdSeq;
2236  }
2237 
2240  FwOpcodeType opCode,
2241  U32 cmdSeq
2242  )
2243  {
2244  // Defaults to no-op; can be overridden
2245  (void) opCode;
2246  (void) cmdSeq;
2247  }
2248 
2251  FwOpcodeType opCode,
2252  U32 cmdSeq
2253  )
2254  {
2255  // Defaults to no-op; can be overridden
2256  (void) opCode;
2257  (void) cmdSeq;
2258  }
2259 
2262  FwOpcodeType opCode,
2263  U32 cmdSeq
2264  )
2265  {
2266  // Defaults to no-op; can be overridden
2267  (void) opCode;
2268  (void) cmdSeq;
2269  }
2270 
2273  FwOpcodeType opCode,
2274  U32 cmdSeq
2275  )
2276  {
2277  // Defaults to no-op; can be overridden
2278  (void) opCode;
2279  (void) cmdSeq;
2280  }
2281 
2282  // ----------------------------------------------------------------------
2283  // Event logging functions
2284  // ----------------------------------------------------------------------
2285 
2288  {
2289  // Get the time
2290  Fw::Time _logTime;
2291  if (this->isConnected_timeCaller_OutputPort(0)) {
2292  this->timeCaller_out(0, _logTime);
2293  }
2294 
2295  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCELOADED;
2296 
2297  // Emit the event on the log port
2298  if (this->isConnected_logOut_OutputPort(0)) {
2299  Fw::LogBuffer _logBuff;
2301 
2302 #if FW_AMPCS_COMPATIBLE
2303  // Serialize the number of arguments
2304  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2305  FW_ASSERT(
2306  _status == Fw::FW_SERIALIZE_OK,
2307  static_cast<FwAssertArgType>(_status)
2308  );
2309 #endif
2310 
2311  _status = fileName.serializeTo(
2312  _logBuff,
2313  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2314  );
2315  FW_ASSERT(
2316  _status == Fw::FW_SERIALIZE_OK,
2317  static_cast<FwAssertArgType>(_status)
2318  );
2319 
2320  this->logOut_out(
2321  0,
2322  _id,
2323  _logTime,
2325  _logBuff
2326  );
2327  }
2328 
2329  // Emit the event on the text log port
2330 #if FW_ENABLE_TEXT_LOGGING
2331  if (this->isConnected_LogText_OutputPort(0)) {
2332 #if FW_OBJECT_NAMES == 1
2333  const char* _formatString =
2334  "(%s) %s: Loaded sequence %s";
2335 #else
2336  const char* _formatString =
2337  "%s: Loaded sequence %s";
2338 #endif
2339 
2340  Fw::TextLogString _logString;
2341  (void) _logString.format(
2342  _formatString,
2343 #if FW_OBJECT_NAMES == 1
2344  this->m_objName.toChar(),
2345 #endif
2346  "CS_SequenceLoaded ",
2347  fileName.toChar()
2348  );
2349 
2350  this->LogText_out(
2351  0,
2352  _id,
2353  _logTime,
2355  _logString
2356  );
2357  }
2358 #endif
2359  }
2360 
2363  {
2364  // Get the time
2365  Fw::Time _logTime;
2366  if (this->isConnected_timeCaller_OutputPort(0)) {
2367  this->timeCaller_out(0, _logTime);
2368  }
2369 
2370  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCECANCELED;
2371 
2372  // Emit the event on the log port
2373  if (this->isConnected_logOut_OutputPort(0)) {
2374  Fw::LogBuffer _logBuff;
2376 
2377 #if FW_AMPCS_COMPATIBLE
2378  // Serialize the number of arguments
2379  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2380  FW_ASSERT(
2381  _status == Fw::FW_SERIALIZE_OK,
2382  static_cast<FwAssertArgType>(_status)
2383  );
2384 #endif
2385 
2386  _status = fileName.serializeTo(
2387  _logBuff,
2388  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2389  );
2390  FW_ASSERT(
2391  _status == Fw::FW_SERIALIZE_OK,
2392  static_cast<FwAssertArgType>(_status)
2393  );
2394 
2395  this->logOut_out(
2396  0,
2397  _id,
2398  _logTime,
2400  _logBuff
2401  );
2402  }
2403 
2404  // Emit the event on the text log port
2405 #if FW_ENABLE_TEXT_LOGGING
2406  if (this->isConnected_LogText_OutputPort(0)) {
2407 #if FW_OBJECT_NAMES == 1
2408  const char* _formatString =
2409  "(%s) %s: Sequence file %s canceled";
2410 #else
2411  const char* _formatString =
2412  "%s: Sequence file %s canceled";
2413 #endif
2414 
2415  Fw::TextLogString _logString;
2416  (void) _logString.format(
2417  _formatString,
2418 #if FW_OBJECT_NAMES == 1
2419  this->m_objName.toChar(),
2420 #endif
2421  "CS_SequenceCanceled ",
2422  fileName.toChar()
2423  );
2424 
2425  this->LogText_out(
2426  0,
2427  _id,
2428  _logTime,
2430  _logString
2431  );
2432  }
2433 #endif
2434  }
2435 
2438  {
2439  // Get the time
2440  Fw::Time _logTime;
2441  if (this->isConnected_timeCaller_OutputPort(0)) {
2442  this->timeCaller_out(0, _logTime);
2443  }
2444 
2445  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILEREADERROR;
2446 
2447  // Emit the event on the log port
2448  if (this->isConnected_logOut_OutputPort(0)) {
2449  Fw::LogBuffer _logBuff;
2451 
2452 #if FW_AMPCS_COMPATIBLE
2453  // Serialize the number of arguments
2454  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2455  FW_ASSERT(
2456  _status == Fw::FW_SERIALIZE_OK,
2457  static_cast<FwAssertArgType>(_status)
2458  );
2459 #endif
2460 
2461  _status = fileName.serializeTo(
2462  _logBuff,
2463  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2464  );
2465  FW_ASSERT(
2466  _status == Fw::FW_SERIALIZE_OK,
2467  static_cast<FwAssertArgType>(_status)
2468  );
2469 
2470  this->logOut_out(
2471  0,
2472  _id,
2473  _logTime,
2475  _logBuff
2476  );
2477  }
2478 
2479  // Emit the event on the text log port
2480 #if FW_ENABLE_TEXT_LOGGING
2481  if (this->isConnected_LogText_OutputPort(0)) {
2482 #if FW_OBJECT_NAMES == 1
2483  const char* _formatString =
2484  "(%s) %s: Error reading sequence file %s";
2485 #else
2486  const char* _formatString =
2487  "%s: Error reading sequence file %s";
2488 #endif
2489 
2490  Fw::TextLogString _logString;
2491  (void) _logString.format(
2492  _formatString,
2493 #if FW_OBJECT_NAMES == 1
2494  this->m_objName.toChar(),
2495 #endif
2496  "CS_FileReadError ",
2497  fileName.toChar()
2498  );
2499 
2500  this->LogText_out(
2501  0,
2502  _id,
2503  _logTime,
2505  _logString
2506  );
2507  }
2508 #endif
2509  }
2510 
2513  const Fw::StringBase& fileName,
2514  const Svc::CmdSequencer_FileReadStage& stage,
2515  I32 error
2516  ) const
2517  {
2518  // Get the time
2519  Fw::Time _logTime;
2520  if (this->isConnected_timeCaller_OutputPort(0)) {
2521  this->timeCaller_out(0, _logTime);
2522  }
2523 
2524  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILEINVALID;
2525 
2526  // Emit the event on the log port
2527  if (this->isConnected_logOut_OutputPort(0)) {
2528  Fw::LogBuffer _logBuff;
2530 
2531 #if FW_AMPCS_COMPATIBLE
2532  // Serialize the number of arguments
2533  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2534  FW_ASSERT(
2535  _status == Fw::FW_SERIALIZE_OK,
2536  static_cast<FwAssertArgType>(_status)
2537  );
2538 #endif
2539 
2540  _status = fileName.serializeTo(
2541  _logBuff,
2542  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2543  );
2544  FW_ASSERT(
2545  _status == Fw::FW_SERIALIZE_OK,
2546  static_cast<FwAssertArgType>(_status)
2547  );
2548 
2549 #if FW_AMPCS_COMPATIBLE
2550  // Serialize the argument size
2551  _status = _logBuff.serializeFrom(
2553  );
2554  FW_ASSERT(
2555  _status == Fw::FW_SERIALIZE_OK,
2556  static_cast<FwAssertArgType>(_status)
2557  );
2558 #endif
2559  _status = _logBuff.serializeFrom(stage);
2560  FW_ASSERT(
2561  _status == Fw::FW_SERIALIZE_OK,
2562  static_cast<FwAssertArgType>(_status)
2563  );
2564 
2565 #if FW_AMPCS_COMPATIBLE
2566  // Serialize the argument size
2567  _status = _logBuff.serializeFrom(
2568  static_cast<U8>(sizeof(I32))
2569  );
2570  FW_ASSERT(
2571  _status == Fw::FW_SERIALIZE_OK,
2572  static_cast<FwAssertArgType>(_status)
2573  );
2574 #endif
2575  _status = _logBuff.serializeFrom(error);
2576  FW_ASSERT(
2577  _status == Fw::FW_SERIALIZE_OK,
2578  static_cast<FwAssertArgType>(_status)
2579  );
2580 
2581  this->logOut_out(
2582  0,
2583  _id,
2584  _logTime,
2586  _logBuff
2587  );
2588  }
2589 
2590  // Emit the event on the text log port
2591 #if FW_ENABLE_TEXT_LOGGING
2592  if (this->isConnected_LogText_OutputPort(0)) {
2593 #if FW_OBJECT_NAMES == 1
2594  const char* _formatString =
2595  "(%s) %s: Sequence file %s invalid. Stage: %s Error: %" PRIi32 "";
2596 #else
2597  const char* _formatString =
2598  "%s: Sequence file %s invalid. Stage: %s Error: %" PRIi32 "";
2599 #endif
2600 
2601  Fw::String stageStr;
2602  stage.toString(stageStr);
2603 
2604  Fw::TextLogString _logString;
2605  (void) _logString.format(
2606  _formatString,
2607 #if FW_OBJECT_NAMES == 1
2608  this->m_objName.toChar(),
2609 #endif
2610  "CS_FileInvalid ",
2611  fileName.toChar(),
2612  stageStr.toChar(),
2613  error
2614  );
2615 
2616  this->LogText_out(
2617  0,
2618  _id,
2619  _logTime,
2621  _logString
2622  );
2623  }
2624 #endif
2625  }
2626 
2629  const Fw::StringBase& fileName,
2630  U32 recordNumber,
2631  I32 error
2632  ) const
2633  {
2634  // Get the time
2635  Fw::Time _logTime;
2636  if (this->isConnected_timeCaller_OutputPort(0)) {
2637  this->timeCaller_out(0, _logTime);
2638  }
2639 
2640  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_RECORDINVALID;
2641 
2642  // Emit the event on the log port
2643  if (this->isConnected_logOut_OutputPort(0)) {
2644  Fw::LogBuffer _logBuff;
2646 
2647 #if FW_AMPCS_COMPATIBLE
2648  // Serialize the number of arguments
2649  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2650  FW_ASSERT(
2651  _status == Fw::FW_SERIALIZE_OK,
2652  static_cast<FwAssertArgType>(_status)
2653  );
2654 #endif
2655 
2656  _status = fileName.serializeTo(
2657  _logBuff,
2658  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2659  );
2660  FW_ASSERT(
2661  _status == Fw::FW_SERIALIZE_OK,
2662  static_cast<FwAssertArgType>(_status)
2663  );
2664 
2665 #if FW_AMPCS_COMPATIBLE
2666  // Serialize the argument size
2667  _status = _logBuff.serializeFrom(
2668  static_cast<U8>(sizeof(U32))
2669  );
2670  FW_ASSERT(
2671  _status == Fw::FW_SERIALIZE_OK,
2672  static_cast<FwAssertArgType>(_status)
2673  );
2674 #endif
2675  _status = _logBuff.serializeFrom(recordNumber);
2676  FW_ASSERT(
2677  _status == Fw::FW_SERIALIZE_OK,
2678  static_cast<FwAssertArgType>(_status)
2679  );
2680 
2681 #if FW_AMPCS_COMPATIBLE
2682  // Serialize the argument size
2683  _status = _logBuff.serializeFrom(
2684  static_cast<U8>(sizeof(I32))
2685  );
2686  FW_ASSERT(
2687  _status == Fw::FW_SERIALIZE_OK,
2688  static_cast<FwAssertArgType>(_status)
2689  );
2690 #endif
2691  _status = _logBuff.serializeFrom(error);
2692  FW_ASSERT(
2693  _status == Fw::FW_SERIALIZE_OK,
2694  static_cast<FwAssertArgType>(_status)
2695  );
2696 
2697  this->logOut_out(
2698  0,
2699  _id,
2700  _logTime,
2702  _logBuff
2703  );
2704  }
2705 
2706  // Emit the event on the text log port
2707 #if FW_ENABLE_TEXT_LOGGING
2708  if (this->isConnected_LogText_OutputPort(0)) {
2709 #if FW_OBJECT_NAMES == 1
2710  const char* _formatString =
2711  "(%s) %s: Sequence file %s: Record %" PRIu32 " invalid. Err: %" PRIi32 "";
2712 #else
2713  const char* _formatString =
2714  "%s: Sequence file %s: Record %" PRIu32 " invalid. Err: %" PRIi32 "";
2715 #endif
2716 
2717  Fw::TextLogString _logString;
2718  (void) _logString.format(
2719  _formatString,
2720 #if FW_OBJECT_NAMES == 1
2721  this->m_objName.toChar(),
2722 #endif
2723  "CS_RecordInvalid ",
2724  fileName.toChar(),
2725  recordNumber,
2726  error
2727  );
2728 
2729  this->LogText_out(
2730  0,
2731  _id,
2732  _logTime,
2734  _logString
2735  );
2736  }
2737 #endif
2738  }
2739 
2742  const Fw::StringBase& fileName,
2743  U32 size
2744  ) const
2745  {
2746  // Get the time
2747  Fw::Time _logTime;
2748  if (this->isConnected_timeCaller_OutputPort(0)) {
2749  this->timeCaller_out(0, _logTime);
2750  }
2751 
2752  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILESIZEERROR;
2753 
2754  // Emit the event on the log port
2755  if (this->isConnected_logOut_OutputPort(0)) {
2756  Fw::LogBuffer _logBuff;
2758 
2759 #if FW_AMPCS_COMPATIBLE
2760  // Serialize the number of arguments
2761  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2762  FW_ASSERT(
2763  _status == Fw::FW_SERIALIZE_OK,
2764  static_cast<FwAssertArgType>(_status)
2765  );
2766 #endif
2767 
2768  _status = fileName.serializeTo(
2769  _logBuff,
2770  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2771  );
2772  FW_ASSERT(
2773  _status == Fw::FW_SERIALIZE_OK,
2774  static_cast<FwAssertArgType>(_status)
2775  );
2776 
2777 #if FW_AMPCS_COMPATIBLE
2778  // Serialize the argument size
2779  _status = _logBuff.serializeFrom(
2780  static_cast<U8>(sizeof(U32))
2781  );
2782  FW_ASSERT(
2783  _status == Fw::FW_SERIALIZE_OK,
2784  static_cast<FwAssertArgType>(_status)
2785  );
2786 #endif
2787  _status = _logBuff.serializeFrom(size);
2788  FW_ASSERT(
2789  _status == Fw::FW_SERIALIZE_OK,
2790  static_cast<FwAssertArgType>(_status)
2791  );
2792 
2793  this->logOut_out(
2794  0,
2795  _id,
2796  _logTime,
2798  _logBuff
2799  );
2800  }
2801 
2802  // Emit the event on the text log port
2803 #if FW_ENABLE_TEXT_LOGGING
2804  if (this->isConnected_LogText_OutputPort(0)) {
2805 #if FW_OBJECT_NAMES == 1
2806  const char* _formatString =
2807  "(%s) %s: Sequence file %s too large. Size: %" PRIu32 "";
2808 #else
2809  const char* _formatString =
2810  "%s: Sequence file %s too large. Size: %" PRIu32 "";
2811 #endif
2812 
2813  Fw::TextLogString _logString;
2814  (void) _logString.format(
2815  _formatString,
2816 #if FW_OBJECT_NAMES == 1
2817  this->m_objName.toChar(),
2818 #endif
2819  "CS_FileSizeError ",
2820  fileName.toChar(),
2821  size
2822  );
2823 
2824  this->LogText_out(
2825  0,
2826  _id,
2827  _logTime,
2829  _logString
2830  );
2831  }
2832 #endif
2833  }
2834 
2837  {
2838  // Get the time
2839  Fw::Time _logTime;
2840  if (this->isConnected_timeCaller_OutputPort(0)) {
2841  this->timeCaller_out(0, _logTime);
2842  }
2843 
2844  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILENOTFOUND;
2845 
2846  // Emit the event on the log port
2847  if (this->isConnected_logOut_OutputPort(0)) {
2848  Fw::LogBuffer _logBuff;
2850 
2851 #if FW_AMPCS_COMPATIBLE
2852  // Serialize the number of arguments
2853  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2854  FW_ASSERT(
2855  _status == Fw::FW_SERIALIZE_OK,
2856  static_cast<FwAssertArgType>(_status)
2857  );
2858 #endif
2859 
2860  _status = fileName.serializeTo(
2861  _logBuff,
2862  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2863  );
2864  FW_ASSERT(
2865  _status == Fw::FW_SERIALIZE_OK,
2866  static_cast<FwAssertArgType>(_status)
2867  );
2868 
2869  this->logOut_out(
2870  0,
2871  _id,
2872  _logTime,
2874  _logBuff
2875  );
2876  }
2877 
2878  // Emit the event on the text log port
2879 #if FW_ENABLE_TEXT_LOGGING
2880  if (this->isConnected_LogText_OutputPort(0)) {
2881 #if FW_OBJECT_NAMES == 1
2882  const char* _formatString =
2883  "(%s) %s: Sequence file %s not found.";
2884 #else
2885  const char* _formatString =
2886  "%s: Sequence file %s not found.";
2887 #endif
2888 
2889  Fw::TextLogString _logString;
2890  (void) _logString.format(
2891  _formatString,
2892 #if FW_OBJECT_NAMES == 1
2893  this->m_objName.toChar(),
2894 #endif
2895  "CS_FileNotFound ",
2896  fileName.toChar()
2897  );
2898 
2899  this->LogText_out(
2900  0,
2901  _id,
2902  _logTime,
2904  _logString
2905  );
2906  }
2907 #endif
2908  }
2909 
2912  const Fw::StringBase& fileName,
2913  U32 storedCRC,
2914  U32 computedCRC
2915  ) const
2916  {
2917  // Get the time
2918  Fw::Time _logTime;
2919  if (this->isConnected_timeCaller_OutputPort(0)) {
2920  this->timeCaller_out(0, _logTime);
2921  }
2922 
2923  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILECRCFAILURE;
2924 
2925  // Emit the event on the log port
2926  if (this->isConnected_logOut_OutputPort(0)) {
2927  Fw::LogBuffer _logBuff;
2929 
2930 #if FW_AMPCS_COMPATIBLE
2931  // Serialize the number of arguments
2932  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2933  FW_ASSERT(
2934  _status == Fw::FW_SERIALIZE_OK,
2935  static_cast<FwAssertArgType>(_status)
2936  );
2937 #endif
2938 
2939  _status = fileName.serializeTo(
2940  _logBuff,
2941  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2942  );
2943  FW_ASSERT(
2944  _status == Fw::FW_SERIALIZE_OK,
2945  static_cast<FwAssertArgType>(_status)
2946  );
2947 
2948 #if FW_AMPCS_COMPATIBLE
2949  // Serialize the argument size
2950  _status = _logBuff.serializeFrom(
2951  static_cast<U8>(sizeof(U32))
2952  );
2953  FW_ASSERT(
2954  _status == Fw::FW_SERIALIZE_OK,
2955  static_cast<FwAssertArgType>(_status)
2956  );
2957 #endif
2958  _status = _logBuff.serializeFrom(storedCRC);
2959  FW_ASSERT(
2960  _status == Fw::FW_SERIALIZE_OK,
2961  static_cast<FwAssertArgType>(_status)
2962  );
2963 
2964 #if FW_AMPCS_COMPATIBLE
2965  // Serialize the argument size
2966  _status = _logBuff.serializeFrom(
2967  static_cast<U8>(sizeof(U32))
2968  );
2969  FW_ASSERT(
2970  _status == Fw::FW_SERIALIZE_OK,
2971  static_cast<FwAssertArgType>(_status)
2972  );
2973 #endif
2974  _status = _logBuff.serializeFrom(computedCRC);
2975  FW_ASSERT(
2976  _status == Fw::FW_SERIALIZE_OK,
2977  static_cast<FwAssertArgType>(_status)
2978  );
2979 
2980  this->logOut_out(
2981  0,
2982  _id,
2983  _logTime,
2985  _logBuff
2986  );
2987  }
2988 
2989  // Emit the event on the text log port
2990 #if FW_ENABLE_TEXT_LOGGING
2991  if (this->isConnected_LogText_OutputPort(0)) {
2992 #if FW_OBJECT_NAMES == 1
2993  const char* _formatString =
2994  "(%s) %s: Sequence file %s had invalid CRC. Stored 0x%" PRIx32 ", Computed 0x%" PRIx32 ".";
2995 #else
2996  const char* _formatString =
2997  "%s: Sequence file %s had invalid CRC. Stored 0x%" PRIx32 ", Computed 0x%" PRIx32 ".";
2998 #endif
2999 
3000  Fw::TextLogString _logString;
3001  (void) _logString.format(
3002  _formatString,
3003 #if FW_OBJECT_NAMES == 1
3004  this->m_objName.toChar(),
3005 #endif
3006  "CS_FileCrcFailure ",
3007  fileName.toChar(),
3008  storedCRC,
3009  computedCRC
3010  );
3011 
3012  this->LogText_out(
3013  0,
3014  _id,
3015  _logTime,
3017  _logString
3018  );
3019  }
3020 #endif
3021  }
3022 
3025  const Fw::StringBase& fileName,
3026  U32 recordNumber,
3027  FwOpcodeType opCode
3028  ) const
3029  {
3030  // Get the time
3031  Fw::Time _logTime;
3032  if (this->isConnected_timeCaller_OutputPort(0)) {
3033  this->timeCaller_out(0, _logTime);
3034  }
3035 
3036  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_COMMANDCOMPLETE;
3037 
3038  // Emit the event on the log port
3039  if (this->isConnected_logOut_OutputPort(0)) {
3040  Fw::LogBuffer _logBuff;
3042 
3043 #if FW_AMPCS_COMPATIBLE
3044  // Serialize the number of arguments
3045  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3046  FW_ASSERT(
3047  _status == Fw::FW_SERIALIZE_OK,
3048  static_cast<FwAssertArgType>(_status)
3049  );
3050 #endif
3051 
3052  _status = fileName.serializeTo(
3053  _logBuff,
3054  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3055  );
3056  FW_ASSERT(
3057  _status == Fw::FW_SERIALIZE_OK,
3058  static_cast<FwAssertArgType>(_status)
3059  );
3060 
3061 #if FW_AMPCS_COMPATIBLE
3062  // Serialize the argument size
3063  _status = _logBuff.serializeFrom(
3064  static_cast<U8>(sizeof(U32))
3065  );
3066  FW_ASSERT(
3067  _status == Fw::FW_SERIALIZE_OK,
3068  static_cast<FwAssertArgType>(_status)
3069  );
3070 #endif
3071  _status = _logBuff.serializeFrom(recordNumber);
3072  FW_ASSERT(
3073  _status == Fw::FW_SERIALIZE_OK,
3074  static_cast<FwAssertArgType>(_status)
3075  );
3076 
3077 #if FW_AMPCS_COMPATIBLE
3078  // Serialize the argument size
3079  _status = _logBuff.serializeFrom(
3080  static_cast<U8>(sizeof(FwOpcodeType))
3081  );
3082  FW_ASSERT(
3083  _status == Fw::FW_SERIALIZE_OK,
3084  static_cast<FwAssertArgType>(_status)
3085  );
3086 #endif
3087  _status = _logBuff.serializeFrom(opCode);
3088  FW_ASSERT(
3089  _status == Fw::FW_SERIALIZE_OK,
3090  static_cast<FwAssertArgType>(_status)
3091  );
3092 
3093  this->logOut_out(
3094  0,
3095  _id,
3096  _logTime,
3098  _logBuff
3099  );
3100  }
3101 
3102  // Emit the event on the text log port
3103 #if FW_ENABLE_TEXT_LOGGING
3104  if (this->isConnected_LogText_OutputPort(0)) {
3105 #if FW_OBJECT_NAMES == 1
3106  const char* _formatString =
3107  "(%s) %s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") complete";
3108 #else
3109  const char* _formatString =
3110  "%s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") complete";
3111 #endif
3112 
3113  Fw::TextLogString _logString;
3114  (void) _logString.format(
3115  _formatString,
3116 #if FW_OBJECT_NAMES == 1
3117  this->m_objName.toChar(),
3118 #endif
3119  "CS_CommandComplete ",
3120  fileName.toChar(),
3121  recordNumber,
3122  opCode
3123  );
3124 
3125  this->LogText_out(
3126  0,
3127  _id,
3128  _logTime,
3130  _logString
3131  );
3132  }
3133 #endif
3134  }
3135 
3138  {
3139  // Get the time
3140  Fw::Time _logTime;
3141  if (this->isConnected_timeCaller_OutputPort(0)) {
3142  this->timeCaller_out(0, _logTime);
3143  }
3144 
3145  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCECOMPLETE;
3146 
3147  // Emit the event on the log port
3148  if (this->isConnected_logOut_OutputPort(0)) {
3149  Fw::LogBuffer _logBuff;
3151 
3152 #if FW_AMPCS_COMPATIBLE
3153  // Serialize the number of arguments
3154  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3155  FW_ASSERT(
3156  _status == Fw::FW_SERIALIZE_OK,
3157  static_cast<FwAssertArgType>(_status)
3158  );
3159 #endif
3160 
3161  _status = fileName.serializeTo(
3162  _logBuff,
3163  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3164  );
3165  FW_ASSERT(
3166  _status == Fw::FW_SERIALIZE_OK,
3167  static_cast<FwAssertArgType>(_status)
3168  );
3169 
3170  this->logOut_out(
3171  0,
3172  _id,
3173  _logTime,
3175  _logBuff
3176  );
3177  }
3178 
3179  // Emit the event on the text log port
3180 #if FW_ENABLE_TEXT_LOGGING
3181  if (this->isConnected_LogText_OutputPort(0)) {
3182 #if FW_OBJECT_NAMES == 1
3183  const char* _formatString =
3184  "(%s) %s: Sequence file %s complete";
3185 #else
3186  const char* _formatString =
3187  "%s: Sequence file %s complete";
3188 #endif
3189 
3190  Fw::TextLogString _logString;
3191  (void) _logString.format(
3192  _formatString,
3193 #if FW_OBJECT_NAMES == 1
3194  this->m_objName.toChar(),
3195 #endif
3196  "CS_SequenceComplete ",
3197  fileName.toChar()
3198  );
3199 
3200  this->LogText_out(
3201  0,
3202  _id,
3203  _logTime,
3205  _logString
3206  );
3207  }
3208 #endif
3209  }
3210 
3213  const Fw::StringBase& fileName,
3214  U32 recordNumber,
3215  FwOpcodeType opCode,
3216  U32 errorStatus
3217  ) const
3218  {
3219  // Get the time
3220  Fw::Time _logTime;
3221  if (this->isConnected_timeCaller_OutputPort(0)) {
3222  this->timeCaller_out(0, _logTime);
3223  }
3224 
3225  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_COMMANDERROR;
3226 
3227  // Emit the event on the log port
3228  if (this->isConnected_logOut_OutputPort(0)) {
3229  Fw::LogBuffer _logBuff;
3231 
3232 #if FW_AMPCS_COMPATIBLE
3233  // Serialize the number of arguments
3234  _status = _logBuff.serializeFrom(static_cast<U8>(4));
3235  FW_ASSERT(
3236  _status == Fw::FW_SERIALIZE_OK,
3237  static_cast<FwAssertArgType>(_status)
3238  );
3239 #endif
3240 
3241  _status = fileName.serializeTo(
3242  _logBuff,
3243  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3244  );
3245  FW_ASSERT(
3246  _status == Fw::FW_SERIALIZE_OK,
3247  static_cast<FwAssertArgType>(_status)
3248  );
3249 
3250 #if FW_AMPCS_COMPATIBLE
3251  // Serialize the argument size
3252  _status = _logBuff.serializeFrom(
3253  static_cast<U8>(sizeof(U32))
3254  );
3255  FW_ASSERT(
3256  _status == Fw::FW_SERIALIZE_OK,
3257  static_cast<FwAssertArgType>(_status)
3258  );
3259 #endif
3260  _status = _logBuff.serializeFrom(recordNumber);
3261  FW_ASSERT(
3262  _status == Fw::FW_SERIALIZE_OK,
3263  static_cast<FwAssertArgType>(_status)
3264  );
3265 
3266 #if FW_AMPCS_COMPATIBLE
3267  // Serialize the argument size
3268  _status = _logBuff.serializeFrom(
3269  static_cast<U8>(sizeof(FwOpcodeType))
3270  );
3271  FW_ASSERT(
3272  _status == Fw::FW_SERIALIZE_OK,
3273  static_cast<FwAssertArgType>(_status)
3274  );
3275 #endif
3276  _status = _logBuff.serializeFrom(opCode);
3277  FW_ASSERT(
3278  _status == Fw::FW_SERIALIZE_OK,
3279  static_cast<FwAssertArgType>(_status)
3280  );
3281 
3282 #if FW_AMPCS_COMPATIBLE
3283  // Serialize the argument size
3284  _status = _logBuff.serializeFrom(
3285  static_cast<U8>(sizeof(U32))
3286  );
3287  FW_ASSERT(
3288  _status == Fw::FW_SERIALIZE_OK,
3289  static_cast<FwAssertArgType>(_status)
3290  );
3291 #endif
3292  _status = _logBuff.serializeFrom(errorStatus);
3293  FW_ASSERT(
3294  _status == Fw::FW_SERIALIZE_OK,
3295  static_cast<FwAssertArgType>(_status)
3296  );
3297 
3298  this->logOut_out(
3299  0,
3300  _id,
3301  _logTime,
3303  _logBuff
3304  );
3305  }
3306 
3307  // Emit the event on the text log port
3308 #if FW_ENABLE_TEXT_LOGGING
3309  if (this->isConnected_LogText_OutputPort(0)) {
3310 #if FW_OBJECT_NAMES == 1
3311  const char* _formatString =
3312  "(%s) %s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") completed with error %" PRIu32 "";
3313 #else
3314  const char* _formatString =
3315  "%s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") completed with error %" PRIu32 "";
3316 #endif
3317 
3318  Fw::TextLogString _logString;
3319  (void) _logString.format(
3320  _formatString,
3321 #if FW_OBJECT_NAMES == 1
3322  this->m_objName.toChar(),
3323 #endif
3324  "CS_CommandError ",
3325  fileName.toChar(),
3326  recordNumber,
3327  opCode,
3328  errorStatus
3329  );
3330 
3331  this->LogText_out(
3332  0,
3333  _id,
3334  _logTime,
3336  _logString
3337  );
3338  }
3339 #endif
3340  }
3341 
3344  {
3345  // Get the time
3346  Fw::Time _logTime;
3347  if (this->isConnected_timeCaller_OutputPort(0)) {
3348  this->timeCaller_out(0, _logTime);
3349  }
3350 
3351  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_INVALIDMODE;
3352 
3353  // Emit the event on the log port
3354  if (this->isConnected_logOut_OutputPort(0)) {
3355  Fw::LogBuffer _logBuff;
3356 
3357 #if FW_AMPCS_COMPATIBLE
3359  // Serialize the number of arguments
3360  _status = _logBuff.serializeFrom(static_cast<U8>(0));
3361  FW_ASSERT(
3362  _status == Fw::FW_SERIALIZE_OK,
3363  static_cast<FwAssertArgType>(_status)
3364  );
3365 #endif
3366 
3367  this->logOut_out(
3368  0,
3369  _id,
3370  _logTime,
3372  _logBuff
3373  );
3374  }
3375 
3376  // Emit the event on the text log port
3377 #if FW_ENABLE_TEXT_LOGGING
3378  if (this->isConnected_LogText_OutputPort(0)) {
3379 #if FW_OBJECT_NAMES == 1
3380  const char* _formatString =
3381  "(%s) %s: Invalid mode";
3382 #else
3383  const char* _formatString =
3384  "%s: Invalid mode";
3385 #endif
3386 
3387  Fw::TextLogString _logString;
3388  (void) _logString.format(
3389  _formatString,
3390 #if FW_OBJECT_NAMES == 1
3391  this->m_objName.toChar(),
3392 #endif
3393  "CS_InvalidMode "
3394  );
3395 
3396  this->LogText_out(
3397  0,
3398  _id,
3399  _logTime,
3401  _logString
3402  );
3403  }
3404 #endif
3405  }
3406 
3409  const Fw::StringBase& fileName,
3410  U32 header_records,
3411  U32 extra_bytes
3412  ) const
3413  {
3414  // Get the time
3415  Fw::Time _logTime;
3416  if (this->isConnected_timeCaller_OutputPort(0)) {
3417  this->timeCaller_out(0, _logTime);
3418  }
3419 
3420  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_RECORDMISMATCH;
3421 
3422  // Emit the event on the log port
3423  if (this->isConnected_logOut_OutputPort(0)) {
3424  Fw::LogBuffer _logBuff;
3426 
3427 #if FW_AMPCS_COMPATIBLE
3428  // Serialize the number of arguments
3429  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3430  FW_ASSERT(
3431  _status == Fw::FW_SERIALIZE_OK,
3432  static_cast<FwAssertArgType>(_status)
3433  );
3434 #endif
3435 
3436  _status = fileName.serializeTo(
3437  _logBuff,
3438  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3439  );
3440  FW_ASSERT(
3441  _status == Fw::FW_SERIALIZE_OK,
3442  static_cast<FwAssertArgType>(_status)
3443  );
3444 
3445 #if FW_AMPCS_COMPATIBLE
3446  // Serialize the argument size
3447  _status = _logBuff.serializeFrom(
3448  static_cast<U8>(sizeof(U32))
3449  );
3450  FW_ASSERT(
3451  _status == Fw::FW_SERIALIZE_OK,
3452  static_cast<FwAssertArgType>(_status)
3453  );
3454 #endif
3455  _status = _logBuff.serializeFrom(header_records);
3456  FW_ASSERT(
3457  _status == Fw::FW_SERIALIZE_OK,
3458  static_cast<FwAssertArgType>(_status)
3459  );
3460 
3461 #if FW_AMPCS_COMPATIBLE
3462  // Serialize the argument size
3463  _status = _logBuff.serializeFrom(
3464  static_cast<U8>(sizeof(U32))
3465  );
3466  FW_ASSERT(
3467  _status == Fw::FW_SERIALIZE_OK,
3468  static_cast<FwAssertArgType>(_status)
3469  );
3470 #endif
3471  _status = _logBuff.serializeFrom(extra_bytes);
3472  FW_ASSERT(
3473  _status == Fw::FW_SERIALIZE_OK,
3474  static_cast<FwAssertArgType>(_status)
3475  );
3476 
3477  this->logOut_out(
3478  0,
3479  _id,
3480  _logTime,
3482  _logBuff
3483  );
3484  }
3485 
3486  // Emit the event on the text log port
3487 #if FW_ENABLE_TEXT_LOGGING
3488  if (this->isConnected_LogText_OutputPort(0)) {
3489 #if FW_OBJECT_NAMES == 1
3490  const char* _formatString =
3491  "(%s) %s: Sequence file %s header records mismatch: %" PRIu32 " in header, found %" PRIu32 " extra bytes.";
3492 #else
3493  const char* _formatString =
3494  "%s: Sequence file %s header records mismatch: %" PRIu32 " in header, found %" PRIu32 " extra bytes.";
3495 #endif
3496 
3497  Fw::TextLogString _logString;
3498  (void) _logString.format(
3499  _formatString,
3500 #if FW_OBJECT_NAMES == 1
3501  this->m_objName.toChar(),
3502 #endif
3503  "CS_RecordMismatch ",
3504  fileName.toChar(),
3505  header_records,
3506  extra_bytes
3507  );
3508 
3509  this->LogText_out(
3510  0,
3511  _id,
3512  _logTime,
3514  _logString
3515  );
3516  }
3517 #endif
3518  }
3519 
3522  const Fw::StringBase& fileName,
3523  U16 time_base,
3524  U16 seq_time_base
3525  ) const
3526  {
3527  // Get the time
3528  Fw::Time _logTime;
3529  if (this->isConnected_timeCaller_OutputPort(0)) {
3530  this->timeCaller_out(0, _logTime);
3531  }
3532 
3533  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_TIMEBASEMISMATCH;
3534 
3535  // Emit the event on the log port
3536  if (this->isConnected_logOut_OutputPort(0)) {
3537  Fw::LogBuffer _logBuff;
3539 
3540 #if FW_AMPCS_COMPATIBLE
3541  // Serialize the number of arguments
3542  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3543  FW_ASSERT(
3544  _status == Fw::FW_SERIALIZE_OK,
3545  static_cast<FwAssertArgType>(_status)
3546  );
3547 #endif
3548 
3549  _status = fileName.serializeTo(
3550  _logBuff,
3551  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3552  );
3553  FW_ASSERT(
3554  _status == Fw::FW_SERIALIZE_OK,
3555  static_cast<FwAssertArgType>(_status)
3556  );
3557 
3558 #if FW_AMPCS_COMPATIBLE
3559  // Serialize the argument size
3560  _status = _logBuff.serializeFrom(
3561  static_cast<U8>(sizeof(U16))
3562  );
3563  FW_ASSERT(
3564  _status == Fw::FW_SERIALIZE_OK,
3565  static_cast<FwAssertArgType>(_status)
3566  );
3567 #endif
3568  _status = _logBuff.serializeFrom(time_base);
3569  FW_ASSERT(
3570  _status == Fw::FW_SERIALIZE_OK,
3571  static_cast<FwAssertArgType>(_status)
3572  );
3573 
3574 #if FW_AMPCS_COMPATIBLE
3575  // Serialize the argument size
3576  _status = _logBuff.serializeFrom(
3577  static_cast<U8>(sizeof(U16))
3578  );
3579  FW_ASSERT(
3580  _status == Fw::FW_SERIALIZE_OK,
3581  static_cast<FwAssertArgType>(_status)
3582  );
3583 #endif
3584  _status = _logBuff.serializeFrom(seq_time_base);
3585  FW_ASSERT(
3586  _status == Fw::FW_SERIALIZE_OK,
3587  static_cast<FwAssertArgType>(_status)
3588  );
3589 
3590  this->logOut_out(
3591  0,
3592  _id,
3593  _logTime,
3595  _logBuff
3596  );
3597  }
3598 
3599  // Emit the event on the text log port
3600 #if FW_ENABLE_TEXT_LOGGING
3601  if (this->isConnected_LogText_OutputPort(0)) {
3602 #if FW_OBJECT_NAMES == 1
3603  const char* _formatString =
3604  "(%s) %s: Sequence file %s: Current time base doesn't match sequence time: base: %" PRIu16 " seq: %" PRIu16 "";
3605 #else
3606  const char* _formatString =
3607  "%s: Sequence file %s: Current time base doesn't match sequence time: base: %" PRIu16 " seq: %" PRIu16 "";
3608 #endif
3609 
3610  Fw::TextLogString _logString;
3611  (void) _logString.format(
3612  _formatString,
3613 #if FW_OBJECT_NAMES == 1
3614  this->m_objName.toChar(),
3615 #endif
3616  "CS_TimeBaseMismatch ",
3617  fileName.toChar(),
3618  time_base,
3619  seq_time_base
3620  );
3621 
3622  this->LogText_out(
3623  0,
3624  _id,
3625  _logTime,
3627  _logString
3628  );
3629  }
3630 #endif
3631  }
3632 
3635  const Fw::StringBase& fileName,
3636  U8 currTimeBase,
3637  U8 seqTimeBase
3638  ) const
3639  {
3640  // Get the time
3641  Fw::Time _logTime;
3642  if (this->isConnected_timeCaller_OutputPort(0)) {
3643  this->timeCaller_out(0, _logTime);
3644  }
3645 
3647 
3648  // Emit the event on the log port
3649  if (this->isConnected_logOut_OutputPort(0)) {
3650  Fw::LogBuffer _logBuff;
3652 
3653 #if FW_AMPCS_COMPATIBLE
3654  // Serialize the number of arguments
3655  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3656  FW_ASSERT(
3657  _status == Fw::FW_SERIALIZE_OK,
3658  static_cast<FwAssertArgType>(_status)
3659  );
3660 #endif
3661 
3662  _status = fileName.serializeTo(
3663  _logBuff,
3664  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3665  );
3666  FW_ASSERT(
3667  _status == Fw::FW_SERIALIZE_OK,
3668  static_cast<FwAssertArgType>(_status)
3669  );
3670 
3671 #if FW_AMPCS_COMPATIBLE
3672  // Serialize the argument size
3673  _status = _logBuff.serializeFrom(
3674  static_cast<U8>(sizeof(U8))
3675  );
3676  FW_ASSERT(
3677  _status == Fw::FW_SERIALIZE_OK,
3678  static_cast<FwAssertArgType>(_status)
3679  );
3680 #endif
3681  _status = _logBuff.serializeFrom(currTimeBase);
3682  FW_ASSERT(
3683  _status == Fw::FW_SERIALIZE_OK,
3684  static_cast<FwAssertArgType>(_status)
3685  );
3686 
3687 #if FW_AMPCS_COMPATIBLE
3688  // Serialize the argument size
3689  _status = _logBuff.serializeFrom(
3690  static_cast<U8>(sizeof(U8))
3691  );
3692  FW_ASSERT(
3693  _status == Fw::FW_SERIALIZE_OK,
3694  static_cast<FwAssertArgType>(_status)
3695  );
3696 #endif
3697  _status = _logBuff.serializeFrom(seqTimeBase);
3698  FW_ASSERT(
3699  _status == Fw::FW_SERIALIZE_OK,
3700  static_cast<FwAssertArgType>(_status)
3701  );
3702 
3703  this->logOut_out(
3704  0,
3705  _id,
3706  _logTime,
3708  _logBuff
3709  );
3710  }
3711 
3712  // Emit the event on the text log port
3713 #if FW_ENABLE_TEXT_LOGGING
3714  if (this->isConnected_LogText_OutputPort(0)) {
3715 #if FW_OBJECT_NAMES == 1
3716  const char* _formatString =
3717  "(%s) %s: Sequence file %s: Current time context doesn't match sequence context: base: %" PRIu8 " seq: %" PRIu8 "";
3718 #else
3719  const char* _formatString =
3720  "%s: Sequence file %s: Current time context doesn't match sequence context: base: %" PRIu8 " seq: %" PRIu8 "";
3721 #endif
3722 
3723  Fw::TextLogString _logString;
3724  (void) _logString.format(
3725  _formatString,
3726 #if FW_OBJECT_NAMES == 1
3727  this->m_objName.toChar(),
3728 #endif
3729  "CS_TimeContextMismatch ",
3730  fileName.toChar(),
3731  currTimeBase,
3732  seqTimeBase
3733  );
3734 
3735  this->LogText_out(
3736  0,
3737  _id,
3738  _logTime,
3740  _logString
3741  );
3742  }
3743 #endif
3744  }
3745 
3748  {
3749  // Get the time
3750  Fw::Time _logTime;
3751  if (this->isConnected_timeCaller_OutputPort(0)) {
3752  this->timeCaller_out(0, _logTime);
3753  }
3754 
3756 
3757  // Emit the event on the log port
3758  if (this->isConnected_logOut_OutputPort(0)) {
3759  Fw::LogBuffer _logBuff;
3761 
3762 #if FW_AMPCS_COMPATIBLE
3763  // Serialize the number of arguments
3764  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3765  FW_ASSERT(
3766  _status == Fw::FW_SERIALIZE_OK,
3767  static_cast<FwAssertArgType>(_status)
3768  );
3769 #endif
3770 
3771  _status = filename.serializeTo(
3772  _logBuff,
3773  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3774  );
3775  FW_ASSERT(
3776  _status == Fw::FW_SERIALIZE_OK,
3777  static_cast<FwAssertArgType>(_status)
3778  );
3779 
3780  this->logOut_out(
3781  0,
3782  _id,
3783  _logTime,
3785  _logBuff
3786  );
3787  }
3788 
3789  // Emit the event on the text log port
3790 #if FW_ENABLE_TEXT_LOGGING
3791  if (this->isConnected_LogText_OutputPort(0)) {
3792 #if FW_OBJECT_NAMES == 1
3793  const char* _formatString =
3794  "(%s) %s: Local request for sequence %s started.";
3795 #else
3796  const char* _formatString =
3797  "%s: Local request for sequence %s started.";
3798 #endif
3799 
3800  Fw::TextLogString _logString;
3801  (void) _logString.format(
3802  _formatString,
3803 #if FW_OBJECT_NAMES == 1
3804  this->m_objName.toChar(),
3805 #endif
3806  "CS_PortSequenceStarted ",
3807  filename.toChar()
3808  );
3809 
3810  this->LogText_out(
3811  0,
3812  _id,
3813  _logTime,
3815  _logString
3816  );
3817  }
3818 #endif
3819  }
3820 
3823  {
3824  // Get the time
3825  Fw::Time _logTime;
3826  if (this->isConnected_timeCaller_OutputPort(0)) {
3827  this->timeCaller_out(0, _logTime);
3828  }
3829 
3831 
3832  // Emit the event on the log port
3833  if (this->isConnected_logOut_OutputPort(0)) {
3834  Fw::LogBuffer _logBuff;
3836 
3837 #if FW_AMPCS_COMPATIBLE
3838  // Serialize the number of arguments
3839  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3840  FW_ASSERT(
3841  _status == Fw::FW_SERIALIZE_OK,
3842  static_cast<FwAssertArgType>(_status)
3843  );
3844 #endif
3845 
3846 #if FW_AMPCS_COMPATIBLE
3847  // Serialize the argument size
3848  _status = _logBuff.serializeFrom(
3849  static_cast<U8>(sizeof(FwOpcodeType))
3850  );
3851  FW_ASSERT(
3852  _status == Fw::FW_SERIALIZE_OK,
3853  static_cast<FwAssertArgType>(_status)
3854  );
3855 #endif
3856  _status = _logBuff.serializeFrom(opcode);
3857  FW_ASSERT(
3858  _status == Fw::FW_SERIALIZE_OK,
3859  static_cast<FwAssertArgType>(_status)
3860  );
3861 
3862  this->logOut_out(
3863  0,
3864  _id,
3865  _logTime,
3867  _logBuff
3868  );
3869  }
3870 
3871  // Emit the event on the text log port
3872 #if FW_ENABLE_TEXT_LOGGING
3873  if (this->isConnected_LogText_OutputPort(0)) {
3874 #if FW_OBJECT_NAMES == 1
3875  const char* _formatString =
3876  "(%s) %s: Command complete status received while no sequences active. Opcode: %" PRIu32 "";
3877 #else
3878  const char* _formatString =
3879  "%s: Command complete status received while no sequences active. Opcode: %" PRIu32 "";
3880 #endif
3881 
3882  Fw::TextLogString _logString;
3883  (void) _logString.format(
3884  _formatString,
3885 #if FW_OBJECT_NAMES == 1
3886  this->m_objName.toChar(),
3887 #endif
3888  "CS_UnexpectedCompletion ",
3889  opcode
3890  );
3891 
3892  this->LogText_out(
3893  0,
3894  _id,
3895  _logTime,
3897  _logString
3898  );
3899  }
3900 #endif
3901  }
3902 
3905  {
3906  // Get the time
3907  Fw::Time _logTime;
3908  if (this->isConnected_timeCaller_OutputPort(0)) {
3909  this->timeCaller_out(0, _logTime);
3910  }
3911 
3912  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_MODESWITCHED;
3913 
3914  // Emit the event on the log port
3915  if (this->isConnected_logOut_OutputPort(0)) {
3916  Fw::LogBuffer _logBuff;
3918 
3919 #if FW_AMPCS_COMPATIBLE
3920  // Serialize the number of arguments
3921  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3922  FW_ASSERT(
3923  _status == Fw::FW_SERIALIZE_OK,
3924  static_cast<FwAssertArgType>(_status)
3925  );
3926 #endif
3927 
3928 #if FW_AMPCS_COMPATIBLE
3929  // Serialize the argument size
3930  _status = _logBuff.serializeFrom(
3932  );
3933  FW_ASSERT(
3934  _status == Fw::FW_SERIALIZE_OK,
3935  static_cast<FwAssertArgType>(_status)
3936  );
3937 #endif
3938  _status = _logBuff.serializeFrom(mode);
3939  FW_ASSERT(
3940  _status == Fw::FW_SERIALIZE_OK,
3941  static_cast<FwAssertArgType>(_status)
3942  );
3943 
3944  this->logOut_out(
3945  0,
3946  _id,
3947  _logTime,
3949  _logBuff
3950  );
3951  }
3952 
3953  // Emit the event on the text log port
3954 #if FW_ENABLE_TEXT_LOGGING
3955  if (this->isConnected_LogText_OutputPort(0)) {
3956 #if FW_OBJECT_NAMES == 1
3957  const char* _formatString =
3958  "(%s) %s: Sequencer switched to %s step mode";
3959 #else
3960  const char* _formatString =
3961  "%s: Sequencer switched to %s step mode";
3962 #endif
3963 
3964  Fw::String modeStr;
3965  mode.toString(modeStr);
3966 
3967  Fw::TextLogString _logString;
3968  (void) _logString.format(
3969  _formatString,
3970 #if FW_OBJECT_NAMES == 1
3971  this->m_objName.toChar(),
3972 #endif
3973  "CS_ModeSwitched ",
3974  modeStr.toChar()
3975  );
3976 
3977  this->LogText_out(
3978  0,
3979  _id,
3980  _logTime,
3982  _logString
3983  );
3984  }
3985 #endif
3986  }
3987 
3990  {
3991  // Get the time
3992  Fw::Time _logTime;
3993  if (this->isConnected_timeCaller_OutputPort(0)) {
3994  this->timeCaller_out(0, _logTime);
3995  }
3996 
3997  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_NOSEQUENCEACTIVE;
3998 
3999  // Emit the event on the log port
4000  if (this->isConnected_logOut_OutputPort(0)) {
4001  Fw::LogBuffer _logBuff;
4002 
4003 #if FW_AMPCS_COMPATIBLE
4005  // Serialize the number of arguments
4006  _status = _logBuff.serializeFrom(static_cast<U8>(0));
4007  FW_ASSERT(
4008  _status == Fw::FW_SERIALIZE_OK,
4009  static_cast<FwAssertArgType>(_status)
4010  );
4011 #endif
4012 
4013  this->logOut_out(
4014  0,
4015  _id,
4016  _logTime,
4018  _logBuff
4019  );
4020  }
4021 
4022  // Emit the event on the text log port
4023 #if FW_ENABLE_TEXT_LOGGING
4024  if (this->isConnected_LogText_OutputPort(0)) {
4025 #if FW_OBJECT_NAMES == 1
4026  const char* _formatString =
4027  "(%s) %s: No sequence active.";
4028 #else
4029  const char* _formatString =
4030  "%s: No sequence active.";
4031 #endif
4032 
4033  Fw::TextLogString _logString;
4034  (void) _logString.format(
4035  _formatString,
4036 #if FW_OBJECT_NAMES == 1
4037  this->m_objName.toChar(),
4038 #endif
4039  "CS_NoSequenceActive "
4040  );
4041 
4042  this->LogText_out(
4043  0,
4044  _id,
4045  _logTime,
4047  _logString
4048  );
4049  }
4050 #endif
4051  }
4052 
4055  {
4056  // Get the time
4057  Fw::Time _logTime;
4058  if (this->isConnected_timeCaller_OutputPort(0)) {
4059  this->timeCaller_out(0, _logTime);
4060  }
4061 
4062  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCEVALID;
4063 
4064  // Emit the event on the log port
4065  if (this->isConnected_logOut_OutputPort(0)) {
4066  Fw::LogBuffer _logBuff;
4068 
4069 #if FW_AMPCS_COMPATIBLE
4070  // Serialize the number of arguments
4071  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4072  FW_ASSERT(
4073  _status == Fw::FW_SERIALIZE_OK,
4074  static_cast<FwAssertArgType>(_status)
4075  );
4076 #endif
4077 
4078  _status = filename.serializeTo(
4079  _logBuff,
4080  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4081  );
4082  FW_ASSERT(
4083  _status == Fw::FW_SERIALIZE_OK,
4084  static_cast<FwAssertArgType>(_status)
4085  );
4086 
4087  this->logOut_out(
4088  0,
4089  _id,
4090  _logTime,
4092  _logBuff
4093  );
4094  }
4095 
4096  // Emit the event on the text log port
4097 #if FW_ENABLE_TEXT_LOGGING
4098  if (this->isConnected_LogText_OutputPort(0)) {
4099 #if FW_OBJECT_NAMES == 1
4100  const char* _formatString =
4101  "(%s) %s: Sequence %s is valid.";
4102 #else
4103  const char* _formatString =
4104  "%s: Sequence %s is valid.";
4105 #endif
4106 
4107  Fw::TextLogString _logString;
4108  (void) _logString.format(
4109  _formatString,
4110 #if FW_OBJECT_NAMES == 1
4111  this->m_objName.toChar(),
4112 #endif
4113  "CS_SequenceValid ",
4114  filename.toChar()
4115  );
4116 
4117  this->LogText_out(
4118  0,
4119  _id,
4120  _logTime,
4122  _logString
4123  );
4124  }
4125 #endif
4126  }
4127 
4130  const Fw::StringBase& filename,
4131  U32 command
4132  ) const
4133  {
4134  // Get the time
4135  Fw::Time _logTime;
4136  if (this->isConnected_timeCaller_OutputPort(0)) {
4137  this->timeCaller_out(0, _logTime);
4138  }
4139 
4140  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCETIMEOUT;
4141 
4142  // Emit the event on the log port
4143  if (this->isConnected_logOut_OutputPort(0)) {
4144  Fw::LogBuffer _logBuff;
4146 
4147 #if FW_AMPCS_COMPATIBLE
4148  // Serialize the number of arguments
4149  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4150  FW_ASSERT(
4151  _status == Fw::FW_SERIALIZE_OK,
4152  static_cast<FwAssertArgType>(_status)
4153  );
4154 #endif
4155 
4156  _status = filename.serializeTo(
4157  _logBuff,
4158  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4159  );
4160  FW_ASSERT(
4161  _status == Fw::FW_SERIALIZE_OK,
4162  static_cast<FwAssertArgType>(_status)
4163  );
4164 
4165 #if FW_AMPCS_COMPATIBLE
4166  // Serialize the argument size
4167  _status = _logBuff.serializeFrom(
4168  static_cast<U8>(sizeof(U32))
4169  );
4170  FW_ASSERT(
4171  _status == Fw::FW_SERIALIZE_OK,
4172  static_cast<FwAssertArgType>(_status)
4173  );
4174 #endif
4175  _status = _logBuff.serializeFrom(command);
4176  FW_ASSERT(
4177  _status == Fw::FW_SERIALIZE_OK,
4178  static_cast<FwAssertArgType>(_status)
4179  );
4180 
4181  this->logOut_out(
4182  0,
4183  _id,
4184  _logTime,
4186  _logBuff
4187  );
4188  }
4189 
4190  // Emit the event on the text log port
4191 #if FW_ENABLE_TEXT_LOGGING
4192  if (this->isConnected_LogText_OutputPort(0)) {
4193 #if FW_OBJECT_NAMES == 1
4194  const char* _formatString =
4195  "(%s) %s: Sequence %s timed out on command %" PRIu32 "";
4196 #else
4197  const char* _formatString =
4198  "%s: Sequence %s timed out on command %" PRIu32 "";
4199 #endif
4200 
4201  Fw::TextLogString _logString;
4202  (void) _logString.format(
4203  _formatString,
4204 #if FW_OBJECT_NAMES == 1
4205  this->m_objName.toChar(),
4206 #endif
4207  "CS_SequenceTimeout ",
4208  filename.toChar(),
4209  command
4210  );
4211 
4212  this->LogText_out(
4213  0,
4214  _id,
4215  _logTime,
4217  _logString
4218  );
4219  }
4220 #endif
4221  }
4222 
4225  const Fw::StringBase& filename,
4226  U32 command
4227  ) const
4228  {
4229  // Get the time
4230  Fw::Time _logTime;
4231  if (this->isConnected_timeCaller_OutputPort(0)) {
4232  this->timeCaller_out(0, _logTime);
4233  }
4234 
4235  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_CMDSTEPPED;
4236 
4237  // Emit the event on the log port
4238  if (this->isConnected_logOut_OutputPort(0)) {
4239  Fw::LogBuffer _logBuff;
4241 
4242 #if FW_AMPCS_COMPATIBLE
4243  // Serialize the number of arguments
4244  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4245  FW_ASSERT(
4246  _status == Fw::FW_SERIALIZE_OK,
4247  static_cast<FwAssertArgType>(_status)
4248  );
4249 #endif
4250 
4251  _status = filename.serializeTo(
4252  _logBuff,
4253  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4254  );
4255  FW_ASSERT(
4256  _status == Fw::FW_SERIALIZE_OK,
4257  static_cast<FwAssertArgType>(_status)
4258  );
4259 
4260 #if FW_AMPCS_COMPATIBLE
4261  // Serialize the argument size
4262  _status = _logBuff.serializeFrom(
4263  static_cast<U8>(sizeof(U32))
4264  );
4265  FW_ASSERT(
4266  _status == Fw::FW_SERIALIZE_OK,
4267  static_cast<FwAssertArgType>(_status)
4268  );
4269 #endif
4270  _status = _logBuff.serializeFrom(command);
4271  FW_ASSERT(
4272  _status == Fw::FW_SERIALIZE_OK,
4273  static_cast<FwAssertArgType>(_status)
4274  );
4275 
4276  this->logOut_out(
4277  0,
4278  _id,
4279  _logTime,
4281  _logBuff
4282  );
4283  }
4284 
4285  // Emit the event on the text log port
4286 #if FW_ENABLE_TEXT_LOGGING
4287  if (this->isConnected_LogText_OutputPort(0)) {
4288 #if FW_OBJECT_NAMES == 1
4289  const char* _formatString =
4290  "(%s) %s: Sequence %s command %" PRIu32 " stepped";
4291 #else
4292  const char* _formatString =
4293  "%s: Sequence %s command %" PRIu32 " stepped";
4294 #endif
4295 
4296  Fw::TextLogString _logString;
4297  (void) _logString.format(
4298  _formatString,
4299 #if FW_OBJECT_NAMES == 1
4300  this->m_objName.toChar(),
4301 #endif
4302  "CS_CmdStepped ",
4303  filename.toChar(),
4304  command
4305  );
4306 
4307  this->LogText_out(
4308  0,
4309  _id,
4310  _logTime,
4312  _logString
4313  );
4314  }
4315 #endif
4316  }
4317 
4320  {
4321  // Get the time
4322  Fw::Time _logTime;
4323  if (this->isConnected_timeCaller_OutputPort(0)) {
4324  this->timeCaller_out(0, _logTime);
4325  }
4326 
4327  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_CMDSTARTED;
4328 
4329  // Emit the event on the log port
4330  if (this->isConnected_logOut_OutputPort(0)) {
4331  Fw::LogBuffer _logBuff;
4333 
4334 #if FW_AMPCS_COMPATIBLE
4335  // Serialize the number of arguments
4336  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4337  FW_ASSERT(
4338  _status == Fw::FW_SERIALIZE_OK,
4339  static_cast<FwAssertArgType>(_status)
4340  );
4341 #endif
4342 
4343  _status = filename.serializeTo(
4344  _logBuff,
4345  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4346  );
4347  FW_ASSERT(
4348  _status == Fw::FW_SERIALIZE_OK,
4349  static_cast<FwAssertArgType>(_status)
4350  );
4351 
4352  this->logOut_out(
4353  0,
4354  _id,
4355  _logTime,
4357  _logBuff
4358  );
4359  }
4360 
4361  // Emit the event on the text log port
4362 #if FW_ENABLE_TEXT_LOGGING
4363  if (this->isConnected_LogText_OutputPort(0)) {
4364 #if FW_OBJECT_NAMES == 1
4365  const char* _formatString =
4366  "(%s) %s: Sequence %s started";
4367 #else
4368  const char* _formatString =
4369  "%s: Sequence %s started";
4370 #endif
4371 
4372  Fw::TextLogString _logString;
4373  (void) _logString.format(
4374  _formatString,
4375 #if FW_OBJECT_NAMES == 1
4376  this->m_objName.toChar(),
4377 #endif
4378  "CS_CmdStarted ",
4379  filename.toChar()
4380  );
4381 
4382  this->LogText_out(
4383  0,
4384  _id,
4385  _logTime,
4387  _logString
4388  );
4389  }
4390 #endif
4391  }
4392 
4395  const Fw::StringBase& filename,
4396  U32 recordNumber,
4397  FwOpcodeType opCode
4398  ) const
4399  {
4400  // Get the time
4401  Fw::Time _logTime;
4402  if (this->isConnected_timeCaller_OutputPort(0)) {
4403  this->timeCaller_out(0, _logTime);
4404  }
4405 
4406  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_JOINWAITING;
4407 
4408  // Emit the event on the log port
4409  if (this->isConnected_logOut_OutputPort(0)) {
4410  Fw::LogBuffer _logBuff;
4412 
4413 #if FW_AMPCS_COMPATIBLE
4414  // Serialize the number of arguments
4415  _status = _logBuff.serializeFrom(static_cast<U8>(3));
4416  FW_ASSERT(
4417  _status == Fw::FW_SERIALIZE_OK,
4418  static_cast<FwAssertArgType>(_status)
4419  );
4420 #endif
4421 
4422  _status = filename.serializeTo(
4423  _logBuff,
4424  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4425  );
4426  FW_ASSERT(
4427  _status == Fw::FW_SERIALIZE_OK,
4428  static_cast<FwAssertArgType>(_status)
4429  );
4430 
4431 #if FW_AMPCS_COMPATIBLE
4432  // Serialize the argument size
4433  _status = _logBuff.serializeFrom(
4434  static_cast<U8>(sizeof(U32))
4435  );
4436  FW_ASSERT(
4437  _status == Fw::FW_SERIALIZE_OK,
4438  static_cast<FwAssertArgType>(_status)
4439  );
4440 #endif
4441  _status = _logBuff.serializeFrom(recordNumber);
4442  FW_ASSERT(
4443  _status == Fw::FW_SERIALIZE_OK,
4444  static_cast<FwAssertArgType>(_status)
4445  );
4446 
4447 #if FW_AMPCS_COMPATIBLE
4448  // Serialize the argument size
4449  _status = _logBuff.serializeFrom(
4450  static_cast<U8>(sizeof(FwOpcodeType))
4451  );
4452  FW_ASSERT(
4453  _status == Fw::FW_SERIALIZE_OK,
4454  static_cast<FwAssertArgType>(_status)
4455  );
4456 #endif
4457  _status = _logBuff.serializeFrom(opCode);
4458  FW_ASSERT(
4459  _status == Fw::FW_SERIALIZE_OK,
4460  static_cast<FwAssertArgType>(_status)
4461  );
4462 
4463  this->logOut_out(
4464  0,
4465  _id,
4466  _logTime,
4468  _logBuff
4469  );
4470  }
4471 
4472  // Emit the event on the text log port
4473 #if FW_ENABLE_TEXT_LOGGING
4474  if (this->isConnected_LogText_OutputPort(0)) {
4475 #if FW_OBJECT_NAMES == 1
4476  const char* _formatString =
4477  "(%s) %s: Start waiting for sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") to complete";
4478 #else
4479  const char* _formatString =
4480  "%s: Start waiting for sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") to complete";
4481 #endif
4482 
4483  Fw::TextLogString _logString;
4484  (void) _logString.format(
4485  _formatString,
4486 #if FW_OBJECT_NAMES == 1
4487  this->m_objName.toChar(),
4488 #endif
4489  "CS_JoinWaiting ",
4490  filename.toChar(),
4491  recordNumber,
4492  opCode
4493  );
4494 
4495  this->LogText_out(
4496  0,
4497  _id,
4498  _logTime,
4500  _logString
4501  );
4502  }
4503 #endif
4504  }
4505 
4508  {
4509  // Get the time
4510  Fw::Time _logTime;
4511  if (this->isConnected_timeCaller_OutputPort(0)) {
4512  this->timeCaller_out(0, _logTime);
4513  }
4514 
4516 
4517  // Emit the event on the log port
4518  if (this->isConnected_logOut_OutputPort(0)) {
4519  Fw::LogBuffer _logBuff;
4520 
4521 #if FW_AMPCS_COMPATIBLE
4523  // Serialize the number of arguments
4524  _status = _logBuff.serializeFrom(static_cast<U8>(0));
4525  FW_ASSERT(
4526  _status == Fw::FW_SERIALIZE_OK,
4527  static_cast<FwAssertArgType>(_status)
4528  );
4529 #endif
4530 
4531  this->logOut_out(
4532  0,
4533  _id,
4534  _logTime,
4536  _logBuff
4537  );
4538  }
4539 
4540  // Emit the event on the text log port
4541 #if FW_ENABLE_TEXT_LOGGING
4542  if (this->isConnected_LogText_OutputPort(0)) {
4543 #if FW_OBJECT_NAMES == 1
4544  const char* _formatString =
4545  "(%s) %s: Still waiting for sequence file to complete";
4546 #else
4547  const char* _formatString =
4548  "%s: Still waiting for sequence file to complete";
4549 #endif
4550 
4551  Fw::TextLogString _logString;
4552  (void) _logString.format(
4553  _formatString,
4554 #if FW_OBJECT_NAMES == 1
4555  this->m_objName.toChar(),
4556 #endif
4557  "CS_JoinWaitingNotComplete "
4558  );
4559 
4560  this->LogText_out(
4561  0,
4562  _id,
4563  _logTime,
4565  _logString
4566  );
4567  }
4568 #endif
4569  }
4570 
4573  {
4574  // Get the time
4575  Fw::Time _logTime;
4576  if (this->isConnected_timeCaller_OutputPort(0)) {
4577  this->timeCaller_out(0, _logTime);
4578  }
4579 
4580  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_NORECORDS;
4581 
4582  // Emit the event on the log port
4583  if (this->isConnected_logOut_OutputPort(0)) {
4584  Fw::LogBuffer _logBuff;
4586 
4587 #if FW_AMPCS_COMPATIBLE
4588  // Serialize the number of arguments
4589  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4590  FW_ASSERT(
4591  _status == Fw::FW_SERIALIZE_OK,
4592  static_cast<FwAssertArgType>(_status)
4593  );
4594 #endif
4595 
4596  _status = fileName.serializeTo(
4597  _logBuff,
4598  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4599  );
4600  FW_ASSERT(
4601  _status == Fw::FW_SERIALIZE_OK,
4602  static_cast<FwAssertArgType>(_status)
4603  );
4604 
4605  this->logOut_out(
4606  0,
4607  _id,
4608  _logTime,
4610  _logBuff
4611  );
4612  }
4613 
4614  // Emit the event on the text log port
4615 #if FW_ENABLE_TEXT_LOGGING
4616  if (this->isConnected_LogText_OutputPort(0)) {
4617 #if FW_OBJECT_NAMES == 1
4618  const char* _formatString =
4619  "(%s) %s: Sequence file %s has no records. Ignoring.";
4620 #else
4621  const char* _formatString =
4622  "%s: Sequence file %s has no records. Ignoring.";
4623 #endif
4624 
4625  Fw::TextLogString _logString;
4626  (void) _logString.format(
4627  _formatString,
4628 #if FW_OBJECT_NAMES == 1
4629  this->m_objName.toChar(),
4630 #endif
4631  "CS_NoRecords ",
4632  fileName.toChar()
4633  );
4634 
4635  this->LogText_out(
4636  0,
4637  _id,
4638  _logTime,
4640  _logString
4641  );
4642  }
4643 #endif
4644  }
4645 
4646  // ----------------------------------------------------------------------
4647  // Telemetry serialized write
4648  // ----------------------------------------------------------------------
4649 
4652  FwChanIdType id,
4653  Fw::TlmBuffer& _tlmBuff,
4654  Fw::Time _tlmTime
4655  ) const
4656  {
4657  if (this->isConnected_tlmOut_OutputPort(0)) {
4658  if (
4660  (_tlmTime == Fw::ZERO_TIME)
4661  ) {
4662  this->timeCaller_out(0, _tlmTime);
4663  }
4664 
4665  FwChanIdType _id;
4666  _id = this->getIdBase() + id;
4667 
4668  this->tlmOut_out(
4669  0,
4670  _id,
4671  _tlmTime,
4672  _tlmBuff
4673  );
4674  }
4675  }
4676 
4677  // ----------------------------------------------------------------------
4678  // Telemetry write functions
4679  // ----------------------------------------------------------------------
4680 
4683  U32 arg,
4684  Fw::Time _tlmTime
4685  ) const
4686  {
4687  if (this->isConnected_tlmOut_OutputPort(0)) {
4688  Fw::TlmBuffer _tlmBuff;
4689  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4690  FW_ASSERT(
4691  _stat == Fw::FW_SERIALIZE_OK,
4692  static_cast<FwAssertArgType>(_stat)
4693  );
4694 
4695  this->tlmWrite(
4697  _tlmBuff,
4698  _tlmTime
4699  );
4700  }
4701  }
4702 
4705  U32 arg,
4706  Fw::Time _tlmTime
4707  ) const
4708  {
4709  if (this->isConnected_tlmOut_OutputPort(0)) {
4710  Fw::TlmBuffer _tlmBuff;
4711  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4712  FW_ASSERT(
4713  _stat == Fw::FW_SERIALIZE_OK,
4714  static_cast<FwAssertArgType>(_stat)
4715  );
4716 
4717  this->tlmWrite(
4719  _tlmBuff,
4720  _tlmTime
4721  );
4722  }
4723  }
4724 
4727  U32 arg,
4728  Fw::Time _tlmTime
4729  ) const
4730  {
4731  if (this->isConnected_tlmOut_OutputPort(0)) {
4732  Fw::TlmBuffer _tlmBuff;
4733  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4734  FW_ASSERT(
4735  _stat == Fw::FW_SERIALIZE_OK,
4736  static_cast<FwAssertArgType>(_stat)
4737  );
4738 
4739  this->tlmWrite(
4741  _tlmBuff,
4742  _tlmTime
4743  );
4744  }
4745  }
4746 
4749  U32 arg,
4750  Fw::Time _tlmTime
4751  ) const
4752  {
4753  if (this->isConnected_tlmOut_OutputPort(0)) {
4754  Fw::TlmBuffer _tlmBuff;
4755  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4756  FW_ASSERT(
4757  _stat == Fw::FW_SERIALIZE_OK,
4758  static_cast<FwAssertArgType>(_stat)
4759  );
4760 
4761  this->tlmWrite(
4763  _tlmBuff,
4764  _tlmTime
4765  );
4766  }
4767  }
4768 
4771  U32 arg,
4772  Fw::Time _tlmTime
4773  ) const
4774  {
4775  if (this->isConnected_tlmOut_OutputPort(0)) {
4776  Fw::TlmBuffer _tlmBuff;
4777  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4778  FW_ASSERT(
4779  _stat == Fw::FW_SERIALIZE_OK,
4780  static_cast<FwAssertArgType>(_stat)
4781  );
4782 
4783  this->tlmWrite(
4785  _tlmBuff,
4786  _tlmTime
4787  );
4788  }
4789  }
4790 
4793  const Fw::StringBase& arg,
4794  Fw::Time _tlmTime
4795  )
4796  {
4797  // Check to see if it is the first time
4798  if (not this->m_first_update_CS_CurrentSequence) {
4799  // Check to see if value has changed. If not, don't write it.
4800  if (arg == this->m_last_CS_CurrentSequence) {
4801  return;
4802  }
4803  else {
4804  this->m_last_CS_CurrentSequence = arg;
4805  }
4806  }
4807  else {
4808  this->m_first_update_CS_CurrentSequence = false;
4809  this->m_last_CS_CurrentSequence = arg;
4810  }
4811 
4812  if (this->isConnected_tlmOut_OutputPort(0)) {
4813  Fw::TlmBuffer _tlmBuff;
4814  Fw::SerializeStatus _stat = arg.serializeTo(
4815  _tlmBuff,
4816  FW_MIN(static_cast<FwSizeType>(FW_TLM_STRING_MAX_SIZE), 240)
4817  );
4818  FW_ASSERT(
4819  _stat == Fw::FW_SERIALIZE_OK,
4820  static_cast<FwAssertArgType>(_stat)
4821  );
4822 
4823  this->tlmWrite(
4825  _tlmBuff,
4826  _tlmTime
4827  );
4828  }
4829  }
4830 
4831  // ----------------------------------------------------------------------
4832  // Time
4833  // ----------------------------------------------------------------------
4834 
4836  getTime() const
4837  {
4838  if (this->isConnected_timeCaller_OutputPort(0)) {
4839  Fw::Time _time;
4840  this->timeCaller_out(0, _time);
4841  return _time;
4842  }
4843  else {
4844  return Fw::Time(TimeBase::TB_NONE, 0, 0);
4845  }
4846  }
4847 
4848  // ----------------------------------------------------------------------
4849  // Message dispatch functions
4850  // ----------------------------------------------------------------------
4851 
4852  Fw::QueuedComponentBase::MsgDispatchStatus CmdSequencerComponentBase ::
4853  doDispatch()
4854  {
4855  ComponentIpcSerializableBuffer _msg;
4856  FwQueuePriorityType _priority = 0;
4857 
4858  Os::Queue::Status _msgStatus = this->m_queue.receive(
4859  _msg,
4861  _priority
4862  );
4863  FW_ASSERT(
4864  _msgStatus == Os::Queue::OP_OK,
4865  static_cast<FwAssertArgType>(_msgStatus)
4866  );
4867 
4868  // Reset to beginning of buffer
4869  _msg.resetDeser();
4870 
4871  FwEnumStoreType _desMsg = 0;
4872  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
4873  FW_ASSERT(
4874  _deserStatus == Fw::FW_SERIALIZE_OK,
4875  static_cast<FwAssertArgType>(_deserStatus)
4876  );
4877 
4878  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
4879 
4880  if (_msgType == CMDSEQUENCER_COMPONENT_EXIT) {
4881  return MSG_DISPATCH_EXIT;
4882  }
4883 
4884  FwIndexType portNum = 0;
4885  _deserStatus = _msg.deserializeTo(portNum);
4886  FW_ASSERT(
4887  _deserStatus == Fw::FW_SERIALIZE_OK,
4888  static_cast<FwAssertArgType>(_deserStatus)
4889  );
4890 
4891  switch (_msgType) {
4892  // Handle async input port cmdResponseIn
4893  case CMDRESPONSEIN_CMDRESPONSE: {
4894  // Deserialize argument opCode
4895  FwOpcodeType opCode;
4896  _deserStatus = _msg.deserializeTo(opCode);
4897  FW_ASSERT(
4898  _deserStatus == Fw::FW_SERIALIZE_OK,
4899  static_cast<FwAssertArgType>(_deserStatus)
4900  );
4901 
4902  // Deserialize argument cmdSeq
4903  U32 cmdSeq;
4904  _deserStatus = _msg.deserializeTo(cmdSeq);
4905  FW_ASSERT(
4906  _deserStatus == Fw::FW_SERIALIZE_OK,
4907  static_cast<FwAssertArgType>(_deserStatus)
4908  );
4909 
4910  // Deserialize argument response
4911  Fw::CmdResponse response;
4912  _deserStatus = _msg.deserializeTo(response);
4913  FW_ASSERT(
4914  _deserStatus == Fw::FW_SERIALIZE_OK,
4915  static_cast<FwAssertArgType>(_deserStatus)
4916  );
4917  // Call handler function
4918  this->cmdResponseIn_handler(
4919  portNum,
4920  opCode,
4921  cmdSeq,
4922  response
4923  );
4924 
4925  break;
4926  }
4927 
4928  // Handle async input port pingIn
4929  case PINGIN_PING: {
4930  // Deserialize argument key
4931  U32 key;
4932  _deserStatus = _msg.deserializeTo(key);
4933  FW_ASSERT(
4934  _deserStatus == Fw::FW_SERIALIZE_OK,
4935  static_cast<FwAssertArgType>(_deserStatus)
4936  );
4937  // Call handler function
4938  this->pingIn_handler(
4939  portNum,
4940  key
4941  );
4942 
4943  break;
4944  }
4945 
4946  // Handle async input port schedIn
4947  case SCHEDIN_SCHED: {
4948  // Deserialize argument context
4949  U32 context;
4950  _deserStatus = _msg.deserializeTo(context);
4951  FW_ASSERT(
4952  _deserStatus == Fw::FW_SERIALIZE_OK,
4953  static_cast<FwAssertArgType>(_deserStatus)
4954  );
4955  // Call handler function
4956  this->schedIn_handler(
4957  portNum,
4958  context
4959  );
4960 
4961  break;
4962  }
4963 
4964  // Handle async input port seqCancelIn
4965  case SEQCANCELIN_CMDSEQCANCEL: {
4966  // Call handler function
4967  this->seqCancelIn_handler(portNum);
4968 
4969  break;
4970  }
4971 
4972  // Handle async input port seqDispatchIn
4973  case SEQDISPATCHIN_FILEDISPATCH: {
4974  // Deserialize argument file_name
4975  char __fprime_ac_file_name_buffer[Fw::StringBase::BUFFER_SIZE(static_cast<FwSizeType>(FW_FIXED_LENGTH_STRING_SIZE))];
4976  Fw::ExternalString file_name(__fprime_ac_file_name_buffer, sizeof __fprime_ac_file_name_buffer);
4977  _deserStatus = _msg.deserializeTo(file_name);
4978  FW_ASSERT(
4979  _deserStatus == Fw::FW_SERIALIZE_OK,
4980  static_cast<FwAssertArgType>(_deserStatus)
4981  );
4982  // Call handler function
4983  this->seqDispatchIn_handler(
4984  portNum,
4985  file_name
4986  );
4987 
4988  break;
4989  }
4990 
4991  // Handle async input port seqRunIn
4992  case SEQRUNIN_CMDSEQIN: {
4993  // Deserialize argument filename
4994  char __fprime_ac_filename_buffer[Fw::StringBase::BUFFER_SIZE(240)];
4995  Fw::ExternalString filename(__fprime_ac_filename_buffer, sizeof __fprime_ac_filename_buffer);
4996  _deserStatus = _msg.deserializeTo(filename);
4997  FW_ASSERT(
4998  _deserStatus == Fw::FW_SERIALIZE_OK,
4999  static_cast<FwAssertArgType>(_deserStatus)
5000  );
5001 
5002  // Deserialize argument args
5003  Svc::SeqArgs args;
5004  _deserStatus = _msg.deserializeTo(args);
5005  FW_ASSERT(
5006  _deserStatus == Fw::FW_SERIALIZE_OK,
5007  static_cast<FwAssertArgType>(_deserStatus)
5008  );
5009  // Call handler function
5010  this->seqRunIn_handler(
5011  portNum,
5012  filename,
5013  args
5014  );
5015 
5016  break;
5017  }
5018 
5019  // Handle command CS_RUN
5020  case CMD_CS_RUN: {
5021  // Deserialize opcode
5022  FwOpcodeType _opCode = 0;
5023  _deserStatus = _msg.deserializeTo(_opCode);
5024  FW_ASSERT (
5025  _deserStatus == Fw::FW_SERIALIZE_OK,
5026  static_cast<FwAssertArgType>(_deserStatus)
5027  );
5028 
5029  // Deserialize command sequence
5030  U32 _cmdSeq = 0;
5031  _deserStatus = _msg.deserializeTo(_cmdSeq);
5032  FW_ASSERT (
5033  _deserStatus == Fw::FW_SERIALIZE_OK,
5034  static_cast<FwAssertArgType>(_deserStatus)
5035  );
5036 
5037  // Deserialize command argument buffer
5038  Fw::CmdArgBuffer args;
5039  _deserStatus = _msg.deserializeTo(args);
5040  FW_ASSERT (
5041  _deserStatus == Fw::FW_SERIALIZE_OK,
5042  static_cast<FwAssertArgType>(_deserStatus)
5043  );
5044 
5045  // Reset buffer
5046  args.resetDeser();
5047 
5048  // Deserialize argument fileName
5049  Fw::CmdStringArg fileName;
5050  _deserStatus = args.deserializeTo(fileName);
5051  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5053  this->cmdResponse_out(
5054  _opCode,
5055  _cmdSeq,
5057  );
5058  }
5059  // Don't crash the task if bad arguments were passed from the ground
5060  break;
5061  }
5062 
5063  // Deserialize argument block
5064  Svc::BlockState block;
5065  _deserStatus = args.deserializeTo(block);
5066  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5068  this->cmdResponse_out(
5069  _opCode,
5070  _cmdSeq,
5072  );
5073  }
5074  // Don't crash the task if bad arguments were passed from the ground
5075  break;
5076  }
5077 
5078  // Make sure there was no data left over.
5079  // That means the argument buffer size was incorrect.
5080 #if FW_CMD_CHECK_RESIDUAL
5081  if (args.getDeserializeSizeLeft() != 0) {
5083  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5084  }
5085  // Don't crash the task if bad arguments were passed from the ground
5086  break;
5087  }
5088 #endif
5089 
5090  // Call handler function
5091  this->CS_RUN_cmdHandler(
5092  _opCode, _cmdSeq,
5093  fileName,
5094  block
5095  );
5096 
5097  break;
5098  }
5099 
5100  // Handle command CS_VALIDATE
5101  case CMD_CS_VALIDATE: {
5102  // Deserialize opcode
5103  FwOpcodeType _opCode = 0;
5104  _deserStatus = _msg.deserializeTo(_opCode);
5105  FW_ASSERT (
5106  _deserStatus == Fw::FW_SERIALIZE_OK,
5107  static_cast<FwAssertArgType>(_deserStatus)
5108  );
5109 
5110  // Deserialize command sequence
5111  U32 _cmdSeq = 0;
5112  _deserStatus = _msg.deserializeTo(_cmdSeq);
5113  FW_ASSERT (
5114  _deserStatus == Fw::FW_SERIALIZE_OK,
5115  static_cast<FwAssertArgType>(_deserStatus)
5116  );
5117 
5118  // Deserialize command argument buffer
5119  Fw::CmdArgBuffer args;
5120  _deserStatus = _msg.deserializeTo(args);
5121  FW_ASSERT (
5122  _deserStatus == Fw::FW_SERIALIZE_OK,
5123  static_cast<FwAssertArgType>(_deserStatus)
5124  );
5125 
5126  // Reset buffer
5127  args.resetDeser();
5128 
5129  // Deserialize argument fileName
5130  Fw::CmdStringArg fileName;
5131  _deserStatus = args.deserializeTo(fileName);
5132  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5134  this->cmdResponse_out(
5135  _opCode,
5136  _cmdSeq,
5138  );
5139  }
5140  // Don't crash the task if bad arguments were passed from the ground
5141  break;
5142  }
5143 
5144  // Make sure there was no data left over.
5145  // That means the argument buffer size was incorrect.
5146 #if FW_CMD_CHECK_RESIDUAL
5147  if (args.getDeserializeSizeLeft() != 0) {
5149  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5150  }
5151  // Don't crash the task if bad arguments were passed from the ground
5152  break;
5153  }
5154 #endif
5155 
5156  // Call handler function
5157  this->CS_VALIDATE_cmdHandler(
5158  _opCode, _cmdSeq,
5159  fileName
5160  );
5161 
5162  break;
5163  }
5164 
5165  // Handle command CS_CANCEL
5166  case CMD_CS_CANCEL: {
5167  // Deserialize opcode
5168  FwOpcodeType _opCode = 0;
5169  _deserStatus = _msg.deserializeTo(_opCode);
5170  FW_ASSERT (
5171  _deserStatus == Fw::FW_SERIALIZE_OK,
5172  static_cast<FwAssertArgType>(_deserStatus)
5173  );
5174 
5175  // Deserialize command sequence
5176  U32 _cmdSeq = 0;
5177  _deserStatus = _msg.deserializeTo(_cmdSeq);
5178  FW_ASSERT (
5179  _deserStatus == Fw::FW_SERIALIZE_OK,
5180  static_cast<FwAssertArgType>(_deserStatus)
5181  );
5182 
5183  // Deserialize command argument buffer
5184  Fw::CmdArgBuffer args;
5185  _deserStatus = _msg.deserializeTo(args);
5186  FW_ASSERT (
5187  _deserStatus == Fw::FW_SERIALIZE_OK,
5188  static_cast<FwAssertArgType>(_deserStatus)
5189  );
5190 
5191  // Reset buffer
5192  args.resetDeser();
5193 
5194  // Make sure there was no data left over.
5195  // That means the argument buffer size was incorrect.
5196 #if FW_CMD_CHECK_RESIDUAL
5197  if (args.getDeserializeSizeLeft() != 0) {
5199  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5200  }
5201  // Don't crash the task if bad arguments were passed from the ground
5202  break;
5203  }
5204 #endif
5205 
5206  // Call handler function
5207  this->CS_CANCEL_cmdHandler(_opCode, _cmdSeq);
5208 
5209  break;
5210  }
5211 
5212  // Handle command CS_START
5213  case CMD_CS_START: {
5214  // Deserialize opcode
5215  FwOpcodeType _opCode = 0;
5216  _deserStatus = _msg.deserializeTo(_opCode);
5217  FW_ASSERT (
5218  _deserStatus == Fw::FW_SERIALIZE_OK,
5219  static_cast<FwAssertArgType>(_deserStatus)
5220  );
5221 
5222  // Deserialize command sequence
5223  U32 _cmdSeq = 0;
5224  _deserStatus = _msg.deserializeTo(_cmdSeq);
5225  FW_ASSERT (
5226  _deserStatus == Fw::FW_SERIALIZE_OK,
5227  static_cast<FwAssertArgType>(_deserStatus)
5228  );
5229 
5230  // Deserialize command argument buffer
5231  Fw::CmdArgBuffer args;
5232  _deserStatus = _msg.deserializeTo(args);
5233  FW_ASSERT (
5234  _deserStatus == Fw::FW_SERIALIZE_OK,
5235  static_cast<FwAssertArgType>(_deserStatus)
5236  );
5237 
5238  // Reset buffer
5239  args.resetDeser();
5240 
5241  // Make sure there was no data left over.
5242  // That means the argument buffer size was incorrect.
5243 #if FW_CMD_CHECK_RESIDUAL
5244  if (args.getDeserializeSizeLeft() != 0) {
5246  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5247  }
5248  // Don't crash the task if bad arguments were passed from the ground
5249  break;
5250  }
5251 #endif
5252 
5253  // Call handler function
5254  this->CS_START_cmdHandler(_opCode, _cmdSeq);
5255 
5256  break;
5257  }
5258 
5259  // Handle command CS_STEP
5260  case CMD_CS_STEP: {
5261  // Deserialize opcode
5262  FwOpcodeType _opCode = 0;
5263  _deserStatus = _msg.deserializeTo(_opCode);
5264  FW_ASSERT (
5265  _deserStatus == Fw::FW_SERIALIZE_OK,
5266  static_cast<FwAssertArgType>(_deserStatus)
5267  );
5268 
5269  // Deserialize command sequence
5270  U32 _cmdSeq = 0;
5271  _deserStatus = _msg.deserializeTo(_cmdSeq);
5272  FW_ASSERT (
5273  _deserStatus == Fw::FW_SERIALIZE_OK,
5274  static_cast<FwAssertArgType>(_deserStatus)
5275  );
5276 
5277  // Deserialize command argument buffer
5278  Fw::CmdArgBuffer args;
5279  _deserStatus = _msg.deserializeTo(args);
5280  FW_ASSERT (
5281  _deserStatus == Fw::FW_SERIALIZE_OK,
5282  static_cast<FwAssertArgType>(_deserStatus)
5283  );
5284 
5285  // Reset buffer
5286  args.resetDeser();
5287 
5288  // Make sure there was no data left over.
5289  // That means the argument buffer size was incorrect.
5290 #if FW_CMD_CHECK_RESIDUAL
5291  if (args.getDeserializeSizeLeft() != 0) {
5293  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5294  }
5295  // Don't crash the task if bad arguments were passed from the ground
5296  break;
5297  }
5298 #endif
5299 
5300  // Call handler function
5301  this->CS_STEP_cmdHandler(_opCode, _cmdSeq);
5302 
5303  break;
5304  }
5305 
5306  // Handle command CS_AUTO
5307  case CMD_CS_AUTO: {
5308  // Deserialize opcode
5309  FwOpcodeType _opCode = 0;
5310  _deserStatus = _msg.deserializeTo(_opCode);
5311  FW_ASSERT (
5312  _deserStatus == Fw::FW_SERIALIZE_OK,
5313  static_cast<FwAssertArgType>(_deserStatus)
5314  );
5315 
5316  // Deserialize command sequence
5317  U32 _cmdSeq = 0;
5318  _deserStatus = _msg.deserializeTo(_cmdSeq);
5319  FW_ASSERT (
5320  _deserStatus == Fw::FW_SERIALIZE_OK,
5321  static_cast<FwAssertArgType>(_deserStatus)
5322  );
5323 
5324  // Deserialize command argument buffer
5325  Fw::CmdArgBuffer args;
5326  _deserStatus = _msg.deserializeTo(args);
5327  FW_ASSERT (
5328  _deserStatus == Fw::FW_SERIALIZE_OK,
5329  static_cast<FwAssertArgType>(_deserStatus)
5330  );
5331 
5332  // Reset buffer
5333  args.resetDeser();
5334 
5335  // Make sure there was no data left over.
5336  // That means the argument buffer size was incorrect.
5337 #if FW_CMD_CHECK_RESIDUAL
5338  if (args.getDeserializeSizeLeft() != 0) {
5340  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5341  }
5342  // Don't crash the task if bad arguments were passed from the ground
5343  break;
5344  }
5345 #endif
5346 
5347  // Call handler function
5348  this->CS_AUTO_cmdHandler(_opCode, _cmdSeq);
5349 
5350  break;
5351  }
5352 
5353  // Handle command CS_MANUAL
5354  case CMD_CS_MANUAL: {
5355  // Deserialize opcode
5356  FwOpcodeType _opCode = 0;
5357  _deserStatus = _msg.deserializeTo(_opCode);
5358  FW_ASSERT (
5359  _deserStatus == Fw::FW_SERIALIZE_OK,
5360  static_cast<FwAssertArgType>(_deserStatus)
5361  );
5362 
5363  // Deserialize command sequence
5364  U32 _cmdSeq = 0;
5365  _deserStatus = _msg.deserializeTo(_cmdSeq);
5366  FW_ASSERT (
5367  _deserStatus == Fw::FW_SERIALIZE_OK,
5368  static_cast<FwAssertArgType>(_deserStatus)
5369  );
5370 
5371  // Deserialize command argument buffer
5372  Fw::CmdArgBuffer args;
5373  _deserStatus = _msg.deserializeTo(args);
5374  FW_ASSERT (
5375  _deserStatus == Fw::FW_SERIALIZE_OK,
5376  static_cast<FwAssertArgType>(_deserStatus)
5377  );
5378 
5379  // Reset buffer
5380  args.resetDeser();
5381 
5382  // Make sure there was no data left over.
5383  // That means the argument buffer size was incorrect.
5384 #if FW_CMD_CHECK_RESIDUAL
5385  if (args.getDeserializeSizeLeft() != 0) {
5387  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5388  }
5389  // Don't crash the task if bad arguments were passed from the ground
5390  break;
5391  }
5392 #endif
5393 
5394  // Call handler function
5395  this->CS_MANUAL_cmdHandler(_opCode, _cmdSeq);
5396 
5397  break;
5398  }
5399 
5400  // Handle command CS_JOIN_WAIT
5401  case CMD_CS_JOIN_WAIT: {
5402  // Deserialize opcode
5403  FwOpcodeType _opCode = 0;
5404  _deserStatus = _msg.deserializeTo(_opCode);
5405  FW_ASSERT (
5406  _deserStatus == Fw::FW_SERIALIZE_OK,
5407  static_cast<FwAssertArgType>(_deserStatus)
5408  );
5409 
5410  // Deserialize command sequence
5411  U32 _cmdSeq = 0;
5412  _deserStatus = _msg.deserializeTo(_cmdSeq);
5413  FW_ASSERT (
5414  _deserStatus == Fw::FW_SERIALIZE_OK,
5415  static_cast<FwAssertArgType>(_deserStatus)
5416  );
5417 
5418  // Deserialize command argument buffer
5419  Fw::CmdArgBuffer args;
5420  _deserStatus = _msg.deserializeTo(args);
5421  FW_ASSERT (
5422  _deserStatus == Fw::FW_SERIALIZE_OK,
5423  static_cast<FwAssertArgType>(_deserStatus)
5424  );
5425 
5426  // Reset buffer
5427  args.resetDeser();
5428 
5429  // Make sure there was no data left over.
5430  // That means the argument buffer size was incorrect.
5431 #if FW_CMD_CHECK_RESIDUAL
5432  if (args.getDeserializeSizeLeft() != 0) {
5434  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5435  }
5436  // Don't crash the task if bad arguments were passed from the ground
5437  break;
5438  }
5439 #endif
5440 
5441  // Call handler function
5442  this->CS_JOIN_WAIT_cmdHandler(_opCode, _cmdSeq);
5443 
5444  break;
5445  }
5446 
5447  default:
5448  return MSG_DISPATCH_ERROR;
5449  }
5450 
5451  return MSG_DISPATCH_OK;
5452  }
5453 
5454  // ----------------------------------------------------------------------
5455  // Calls for messages received on special input ports
5456  // ----------------------------------------------------------------------
5457 
5458  void CmdSequencerComponentBase ::
5459  m_p_cmdIn_in(
5460  Fw::PassiveComponentBase* callComp,
5461  FwIndexType portNum,
5462  FwOpcodeType opCode,
5463  U32 cmdSeq,
5464  Fw::CmdArgBuffer& args
5465  )
5466  {
5467  FW_ASSERT(callComp != nullptr);
5468  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5469  compPtr->cmdIn_handlerBase(
5470  portNum,
5471  opCode,
5472  cmdSeq,
5473  args
5474  );
5475  }
5476 
5477  // ----------------------------------------------------------------------
5478  // Calls for messages received on typed input ports
5479  // ----------------------------------------------------------------------
5480 
5481  void CmdSequencerComponentBase ::
5482  m_p_cmdResponseIn_in(
5483  Fw::PassiveComponentBase* callComp,
5484  FwIndexType portNum,
5485  FwOpcodeType opCode,
5486  U32 cmdSeq,
5487  const Fw::CmdResponse& response
5488  )
5489  {
5490  FW_ASSERT(callComp != nullptr);
5491  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5492  compPtr->cmdResponseIn_handlerBase(
5493  portNum,
5494  opCode,
5495  cmdSeq,
5496  response
5497  );
5498  }
5499 
5500  void CmdSequencerComponentBase ::
5501  m_p_pingIn_in(
5502  Fw::PassiveComponentBase* callComp,
5503  FwIndexType portNum,
5504  U32 key
5505  )
5506  {
5507  FW_ASSERT(callComp != nullptr);
5508  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5509  compPtr->pingIn_handlerBase(
5510  portNum,
5511  key
5512  );
5513  }
5514 
5515  void CmdSequencerComponentBase ::
5516  m_p_schedIn_in(
5517  Fw::PassiveComponentBase* callComp,
5518  FwIndexType portNum,
5519  U32 context
5520  )
5521  {
5522  FW_ASSERT(callComp != nullptr);
5523  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5524  compPtr->schedIn_handlerBase(
5525  portNum,
5526  context
5527  );
5528  }
5529 
5530  void CmdSequencerComponentBase ::
5531  m_p_seqCancelIn_in(
5532  Fw::PassiveComponentBase* callComp,
5533  FwIndexType portNum
5534  )
5535  {
5536  FW_ASSERT(callComp != nullptr);
5537  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5538  compPtr->seqCancelIn_handlerBase(portNum);
5539  }
5540 
5541  void CmdSequencerComponentBase ::
5542  m_p_seqDispatchIn_in(
5543  Fw::PassiveComponentBase* callComp,
5544  FwIndexType portNum,
5545  Fw::StringBase& file_name
5546  )
5547  {
5548  FW_ASSERT(callComp != nullptr);
5549  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5550  compPtr->seqDispatchIn_handlerBase(
5551  portNum,
5552  file_name
5553  );
5554  }
5555 
5556  void CmdSequencerComponentBase ::
5557  m_p_seqRunIn_in(
5558  Fw::PassiveComponentBase* callComp,
5559  FwIndexType portNum,
5560  const Fw::StringBase& filename,
5561  const Svc::SeqArgs& args
5562  )
5563  {
5564  FW_ASSERT(callComp != nullptr);
5565  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5566  compPtr->seqRunIn_handlerBase(
5567  portNum,
5568  filename,
5569  args
5570  );
5571  }
5572 
5573 #if !FW_DIRECT_PORT_CALLS
5574 
5575  // ----------------------------------------------------------------------
5576  // Invocation functions for special output ports
5577  // ----------------------------------------------------------------------
5578 
5579 #if FW_ENABLE_TEXT_LOGGING
5580 
5581  void CmdSequencerComponentBase ::
5582  LogText_out(
5583  FwIndexType portNum,
5584  FwEventIdType id,
5585  Fw::Time& timeTag,
5586  const Fw::LogSeverity& severity,
5587  Fw::TextLogString& text
5588  ) const
5589  {
5590  FW_ASSERT(
5591  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
5592  static_cast<FwAssertArgType>(portNum)
5593  );
5594 
5595  FW_ASSERT(
5596  this->m_LogText_OutputPort[portNum].isConnected(),
5597  static_cast<FwAssertArgType>(portNum)
5598  );
5599  this->m_LogText_OutputPort[portNum].invoke(
5600  id,
5601  timeTag,
5602  severity,
5603  text
5604  );
5605  }
5606 
5607 #endif
5608 
5609  void CmdSequencerComponentBase ::
5610  cmdRegOut_out(
5611  FwIndexType portNum,
5612  FwOpcodeType opCode
5613  ) const
5614  {
5615  FW_ASSERT(
5616  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
5617  static_cast<FwAssertArgType>(portNum)
5618  );
5619 
5620  FW_ASSERT(
5621  this->m_cmdRegOut_OutputPort[portNum].isConnected(),
5622  static_cast<FwAssertArgType>(portNum)
5623  );
5624  this->m_cmdRegOut_OutputPort[portNum].invoke(
5625  opCode
5626  );
5627  }
5628 
5629  void CmdSequencerComponentBase ::
5630  cmdResponseOut_out(
5631  FwIndexType portNum,
5632  FwOpcodeType opCode,
5633  U32 cmdSeq,
5634  const Fw::CmdResponse& response
5635  ) const
5636  {
5637  FW_ASSERT(
5638  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
5639  static_cast<FwAssertArgType>(portNum)
5640  );
5641 
5642  FW_ASSERT(
5643  this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
5644  static_cast<FwAssertArgType>(portNum)
5645  );
5646  this->m_cmdResponseOut_OutputPort[portNum].invoke(
5647  opCode,
5648  cmdSeq,
5649  response
5650  );
5651  }
5652 
5653  void CmdSequencerComponentBase ::
5654  logOut_out(
5655  FwIndexType portNum,
5656  FwEventIdType id,
5657  Fw::Time& timeTag,
5658  const Fw::LogSeverity& severity,
5659  Fw::LogBuffer& args
5660  ) const
5661  {
5662  FW_ASSERT(
5663  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
5664  static_cast<FwAssertArgType>(portNum)
5665  );
5666 
5667  FW_ASSERT(
5668  this->m_logOut_OutputPort[portNum].isConnected(),
5669  static_cast<FwAssertArgType>(portNum)
5670  );
5671  this->m_logOut_OutputPort[portNum].invoke(
5672  id,
5673  timeTag,
5674  severity,
5675  args
5676  );
5677  }
5678 
5679  void CmdSequencerComponentBase ::
5680  timeCaller_out(
5681  FwIndexType portNum,
5682  Fw::Time& time
5683  ) const
5684  {
5685  FW_ASSERT(
5686  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
5687  static_cast<FwAssertArgType>(portNum)
5688  );
5689 
5690  FW_ASSERT(
5691  this->m_timeCaller_OutputPort[portNum].isConnected(),
5692  static_cast<FwAssertArgType>(portNum)
5693  );
5694  this->m_timeCaller_OutputPort[portNum].invoke(
5695  time
5696  );
5697  }
5698 
5699  void CmdSequencerComponentBase ::
5700  tlmOut_out(
5701  FwIndexType portNum,
5702  FwChanIdType id,
5703  Fw::Time& timeTag,
5704  Fw::TlmBuffer& val
5705  ) const
5706  {
5707  FW_ASSERT(
5708  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
5709  static_cast<FwAssertArgType>(portNum)
5710  );
5711 
5712  FW_ASSERT(
5713  this->m_tlmOut_OutputPort[portNum].isConnected(),
5714  static_cast<FwAssertArgType>(portNum)
5715  );
5716  this->m_tlmOut_OutputPort[portNum].invoke(
5717  id,
5718  timeTag,
5719  val
5720  );
5721  }
5722 
5723 #endif
5724 
5725 }
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
static constexpr FwIndexType getNum_cmdIn_InputPorts()
Serialization/Deserialization operation was successful.
void log_WARNING_HI_CS_TimeContextMismatch(const Fw::StringBase &fileName, U8 currTimeBase, U8 seqTimeBase) const
static constexpr FwIndexType getNum_tlmOut_OutputPorts()
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:157
void tlmWrite_CS_LoadCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void invoke(Fw::ComBuffer &data, U32 context) const
Invoke a port connection.
Definition: ComPortAc.cpp:181
void init()
Initialization function.
Definition: ComPortAc.cpp:162
static constexpr FwSizeType CAPACITY
Definition: CmdPortAc.hpp:36
void invoke(const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke a port connection.
static constexpr FwIndexType getNum_cmdResponseIn_InputPorts()
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)=0
Handler for input port seqRunIn.
static constexpr FwIndexType getNum_timeCaller_OutputPorts()
static constexpr FwIndexType getNum_cmdResponseOut_OutputPorts()
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:27
static constexpr FwIndexType getNum_logOut_OutputPorts()
virtual void seqDispatchIn_handler(FwIndexType portNum, Fw::StringBase &file_name)=0
Handler for input port seqDispatchIn.
void log_WARNING_HI_CS_FileSizeError(const Fw::StringBase &fileName, U32 size) const
void log_WARNING_HI_CS_FileInvalid(const Fw::StringBase &fileName, const Svc::CmdSequencer_FileReadStage &stage, I32 error) const
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum) const
static constexpr FwSizeType CAPACITY
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
PlatformSizeType FwSizeType
Cannot run new sequence when current sequence file is still running.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Definition: Queue.cpp:71
I32 FwEnumStoreType
void tlmWrite_CS_Errors(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_WARNING_HI_CS_FileNotFound(const Fw::StringBase &fileName) const
void CS_VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
static constexpr FwIndexType getNum_seqDispatchIn_InputPorts()
void log_ACTIVITY_HI_CS_JoinWaiting(const Fw::StringBase &filename, U32 recordNumber, FwOpcodeType opCode) const
Status
status returned from the queue send function
Definition: Queue.hpp:30
void init()
Initialization function.
void CS_MANUAL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Initialization function.
Definition: SchedPortAc.cpp:73
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void regCommands()
Register commands with the Command Dispatcher.
message to exit active component task
BYTE pingInPortSize[Svc::PingPortBuffer::CAPACITY]
void init()
Initialization function.
void init()
Initialization function.
Definition: CmdPortAc.cpp:89
SerializeStatus deserializeTo(U8 &val, Endianness mode=Endianness::BIG) override
Deserialize an 8-bit unsigned integer value.
virtual void schedIn_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port schedIn.
void log_WARNING_HI_CS_UnexpectedCompletion(FwOpcodeType opcode) const
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
virtual void CS_AUTO_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_AUTO.
The stage of the file read operation.
void log_ACTIVITY_LO_CS_SequenceLoaded(const Fw::StringBase &fileName) const
void CS_STEP_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void invoke(U32 key) const
Invoke a port connection.
Definition: PingPortAc.cpp:170
static constexpr FwIndexType getNum_seqRunIn_InputPorts()
virtual const CHAR * toChar() const =0
Convert to a C-style char*.
const Time ZERO_TIME
Definition: Time.cpp:5
static constexpr FwIndexType getNum_schedIn_InputPorts()
void tlmWrite_CS_CurrentSequence(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_CS_CmdStarted(const Fw::StringBase &filename) const
virtual void CS_VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
static constexpr FwIndexType getNum_seqDone_OutputPorts()
virtual void seqCancelIn_handler(FwIndexType portNum)=0
Handler for input port seqCancelIn.
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void init()
Initialization function.
Definition: TlmPortAc.cpp:171
Enum representing a command response.
A command in a sequence was stepped through.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
The Command Sequencer issued a command and received a success status in return.
No time base has been established (Required)
SerializeStatus serializeFrom(U8 val, Endianness mode=Endianness::BIG) override
Serialize an 8-bit unsigned integer value.
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
bool isConnected_seqDone_OutputPort(FwIndexType portNum) const
void CS_START_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
The running time base doesn&#39;t match the time base in the sequence files.
void log_WARNING_HI_CS_SequenceTimeout(const Fw::StringBase &filename, U32 command) const
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum) const
virtual void CS_CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_CANCEL.
Os::Queue m_queue
queue object for active component
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:177
void init()
Object initializer.
Definition: ObjBase.cpp:24
void cmdIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Handler base-class function for input port cmdIn.
SerializeStatus
forward declaration for string
void set_seqDone_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDone[portNum].
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:95
The running time base doesn&#39;t match the time base in the sequence files.
Message will block until space is available.
Definition: Queue.hpp:47
virtual void CS_RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_RUN.
void tlmWrite_CS_CancelCommands(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
FwIdType FwEventIdType
The type of an event identifier.
virtual ~CmdSequencerComponentBase()
Destroy CmdSequencerComponentBase object.
void tlmWrite_CS_CommandsExecuted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void invoke(FwOpcodeType opCode) const
Invoke a port connection.
static constexpr FwIndexType getNum_pingOut_OutputPorts()
static constexpr FwSizeType CAPACITY
Definition: PingPortAc.hpp:34
void log_ACTIVITY_HI_CS_PortSequenceStarted(const Fw::StringBase &filename) const
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) const
Invoke output port seqStartOut.
void log_WARNING_HI_CS_RecordInvalid(const Fw::StringBase &fileName, U32 recordNumber, I32 error) const
void log_ACTIVITY_HI_CS_SequenceCanceled(const Fw::StringBase &fileName) const
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:40
void init()
Initialization function.
Definition: TimePortAc.cpp:151
bool isConnected_logOut_OutputPort(FwIndexType portNum) const
Less important informational events.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
void log_WARNING_HI_CS_RecordMismatch(const Fw::StringBase &fileName, U32 header_records, U32 extra_bytes) const
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
#define FW_MIN(a, b)
MIN macro (deprecated in C++, use std::min)
Definition: BasicTypes.h:99
A less serious but recoverable event.
virtual void CS_RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, const Svc::BlockState &block)=0
void init()
Initialization function.
Definition: PingPortAc.cpp:151
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
void invoke(Fw::Time &time) const
Invoke a port connection.
Definition: TimePortAc.cpp:170
void CS_JOIN_WAIT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Handler base-class function for input port seqRunIn.
The Command Sequencer issued a command and received an error status in return.
Number of records in header doesn&#39;t match number in file.
Serializable::SizeType getDeserializeSizeLeft() const override
Get remaining deserialization buffer size.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port connection.
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
FwIdType FwChanIdType
The type of a telemetry channel identifier.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
virtual void CS_START_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:157
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:54
Sequencer blocking state.
void init()
Initialization function.
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void resetDeser() override
Reset deserialization pointer to beginning of buffer.
static constexpr FwIndexType getNum_cmdRegOut_OutputPorts()
A string backed by an external buffer.
void log_ACTIVITY_HI_CS_ModeSwitched(const Svc::CmdSequencer_SeqMode &mode) const
A serious but recoverable event.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
A local port request to run a sequence was started.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
Definition: TlmPortAc.cpp:190
const char * toChar() const
Convert to a C-style char*.
bool isConnected() const
Definition: PortBase.cpp:38
Enum representing event severity.
void CS_AUTO_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
virtual void CS_START_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_START.
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:58
void init()
Initialization function.
Definition: LogPortAc.cpp:180
void setPortNum(FwIndexType portNum)
The size of the serial representation.
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:54
void set_comCmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to comCmdOut[portNum].
static constexpr FwIndexType getNum_seqStartOut_OutputPorts()
static constexpr FwSizeType CAPACITY
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
BlockingType
message type
Definition: Queue.hpp:46
Svc::InputSchedPort * get_schedIn_InputPort(FwIndexType portNum)
virtual void CS_AUTO_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
Command failed to deserialize.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
void log_WARNING_HI_CS_FileCrcFailure(const Fw::StringBase &fileName, U32 storedCRC, U32 computedCRC) const
Important informational events.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: SchedPortAc.cpp:79
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port connection.
Definition: LogPortAc.cpp:199
bool isConnected_timeCaller_OutputPort(FwIndexType portNum) const
void init()
Initialization function.
A sequence related command came with no active sequence.
virtual void CS_MANUAL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_MANUAL.
bool isConnected_pingOut_OutputPort(FwIndexType portNum) const
void CS_CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_CS_TimeBaseMismatch(const Fw::StringBase &fileName, U16 time_base, U16 seq_time_base) const
A message was sent requesting an exit of the loop.
void tlmWrite(FwChanIdType id, Fw::TlmBuffer &_tlmBuff, Fw::Time _tlmTime=Fw::Time()) const
virtual void CS_STEP_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_STEP.
PlatformIndexType FwIndexType
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args)
Pre-message hook for async input port seqRunIn.
void seqCancelIn_handlerBase(FwIndexType portNum)
Handler base-class function for input port seqCancelIn.
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:186
void addCallPort(InputCmdSeqInPort *callPort)
Register an input port.
A command status came back when no sequence was running.
void init()
Initialization function.
The Command Sequencer received a command that was invalid for its current mode.
void init()
Initialization function.
Definition: PingPortAc.cpp:73
void CS_RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Svc::InputFileDispatchPort * get_seqDispatchIn_InputPort(FwIndexType portNum)
void comCmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context) const
Invoke output port comCmdOut.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
static constexpr FwIndexType getNum_seqCancelIn_InputPorts()
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
RateGroupDivider component implementation.
virtual void CS_VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_VALIDATE.
void log_ACTIVITY_HI_CS_SequenceComplete(const Fw::StringBase &fileName) const
virtual void CS_STEP_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void seqDone_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke output port seqDone.
void log_ACTIVITY_LO_CS_CommandComplete(const Fw::StringBase &fileName, U32 recordNumber, FwOpcodeType opCode) const
message sent/received okay
Definition: Queue.hpp:31
U8 BYTE
byte type
Definition: BasicTypes.h:57
void addCallPort(InputComPort *callPort)
Register an input port.
Definition: ComPortAc.cpp:168
virtual void CS_MANUAL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
CmdSequencerComponentBase(const char *compName="")
Construct CmdSequencerComponentBase object.
void seqDispatchIn_handlerBase(FwIndexType portNum, Fw::StringBase &file_name)
Handler base-class function for input port seqDispatchIn.
The Sequence File Loader could not read the sequence file.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:79
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
Implementation of malloc based allocator.
static constexpr FwSizeType CAPACITY
static constexpr FwIndexType getNum_pingIn_InputPorts()
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void log_WARNING_LO_CS_NoRecords(const Fw::StringBase &fileName) const
Log event CS_NoRecords.
virtual void CS_JOIN_WAIT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void seqCancelIn_preMsgHook(FwIndexType portNum)
Pre-message hook for async input port seqCancelIn.
virtual void schedIn_handler(FwIndexType portNum, U32 context)=0
Handler for input port schedIn.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
void log_WARNING_HI_CS_CommandError(const Fw::StringBase &fileName, U32 recordNumber, FwOpcodeType opCode, U32 errorStatus) const
void init()
Initialization function.
Wait for the current running sequence file complete.
virtual void CS_CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
static constexpr FwIndexType getNum_comCmdOut_OutputPorts()
Svc::InputCmdSeqCancelPort * get_seqCancelIn_InputPort(FwIndexType portNum)
#define FW_ASSERT(...)
Definition: Assert.hpp:14
bool isConnected_tlmOut_OutputPort(FwIndexType portNum) const
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
static constexpr FwSizeType CAPACITY
Definition: SchedPortAc.hpp:34
virtual void seqDispatchIn_preMsgHook(FwIndexType portNum, Fw::StringBase &file_name)
Pre-message hook for async input port seqDispatchIn.
bool isConnected_comCmdOut_OutputPort(FwIndexType portNum) const
void log_ACTIVITY_HI_CS_SequenceValid(const Fw::StringBase &filename) const
void log_WARNING_HI_CS_FileReadError(const Fw::StringBase &fileName) const
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void tlmWrite_CS_SequencesCompleted(U32 arg, Fw::Time _tlmTime=Fw::Time()) const
void log_ACTIVITY_HI_CS_CmdStepped(const Fw::StringBase &filename, U32 command) const
SerializeStatus serializeTo(SerialBufferBase &buffer, Endianness mode=Endianness::BIG) const override
Serialize the contents of this object to a buffer.
BYTE cmdPortSize[Fw::CmdPortBuffer::CAPACITY]
virtual void CS_JOIN_WAIT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CS_JOIN_WAIT.