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  if (qStatus == Os::Queue::Status::FULL) {
1322  this->incNumMsgDropped();
1323  return;
1324  }
1325 
1326  FW_ASSERT(
1327  qStatus == Os::Queue::OP_OK,
1328  static_cast<FwAssertArgType>(qStatus)
1329  );
1330  }
1331 
1334  FwIndexType portNum,
1335  U32 context
1336  )
1337  {
1338  // Make sure port number is valid
1339  FW_ASSERT(
1340  (0 <= portNum) && (portNum < this->getNum_schedIn_InputPorts()),
1341  static_cast<FwAssertArgType>(portNum)
1342  );
1343 
1344  // Call pre-message hook
1346  portNum,
1347  context
1348  );
1349  ComponentIpcSerializableBuffer msg;
1351 
1352  // Serialize message ID
1353  _status = msg.serializeFrom(
1354  static_cast<FwEnumStoreType>(SCHEDIN_SCHED)
1355  );
1356  FW_ASSERT(
1357  _status == Fw::FW_SERIALIZE_OK,
1358  static_cast<FwAssertArgType>(_status)
1359  );
1360 
1361  // Serialize port number
1362  _status = msg.serializeFrom(portNum);
1363  FW_ASSERT(
1364  _status == Fw::FW_SERIALIZE_OK,
1365  static_cast<FwAssertArgType>(_status)
1366  );
1367 
1368  // Serialize argument context
1369  _status = msg.serializeFrom(context);
1370  FW_ASSERT(
1371  _status == Fw::FW_SERIALIZE_OK,
1372  static_cast<FwAssertArgType>(_status)
1373  );
1374 
1375  // Send message
1377  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1378 
1379  FW_ASSERT(
1380  qStatus == Os::Queue::OP_OK,
1381  static_cast<FwAssertArgType>(qStatus)
1382  );
1383  }
1384 
1387  {
1388  // Make sure port number is valid
1389  FW_ASSERT(
1390  (0 <= portNum) && (portNum < this->getNum_seqCancelIn_InputPorts()),
1391  static_cast<FwAssertArgType>(portNum)
1392  );
1393 
1394  // Call pre-message hook
1395  seqCancelIn_preMsgHook(portNum);
1396  ComponentIpcSerializableBuffer msg;
1398 
1399  // Serialize message ID
1400  _status = msg.serializeFrom(
1401  static_cast<FwEnumStoreType>(SEQCANCELIN_CMDSEQCANCEL)
1402  );
1403  FW_ASSERT(
1404  _status == Fw::FW_SERIALIZE_OK,
1405  static_cast<FwAssertArgType>(_status)
1406  );
1407 
1408  // Serialize port number
1409  _status = msg.serializeFrom(portNum);
1410  FW_ASSERT(
1411  _status == Fw::FW_SERIALIZE_OK,
1412  static_cast<FwAssertArgType>(_status)
1413  );
1414 
1415  // Send message
1417  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1418 
1419  FW_ASSERT(
1420  qStatus == Os::Queue::OP_OK,
1421  static_cast<FwAssertArgType>(qStatus)
1422  );
1423  }
1424 
1427  FwIndexType portNum,
1428  Fw::StringBase& file_name
1429  )
1430  {
1431  // Make sure port number is valid
1432  FW_ASSERT(
1433  (0 <= portNum) && (portNum < this->getNum_seqDispatchIn_InputPorts()),
1434  static_cast<FwAssertArgType>(portNum)
1435  );
1436 
1437  // Call pre-message hook
1439  portNum,
1440  file_name
1441  );
1442  ComponentIpcSerializableBuffer msg;
1444 
1445  // Serialize message ID
1446  _status = msg.serializeFrom(
1447  static_cast<FwEnumStoreType>(SEQDISPATCHIN_FILEDISPATCH)
1448  );
1449  FW_ASSERT(
1450  _status == Fw::FW_SERIALIZE_OK,
1451  static_cast<FwAssertArgType>(_status)
1452  );
1453 
1454  // Serialize port number
1455  _status = msg.serializeFrom(portNum);
1456  FW_ASSERT(
1457  _status == Fw::FW_SERIALIZE_OK,
1458  static_cast<FwAssertArgType>(_status)
1459  );
1460 
1461  // Serialize argument file_name
1462  _status = file_name.serializeTo(msg, 240);
1463  FW_ASSERT(
1464  _status == Fw::FW_SERIALIZE_OK,
1465  static_cast<FwAssertArgType>(_status)
1466  );
1467 
1468  // Send message
1470  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1471 
1472  FW_ASSERT(
1473  qStatus == Os::Queue::OP_OK,
1474  static_cast<FwAssertArgType>(qStatus)
1475  );
1476  }
1477 
1480  FwIndexType portNum,
1481  const Fw::StringBase& filename,
1482  const Svc::SeqArgs& args
1483  )
1484  {
1485  // Make sure port number is valid
1486  FW_ASSERT(
1487  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
1488  static_cast<FwAssertArgType>(portNum)
1489  );
1490 
1491  // Call pre-message hook
1493  portNum,
1494  filename,
1495  args
1496  );
1497  ComponentIpcSerializableBuffer msg;
1499 
1500  // Serialize message ID
1501  _status = msg.serializeFrom(
1502  static_cast<FwEnumStoreType>(SEQRUNIN_CMDSEQIN)
1503  );
1504  FW_ASSERT(
1505  _status == Fw::FW_SERIALIZE_OK,
1506  static_cast<FwAssertArgType>(_status)
1507  );
1508 
1509  // Serialize port number
1510  _status = msg.serializeFrom(portNum);
1511  FW_ASSERT(
1512  _status == Fw::FW_SERIALIZE_OK,
1513  static_cast<FwAssertArgType>(_status)
1514  );
1515 
1516  // Serialize argument filename
1517  _status = filename.serializeTo(msg, 240);
1518  FW_ASSERT(
1519  _status == Fw::FW_SERIALIZE_OK,
1520  static_cast<FwAssertArgType>(_status)
1521  );
1522 
1523  // Serialize argument args
1524  _status = msg.serializeFrom(args);
1525  FW_ASSERT(
1526  _status == Fw::FW_SERIALIZE_OK,
1527  static_cast<FwAssertArgType>(_status)
1528  );
1529 
1530  // Send message
1532  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1533 
1534  FW_ASSERT(
1535  qStatus == Os::Queue::OP_OK,
1536  static_cast<FwAssertArgType>(qStatus)
1537  );
1538  }
1539 
1540  // ----------------------------------------------------------------------
1541  // Pre-message hooks for typed async input ports
1542  //
1543  // Each of these functions is invoked just before processing a message
1544  // on the corresponding port. By default, they do nothing. You can
1545  // override them to provide specific pre-message behavior.
1546  // ----------------------------------------------------------------------
1547 
1550  FwIndexType portNum,
1551  FwOpcodeType opCode,
1552  U32 cmdSeq,
1553  const Fw::CmdResponse& response
1554  )
1555  {
1556  // Default: no-op
1557  }
1558 
1561  FwIndexType portNum,
1562  U32 key
1563  )
1564  {
1565  // Default: no-op
1566  }
1567 
1570  FwIndexType portNum,
1571  U32 context
1572  )
1573  {
1574  // Default: no-op
1575  }
1576 
1579  {
1580  // Default: no-op
1581  }
1582 
1585  FwIndexType portNum,
1586  Fw::StringBase& file_name
1587  )
1588  {
1589  // Default: no-op
1590  }
1591 
1594  FwIndexType portNum,
1595  const Fw::StringBase& filename,
1596  const Svc::SeqArgs& args
1597  )
1598  {
1599  // Default: no-op
1600  }
1601 
1602 #if !FW_DIRECT_PORT_CALLS
1603 
1604  // ----------------------------------------------------------------------
1605  // Invocation functions for typed output ports
1606  // ----------------------------------------------------------------------
1607 
1610  FwIndexType portNum,
1611  Fw::ComBuffer& data,
1612  U32 context
1613  ) const
1614  {
1615  FW_ASSERT(
1616  (0 <= portNum) && (portNum < this->getNum_comCmdOut_OutputPorts()),
1617  static_cast<FwAssertArgType>(portNum)
1618  );
1619 
1620  FW_ASSERT(
1621  this->m_comCmdOut_OutputPort[portNum].isConnected(),
1622  static_cast<FwAssertArgType>(portNum)
1623  );
1624  this->m_comCmdOut_OutputPort[portNum].invoke(
1625  data,
1626  context
1627  );
1628  }
1629 
1632  FwIndexType portNum,
1633  U32 key
1634  ) const
1635  {
1636  FW_ASSERT(
1637  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1638  static_cast<FwAssertArgType>(portNum)
1639  );
1640 
1641  FW_ASSERT(
1642  this->m_pingOut_OutputPort[portNum].isConnected(),
1643  static_cast<FwAssertArgType>(portNum)
1644  );
1645  this->m_pingOut_OutputPort[portNum].invoke(
1646  key
1647  );
1648  }
1649 
1652  FwIndexType portNum,
1653  FwOpcodeType opCode,
1654  U32 cmdSeq,
1655  const Fw::CmdResponse& response
1656  ) const
1657  {
1658  FW_ASSERT(
1659  (0 <= portNum) && (portNum < this->getNum_seqDone_OutputPorts()),
1660  static_cast<FwAssertArgType>(portNum)
1661  );
1662 
1663  FW_ASSERT(
1664  this->m_seqDone_OutputPort[portNum].isConnected(),
1665  static_cast<FwAssertArgType>(portNum)
1666  );
1667  this->m_seqDone_OutputPort[portNum].invoke(
1668  opCode,
1669  cmdSeq,
1670  response
1671  );
1672  }
1673 
1676  FwIndexType portNum,
1677  const Fw::StringBase& filename,
1678  const Svc::SeqArgs& args
1679  ) const
1680  {
1681  FW_ASSERT(
1682  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1683  static_cast<FwAssertArgType>(portNum)
1684  );
1685 
1686  FW_ASSERT(
1687  this->m_seqStartOut_OutputPort[portNum].isConnected(),
1688  static_cast<FwAssertArgType>(portNum)
1689  );
1690  this->m_seqStartOut_OutputPort[portNum].invoke(
1691  filename,
1692  args
1693  );
1694  }
1695 
1696 #endif
1697 
1698  // ----------------------------------------------------------------------
1699  // Command response
1700  // ----------------------------------------------------------------------
1701 
1704  FwOpcodeType opCode,
1705  U32 cmdSeq,
1706  Fw::CmdResponse response
1707  )
1708  {
1710  this->cmdResponseOut_out(0, opCode, cmdSeq, response);
1711  }
1712 
1713  // ----------------------------------------------------------------------
1714  // Command handler base-class functions
1715  //
1716  // Call these functions directly to bypass the command input port
1717  // ----------------------------------------------------------------------
1718 
1721  FwOpcodeType opCode,
1722  U32 cmdSeq,
1723  Fw::CmdArgBuffer& args
1724  )
1725  {
1726  // Call pre-message hook
1727  this->CS_RUN_preMsgHook(opCode,cmdSeq);
1728 
1729  // Defer deserializing arguments to the message dispatcher
1730  // to avoid deserializing and reserializing just for IPC
1731  ComponentIpcSerializableBuffer msg;
1733 
1734  // Serialize for IPC
1735  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_RUN));
1736  FW_ASSERT (
1737  _status == Fw::FW_SERIALIZE_OK,
1738  static_cast<FwAssertArgType>(_status)
1739  );
1740 
1741  // Fake port number to make message dequeue work
1742  FwIndexType port = 0;
1743 
1744  _status = msg.serializeFrom(port);
1745  FW_ASSERT (
1746  _status == Fw::FW_SERIALIZE_OK,
1747  static_cast<FwAssertArgType>(_status)
1748  );
1749 
1750  _status = msg.serializeFrom(opCode);
1751  FW_ASSERT (
1752  _status == Fw::FW_SERIALIZE_OK,
1753  static_cast<FwAssertArgType>(_status)
1754  );
1755 
1756  _status = msg.serializeFrom(cmdSeq);
1757  FW_ASSERT (
1758  _status == Fw::FW_SERIALIZE_OK,
1759  static_cast<FwAssertArgType>(_status)
1760  );
1761 
1762  _status = msg.serializeFrom(args);
1763  FW_ASSERT (
1764  _status == Fw::FW_SERIALIZE_OK,
1765  static_cast<FwAssertArgType>(_status)
1766  );
1767 
1768  // Send message
1770  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1771 
1772  FW_ASSERT(
1773  qStatus == Os::Queue::OP_OK,
1774  static_cast<FwAssertArgType>(qStatus)
1775  );
1776  }
1777 
1780  FwOpcodeType opCode,
1781  U32 cmdSeq,
1782  Fw::CmdArgBuffer& args
1783  )
1784  {
1785  // Call pre-message hook
1786  this->CS_VALIDATE_preMsgHook(opCode,cmdSeq);
1787 
1788  // Defer deserializing arguments to the message dispatcher
1789  // to avoid deserializing and reserializing just for IPC
1790  ComponentIpcSerializableBuffer msg;
1792 
1793  // Serialize for IPC
1794  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_VALIDATE));
1795  FW_ASSERT (
1796  _status == Fw::FW_SERIALIZE_OK,
1797  static_cast<FwAssertArgType>(_status)
1798  );
1799 
1800  // Fake port number to make message dequeue work
1801  FwIndexType port = 0;
1802 
1803  _status = msg.serializeFrom(port);
1804  FW_ASSERT (
1805  _status == Fw::FW_SERIALIZE_OK,
1806  static_cast<FwAssertArgType>(_status)
1807  );
1808 
1809  _status = msg.serializeFrom(opCode);
1810  FW_ASSERT (
1811  _status == Fw::FW_SERIALIZE_OK,
1812  static_cast<FwAssertArgType>(_status)
1813  );
1814 
1815  _status = msg.serializeFrom(cmdSeq);
1816  FW_ASSERT (
1817  _status == Fw::FW_SERIALIZE_OK,
1818  static_cast<FwAssertArgType>(_status)
1819  );
1820 
1821  _status = msg.serializeFrom(args);
1822  FW_ASSERT (
1823  _status == Fw::FW_SERIALIZE_OK,
1824  static_cast<FwAssertArgType>(_status)
1825  );
1826 
1827  // Send message
1829  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1830 
1831  FW_ASSERT(
1832  qStatus == Os::Queue::OP_OK,
1833  static_cast<FwAssertArgType>(qStatus)
1834  );
1835  }
1836 
1839  FwOpcodeType opCode,
1840  U32 cmdSeq,
1841  Fw::CmdArgBuffer& args
1842  )
1843  {
1844  // Call pre-message hook
1845  this->CS_CANCEL_preMsgHook(opCode,cmdSeq);
1846 
1847  // Defer deserializing arguments to the message dispatcher
1848  // to avoid deserializing and reserializing just for IPC
1849  ComponentIpcSerializableBuffer msg;
1851 
1852  // Serialize for IPC
1853  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_CANCEL));
1854  FW_ASSERT (
1855  _status == Fw::FW_SERIALIZE_OK,
1856  static_cast<FwAssertArgType>(_status)
1857  );
1858 
1859  // Fake port number to make message dequeue work
1860  FwIndexType port = 0;
1861 
1862  _status = msg.serializeFrom(port);
1863  FW_ASSERT (
1864  _status == Fw::FW_SERIALIZE_OK,
1865  static_cast<FwAssertArgType>(_status)
1866  );
1867 
1868  _status = msg.serializeFrom(opCode);
1869  FW_ASSERT (
1870  _status == Fw::FW_SERIALIZE_OK,
1871  static_cast<FwAssertArgType>(_status)
1872  );
1873 
1874  _status = msg.serializeFrom(cmdSeq);
1875  FW_ASSERT (
1876  _status == Fw::FW_SERIALIZE_OK,
1877  static_cast<FwAssertArgType>(_status)
1878  );
1879 
1880  _status = msg.serializeFrom(args);
1881  FW_ASSERT (
1882  _status == Fw::FW_SERIALIZE_OK,
1883  static_cast<FwAssertArgType>(_status)
1884  );
1885 
1886  // Send message
1888  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1889 
1890  FW_ASSERT(
1891  qStatus == Os::Queue::OP_OK,
1892  static_cast<FwAssertArgType>(qStatus)
1893  );
1894  }
1895 
1898  FwOpcodeType opCode,
1899  U32 cmdSeq,
1900  Fw::CmdArgBuffer& args
1901  )
1902  {
1903  // Call pre-message hook
1904  this->CS_START_preMsgHook(opCode,cmdSeq);
1905 
1906  // Defer deserializing arguments to the message dispatcher
1907  // to avoid deserializing and reserializing just for IPC
1908  ComponentIpcSerializableBuffer msg;
1910 
1911  // Serialize for IPC
1912  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_START));
1913  FW_ASSERT (
1914  _status == Fw::FW_SERIALIZE_OK,
1915  static_cast<FwAssertArgType>(_status)
1916  );
1917 
1918  // Fake port number to make message dequeue work
1919  FwIndexType port = 0;
1920 
1921  _status = msg.serializeFrom(port);
1922  FW_ASSERT (
1923  _status == Fw::FW_SERIALIZE_OK,
1924  static_cast<FwAssertArgType>(_status)
1925  );
1926 
1927  _status = msg.serializeFrom(opCode);
1928  FW_ASSERT (
1929  _status == Fw::FW_SERIALIZE_OK,
1930  static_cast<FwAssertArgType>(_status)
1931  );
1932 
1933  _status = msg.serializeFrom(cmdSeq);
1934  FW_ASSERT (
1935  _status == Fw::FW_SERIALIZE_OK,
1936  static_cast<FwAssertArgType>(_status)
1937  );
1938 
1939  _status = msg.serializeFrom(args);
1940  FW_ASSERT (
1941  _status == Fw::FW_SERIALIZE_OK,
1942  static_cast<FwAssertArgType>(_status)
1943  );
1944 
1945  // Send message
1947  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
1948 
1949  FW_ASSERT(
1950  qStatus == Os::Queue::OP_OK,
1951  static_cast<FwAssertArgType>(qStatus)
1952  );
1953  }
1954 
1957  FwOpcodeType opCode,
1958  U32 cmdSeq,
1959  Fw::CmdArgBuffer& args
1960  )
1961  {
1962  // Call pre-message hook
1963  this->CS_STEP_preMsgHook(opCode,cmdSeq);
1964 
1965  // Defer deserializing arguments to the message dispatcher
1966  // to avoid deserializing and reserializing just for IPC
1967  ComponentIpcSerializableBuffer msg;
1969 
1970  // Serialize for IPC
1971  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_STEP));
1972  FW_ASSERT (
1973  _status == Fw::FW_SERIALIZE_OK,
1974  static_cast<FwAssertArgType>(_status)
1975  );
1976 
1977  // Fake port number to make message dequeue work
1978  FwIndexType port = 0;
1979 
1980  _status = msg.serializeFrom(port);
1981  FW_ASSERT (
1982  _status == Fw::FW_SERIALIZE_OK,
1983  static_cast<FwAssertArgType>(_status)
1984  );
1985 
1986  _status = msg.serializeFrom(opCode);
1987  FW_ASSERT (
1988  _status == Fw::FW_SERIALIZE_OK,
1989  static_cast<FwAssertArgType>(_status)
1990  );
1991 
1992  _status = msg.serializeFrom(cmdSeq);
1993  FW_ASSERT (
1994  _status == Fw::FW_SERIALIZE_OK,
1995  static_cast<FwAssertArgType>(_status)
1996  );
1997 
1998  _status = msg.serializeFrom(args);
1999  FW_ASSERT (
2000  _status == Fw::FW_SERIALIZE_OK,
2001  static_cast<FwAssertArgType>(_status)
2002  );
2003 
2004  // Send message
2006  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2007 
2008  FW_ASSERT(
2009  qStatus == Os::Queue::OP_OK,
2010  static_cast<FwAssertArgType>(qStatus)
2011  );
2012  }
2013 
2016  FwOpcodeType opCode,
2017  U32 cmdSeq,
2018  Fw::CmdArgBuffer& args
2019  )
2020  {
2021  // Call pre-message hook
2022  this->CS_AUTO_preMsgHook(opCode,cmdSeq);
2023 
2024  // Defer deserializing arguments to the message dispatcher
2025  // to avoid deserializing and reserializing just for IPC
2026  ComponentIpcSerializableBuffer msg;
2028 
2029  // Serialize for IPC
2030  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_AUTO));
2031  FW_ASSERT (
2032  _status == Fw::FW_SERIALIZE_OK,
2033  static_cast<FwAssertArgType>(_status)
2034  );
2035 
2036  // Fake port number to make message dequeue work
2037  FwIndexType port = 0;
2038 
2039  _status = msg.serializeFrom(port);
2040  FW_ASSERT (
2041  _status == Fw::FW_SERIALIZE_OK,
2042  static_cast<FwAssertArgType>(_status)
2043  );
2044 
2045  _status = msg.serializeFrom(opCode);
2046  FW_ASSERT (
2047  _status == Fw::FW_SERIALIZE_OK,
2048  static_cast<FwAssertArgType>(_status)
2049  );
2050 
2051  _status = msg.serializeFrom(cmdSeq);
2052  FW_ASSERT (
2053  _status == Fw::FW_SERIALIZE_OK,
2054  static_cast<FwAssertArgType>(_status)
2055  );
2056 
2057  _status = msg.serializeFrom(args);
2058  FW_ASSERT (
2059  _status == Fw::FW_SERIALIZE_OK,
2060  static_cast<FwAssertArgType>(_status)
2061  );
2062 
2063  // Send message
2065  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2066 
2067  FW_ASSERT(
2068  qStatus == Os::Queue::OP_OK,
2069  static_cast<FwAssertArgType>(qStatus)
2070  );
2071  }
2072 
2075  FwOpcodeType opCode,
2076  U32 cmdSeq,
2077  Fw::CmdArgBuffer& args
2078  )
2079  {
2080  // Call pre-message hook
2081  this->CS_MANUAL_preMsgHook(opCode,cmdSeq);
2082 
2083  // Defer deserializing arguments to the message dispatcher
2084  // to avoid deserializing and reserializing just for IPC
2085  ComponentIpcSerializableBuffer msg;
2087 
2088  // Serialize for IPC
2089  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_MANUAL));
2090  FW_ASSERT (
2091  _status == Fw::FW_SERIALIZE_OK,
2092  static_cast<FwAssertArgType>(_status)
2093  );
2094 
2095  // Fake port number to make message dequeue work
2096  FwIndexType port = 0;
2097 
2098  _status = msg.serializeFrom(port);
2099  FW_ASSERT (
2100  _status == Fw::FW_SERIALIZE_OK,
2101  static_cast<FwAssertArgType>(_status)
2102  );
2103 
2104  _status = msg.serializeFrom(opCode);
2105  FW_ASSERT (
2106  _status == Fw::FW_SERIALIZE_OK,
2107  static_cast<FwAssertArgType>(_status)
2108  );
2109 
2110  _status = msg.serializeFrom(cmdSeq);
2111  FW_ASSERT (
2112  _status == Fw::FW_SERIALIZE_OK,
2113  static_cast<FwAssertArgType>(_status)
2114  );
2115 
2116  _status = msg.serializeFrom(args);
2117  FW_ASSERT (
2118  _status == Fw::FW_SERIALIZE_OK,
2119  static_cast<FwAssertArgType>(_status)
2120  );
2121 
2122  // Send message
2124  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2125 
2126  FW_ASSERT(
2127  qStatus == Os::Queue::OP_OK,
2128  static_cast<FwAssertArgType>(qStatus)
2129  );
2130  }
2131 
2134  FwOpcodeType opCode,
2135  U32 cmdSeq,
2136  Fw::CmdArgBuffer& args
2137  )
2138  {
2139  // Call pre-message hook
2140  this->CS_JOIN_WAIT_preMsgHook(opCode,cmdSeq);
2141 
2142  // Defer deserializing arguments to the message dispatcher
2143  // to avoid deserializing and reserializing just for IPC
2144  ComponentIpcSerializableBuffer msg;
2146 
2147  // Serialize for IPC
2148  _status = msg.serializeFrom(static_cast<FwEnumStoreType>(CMD_CS_JOIN_WAIT));
2149  FW_ASSERT (
2150  _status == Fw::FW_SERIALIZE_OK,
2151  static_cast<FwAssertArgType>(_status)
2152  );
2153 
2154  // Fake port number to make message dequeue work
2155  FwIndexType port = 0;
2156 
2157  _status = msg.serializeFrom(port);
2158  FW_ASSERT (
2159  _status == Fw::FW_SERIALIZE_OK,
2160  static_cast<FwAssertArgType>(_status)
2161  );
2162 
2163  _status = msg.serializeFrom(opCode);
2164  FW_ASSERT (
2165  _status == Fw::FW_SERIALIZE_OK,
2166  static_cast<FwAssertArgType>(_status)
2167  );
2168 
2169  _status = msg.serializeFrom(cmdSeq);
2170  FW_ASSERT (
2171  _status == Fw::FW_SERIALIZE_OK,
2172  static_cast<FwAssertArgType>(_status)
2173  );
2174 
2175  _status = msg.serializeFrom(args);
2176  FW_ASSERT (
2177  _status == Fw::FW_SERIALIZE_OK,
2178  static_cast<FwAssertArgType>(_status)
2179  );
2180 
2181  // Send message
2183  Os::Queue::Status qStatus = this->m_queue.send(msg, 0, _block);
2184 
2185  FW_ASSERT(
2186  qStatus == Os::Queue::OP_OK,
2187  static_cast<FwAssertArgType>(qStatus)
2188  );
2189  }
2190 
2191  // ----------------------------------------------------------------------
2192  // Pre-message hooks for async commands
2193  //
2194  // Each of these functions is invoked just before processing the
2195  // corresponding command. By default they do nothing. You can
2196  // override them to provide specific pre-command behavior.
2197  // ----------------------------------------------------------------------
2198 
2201  FwOpcodeType opCode,
2202  U32 cmdSeq
2203  )
2204  {
2205  // Defaults to no-op; can be overridden
2206  (void) opCode;
2207  (void) cmdSeq;
2208  }
2209 
2212  FwOpcodeType opCode,
2213  U32 cmdSeq
2214  )
2215  {
2216  // Defaults to no-op; can be overridden
2217  (void) opCode;
2218  (void) cmdSeq;
2219  }
2220 
2223  FwOpcodeType opCode,
2224  U32 cmdSeq
2225  )
2226  {
2227  // Defaults to no-op; can be overridden
2228  (void) opCode;
2229  (void) cmdSeq;
2230  }
2231 
2234  FwOpcodeType opCode,
2235  U32 cmdSeq
2236  )
2237  {
2238  // Defaults to no-op; can be overridden
2239  (void) opCode;
2240  (void) cmdSeq;
2241  }
2242 
2245  FwOpcodeType opCode,
2246  U32 cmdSeq
2247  )
2248  {
2249  // Defaults to no-op; can be overridden
2250  (void) opCode;
2251  (void) cmdSeq;
2252  }
2253 
2256  FwOpcodeType opCode,
2257  U32 cmdSeq
2258  )
2259  {
2260  // Defaults to no-op; can be overridden
2261  (void) opCode;
2262  (void) cmdSeq;
2263  }
2264 
2267  FwOpcodeType opCode,
2268  U32 cmdSeq
2269  )
2270  {
2271  // Defaults to no-op; can be overridden
2272  (void) opCode;
2273  (void) cmdSeq;
2274  }
2275 
2278  FwOpcodeType opCode,
2279  U32 cmdSeq
2280  )
2281  {
2282  // Defaults to no-op; can be overridden
2283  (void) opCode;
2284  (void) cmdSeq;
2285  }
2286 
2287  // ----------------------------------------------------------------------
2288  // Event logging functions
2289  // ----------------------------------------------------------------------
2290 
2293  {
2294  // Get the time
2295  Fw::Time _logTime;
2296  if (this->isConnected_timeCaller_OutputPort(0)) {
2297  this->timeCaller_out(0, _logTime);
2298  }
2299 
2300  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCELOADED;
2301 
2302  // Emit the event on the log port
2303  if (this->isConnected_logOut_OutputPort(0)) {
2304  Fw::LogBuffer _logBuff;
2306 
2307 #if FW_AMPCS_COMPATIBLE
2308  // Serialize the number of arguments
2309  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2310  FW_ASSERT(
2311  _status == Fw::FW_SERIALIZE_OK,
2312  static_cast<FwAssertArgType>(_status)
2313  );
2314 #endif
2315 
2316  _status = fileName.serializeTo(
2317  _logBuff,
2318  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2319  );
2320  FW_ASSERT(
2321  _status == Fw::FW_SERIALIZE_OK,
2322  static_cast<FwAssertArgType>(_status)
2323  );
2324 
2325  this->logOut_out(
2326  0,
2327  _id,
2328  _logTime,
2330  _logBuff
2331  );
2332  }
2333 
2334  // Emit the event on the text log port
2335 #if FW_ENABLE_TEXT_LOGGING
2336  if (this->isConnected_LogText_OutputPort(0)) {
2337 #if FW_OBJECT_NAMES == 1
2338  const char* _formatString =
2339  "(%s) %s: Loaded sequence %s";
2340 #else
2341  const char* _formatString =
2342  "%s: Loaded sequence %s";
2343 #endif
2344 
2345  Fw::TextLogString _logString;
2346  (void) _logString.format(
2347  _formatString,
2348 #if FW_OBJECT_NAMES == 1
2349  this->m_objName.toChar(),
2350 #endif
2351  "CS_SequenceLoaded ",
2352  fileName.toChar()
2353  );
2354 
2355  this->LogText_out(
2356  0,
2357  _id,
2358  _logTime,
2360  _logString
2361  );
2362  }
2363 #endif
2364  }
2365 
2368  {
2369  // Get the time
2370  Fw::Time _logTime;
2371  if (this->isConnected_timeCaller_OutputPort(0)) {
2372  this->timeCaller_out(0, _logTime);
2373  }
2374 
2375  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCECANCELED;
2376 
2377  // Emit the event on the log port
2378  if (this->isConnected_logOut_OutputPort(0)) {
2379  Fw::LogBuffer _logBuff;
2381 
2382 #if FW_AMPCS_COMPATIBLE
2383  // Serialize the number of arguments
2384  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2385  FW_ASSERT(
2386  _status == Fw::FW_SERIALIZE_OK,
2387  static_cast<FwAssertArgType>(_status)
2388  );
2389 #endif
2390 
2391  _status = fileName.serializeTo(
2392  _logBuff,
2393  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2394  );
2395  FW_ASSERT(
2396  _status == Fw::FW_SERIALIZE_OK,
2397  static_cast<FwAssertArgType>(_status)
2398  );
2399 
2400  this->logOut_out(
2401  0,
2402  _id,
2403  _logTime,
2405  _logBuff
2406  );
2407  }
2408 
2409  // Emit the event on the text log port
2410 #if FW_ENABLE_TEXT_LOGGING
2411  if (this->isConnected_LogText_OutputPort(0)) {
2412 #if FW_OBJECT_NAMES == 1
2413  const char* _formatString =
2414  "(%s) %s: Sequence file %s canceled";
2415 #else
2416  const char* _formatString =
2417  "%s: Sequence file %s canceled";
2418 #endif
2419 
2420  Fw::TextLogString _logString;
2421  (void) _logString.format(
2422  _formatString,
2423 #if FW_OBJECT_NAMES == 1
2424  this->m_objName.toChar(),
2425 #endif
2426  "CS_SequenceCanceled ",
2427  fileName.toChar()
2428  );
2429 
2430  this->LogText_out(
2431  0,
2432  _id,
2433  _logTime,
2435  _logString
2436  );
2437  }
2438 #endif
2439  }
2440 
2443  {
2444  // Get the time
2445  Fw::Time _logTime;
2446  if (this->isConnected_timeCaller_OutputPort(0)) {
2447  this->timeCaller_out(0, _logTime);
2448  }
2449 
2450  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILEREADERROR;
2451 
2452  // Emit the event on the log port
2453  if (this->isConnected_logOut_OutputPort(0)) {
2454  Fw::LogBuffer _logBuff;
2456 
2457 #if FW_AMPCS_COMPATIBLE
2458  // Serialize the number of arguments
2459  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2460  FW_ASSERT(
2461  _status == Fw::FW_SERIALIZE_OK,
2462  static_cast<FwAssertArgType>(_status)
2463  );
2464 #endif
2465 
2466  _status = fileName.serializeTo(
2467  _logBuff,
2468  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2469  );
2470  FW_ASSERT(
2471  _status == Fw::FW_SERIALIZE_OK,
2472  static_cast<FwAssertArgType>(_status)
2473  );
2474 
2475  this->logOut_out(
2476  0,
2477  _id,
2478  _logTime,
2480  _logBuff
2481  );
2482  }
2483 
2484  // Emit the event on the text log port
2485 #if FW_ENABLE_TEXT_LOGGING
2486  if (this->isConnected_LogText_OutputPort(0)) {
2487 #if FW_OBJECT_NAMES == 1
2488  const char* _formatString =
2489  "(%s) %s: Error reading sequence file %s";
2490 #else
2491  const char* _formatString =
2492  "%s: Error reading sequence file %s";
2493 #endif
2494 
2495  Fw::TextLogString _logString;
2496  (void) _logString.format(
2497  _formatString,
2498 #if FW_OBJECT_NAMES == 1
2499  this->m_objName.toChar(),
2500 #endif
2501  "CS_FileReadError ",
2502  fileName.toChar()
2503  );
2504 
2505  this->LogText_out(
2506  0,
2507  _id,
2508  _logTime,
2510  _logString
2511  );
2512  }
2513 #endif
2514  }
2515 
2518  const Fw::StringBase& fileName,
2519  const Svc::CmdSequencer_FileReadStage& stage,
2520  I32 error
2521  ) const
2522  {
2523  // Get the time
2524  Fw::Time _logTime;
2525  if (this->isConnected_timeCaller_OutputPort(0)) {
2526  this->timeCaller_out(0, _logTime);
2527  }
2528 
2529  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILEINVALID;
2530 
2531  // Emit the event on the log port
2532  if (this->isConnected_logOut_OutputPort(0)) {
2533  Fw::LogBuffer _logBuff;
2535 
2536 #if FW_AMPCS_COMPATIBLE
2537  // Serialize the number of arguments
2538  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2539  FW_ASSERT(
2540  _status == Fw::FW_SERIALIZE_OK,
2541  static_cast<FwAssertArgType>(_status)
2542  );
2543 #endif
2544 
2545  _status = fileName.serializeTo(
2546  _logBuff,
2547  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2548  );
2549  FW_ASSERT(
2550  _status == Fw::FW_SERIALIZE_OK,
2551  static_cast<FwAssertArgType>(_status)
2552  );
2553 
2554 #if FW_AMPCS_COMPATIBLE
2555  // Serialize the argument size
2556  _status = _logBuff.serializeFrom(
2558  );
2559  FW_ASSERT(
2560  _status == Fw::FW_SERIALIZE_OK,
2561  static_cast<FwAssertArgType>(_status)
2562  );
2563 #endif
2564  _status = _logBuff.serializeFrom(stage);
2565  FW_ASSERT(
2566  _status == Fw::FW_SERIALIZE_OK,
2567  static_cast<FwAssertArgType>(_status)
2568  );
2569 
2570 #if FW_AMPCS_COMPATIBLE
2571  // Serialize the argument size
2572  _status = _logBuff.serializeFrom(
2573  static_cast<U8>(sizeof(I32))
2574  );
2575  FW_ASSERT(
2576  _status == Fw::FW_SERIALIZE_OK,
2577  static_cast<FwAssertArgType>(_status)
2578  );
2579 #endif
2580  _status = _logBuff.serializeFrom(error);
2581  FW_ASSERT(
2582  _status == Fw::FW_SERIALIZE_OK,
2583  static_cast<FwAssertArgType>(_status)
2584  );
2585 
2586  this->logOut_out(
2587  0,
2588  _id,
2589  _logTime,
2591  _logBuff
2592  );
2593  }
2594 
2595  // Emit the event on the text log port
2596 #if FW_ENABLE_TEXT_LOGGING
2597  if (this->isConnected_LogText_OutputPort(0)) {
2598 #if FW_OBJECT_NAMES == 1
2599  const char* _formatString =
2600  "(%s) %s: Sequence file %s invalid. Stage: %s Error: %" PRIi32 "";
2601 #else
2602  const char* _formatString =
2603  "%s: Sequence file %s invalid. Stage: %s Error: %" PRIi32 "";
2604 #endif
2605 
2606  Fw::String stageStr;
2607  stage.toString(stageStr);
2608 
2609  Fw::TextLogString _logString;
2610  (void) _logString.format(
2611  _formatString,
2612 #if FW_OBJECT_NAMES == 1
2613  this->m_objName.toChar(),
2614 #endif
2615  "CS_FileInvalid ",
2616  fileName.toChar(),
2617  stageStr.toChar(),
2618  error
2619  );
2620 
2621  this->LogText_out(
2622  0,
2623  _id,
2624  _logTime,
2626  _logString
2627  );
2628  }
2629 #endif
2630  }
2631 
2634  const Fw::StringBase& fileName,
2635  U32 recordNumber,
2636  I32 error
2637  ) const
2638  {
2639  // Get the time
2640  Fw::Time _logTime;
2641  if (this->isConnected_timeCaller_OutputPort(0)) {
2642  this->timeCaller_out(0, _logTime);
2643  }
2644 
2645  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_RECORDINVALID;
2646 
2647  // Emit the event on the log port
2648  if (this->isConnected_logOut_OutputPort(0)) {
2649  Fw::LogBuffer _logBuff;
2651 
2652 #if FW_AMPCS_COMPATIBLE
2653  // Serialize the number of arguments
2654  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2655  FW_ASSERT(
2656  _status == Fw::FW_SERIALIZE_OK,
2657  static_cast<FwAssertArgType>(_status)
2658  );
2659 #endif
2660 
2661  _status = fileName.serializeTo(
2662  _logBuff,
2663  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2664  );
2665  FW_ASSERT(
2666  _status == Fw::FW_SERIALIZE_OK,
2667  static_cast<FwAssertArgType>(_status)
2668  );
2669 
2670 #if FW_AMPCS_COMPATIBLE
2671  // Serialize the argument size
2672  _status = _logBuff.serializeFrom(
2673  static_cast<U8>(sizeof(U32))
2674  );
2675  FW_ASSERT(
2676  _status == Fw::FW_SERIALIZE_OK,
2677  static_cast<FwAssertArgType>(_status)
2678  );
2679 #endif
2680  _status = _logBuff.serializeFrom(recordNumber);
2681  FW_ASSERT(
2682  _status == Fw::FW_SERIALIZE_OK,
2683  static_cast<FwAssertArgType>(_status)
2684  );
2685 
2686 #if FW_AMPCS_COMPATIBLE
2687  // Serialize the argument size
2688  _status = _logBuff.serializeFrom(
2689  static_cast<U8>(sizeof(I32))
2690  );
2691  FW_ASSERT(
2692  _status == Fw::FW_SERIALIZE_OK,
2693  static_cast<FwAssertArgType>(_status)
2694  );
2695 #endif
2696  _status = _logBuff.serializeFrom(error);
2697  FW_ASSERT(
2698  _status == Fw::FW_SERIALIZE_OK,
2699  static_cast<FwAssertArgType>(_status)
2700  );
2701 
2702  this->logOut_out(
2703  0,
2704  _id,
2705  _logTime,
2707  _logBuff
2708  );
2709  }
2710 
2711  // Emit the event on the text log port
2712 #if FW_ENABLE_TEXT_LOGGING
2713  if (this->isConnected_LogText_OutputPort(0)) {
2714 #if FW_OBJECT_NAMES == 1
2715  const char* _formatString =
2716  "(%s) %s: Sequence file %s: Record %" PRIu32 " invalid. Err: %" PRIi32 "";
2717 #else
2718  const char* _formatString =
2719  "%s: Sequence file %s: Record %" PRIu32 " invalid. Err: %" PRIi32 "";
2720 #endif
2721 
2722  Fw::TextLogString _logString;
2723  (void) _logString.format(
2724  _formatString,
2725 #if FW_OBJECT_NAMES == 1
2726  this->m_objName.toChar(),
2727 #endif
2728  "CS_RecordInvalid ",
2729  fileName.toChar(),
2730  recordNumber,
2731  error
2732  );
2733 
2734  this->LogText_out(
2735  0,
2736  _id,
2737  _logTime,
2739  _logString
2740  );
2741  }
2742 #endif
2743  }
2744 
2747  const Fw::StringBase& fileName,
2748  U32 size
2749  ) const
2750  {
2751  // Get the time
2752  Fw::Time _logTime;
2753  if (this->isConnected_timeCaller_OutputPort(0)) {
2754  this->timeCaller_out(0, _logTime);
2755  }
2756 
2757  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILESIZEERROR;
2758 
2759  // Emit the event on the log port
2760  if (this->isConnected_logOut_OutputPort(0)) {
2761  Fw::LogBuffer _logBuff;
2763 
2764 #if FW_AMPCS_COMPATIBLE
2765  // Serialize the number of arguments
2766  _status = _logBuff.serializeFrom(static_cast<U8>(2));
2767  FW_ASSERT(
2768  _status == Fw::FW_SERIALIZE_OK,
2769  static_cast<FwAssertArgType>(_status)
2770  );
2771 #endif
2772 
2773  _status = fileName.serializeTo(
2774  _logBuff,
2775  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2776  );
2777  FW_ASSERT(
2778  _status == Fw::FW_SERIALIZE_OK,
2779  static_cast<FwAssertArgType>(_status)
2780  );
2781 
2782 #if FW_AMPCS_COMPATIBLE
2783  // Serialize the argument size
2784  _status = _logBuff.serializeFrom(
2785  static_cast<U8>(sizeof(U32))
2786  );
2787  FW_ASSERT(
2788  _status == Fw::FW_SERIALIZE_OK,
2789  static_cast<FwAssertArgType>(_status)
2790  );
2791 #endif
2792  _status = _logBuff.serializeFrom(size);
2793  FW_ASSERT(
2794  _status == Fw::FW_SERIALIZE_OK,
2795  static_cast<FwAssertArgType>(_status)
2796  );
2797 
2798  this->logOut_out(
2799  0,
2800  _id,
2801  _logTime,
2803  _logBuff
2804  );
2805  }
2806 
2807  // Emit the event on the text log port
2808 #if FW_ENABLE_TEXT_LOGGING
2809  if (this->isConnected_LogText_OutputPort(0)) {
2810 #if FW_OBJECT_NAMES == 1
2811  const char* _formatString =
2812  "(%s) %s: Sequence file %s too large. Size: %" PRIu32 "";
2813 #else
2814  const char* _formatString =
2815  "%s: Sequence file %s too large. Size: %" PRIu32 "";
2816 #endif
2817 
2818  Fw::TextLogString _logString;
2819  (void) _logString.format(
2820  _formatString,
2821 #if FW_OBJECT_NAMES == 1
2822  this->m_objName.toChar(),
2823 #endif
2824  "CS_FileSizeError ",
2825  fileName.toChar(),
2826  size
2827  );
2828 
2829  this->LogText_out(
2830  0,
2831  _id,
2832  _logTime,
2834  _logString
2835  );
2836  }
2837 #endif
2838  }
2839 
2842  {
2843  // Get the time
2844  Fw::Time _logTime;
2845  if (this->isConnected_timeCaller_OutputPort(0)) {
2846  this->timeCaller_out(0, _logTime);
2847  }
2848 
2849  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILENOTFOUND;
2850 
2851  // Emit the event on the log port
2852  if (this->isConnected_logOut_OutputPort(0)) {
2853  Fw::LogBuffer _logBuff;
2855 
2856 #if FW_AMPCS_COMPATIBLE
2857  // Serialize the number of arguments
2858  _status = _logBuff.serializeFrom(static_cast<U8>(1));
2859  FW_ASSERT(
2860  _status == Fw::FW_SERIALIZE_OK,
2861  static_cast<FwAssertArgType>(_status)
2862  );
2863 #endif
2864 
2865  _status = fileName.serializeTo(
2866  _logBuff,
2867  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2868  );
2869  FW_ASSERT(
2870  _status == Fw::FW_SERIALIZE_OK,
2871  static_cast<FwAssertArgType>(_status)
2872  );
2873 
2874  this->logOut_out(
2875  0,
2876  _id,
2877  _logTime,
2879  _logBuff
2880  );
2881  }
2882 
2883  // Emit the event on the text log port
2884 #if FW_ENABLE_TEXT_LOGGING
2885  if (this->isConnected_LogText_OutputPort(0)) {
2886 #if FW_OBJECT_NAMES == 1
2887  const char* _formatString =
2888  "(%s) %s: Sequence file %s not found.";
2889 #else
2890  const char* _formatString =
2891  "%s: Sequence file %s not found.";
2892 #endif
2893 
2894  Fw::TextLogString _logString;
2895  (void) _logString.format(
2896  _formatString,
2897 #if FW_OBJECT_NAMES == 1
2898  this->m_objName.toChar(),
2899 #endif
2900  "CS_FileNotFound ",
2901  fileName.toChar()
2902  );
2903 
2904  this->LogText_out(
2905  0,
2906  _id,
2907  _logTime,
2909  _logString
2910  );
2911  }
2912 #endif
2913  }
2914 
2917  const Fw::StringBase& fileName,
2918  U32 storedCRC,
2919  U32 computedCRC
2920  ) const
2921  {
2922  // Get the time
2923  Fw::Time _logTime;
2924  if (this->isConnected_timeCaller_OutputPort(0)) {
2925  this->timeCaller_out(0, _logTime);
2926  }
2927 
2928  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_FILECRCFAILURE;
2929 
2930  // Emit the event on the log port
2931  if (this->isConnected_logOut_OutputPort(0)) {
2932  Fw::LogBuffer _logBuff;
2934 
2935 #if FW_AMPCS_COMPATIBLE
2936  // Serialize the number of arguments
2937  _status = _logBuff.serializeFrom(static_cast<U8>(3));
2938  FW_ASSERT(
2939  _status == Fw::FW_SERIALIZE_OK,
2940  static_cast<FwAssertArgType>(_status)
2941  );
2942 #endif
2943 
2944  _status = fileName.serializeTo(
2945  _logBuff,
2946  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
2947  );
2948  FW_ASSERT(
2949  _status == Fw::FW_SERIALIZE_OK,
2950  static_cast<FwAssertArgType>(_status)
2951  );
2952 
2953 #if FW_AMPCS_COMPATIBLE
2954  // Serialize the argument size
2955  _status = _logBuff.serializeFrom(
2956  static_cast<U8>(sizeof(U32))
2957  );
2958  FW_ASSERT(
2959  _status == Fw::FW_SERIALIZE_OK,
2960  static_cast<FwAssertArgType>(_status)
2961  );
2962 #endif
2963  _status = _logBuff.serializeFrom(storedCRC);
2964  FW_ASSERT(
2965  _status == Fw::FW_SERIALIZE_OK,
2966  static_cast<FwAssertArgType>(_status)
2967  );
2968 
2969 #if FW_AMPCS_COMPATIBLE
2970  // Serialize the argument size
2971  _status = _logBuff.serializeFrom(
2972  static_cast<U8>(sizeof(U32))
2973  );
2974  FW_ASSERT(
2975  _status == Fw::FW_SERIALIZE_OK,
2976  static_cast<FwAssertArgType>(_status)
2977  );
2978 #endif
2979  _status = _logBuff.serializeFrom(computedCRC);
2980  FW_ASSERT(
2981  _status == Fw::FW_SERIALIZE_OK,
2982  static_cast<FwAssertArgType>(_status)
2983  );
2984 
2985  this->logOut_out(
2986  0,
2987  _id,
2988  _logTime,
2990  _logBuff
2991  );
2992  }
2993 
2994  // Emit the event on the text log port
2995 #if FW_ENABLE_TEXT_LOGGING
2996  if (this->isConnected_LogText_OutputPort(0)) {
2997 #if FW_OBJECT_NAMES == 1
2998  const char* _formatString =
2999  "(%s) %s: Sequence file %s had invalid CRC. Stored 0x%" PRIx32 ", Computed 0x%" PRIx32 ".";
3000 #else
3001  const char* _formatString =
3002  "%s: Sequence file %s had invalid CRC. Stored 0x%" PRIx32 ", Computed 0x%" PRIx32 ".";
3003 #endif
3004 
3005  Fw::TextLogString _logString;
3006  (void) _logString.format(
3007  _formatString,
3008 #if FW_OBJECT_NAMES == 1
3009  this->m_objName.toChar(),
3010 #endif
3011  "CS_FileCrcFailure ",
3012  fileName.toChar(),
3013  storedCRC,
3014  computedCRC
3015  );
3016 
3017  this->LogText_out(
3018  0,
3019  _id,
3020  _logTime,
3022  _logString
3023  );
3024  }
3025 #endif
3026  }
3027 
3030  const Fw::StringBase& fileName,
3031  U32 recordNumber,
3032  FwOpcodeType opCode
3033  ) const
3034  {
3035  // Get the time
3036  Fw::Time _logTime;
3037  if (this->isConnected_timeCaller_OutputPort(0)) {
3038  this->timeCaller_out(0, _logTime);
3039  }
3040 
3041  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_COMMANDCOMPLETE;
3042 
3043  // Emit the event on the log port
3044  if (this->isConnected_logOut_OutputPort(0)) {
3045  Fw::LogBuffer _logBuff;
3047 
3048 #if FW_AMPCS_COMPATIBLE
3049  // Serialize the number of arguments
3050  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3051  FW_ASSERT(
3052  _status == Fw::FW_SERIALIZE_OK,
3053  static_cast<FwAssertArgType>(_status)
3054  );
3055 #endif
3056 
3057  _status = fileName.serializeTo(
3058  _logBuff,
3059  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3060  );
3061  FW_ASSERT(
3062  _status == Fw::FW_SERIALIZE_OK,
3063  static_cast<FwAssertArgType>(_status)
3064  );
3065 
3066 #if FW_AMPCS_COMPATIBLE
3067  // Serialize the argument size
3068  _status = _logBuff.serializeFrom(
3069  static_cast<U8>(sizeof(U32))
3070  );
3071  FW_ASSERT(
3072  _status == Fw::FW_SERIALIZE_OK,
3073  static_cast<FwAssertArgType>(_status)
3074  );
3075 #endif
3076  _status = _logBuff.serializeFrom(recordNumber);
3077  FW_ASSERT(
3078  _status == Fw::FW_SERIALIZE_OK,
3079  static_cast<FwAssertArgType>(_status)
3080  );
3081 
3082 #if FW_AMPCS_COMPATIBLE
3083  // Serialize the argument size
3084  _status = _logBuff.serializeFrom(
3085  static_cast<U8>(sizeof(FwOpcodeType))
3086  );
3087  FW_ASSERT(
3088  _status == Fw::FW_SERIALIZE_OK,
3089  static_cast<FwAssertArgType>(_status)
3090  );
3091 #endif
3092  _status = _logBuff.serializeFrom(opCode);
3093  FW_ASSERT(
3094  _status == Fw::FW_SERIALIZE_OK,
3095  static_cast<FwAssertArgType>(_status)
3096  );
3097 
3098  this->logOut_out(
3099  0,
3100  _id,
3101  _logTime,
3103  _logBuff
3104  );
3105  }
3106 
3107  // Emit the event on the text log port
3108 #if FW_ENABLE_TEXT_LOGGING
3109  if (this->isConnected_LogText_OutputPort(0)) {
3110 #if FW_OBJECT_NAMES == 1
3111  const char* _formatString =
3112  "(%s) %s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") complete";
3113 #else
3114  const char* _formatString =
3115  "%s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") complete";
3116 #endif
3117 
3118  Fw::TextLogString _logString;
3119  (void) _logString.format(
3120  _formatString,
3121 #if FW_OBJECT_NAMES == 1
3122  this->m_objName.toChar(),
3123 #endif
3124  "CS_CommandComplete ",
3125  fileName.toChar(),
3126  recordNumber,
3127  opCode
3128  );
3129 
3130  this->LogText_out(
3131  0,
3132  _id,
3133  _logTime,
3135  _logString
3136  );
3137  }
3138 #endif
3139  }
3140 
3143  {
3144  // Get the time
3145  Fw::Time _logTime;
3146  if (this->isConnected_timeCaller_OutputPort(0)) {
3147  this->timeCaller_out(0, _logTime);
3148  }
3149 
3150  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCECOMPLETE;
3151 
3152  // Emit the event on the log port
3153  if (this->isConnected_logOut_OutputPort(0)) {
3154  Fw::LogBuffer _logBuff;
3156 
3157 #if FW_AMPCS_COMPATIBLE
3158  // Serialize the number of arguments
3159  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3160  FW_ASSERT(
3161  _status == Fw::FW_SERIALIZE_OK,
3162  static_cast<FwAssertArgType>(_status)
3163  );
3164 #endif
3165 
3166  _status = fileName.serializeTo(
3167  _logBuff,
3168  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3169  );
3170  FW_ASSERT(
3171  _status == Fw::FW_SERIALIZE_OK,
3172  static_cast<FwAssertArgType>(_status)
3173  );
3174 
3175  this->logOut_out(
3176  0,
3177  _id,
3178  _logTime,
3180  _logBuff
3181  );
3182  }
3183 
3184  // Emit the event on the text log port
3185 #if FW_ENABLE_TEXT_LOGGING
3186  if (this->isConnected_LogText_OutputPort(0)) {
3187 #if FW_OBJECT_NAMES == 1
3188  const char* _formatString =
3189  "(%s) %s: Sequence file %s complete";
3190 #else
3191  const char* _formatString =
3192  "%s: Sequence file %s complete";
3193 #endif
3194 
3195  Fw::TextLogString _logString;
3196  (void) _logString.format(
3197  _formatString,
3198 #if FW_OBJECT_NAMES == 1
3199  this->m_objName.toChar(),
3200 #endif
3201  "CS_SequenceComplete ",
3202  fileName.toChar()
3203  );
3204 
3205  this->LogText_out(
3206  0,
3207  _id,
3208  _logTime,
3210  _logString
3211  );
3212  }
3213 #endif
3214  }
3215 
3218  const Fw::StringBase& fileName,
3219  U32 recordNumber,
3220  FwOpcodeType opCode,
3221  U32 errorStatus
3222  ) const
3223  {
3224  // Get the time
3225  Fw::Time _logTime;
3226  if (this->isConnected_timeCaller_OutputPort(0)) {
3227  this->timeCaller_out(0, _logTime);
3228  }
3229 
3230  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_COMMANDERROR;
3231 
3232  // Emit the event on the log port
3233  if (this->isConnected_logOut_OutputPort(0)) {
3234  Fw::LogBuffer _logBuff;
3236 
3237 #if FW_AMPCS_COMPATIBLE
3238  // Serialize the number of arguments
3239  _status = _logBuff.serializeFrom(static_cast<U8>(4));
3240  FW_ASSERT(
3241  _status == Fw::FW_SERIALIZE_OK,
3242  static_cast<FwAssertArgType>(_status)
3243  );
3244 #endif
3245 
3246  _status = fileName.serializeTo(
3247  _logBuff,
3248  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3249  );
3250  FW_ASSERT(
3251  _status == Fw::FW_SERIALIZE_OK,
3252  static_cast<FwAssertArgType>(_status)
3253  );
3254 
3255 #if FW_AMPCS_COMPATIBLE
3256  // Serialize the argument size
3257  _status = _logBuff.serializeFrom(
3258  static_cast<U8>(sizeof(U32))
3259  );
3260  FW_ASSERT(
3261  _status == Fw::FW_SERIALIZE_OK,
3262  static_cast<FwAssertArgType>(_status)
3263  );
3264 #endif
3265  _status = _logBuff.serializeFrom(recordNumber);
3266  FW_ASSERT(
3267  _status == Fw::FW_SERIALIZE_OK,
3268  static_cast<FwAssertArgType>(_status)
3269  );
3270 
3271 #if FW_AMPCS_COMPATIBLE
3272  // Serialize the argument size
3273  _status = _logBuff.serializeFrom(
3274  static_cast<U8>(sizeof(FwOpcodeType))
3275  );
3276  FW_ASSERT(
3277  _status == Fw::FW_SERIALIZE_OK,
3278  static_cast<FwAssertArgType>(_status)
3279  );
3280 #endif
3281  _status = _logBuff.serializeFrom(opCode);
3282  FW_ASSERT(
3283  _status == Fw::FW_SERIALIZE_OK,
3284  static_cast<FwAssertArgType>(_status)
3285  );
3286 
3287 #if FW_AMPCS_COMPATIBLE
3288  // Serialize the argument size
3289  _status = _logBuff.serializeFrom(
3290  static_cast<U8>(sizeof(U32))
3291  );
3292  FW_ASSERT(
3293  _status == Fw::FW_SERIALIZE_OK,
3294  static_cast<FwAssertArgType>(_status)
3295  );
3296 #endif
3297  _status = _logBuff.serializeFrom(errorStatus);
3298  FW_ASSERT(
3299  _status == Fw::FW_SERIALIZE_OK,
3300  static_cast<FwAssertArgType>(_status)
3301  );
3302 
3303  this->logOut_out(
3304  0,
3305  _id,
3306  _logTime,
3308  _logBuff
3309  );
3310  }
3311 
3312  // Emit the event on the text log port
3313 #if FW_ENABLE_TEXT_LOGGING
3314  if (this->isConnected_LogText_OutputPort(0)) {
3315 #if FW_OBJECT_NAMES == 1
3316  const char* _formatString =
3317  "(%s) %s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") completed with error %" PRIu32 "";
3318 #else
3319  const char* _formatString =
3320  "%s: Sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") completed with error %" PRIu32 "";
3321 #endif
3322 
3323  Fw::TextLogString _logString;
3324  (void) _logString.format(
3325  _formatString,
3326 #if FW_OBJECT_NAMES == 1
3327  this->m_objName.toChar(),
3328 #endif
3329  "CS_CommandError ",
3330  fileName.toChar(),
3331  recordNumber,
3332  opCode,
3333  errorStatus
3334  );
3335 
3336  this->LogText_out(
3337  0,
3338  _id,
3339  _logTime,
3341  _logString
3342  );
3343  }
3344 #endif
3345  }
3346 
3349  {
3350  // Get the time
3351  Fw::Time _logTime;
3352  if (this->isConnected_timeCaller_OutputPort(0)) {
3353  this->timeCaller_out(0, _logTime);
3354  }
3355 
3356  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_INVALIDMODE;
3357 
3358  // Emit the event on the log port
3359  if (this->isConnected_logOut_OutputPort(0)) {
3360  Fw::LogBuffer _logBuff;
3361 
3362 #if FW_AMPCS_COMPATIBLE
3364  // Serialize the number of arguments
3365  _status = _logBuff.serializeFrom(static_cast<U8>(0));
3366  FW_ASSERT(
3367  _status == Fw::FW_SERIALIZE_OK,
3368  static_cast<FwAssertArgType>(_status)
3369  );
3370 #endif
3371 
3372  this->logOut_out(
3373  0,
3374  _id,
3375  _logTime,
3377  _logBuff
3378  );
3379  }
3380 
3381  // Emit the event on the text log port
3382 #if FW_ENABLE_TEXT_LOGGING
3383  if (this->isConnected_LogText_OutputPort(0)) {
3384 #if FW_OBJECT_NAMES == 1
3385  const char* _formatString =
3386  "(%s) %s: Invalid mode";
3387 #else
3388  const char* _formatString =
3389  "%s: Invalid mode";
3390 #endif
3391 
3392  Fw::TextLogString _logString;
3393  (void) _logString.format(
3394  _formatString,
3395 #if FW_OBJECT_NAMES == 1
3396  this->m_objName.toChar(),
3397 #endif
3398  "CS_InvalidMode "
3399  );
3400 
3401  this->LogText_out(
3402  0,
3403  _id,
3404  _logTime,
3406  _logString
3407  );
3408  }
3409 #endif
3410  }
3411 
3414  const Fw::StringBase& fileName,
3415  U32 header_records,
3416  U32 extra_bytes
3417  ) const
3418  {
3419  // Get the time
3420  Fw::Time _logTime;
3421  if (this->isConnected_timeCaller_OutputPort(0)) {
3422  this->timeCaller_out(0, _logTime);
3423  }
3424 
3425  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_RECORDMISMATCH;
3426 
3427  // Emit the event on the log port
3428  if (this->isConnected_logOut_OutputPort(0)) {
3429  Fw::LogBuffer _logBuff;
3431 
3432 #if FW_AMPCS_COMPATIBLE
3433  // Serialize the number of arguments
3434  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3435  FW_ASSERT(
3436  _status == Fw::FW_SERIALIZE_OK,
3437  static_cast<FwAssertArgType>(_status)
3438  );
3439 #endif
3440 
3441  _status = fileName.serializeTo(
3442  _logBuff,
3443  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3444  );
3445  FW_ASSERT(
3446  _status == Fw::FW_SERIALIZE_OK,
3447  static_cast<FwAssertArgType>(_status)
3448  );
3449 
3450 #if FW_AMPCS_COMPATIBLE
3451  // Serialize the argument size
3452  _status = _logBuff.serializeFrom(
3453  static_cast<U8>(sizeof(U32))
3454  );
3455  FW_ASSERT(
3456  _status == Fw::FW_SERIALIZE_OK,
3457  static_cast<FwAssertArgType>(_status)
3458  );
3459 #endif
3460  _status = _logBuff.serializeFrom(header_records);
3461  FW_ASSERT(
3462  _status == Fw::FW_SERIALIZE_OK,
3463  static_cast<FwAssertArgType>(_status)
3464  );
3465 
3466 #if FW_AMPCS_COMPATIBLE
3467  // Serialize the argument size
3468  _status = _logBuff.serializeFrom(
3469  static_cast<U8>(sizeof(U32))
3470  );
3471  FW_ASSERT(
3472  _status == Fw::FW_SERIALIZE_OK,
3473  static_cast<FwAssertArgType>(_status)
3474  );
3475 #endif
3476  _status = _logBuff.serializeFrom(extra_bytes);
3477  FW_ASSERT(
3478  _status == Fw::FW_SERIALIZE_OK,
3479  static_cast<FwAssertArgType>(_status)
3480  );
3481 
3482  this->logOut_out(
3483  0,
3484  _id,
3485  _logTime,
3487  _logBuff
3488  );
3489  }
3490 
3491  // Emit the event on the text log port
3492 #if FW_ENABLE_TEXT_LOGGING
3493  if (this->isConnected_LogText_OutputPort(0)) {
3494 #if FW_OBJECT_NAMES == 1
3495  const char* _formatString =
3496  "(%s) %s: Sequence file %s header records mismatch: %" PRIu32 " in header, found %" PRIu32 " extra bytes.";
3497 #else
3498  const char* _formatString =
3499  "%s: Sequence file %s header records mismatch: %" PRIu32 " in header, found %" PRIu32 " extra bytes.";
3500 #endif
3501 
3502  Fw::TextLogString _logString;
3503  (void) _logString.format(
3504  _formatString,
3505 #if FW_OBJECT_NAMES == 1
3506  this->m_objName.toChar(),
3507 #endif
3508  "CS_RecordMismatch ",
3509  fileName.toChar(),
3510  header_records,
3511  extra_bytes
3512  );
3513 
3514  this->LogText_out(
3515  0,
3516  _id,
3517  _logTime,
3519  _logString
3520  );
3521  }
3522 #endif
3523  }
3524 
3527  const Fw::StringBase& fileName,
3528  U16 time_base,
3529  U16 seq_time_base
3530  ) const
3531  {
3532  // Get the time
3533  Fw::Time _logTime;
3534  if (this->isConnected_timeCaller_OutputPort(0)) {
3535  this->timeCaller_out(0, _logTime);
3536  }
3537 
3538  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_TIMEBASEMISMATCH;
3539 
3540  // Emit the event on the log port
3541  if (this->isConnected_logOut_OutputPort(0)) {
3542  Fw::LogBuffer _logBuff;
3544 
3545 #if FW_AMPCS_COMPATIBLE
3546  // Serialize the number of arguments
3547  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3548  FW_ASSERT(
3549  _status == Fw::FW_SERIALIZE_OK,
3550  static_cast<FwAssertArgType>(_status)
3551  );
3552 #endif
3553 
3554  _status = fileName.serializeTo(
3555  _logBuff,
3556  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3557  );
3558  FW_ASSERT(
3559  _status == Fw::FW_SERIALIZE_OK,
3560  static_cast<FwAssertArgType>(_status)
3561  );
3562 
3563 #if FW_AMPCS_COMPATIBLE
3564  // Serialize the argument size
3565  _status = _logBuff.serializeFrom(
3566  static_cast<U8>(sizeof(U16))
3567  );
3568  FW_ASSERT(
3569  _status == Fw::FW_SERIALIZE_OK,
3570  static_cast<FwAssertArgType>(_status)
3571  );
3572 #endif
3573  _status = _logBuff.serializeFrom(time_base);
3574  FW_ASSERT(
3575  _status == Fw::FW_SERIALIZE_OK,
3576  static_cast<FwAssertArgType>(_status)
3577  );
3578 
3579 #if FW_AMPCS_COMPATIBLE
3580  // Serialize the argument size
3581  _status = _logBuff.serializeFrom(
3582  static_cast<U8>(sizeof(U16))
3583  );
3584  FW_ASSERT(
3585  _status == Fw::FW_SERIALIZE_OK,
3586  static_cast<FwAssertArgType>(_status)
3587  );
3588 #endif
3589  _status = _logBuff.serializeFrom(seq_time_base);
3590  FW_ASSERT(
3591  _status == Fw::FW_SERIALIZE_OK,
3592  static_cast<FwAssertArgType>(_status)
3593  );
3594 
3595  this->logOut_out(
3596  0,
3597  _id,
3598  _logTime,
3600  _logBuff
3601  );
3602  }
3603 
3604  // Emit the event on the text log port
3605 #if FW_ENABLE_TEXT_LOGGING
3606  if (this->isConnected_LogText_OutputPort(0)) {
3607 #if FW_OBJECT_NAMES == 1
3608  const char* _formatString =
3609  "(%s) %s: Sequence file %s: Current time base doesn't match sequence time: base: %" PRIu16 " seq: %" PRIu16 "";
3610 #else
3611  const char* _formatString =
3612  "%s: Sequence file %s: Current time base doesn't match sequence time: base: %" PRIu16 " seq: %" PRIu16 "";
3613 #endif
3614 
3615  Fw::TextLogString _logString;
3616  (void) _logString.format(
3617  _formatString,
3618 #if FW_OBJECT_NAMES == 1
3619  this->m_objName.toChar(),
3620 #endif
3621  "CS_TimeBaseMismatch ",
3622  fileName.toChar(),
3623  time_base,
3624  seq_time_base
3625  );
3626 
3627  this->LogText_out(
3628  0,
3629  _id,
3630  _logTime,
3632  _logString
3633  );
3634  }
3635 #endif
3636  }
3637 
3640  const Fw::StringBase& fileName,
3641  U8 currTimeBase,
3642  U8 seqTimeBase
3643  ) const
3644  {
3645  // Get the time
3646  Fw::Time _logTime;
3647  if (this->isConnected_timeCaller_OutputPort(0)) {
3648  this->timeCaller_out(0, _logTime);
3649  }
3650 
3652 
3653  // Emit the event on the log port
3654  if (this->isConnected_logOut_OutputPort(0)) {
3655  Fw::LogBuffer _logBuff;
3657 
3658 #if FW_AMPCS_COMPATIBLE
3659  // Serialize the number of arguments
3660  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3661  FW_ASSERT(
3662  _status == Fw::FW_SERIALIZE_OK,
3663  static_cast<FwAssertArgType>(_status)
3664  );
3665 #endif
3666 
3667  _status = fileName.serializeTo(
3668  _logBuff,
3669  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3670  );
3671  FW_ASSERT(
3672  _status == Fw::FW_SERIALIZE_OK,
3673  static_cast<FwAssertArgType>(_status)
3674  );
3675 
3676 #if FW_AMPCS_COMPATIBLE
3677  // Serialize the argument size
3678  _status = _logBuff.serializeFrom(
3679  static_cast<U8>(sizeof(U8))
3680  );
3681  FW_ASSERT(
3682  _status == Fw::FW_SERIALIZE_OK,
3683  static_cast<FwAssertArgType>(_status)
3684  );
3685 #endif
3686  _status = _logBuff.serializeFrom(currTimeBase);
3687  FW_ASSERT(
3688  _status == Fw::FW_SERIALIZE_OK,
3689  static_cast<FwAssertArgType>(_status)
3690  );
3691 
3692 #if FW_AMPCS_COMPATIBLE
3693  // Serialize the argument size
3694  _status = _logBuff.serializeFrom(
3695  static_cast<U8>(sizeof(U8))
3696  );
3697  FW_ASSERT(
3698  _status == Fw::FW_SERIALIZE_OK,
3699  static_cast<FwAssertArgType>(_status)
3700  );
3701 #endif
3702  _status = _logBuff.serializeFrom(seqTimeBase);
3703  FW_ASSERT(
3704  _status == Fw::FW_SERIALIZE_OK,
3705  static_cast<FwAssertArgType>(_status)
3706  );
3707 
3708  this->logOut_out(
3709  0,
3710  _id,
3711  _logTime,
3713  _logBuff
3714  );
3715  }
3716 
3717  // Emit the event on the text log port
3718 #if FW_ENABLE_TEXT_LOGGING
3719  if (this->isConnected_LogText_OutputPort(0)) {
3720 #if FW_OBJECT_NAMES == 1
3721  const char* _formatString =
3722  "(%s) %s: Sequence file %s: Current time context doesn't match sequence context: base: %" PRIu8 " seq: %" PRIu8 "";
3723 #else
3724  const char* _formatString =
3725  "%s: Sequence file %s: Current time context doesn't match sequence context: base: %" PRIu8 " seq: %" PRIu8 "";
3726 #endif
3727 
3728  Fw::TextLogString _logString;
3729  (void) _logString.format(
3730  _formatString,
3731 #if FW_OBJECT_NAMES == 1
3732  this->m_objName.toChar(),
3733 #endif
3734  "CS_TimeContextMismatch ",
3735  fileName.toChar(),
3736  currTimeBase,
3737  seqTimeBase
3738  );
3739 
3740  this->LogText_out(
3741  0,
3742  _id,
3743  _logTime,
3745  _logString
3746  );
3747  }
3748 #endif
3749  }
3750 
3753  {
3754  // Get the time
3755  Fw::Time _logTime;
3756  if (this->isConnected_timeCaller_OutputPort(0)) {
3757  this->timeCaller_out(0, _logTime);
3758  }
3759 
3761 
3762  // Emit the event on the log port
3763  if (this->isConnected_logOut_OutputPort(0)) {
3764  Fw::LogBuffer _logBuff;
3766 
3767 #if FW_AMPCS_COMPATIBLE
3768  // Serialize the number of arguments
3769  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3770  FW_ASSERT(
3771  _status == Fw::FW_SERIALIZE_OK,
3772  static_cast<FwAssertArgType>(_status)
3773  );
3774 #endif
3775 
3776  _status = filename.serializeTo(
3777  _logBuff,
3778  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
3779  );
3780  FW_ASSERT(
3781  _status == Fw::FW_SERIALIZE_OK,
3782  static_cast<FwAssertArgType>(_status)
3783  );
3784 
3785  this->logOut_out(
3786  0,
3787  _id,
3788  _logTime,
3790  _logBuff
3791  );
3792  }
3793 
3794  // Emit the event on the text log port
3795 #if FW_ENABLE_TEXT_LOGGING
3796  if (this->isConnected_LogText_OutputPort(0)) {
3797 #if FW_OBJECT_NAMES == 1
3798  const char* _formatString =
3799  "(%s) %s: Local request for sequence %s started.";
3800 #else
3801  const char* _formatString =
3802  "%s: Local request for sequence %s started.";
3803 #endif
3804 
3805  Fw::TextLogString _logString;
3806  (void) _logString.format(
3807  _formatString,
3808 #if FW_OBJECT_NAMES == 1
3809  this->m_objName.toChar(),
3810 #endif
3811  "CS_PortSequenceStarted ",
3812  filename.toChar()
3813  );
3814 
3815  this->LogText_out(
3816  0,
3817  _id,
3818  _logTime,
3820  _logString
3821  );
3822  }
3823 #endif
3824  }
3825 
3828  {
3829  // Get the time
3830  Fw::Time _logTime;
3831  if (this->isConnected_timeCaller_OutputPort(0)) {
3832  this->timeCaller_out(0, _logTime);
3833  }
3834 
3836 
3837  // Emit the event on the log port
3838  if (this->isConnected_logOut_OutputPort(0)) {
3839  Fw::LogBuffer _logBuff;
3841 
3842 #if FW_AMPCS_COMPATIBLE
3843  // Serialize the number of arguments
3844  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3845  FW_ASSERT(
3846  _status == Fw::FW_SERIALIZE_OK,
3847  static_cast<FwAssertArgType>(_status)
3848  );
3849 #endif
3850 
3851 #if FW_AMPCS_COMPATIBLE
3852  // Serialize the argument size
3853  _status = _logBuff.serializeFrom(
3854  static_cast<U8>(sizeof(FwOpcodeType))
3855  );
3856  FW_ASSERT(
3857  _status == Fw::FW_SERIALIZE_OK,
3858  static_cast<FwAssertArgType>(_status)
3859  );
3860 #endif
3861  _status = _logBuff.serializeFrom(opcode);
3862  FW_ASSERT(
3863  _status == Fw::FW_SERIALIZE_OK,
3864  static_cast<FwAssertArgType>(_status)
3865  );
3866 
3867  this->logOut_out(
3868  0,
3869  _id,
3870  _logTime,
3872  _logBuff
3873  );
3874  }
3875 
3876  // Emit the event on the text log port
3877 #if FW_ENABLE_TEXT_LOGGING
3878  if (this->isConnected_LogText_OutputPort(0)) {
3879 #if FW_OBJECT_NAMES == 1
3880  const char* _formatString =
3881  "(%s) %s: Command complete status received while no sequences active. Opcode: %" PRIu32 "";
3882 #else
3883  const char* _formatString =
3884  "%s: Command complete status received while no sequences active. Opcode: %" PRIu32 "";
3885 #endif
3886 
3887  Fw::TextLogString _logString;
3888  (void) _logString.format(
3889  _formatString,
3890 #if FW_OBJECT_NAMES == 1
3891  this->m_objName.toChar(),
3892 #endif
3893  "CS_UnexpectedCompletion ",
3894  opcode
3895  );
3896 
3897  this->LogText_out(
3898  0,
3899  _id,
3900  _logTime,
3902  _logString
3903  );
3904  }
3905 #endif
3906  }
3907 
3910  {
3911  // Get the time
3912  Fw::Time _logTime;
3913  if (this->isConnected_timeCaller_OutputPort(0)) {
3914  this->timeCaller_out(0, _logTime);
3915  }
3916 
3917  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_MODESWITCHED;
3918 
3919  // Emit the event on the log port
3920  if (this->isConnected_logOut_OutputPort(0)) {
3921  Fw::LogBuffer _logBuff;
3923 
3924 #if FW_AMPCS_COMPATIBLE
3925  // Serialize the number of arguments
3926  _status = _logBuff.serializeFrom(static_cast<U8>(1));
3927  FW_ASSERT(
3928  _status == Fw::FW_SERIALIZE_OK,
3929  static_cast<FwAssertArgType>(_status)
3930  );
3931 #endif
3932 
3933 #if FW_AMPCS_COMPATIBLE
3934  // Serialize the argument size
3935  _status = _logBuff.serializeFrom(
3937  );
3938  FW_ASSERT(
3939  _status == Fw::FW_SERIALIZE_OK,
3940  static_cast<FwAssertArgType>(_status)
3941  );
3942 #endif
3943  _status = _logBuff.serializeFrom(mode);
3944  FW_ASSERT(
3945  _status == Fw::FW_SERIALIZE_OK,
3946  static_cast<FwAssertArgType>(_status)
3947  );
3948 
3949  this->logOut_out(
3950  0,
3951  _id,
3952  _logTime,
3954  _logBuff
3955  );
3956  }
3957 
3958  // Emit the event on the text log port
3959 #if FW_ENABLE_TEXT_LOGGING
3960  if (this->isConnected_LogText_OutputPort(0)) {
3961 #if FW_OBJECT_NAMES == 1
3962  const char* _formatString =
3963  "(%s) %s: Sequencer switched to %s step mode";
3964 #else
3965  const char* _formatString =
3966  "%s: Sequencer switched to %s step mode";
3967 #endif
3968 
3969  Fw::String modeStr;
3970  mode.toString(modeStr);
3971 
3972  Fw::TextLogString _logString;
3973  (void) _logString.format(
3974  _formatString,
3975 #if FW_OBJECT_NAMES == 1
3976  this->m_objName.toChar(),
3977 #endif
3978  "CS_ModeSwitched ",
3979  modeStr.toChar()
3980  );
3981 
3982  this->LogText_out(
3983  0,
3984  _id,
3985  _logTime,
3987  _logString
3988  );
3989  }
3990 #endif
3991  }
3992 
3995  {
3996  // Get the time
3997  Fw::Time _logTime;
3998  if (this->isConnected_timeCaller_OutputPort(0)) {
3999  this->timeCaller_out(0, _logTime);
4000  }
4001 
4002  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_NOSEQUENCEACTIVE;
4003 
4004  // Emit the event on the log port
4005  if (this->isConnected_logOut_OutputPort(0)) {
4006  Fw::LogBuffer _logBuff;
4007 
4008 #if FW_AMPCS_COMPATIBLE
4010  // Serialize the number of arguments
4011  _status = _logBuff.serializeFrom(static_cast<U8>(0));
4012  FW_ASSERT(
4013  _status == Fw::FW_SERIALIZE_OK,
4014  static_cast<FwAssertArgType>(_status)
4015  );
4016 #endif
4017 
4018  this->logOut_out(
4019  0,
4020  _id,
4021  _logTime,
4023  _logBuff
4024  );
4025  }
4026 
4027  // Emit the event on the text log port
4028 #if FW_ENABLE_TEXT_LOGGING
4029  if (this->isConnected_LogText_OutputPort(0)) {
4030 #if FW_OBJECT_NAMES == 1
4031  const char* _formatString =
4032  "(%s) %s: No sequence active.";
4033 #else
4034  const char* _formatString =
4035  "%s: No sequence active.";
4036 #endif
4037 
4038  Fw::TextLogString _logString;
4039  (void) _logString.format(
4040  _formatString,
4041 #if FW_OBJECT_NAMES == 1
4042  this->m_objName.toChar(),
4043 #endif
4044  "CS_NoSequenceActive "
4045  );
4046 
4047  this->LogText_out(
4048  0,
4049  _id,
4050  _logTime,
4052  _logString
4053  );
4054  }
4055 #endif
4056  }
4057 
4060  {
4061  // Get the time
4062  Fw::Time _logTime;
4063  if (this->isConnected_timeCaller_OutputPort(0)) {
4064  this->timeCaller_out(0, _logTime);
4065  }
4066 
4067  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCEVALID;
4068 
4069  // Emit the event on the log port
4070  if (this->isConnected_logOut_OutputPort(0)) {
4071  Fw::LogBuffer _logBuff;
4073 
4074 #if FW_AMPCS_COMPATIBLE
4075  // Serialize the number of arguments
4076  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4077  FW_ASSERT(
4078  _status == Fw::FW_SERIALIZE_OK,
4079  static_cast<FwAssertArgType>(_status)
4080  );
4081 #endif
4082 
4083  _status = filename.serializeTo(
4084  _logBuff,
4085  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4086  );
4087  FW_ASSERT(
4088  _status == Fw::FW_SERIALIZE_OK,
4089  static_cast<FwAssertArgType>(_status)
4090  );
4091 
4092  this->logOut_out(
4093  0,
4094  _id,
4095  _logTime,
4097  _logBuff
4098  );
4099  }
4100 
4101  // Emit the event on the text log port
4102 #if FW_ENABLE_TEXT_LOGGING
4103  if (this->isConnected_LogText_OutputPort(0)) {
4104 #if FW_OBJECT_NAMES == 1
4105  const char* _formatString =
4106  "(%s) %s: Sequence %s is valid.";
4107 #else
4108  const char* _formatString =
4109  "%s: Sequence %s is valid.";
4110 #endif
4111 
4112  Fw::TextLogString _logString;
4113  (void) _logString.format(
4114  _formatString,
4115 #if FW_OBJECT_NAMES == 1
4116  this->m_objName.toChar(),
4117 #endif
4118  "CS_SequenceValid ",
4119  filename.toChar()
4120  );
4121 
4122  this->LogText_out(
4123  0,
4124  _id,
4125  _logTime,
4127  _logString
4128  );
4129  }
4130 #endif
4131  }
4132 
4135  const Fw::StringBase& filename,
4136  U32 command
4137  ) const
4138  {
4139  // Get the time
4140  Fw::Time _logTime;
4141  if (this->isConnected_timeCaller_OutputPort(0)) {
4142  this->timeCaller_out(0, _logTime);
4143  }
4144 
4145  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_SEQUENCETIMEOUT;
4146 
4147  // Emit the event on the log port
4148  if (this->isConnected_logOut_OutputPort(0)) {
4149  Fw::LogBuffer _logBuff;
4151 
4152 #if FW_AMPCS_COMPATIBLE
4153  // Serialize the number of arguments
4154  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4155  FW_ASSERT(
4156  _status == Fw::FW_SERIALIZE_OK,
4157  static_cast<FwAssertArgType>(_status)
4158  );
4159 #endif
4160 
4161  _status = filename.serializeTo(
4162  _logBuff,
4163  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4164  );
4165  FW_ASSERT(
4166  _status == Fw::FW_SERIALIZE_OK,
4167  static_cast<FwAssertArgType>(_status)
4168  );
4169 
4170 #if FW_AMPCS_COMPATIBLE
4171  // Serialize the argument size
4172  _status = _logBuff.serializeFrom(
4173  static_cast<U8>(sizeof(U32))
4174  );
4175  FW_ASSERT(
4176  _status == Fw::FW_SERIALIZE_OK,
4177  static_cast<FwAssertArgType>(_status)
4178  );
4179 #endif
4180  _status = _logBuff.serializeFrom(command);
4181  FW_ASSERT(
4182  _status == Fw::FW_SERIALIZE_OK,
4183  static_cast<FwAssertArgType>(_status)
4184  );
4185 
4186  this->logOut_out(
4187  0,
4188  _id,
4189  _logTime,
4191  _logBuff
4192  );
4193  }
4194 
4195  // Emit the event on the text log port
4196 #if FW_ENABLE_TEXT_LOGGING
4197  if (this->isConnected_LogText_OutputPort(0)) {
4198 #if FW_OBJECT_NAMES == 1
4199  const char* _formatString =
4200  "(%s) %s: Sequence %s timed out on command %" PRIu32 "";
4201 #else
4202  const char* _formatString =
4203  "%s: Sequence %s timed out on command %" PRIu32 "";
4204 #endif
4205 
4206  Fw::TextLogString _logString;
4207  (void) _logString.format(
4208  _formatString,
4209 #if FW_OBJECT_NAMES == 1
4210  this->m_objName.toChar(),
4211 #endif
4212  "CS_SequenceTimeout ",
4213  filename.toChar(),
4214  command
4215  );
4216 
4217  this->LogText_out(
4218  0,
4219  _id,
4220  _logTime,
4222  _logString
4223  );
4224  }
4225 #endif
4226  }
4227 
4230  const Fw::StringBase& filename,
4231  U32 command
4232  ) const
4233  {
4234  // Get the time
4235  Fw::Time _logTime;
4236  if (this->isConnected_timeCaller_OutputPort(0)) {
4237  this->timeCaller_out(0, _logTime);
4238  }
4239 
4240  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_CMDSTEPPED;
4241 
4242  // Emit the event on the log port
4243  if (this->isConnected_logOut_OutputPort(0)) {
4244  Fw::LogBuffer _logBuff;
4246 
4247 #if FW_AMPCS_COMPATIBLE
4248  // Serialize the number of arguments
4249  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4250  FW_ASSERT(
4251  _status == Fw::FW_SERIALIZE_OK,
4252  static_cast<FwAssertArgType>(_status)
4253  );
4254 #endif
4255 
4256  _status = filename.serializeTo(
4257  _logBuff,
4258  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4259  );
4260  FW_ASSERT(
4261  _status == Fw::FW_SERIALIZE_OK,
4262  static_cast<FwAssertArgType>(_status)
4263  );
4264 
4265 #if FW_AMPCS_COMPATIBLE
4266  // Serialize the argument size
4267  _status = _logBuff.serializeFrom(
4268  static_cast<U8>(sizeof(U32))
4269  );
4270  FW_ASSERT(
4271  _status == Fw::FW_SERIALIZE_OK,
4272  static_cast<FwAssertArgType>(_status)
4273  );
4274 #endif
4275  _status = _logBuff.serializeFrom(command);
4276  FW_ASSERT(
4277  _status == Fw::FW_SERIALIZE_OK,
4278  static_cast<FwAssertArgType>(_status)
4279  );
4280 
4281  this->logOut_out(
4282  0,
4283  _id,
4284  _logTime,
4286  _logBuff
4287  );
4288  }
4289 
4290  // Emit the event on the text log port
4291 #if FW_ENABLE_TEXT_LOGGING
4292  if (this->isConnected_LogText_OutputPort(0)) {
4293 #if FW_OBJECT_NAMES == 1
4294  const char* _formatString =
4295  "(%s) %s: Sequence %s command %" PRIu32 " stepped";
4296 #else
4297  const char* _formatString =
4298  "%s: Sequence %s command %" PRIu32 " stepped";
4299 #endif
4300 
4301  Fw::TextLogString _logString;
4302  (void) _logString.format(
4303  _formatString,
4304 #if FW_OBJECT_NAMES == 1
4305  this->m_objName.toChar(),
4306 #endif
4307  "CS_CmdStepped ",
4308  filename.toChar(),
4309  command
4310  );
4311 
4312  this->LogText_out(
4313  0,
4314  _id,
4315  _logTime,
4317  _logString
4318  );
4319  }
4320 #endif
4321  }
4322 
4325  {
4326  // Get the time
4327  Fw::Time _logTime;
4328  if (this->isConnected_timeCaller_OutputPort(0)) {
4329  this->timeCaller_out(0, _logTime);
4330  }
4331 
4332  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_CMDSTARTED;
4333 
4334  // Emit the event on the log port
4335  if (this->isConnected_logOut_OutputPort(0)) {
4336  Fw::LogBuffer _logBuff;
4338 
4339 #if FW_AMPCS_COMPATIBLE
4340  // Serialize the number of arguments
4341  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4342  FW_ASSERT(
4343  _status == Fw::FW_SERIALIZE_OK,
4344  static_cast<FwAssertArgType>(_status)
4345  );
4346 #endif
4347 
4348  _status = filename.serializeTo(
4349  _logBuff,
4350  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4351  );
4352  FW_ASSERT(
4353  _status == Fw::FW_SERIALIZE_OK,
4354  static_cast<FwAssertArgType>(_status)
4355  );
4356 
4357  this->logOut_out(
4358  0,
4359  _id,
4360  _logTime,
4362  _logBuff
4363  );
4364  }
4365 
4366  // Emit the event on the text log port
4367 #if FW_ENABLE_TEXT_LOGGING
4368  if (this->isConnected_LogText_OutputPort(0)) {
4369 #if FW_OBJECT_NAMES == 1
4370  const char* _formatString =
4371  "(%s) %s: Sequence %s started";
4372 #else
4373  const char* _formatString =
4374  "%s: Sequence %s started";
4375 #endif
4376 
4377  Fw::TextLogString _logString;
4378  (void) _logString.format(
4379  _formatString,
4380 #if FW_OBJECT_NAMES == 1
4381  this->m_objName.toChar(),
4382 #endif
4383  "CS_CmdStarted ",
4384  filename.toChar()
4385  );
4386 
4387  this->LogText_out(
4388  0,
4389  _id,
4390  _logTime,
4392  _logString
4393  );
4394  }
4395 #endif
4396  }
4397 
4400  const Fw::StringBase& filename,
4401  U32 recordNumber,
4402  FwOpcodeType opCode
4403  ) const
4404  {
4405  // Get the time
4406  Fw::Time _logTime;
4407  if (this->isConnected_timeCaller_OutputPort(0)) {
4408  this->timeCaller_out(0, _logTime);
4409  }
4410 
4411  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_JOINWAITING;
4412 
4413  // Emit the event on the log port
4414  if (this->isConnected_logOut_OutputPort(0)) {
4415  Fw::LogBuffer _logBuff;
4417 
4418 #if FW_AMPCS_COMPATIBLE
4419  // Serialize the number of arguments
4420  _status = _logBuff.serializeFrom(static_cast<U8>(3));
4421  FW_ASSERT(
4422  _status == Fw::FW_SERIALIZE_OK,
4423  static_cast<FwAssertArgType>(_status)
4424  );
4425 #endif
4426 
4427  _status = filename.serializeTo(
4428  _logBuff,
4429  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4430  );
4431  FW_ASSERT(
4432  _status == Fw::FW_SERIALIZE_OK,
4433  static_cast<FwAssertArgType>(_status)
4434  );
4435 
4436 #if FW_AMPCS_COMPATIBLE
4437  // Serialize the argument size
4438  _status = _logBuff.serializeFrom(
4439  static_cast<U8>(sizeof(U32))
4440  );
4441  FW_ASSERT(
4442  _status == Fw::FW_SERIALIZE_OK,
4443  static_cast<FwAssertArgType>(_status)
4444  );
4445 #endif
4446  _status = _logBuff.serializeFrom(recordNumber);
4447  FW_ASSERT(
4448  _status == Fw::FW_SERIALIZE_OK,
4449  static_cast<FwAssertArgType>(_status)
4450  );
4451 
4452 #if FW_AMPCS_COMPATIBLE
4453  // Serialize the argument size
4454  _status = _logBuff.serializeFrom(
4455  static_cast<U8>(sizeof(FwOpcodeType))
4456  );
4457  FW_ASSERT(
4458  _status == Fw::FW_SERIALIZE_OK,
4459  static_cast<FwAssertArgType>(_status)
4460  );
4461 #endif
4462  _status = _logBuff.serializeFrom(opCode);
4463  FW_ASSERT(
4464  _status == Fw::FW_SERIALIZE_OK,
4465  static_cast<FwAssertArgType>(_status)
4466  );
4467 
4468  this->logOut_out(
4469  0,
4470  _id,
4471  _logTime,
4473  _logBuff
4474  );
4475  }
4476 
4477  // Emit the event on the text log port
4478 #if FW_ENABLE_TEXT_LOGGING
4479  if (this->isConnected_LogText_OutputPort(0)) {
4480 #if FW_OBJECT_NAMES == 1
4481  const char* _formatString =
4482  "(%s) %s: Start waiting for sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") to complete";
4483 #else
4484  const char* _formatString =
4485  "%s: Start waiting for sequence file %s: Command %" PRIu32 " (opcode %" PRIu32 ") to complete";
4486 #endif
4487 
4488  Fw::TextLogString _logString;
4489  (void) _logString.format(
4490  _formatString,
4491 #if FW_OBJECT_NAMES == 1
4492  this->m_objName.toChar(),
4493 #endif
4494  "CS_JoinWaiting ",
4495  filename.toChar(),
4496  recordNumber,
4497  opCode
4498  );
4499 
4500  this->LogText_out(
4501  0,
4502  _id,
4503  _logTime,
4505  _logString
4506  );
4507  }
4508 #endif
4509  }
4510 
4513  {
4514  // Get the time
4515  Fw::Time _logTime;
4516  if (this->isConnected_timeCaller_OutputPort(0)) {
4517  this->timeCaller_out(0, _logTime);
4518  }
4519 
4521 
4522  // Emit the event on the log port
4523  if (this->isConnected_logOut_OutputPort(0)) {
4524  Fw::LogBuffer _logBuff;
4525 
4526 #if FW_AMPCS_COMPATIBLE
4528  // Serialize the number of arguments
4529  _status = _logBuff.serializeFrom(static_cast<U8>(0));
4530  FW_ASSERT(
4531  _status == Fw::FW_SERIALIZE_OK,
4532  static_cast<FwAssertArgType>(_status)
4533  );
4534 #endif
4535 
4536  this->logOut_out(
4537  0,
4538  _id,
4539  _logTime,
4541  _logBuff
4542  );
4543  }
4544 
4545  // Emit the event on the text log port
4546 #if FW_ENABLE_TEXT_LOGGING
4547  if (this->isConnected_LogText_OutputPort(0)) {
4548 #if FW_OBJECT_NAMES == 1
4549  const char* _formatString =
4550  "(%s) %s: Still waiting for sequence file to complete";
4551 #else
4552  const char* _formatString =
4553  "%s: Still waiting for sequence file to complete";
4554 #endif
4555 
4556  Fw::TextLogString _logString;
4557  (void) _logString.format(
4558  _formatString,
4559 #if FW_OBJECT_NAMES == 1
4560  this->m_objName.toChar(),
4561 #endif
4562  "CS_JoinWaitingNotComplete "
4563  );
4564 
4565  this->LogText_out(
4566  0,
4567  _id,
4568  _logTime,
4570  _logString
4571  );
4572  }
4573 #endif
4574  }
4575 
4578  {
4579  // Get the time
4580  Fw::Time _logTime;
4581  if (this->isConnected_timeCaller_OutputPort(0)) {
4582  this->timeCaller_out(0, _logTime);
4583  }
4584 
4585  const FwEventIdType _id = this->getIdBase() + EVENTID_CS_NORECORDS;
4586 
4587  // Emit the event on the log port
4588  if (this->isConnected_logOut_OutputPort(0)) {
4589  Fw::LogBuffer _logBuff;
4591 
4592 #if FW_AMPCS_COMPATIBLE
4593  // Serialize the number of arguments
4594  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4595  FW_ASSERT(
4596  _status == Fw::FW_SERIALIZE_OK,
4597  static_cast<FwAssertArgType>(_status)
4598  );
4599 #endif
4600 
4601  _status = fileName.serializeTo(
4602  _logBuff,
4603  FW_MIN(static_cast<FwSizeType>(FW_LOG_STRING_MAX_SIZE), 60)
4604  );
4605  FW_ASSERT(
4606  _status == Fw::FW_SERIALIZE_OK,
4607  static_cast<FwAssertArgType>(_status)
4608  );
4609 
4610  this->logOut_out(
4611  0,
4612  _id,
4613  _logTime,
4615  _logBuff
4616  );
4617  }
4618 
4619  // Emit the event on the text log port
4620 #if FW_ENABLE_TEXT_LOGGING
4621  if (this->isConnected_LogText_OutputPort(0)) {
4622 #if FW_OBJECT_NAMES == 1
4623  const char* _formatString =
4624  "(%s) %s: Sequence file %s has no records. Ignoring.";
4625 #else
4626  const char* _formatString =
4627  "%s: Sequence file %s has no records. Ignoring.";
4628 #endif
4629 
4630  Fw::TextLogString _logString;
4631  (void) _logString.format(
4632  _formatString,
4633 #if FW_OBJECT_NAMES == 1
4634  this->m_objName.toChar(),
4635 #endif
4636  "CS_NoRecords ",
4637  fileName.toChar()
4638  );
4639 
4640  this->LogText_out(
4641  0,
4642  _id,
4643  _logTime,
4645  _logString
4646  );
4647  }
4648 #endif
4649  }
4650 
4651  // ----------------------------------------------------------------------
4652  // Telemetry serialized write
4653  // ----------------------------------------------------------------------
4654 
4657  FwChanIdType id,
4658  Fw::TlmBuffer& _tlmBuff,
4659  Fw::Time _tlmTime
4660  ) const
4661  {
4662  if (this->isConnected_tlmOut_OutputPort(0)) {
4663  if (
4665  (_tlmTime == Fw::ZERO_TIME)
4666  ) {
4667  this->timeCaller_out(0, _tlmTime);
4668  }
4669 
4670  FwChanIdType _id;
4671  _id = this->getIdBase() + id;
4672 
4673  this->tlmOut_out(
4674  0,
4675  _id,
4676  _tlmTime,
4677  _tlmBuff
4678  );
4679  }
4680  }
4681 
4682  // ----------------------------------------------------------------------
4683  // Telemetry write functions
4684  // ----------------------------------------------------------------------
4685 
4688  U32 arg,
4689  Fw::Time _tlmTime
4690  ) const
4691  {
4692  if (this->isConnected_tlmOut_OutputPort(0)) {
4693  Fw::TlmBuffer _tlmBuff;
4694  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4695  FW_ASSERT(
4696  _stat == Fw::FW_SERIALIZE_OK,
4697  static_cast<FwAssertArgType>(_stat)
4698  );
4699 
4700  this->tlmWrite(
4702  _tlmBuff,
4703  _tlmTime
4704  );
4705  }
4706  }
4707 
4710  U32 arg,
4711  Fw::Time _tlmTime
4712  ) const
4713  {
4714  if (this->isConnected_tlmOut_OutputPort(0)) {
4715  Fw::TlmBuffer _tlmBuff;
4716  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4717  FW_ASSERT(
4718  _stat == Fw::FW_SERIALIZE_OK,
4719  static_cast<FwAssertArgType>(_stat)
4720  );
4721 
4722  this->tlmWrite(
4724  _tlmBuff,
4725  _tlmTime
4726  );
4727  }
4728  }
4729 
4732  U32 arg,
4733  Fw::Time _tlmTime
4734  ) const
4735  {
4736  if (this->isConnected_tlmOut_OutputPort(0)) {
4737  Fw::TlmBuffer _tlmBuff;
4738  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4739  FW_ASSERT(
4740  _stat == Fw::FW_SERIALIZE_OK,
4741  static_cast<FwAssertArgType>(_stat)
4742  );
4743 
4744  this->tlmWrite(
4746  _tlmBuff,
4747  _tlmTime
4748  );
4749  }
4750  }
4751 
4754  U32 arg,
4755  Fw::Time _tlmTime
4756  ) const
4757  {
4758  if (this->isConnected_tlmOut_OutputPort(0)) {
4759  Fw::TlmBuffer _tlmBuff;
4760  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4761  FW_ASSERT(
4762  _stat == Fw::FW_SERIALIZE_OK,
4763  static_cast<FwAssertArgType>(_stat)
4764  );
4765 
4766  this->tlmWrite(
4768  _tlmBuff,
4769  _tlmTime
4770  );
4771  }
4772  }
4773 
4776  U32 arg,
4777  Fw::Time _tlmTime
4778  ) const
4779  {
4780  if (this->isConnected_tlmOut_OutputPort(0)) {
4781  Fw::TlmBuffer _tlmBuff;
4782  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
4783  FW_ASSERT(
4784  _stat == Fw::FW_SERIALIZE_OK,
4785  static_cast<FwAssertArgType>(_stat)
4786  );
4787 
4788  this->tlmWrite(
4790  _tlmBuff,
4791  _tlmTime
4792  );
4793  }
4794  }
4795 
4798  const Fw::StringBase& arg,
4799  Fw::Time _tlmTime
4800  )
4801  {
4802  // Check to see if it is the first time
4803  if (not this->m_first_update_CS_CurrentSequence) {
4804  // Check to see if value has changed. If not, don't write it.
4805  if (arg == this->m_last_CS_CurrentSequence) {
4806  return;
4807  }
4808  else {
4809  this->m_last_CS_CurrentSequence = arg;
4810  }
4811  }
4812  else {
4813  this->m_first_update_CS_CurrentSequence = false;
4814  this->m_last_CS_CurrentSequence = arg;
4815  }
4816 
4817  if (this->isConnected_tlmOut_OutputPort(0)) {
4818  Fw::TlmBuffer _tlmBuff;
4819  Fw::SerializeStatus _stat = arg.serializeTo(
4820  _tlmBuff,
4821  FW_MIN(static_cast<FwSizeType>(FW_TLM_STRING_MAX_SIZE), 240)
4822  );
4823  FW_ASSERT(
4824  _stat == Fw::FW_SERIALIZE_OK,
4825  static_cast<FwAssertArgType>(_stat)
4826  );
4827 
4828  this->tlmWrite(
4830  _tlmBuff,
4831  _tlmTime
4832  );
4833  }
4834  }
4835 
4836  // ----------------------------------------------------------------------
4837  // Time
4838  // ----------------------------------------------------------------------
4839 
4841  getTime() const
4842  {
4843  if (this->isConnected_timeCaller_OutputPort(0)) {
4844  Fw::Time _time;
4845  this->timeCaller_out(0, _time);
4846  return _time;
4847  }
4848  else {
4849  return Fw::Time(TimeBase::TB_NONE, 0, 0);
4850  }
4851  }
4852 
4853  // ----------------------------------------------------------------------
4854  // Message dispatch functions
4855  // ----------------------------------------------------------------------
4856 
4857  Fw::QueuedComponentBase::MsgDispatchStatus CmdSequencerComponentBase ::
4858  doDispatch()
4859  {
4860  ComponentIpcSerializableBuffer _msg;
4861  FwQueuePriorityType _priority = 0;
4862 
4863  Os::Queue::Status _msgStatus = this->m_queue.receive(
4864  _msg,
4866  _priority
4867  );
4868  FW_ASSERT(
4869  _msgStatus == Os::Queue::OP_OK,
4870  static_cast<FwAssertArgType>(_msgStatus)
4871  );
4872 
4873  // Reset to beginning of buffer
4874  _msg.resetDeser();
4875 
4876  FwEnumStoreType _desMsg = 0;
4877  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
4878  FW_ASSERT(
4879  _deserStatus == Fw::FW_SERIALIZE_OK,
4880  static_cast<FwAssertArgType>(_deserStatus)
4881  );
4882 
4883  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
4884 
4885  if (_msgType == CMDSEQUENCER_COMPONENT_EXIT) {
4886  return MSG_DISPATCH_EXIT;
4887  }
4888 
4889  FwIndexType portNum = 0;
4890  _deserStatus = _msg.deserializeTo(portNum);
4891  FW_ASSERT(
4892  _deserStatus == Fw::FW_SERIALIZE_OK,
4893  static_cast<FwAssertArgType>(_deserStatus)
4894  );
4895 
4896  switch (_msgType) {
4897  // Handle async input port cmdResponseIn
4898  case CMDRESPONSEIN_CMDRESPONSE: {
4899  // Deserialize argument opCode
4900  FwOpcodeType opCode;
4901  _deserStatus = _msg.deserializeTo(opCode);
4902  FW_ASSERT(
4903  _deserStatus == Fw::FW_SERIALIZE_OK,
4904  static_cast<FwAssertArgType>(_deserStatus)
4905  );
4906 
4907  // Deserialize argument cmdSeq
4908  U32 cmdSeq;
4909  _deserStatus = _msg.deserializeTo(cmdSeq);
4910  FW_ASSERT(
4911  _deserStatus == Fw::FW_SERIALIZE_OK,
4912  static_cast<FwAssertArgType>(_deserStatus)
4913  );
4914 
4915  // Deserialize argument response
4916  Fw::CmdResponse response;
4917  _deserStatus = _msg.deserializeTo(response);
4918  FW_ASSERT(
4919  _deserStatus == Fw::FW_SERIALIZE_OK,
4920  static_cast<FwAssertArgType>(_deserStatus)
4921  );
4922  // Call handler function
4923  this->cmdResponseIn_handler(
4924  portNum,
4925  opCode,
4926  cmdSeq,
4927  response
4928  );
4929 
4930  break;
4931  }
4932 
4933  // Handle async input port pingIn
4934  case PINGIN_PING: {
4935  // Deserialize argument key
4936  U32 key;
4937  _deserStatus = _msg.deserializeTo(key);
4938  FW_ASSERT(
4939  _deserStatus == Fw::FW_SERIALIZE_OK,
4940  static_cast<FwAssertArgType>(_deserStatus)
4941  );
4942  // Call handler function
4943  this->pingIn_handler(
4944  portNum,
4945  key
4946  );
4947 
4948  break;
4949  }
4950 
4951  // Handle async input port schedIn
4952  case SCHEDIN_SCHED: {
4953  // Deserialize argument context
4954  U32 context;
4955  _deserStatus = _msg.deserializeTo(context);
4956  FW_ASSERT(
4957  _deserStatus == Fw::FW_SERIALIZE_OK,
4958  static_cast<FwAssertArgType>(_deserStatus)
4959  );
4960  // Call handler function
4961  this->schedIn_handler(
4962  portNum,
4963  context
4964  );
4965 
4966  break;
4967  }
4968 
4969  // Handle async input port seqCancelIn
4970  case SEQCANCELIN_CMDSEQCANCEL: {
4971  // Call handler function
4972  this->seqCancelIn_handler(portNum);
4973 
4974  break;
4975  }
4976 
4977  // Handle async input port seqDispatchIn
4978  case SEQDISPATCHIN_FILEDISPATCH: {
4979  // Deserialize argument file_name
4980  char __fprime_ac_file_name_buffer[Fw::StringBase::BUFFER_SIZE(240)];
4981  Fw::ExternalString file_name(__fprime_ac_file_name_buffer, sizeof __fprime_ac_file_name_buffer);
4982  _deserStatus = _msg.deserializeTo(file_name);
4983  FW_ASSERT(
4984  _deserStatus == Fw::FW_SERIALIZE_OK,
4985  static_cast<FwAssertArgType>(_deserStatus)
4986  );
4987  // Call handler function
4988  this->seqDispatchIn_handler(
4989  portNum,
4990  file_name
4991  );
4992 
4993  break;
4994  }
4995 
4996  // Handle async input port seqRunIn
4997  case SEQRUNIN_CMDSEQIN: {
4998  // Deserialize argument filename
4999  char __fprime_ac_filename_buffer[Fw::StringBase::BUFFER_SIZE(240)];
5000  Fw::ExternalString filename(__fprime_ac_filename_buffer, sizeof __fprime_ac_filename_buffer);
5001  _deserStatus = _msg.deserializeTo(filename);
5002  FW_ASSERT(
5003  _deserStatus == Fw::FW_SERIALIZE_OK,
5004  static_cast<FwAssertArgType>(_deserStatus)
5005  );
5006 
5007  // Deserialize argument args
5008  Svc::SeqArgs args;
5009  _deserStatus = _msg.deserializeTo(args);
5010  FW_ASSERT(
5011  _deserStatus == Fw::FW_SERIALIZE_OK,
5012  static_cast<FwAssertArgType>(_deserStatus)
5013  );
5014  // Call handler function
5015  this->seqRunIn_handler(
5016  portNum,
5017  filename,
5018  args
5019  );
5020 
5021  break;
5022  }
5023 
5024  // Handle command CS_RUN
5025  case CMD_CS_RUN: {
5026  // Deserialize opcode
5027  FwOpcodeType _opCode = 0;
5028  _deserStatus = _msg.deserializeTo(_opCode);
5029  FW_ASSERT (
5030  _deserStatus == Fw::FW_SERIALIZE_OK,
5031  static_cast<FwAssertArgType>(_deserStatus)
5032  );
5033 
5034  // Deserialize command sequence
5035  U32 _cmdSeq = 0;
5036  _deserStatus = _msg.deserializeTo(_cmdSeq);
5037  FW_ASSERT (
5038  _deserStatus == Fw::FW_SERIALIZE_OK,
5039  static_cast<FwAssertArgType>(_deserStatus)
5040  );
5041 
5042  // Deserialize command argument buffer
5043  Fw::CmdArgBuffer args;
5044  _deserStatus = _msg.deserializeTo(args);
5045  FW_ASSERT (
5046  _deserStatus == Fw::FW_SERIALIZE_OK,
5047  static_cast<FwAssertArgType>(_deserStatus)
5048  );
5049 
5050  // Reset buffer
5051  args.resetDeser();
5052 
5053  // Deserialize argument fileName
5054  Fw::CmdStringArg fileName;
5055  _deserStatus = args.deserializeTo(fileName);
5056  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5058  this->cmdResponse_out(
5059  _opCode,
5060  _cmdSeq,
5062  );
5063  }
5064  // Don't crash the task if bad arguments were passed from the ground
5065  break;
5066  }
5067 
5068  // Deserialize argument block
5069  Svc::BlockState block;
5070  _deserStatus = args.deserializeTo(block);
5071  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5073  this->cmdResponse_out(
5074  _opCode,
5075  _cmdSeq,
5077  );
5078  }
5079  // Don't crash the task if bad arguments were passed from the ground
5080  break;
5081  }
5082 
5083  // Make sure there was no data left over.
5084  // That means the argument buffer size was incorrect.
5085 #if FW_CMD_CHECK_RESIDUAL
5086  if (args.getDeserializeSizeLeft() != 0) {
5088  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5089  }
5090  // Don't crash the task if bad arguments were passed from the ground
5091  break;
5092  }
5093 #endif
5094 
5095  // Call handler function
5096  this->CS_RUN_cmdHandler(
5097  _opCode, _cmdSeq,
5098  fileName,
5099  block
5100  );
5101 
5102  break;
5103  }
5104 
5105  // Handle command CS_VALIDATE
5106  case CMD_CS_VALIDATE: {
5107  // Deserialize opcode
5108  FwOpcodeType _opCode = 0;
5109  _deserStatus = _msg.deserializeTo(_opCode);
5110  FW_ASSERT (
5111  _deserStatus == Fw::FW_SERIALIZE_OK,
5112  static_cast<FwAssertArgType>(_deserStatus)
5113  );
5114 
5115  // Deserialize command sequence
5116  U32 _cmdSeq = 0;
5117  _deserStatus = _msg.deserializeTo(_cmdSeq);
5118  FW_ASSERT (
5119  _deserStatus == Fw::FW_SERIALIZE_OK,
5120  static_cast<FwAssertArgType>(_deserStatus)
5121  );
5122 
5123  // Deserialize command argument buffer
5124  Fw::CmdArgBuffer args;
5125  _deserStatus = _msg.deserializeTo(args);
5126  FW_ASSERT (
5127  _deserStatus == Fw::FW_SERIALIZE_OK,
5128  static_cast<FwAssertArgType>(_deserStatus)
5129  );
5130 
5131  // Reset buffer
5132  args.resetDeser();
5133 
5134  // Deserialize argument fileName
5135  Fw::CmdStringArg fileName;
5136  _deserStatus = args.deserializeTo(fileName);
5137  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
5139  this->cmdResponse_out(
5140  _opCode,
5141  _cmdSeq,
5143  );
5144  }
5145  // Don't crash the task if bad arguments were passed from the ground
5146  break;
5147  }
5148 
5149  // Make sure there was no data left over.
5150  // That means the argument buffer size was incorrect.
5151 #if FW_CMD_CHECK_RESIDUAL
5152  if (args.getDeserializeSizeLeft() != 0) {
5154  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5155  }
5156  // Don't crash the task if bad arguments were passed from the ground
5157  break;
5158  }
5159 #endif
5160 
5161  // Call handler function
5162  this->CS_VALIDATE_cmdHandler(
5163  _opCode, _cmdSeq,
5164  fileName
5165  );
5166 
5167  break;
5168  }
5169 
5170  // Handle command CS_CANCEL
5171  case CMD_CS_CANCEL: {
5172  // Deserialize opcode
5173  FwOpcodeType _opCode = 0;
5174  _deserStatus = _msg.deserializeTo(_opCode);
5175  FW_ASSERT (
5176  _deserStatus == Fw::FW_SERIALIZE_OK,
5177  static_cast<FwAssertArgType>(_deserStatus)
5178  );
5179 
5180  // Deserialize command sequence
5181  U32 _cmdSeq = 0;
5182  _deserStatus = _msg.deserializeTo(_cmdSeq);
5183  FW_ASSERT (
5184  _deserStatus == Fw::FW_SERIALIZE_OK,
5185  static_cast<FwAssertArgType>(_deserStatus)
5186  );
5187 
5188  // Deserialize command argument buffer
5189  Fw::CmdArgBuffer args;
5190  _deserStatus = _msg.deserializeTo(args);
5191  FW_ASSERT (
5192  _deserStatus == Fw::FW_SERIALIZE_OK,
5193  static_cast<FwAssertArgType>(_deserStatus)
5194  );
5195 
5196  // Reset buffer
5197  args.resetDeser();
5198 
5199  // Make sure there was no data left over.
5200  // That means the argument buffer size was incorrect.
5201 #if FW_CMD_CHECK_RESIDUAL
5202  if (args.getDeserializeSizeLeft() != 0) {
5204  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5205  }
5206  // Don't crash the task if bad arguments were passed from the ground
5207  break;
5208  }
5209 #endif
5210 
5211  // Call handler function
5212  this->CS_CANCEL_cmdHandler(_opCode, _cmdSeq);
5213 
5214  break;
5215  }
5216 
5217  // Handle command CS_START
5218  case CMD_CS_START: {
5219  // Deserialize opcode
5220  FwOpcodeType _opCode = 0;
5221  _deserStatus = _msg.deserializeTo(_opCode);
5222  FW_ASSERT (
5223  _deserStatus == Fw::FW_SERIALIZE_OK,
5224  static_cast<FwAssertArgType>(_deserStatus)
5225  );
5226 
5227  // Deserialize command sequence
5228  U32 _cmdSeq = 0;
5229  _deserStatus = _msg.deserializeTo(_cmdSeq);
5230  FW_ASSERT (
5231  _deserStatus == Fw::FW_SERIALIZE_OK,
5232  static_cast<FwAssertArgType>(_deserStatus)
5233  );
5234 
5235  // Deserialize command argument buffer
5236  Fw::CmdArgBuffer args;
5237  _deserStatus = _msg.deserializeTo(args);
5238  FW_ASSERT (
5239  _deserStatus == Fw::FW_SERIALIZE_OK,
5240  static_cast<FwAssertArgType>(_deserStatus)
5241  );
5242 
5243  // Reset buffer
5244  args.resetDeser();
5245 
5246  // Make sure there was no data left over.
5247  // That means the argument buffer size was incorrect.
5248 #if FW_CMD_CHECK_RESIDUAL
5249  if (args.getDeserializeSizeLeft() != 0) {
5251  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5252  }
5253  // Don't crash the task if bad arguments were passed from the ground
5254  break;
5255  }
5256 #endif
5257 
5258  // Call handler function
5259  this->CS_START_cmdHandler(_opCode, _cmdSeq);
5260 
5261  break;
5262  }
5263 
5264  // Handle command CS_STEP
5265  case CMD_CS_STEP: {
5266  // Deserialize opcode
5267  FwOpcodeType _opCode = 0;
5268  _deserStatus = _msg.deserializeTo(_opCode);
5269  FW_ASSERT (
5270  _deserStatus == Fw::FW_SERIALIZE_OK,
5271  static_cast<FwAssertArgType>(_deserStatus)
5272  );
5273 
5274  // Deserialize command sequence
5275  U32 _cmdSeq = 0;
5276  _deserStatus = _msg.deserializeTo(_cmdSeq);
5277  FW_ASSERT (
5278  _deserStatus == Fw::FW_SERIALIZE_OK,
5279  static_cast<FwAssertArgType>(_deserStatus)
5280  );
5281 
5282  // Deserialize command argument buffer
5283  Fw::CmdArgBuffer args;
5284  _deserStatus = _msg.deserializeTo(args);
5285  FW_ASSERT (
5286  _deserStatus == Fw::FW_SERIALIZE_OK,
5287  static_cast<FwAssertArgType>(_deserStatus)
5288  );
5289 
5290  // Reset buffer
5291  args.resetDeser();
5292 
5293  // Make sure there was no data left over.
5294  // That means the argument buffer size was incorrect.
5295 #if FW_CMD_CHECK_RESIDUAL
5296  if (args.getDeserializeSizeLeft() != 0) {
5298  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5299  }
5300  // Don't crash the task if bad arguments were passed from the ground
5301  break;
5302  }
5303 #endif
5304 
5305  // Call handler function
5306  this->CS_STEP_cmdHandler(_opCode, _cmdSeq);
5307 
5308  break;
5309  }
5310 
5311  // Handle command CS_AUTO
5312  case CMD_CS_AUTO: {
5313  // Deserialize opcode
5314  FwOpcodeType _opCode = 0;
5315  _deserStatus = _msg.deserializeTo(_opCode);
5316  FW_ASSERT (
5317  _deserStatus == Fw::FW_SERIALIZE_OK,
5318  static_cast<FwAssertArgType>(_deserStatus)
5319  );
5320 
5321  // Deserialize command sequence
5322  U32 _cmdSeq = 0;
5323  _deserStatus = _msg.deserializeTo(_cmdSeq);
5324  FW_ASSERT (
5325  _deserStatus == Fw::FW_SERIALIZE_OK,
5326  static_cast<FwAssertArgType>(_deserStatus)
5327  );
5328 
5329  // Deserialize command argument buffer
5330  Fw::CmdArgBuffer args;
5331  _deserStatus = _msg.deserializeTo(args);
5332  FW_ASSERT (
5333  _deserStatus == Fw::FW_SERIALIZE_OK,
5334  static_cast<FwAssertArgType>(_deserStatus)
5335  );
5336 
5337  // Reset buffer
5338  args.resetDeser();
5339 
5340  // Make sure there was no data left over.
5341  // That means the argument buffer size was incorrect.
5342 #if FW_CMD_CHECK_RESIDUAL
5343  if (args.getDeserializeSizeLeft() != 0) {
5345  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5346  }
5347  // Don't crash the task if bad arguments were passed from the ground
5348  break;
5349  }
5350 #endif
5351 
5352  // Call handler function
5353  this->CS_AUTO_cmdHandler(_opCode, _cmdSeq);
5354 
5355  break;
5356  }
5357 
5358  // Handle command CS_MANUAL
5359  case CMD_CS_MANUAL: {
5360  // Deserialize opcode
5361  FwOpcodeType _opCode = 0;
5362  _deserStatus = _msg.deserializeTo(_opCode);
5363  FW_ASSERT (
5364  _deserStatus == Fw::FW_SERIALIZE_OK,
5365  static_cast<FwAssertArgType>(_deserStatus)
5366  );
5367 
5368  // Deserialize command sequence
5369  U32 _cmdSeq = 0;
5370  _deserStatus = _msg.deserializeTo(_cmdSeq);
5371  FW_ASSERT (
5372  _deserStatus == Fw::FW_SERIALIZE_OK,
5373  static_cast<FwAssertArgType>(_deserStatus)
5374  );
5375 
5376  // Deserialize command argument buffer
5377  Fw::CmdArgBuffer args;
5378  _deserStatus = _msg.deserializeTo(args);
5379  FW_ASSERT (
5380  _deserStatus == Fw::FW_SERIALIZE_OK,
5381  static_cast<FwAssertArgType>(_deserStatus)
5382  );
5383 
5384  // Reset buffer
5385  args.resetDeser();
5386 
5387  // Make sure there was no data left over.
5388  // That means the argument buffer size was incorrect.
5389 #if FW_CMD_CHECK_RESIDUAL
5390  if (args.getDeserializeSizeLeft() != 0) {
5392  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5393  }
5394  // Don't crash the task if bad arguments were passed from the ground
5395  break;
5396  }
5397 #endif
5398 
5399  // Call handler function
5400  this->CS_MANUAL_cmdHandler(_opCode, _cmdSeq);
5401 
5402  break;
5403  }
5404 
5405  // Handle command CS_JOIN_WAIT
5406  case CMD_CS_JOIN_WAIT: {
5407  // Deserialize opcode
5408  FwOpcodeType _opCode = 0;
5409  _deserStatus = _msg.deserializeTo(_opCode);
5410  FW_ASSERT (
5411  _deserStatus == Fw::FW_SERIALIZE_OK,
5412  static_cast<FwAssertArgType>(_deserStatus)
5413  );
5414 
5415  // Deserialize command sequence
5416  U32 _cmdSeq = 0;
5417  _deserStatus = _msg.deserializeTo(_cmdSeq);
5418  FW_ASSERT (
5419  _deserStatus == Fw::FW_SERIALIZE_OK,
5420  static_cast<FwAssertArgType>(_deserStatus)
5421  );
5422 
5423  // Deserialize command argument buffer
5424  Fw::CmdArgBuffer args;
5425  _deserStatus = _msg.deserializeTo(args);
5426  FW_ASSERT (
5427  _deserStatus == Fw::FW_SERIALIZE_OK,
5428  static_cast<FwAssertArgType>(_deserStatus)
5429  );
5430 
5431  // Reset buffer
5432  args.resetDeser();
5433 
5434  // Make sure there was no data left over.
5435  // That means the argument buffer size was incorrect.
5436 #if FW_CMD_CHECK_RESIDUAL
5437  if (args.getDeserializeSizeLeft() != 0) {
5439  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
5440  }
5441  // Don't crash the task if bad arguments were passed from the ground
5442  break;
5443  }
5444 #endif
5445 
5446  // Call handler function
5447  this->CS_JOIN_WAIT_cmdHandler(_opCode, _cmdSeq);
5448 
5449  break;
5450  }
5451 
5452  default:
5453  return MSG_DISPATCH_ERROR;
5454  }
5455 
5456  return MSG_DISPATCH_OK;
5457  }
5458 
5459  // ----------------------------------------------------------------------
5460  // Calls for messages received on special input ports
5461  // ----------------------------------------------------------------------
5462 
5463  void CmdSequencerComponentBase ::
5464  m_p_cmdIn_in(
5465  Fw::PassiveComponentBase* callComp,
5466  FwIndexType portNum,
5467  FwOpcodeType opCode,
5468  U32 cmdSeq,
5469  Fw::CmdArgBuffer& args
5470  )
5471  {
5472  FW_ASSERT(callComp != nullptr);
5473  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5474  compPtr->cmdIn_handlerBase(
5475  portNum,
5476  opCode,
5477  cmdSeq,
5478  args
5479  );
5480  }
5481 
5482  // ----------------------------------------------------------------------
5483  // Calls for messages received on typed input ports
5484  // ----------------------------------------------------------------------
5485 
5486  void CmdSequencerComponentBase ::
5487  m_p_cmdResponseIn_in(
5488  Fw::PassiveComponentBase* callComp,
5489  FwIndexType portNum,
5490  FwOpcodeType opCode,
5491  U32 cmdSeq,
5492  const Fw::CmdResponse& response
5493  )
5494  {
5495  FW_ASSERT(callComp != nullptr);
5496  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5497  compPtr->cmdResponseIn_handlerBase(
5498  portNum,
5499  opCode,
5500  cmdSeq,
5501  response
5502  );
5503  }
5504 
5505  void CmdSequencerComponentBase ::
5506  m_p_pingIn_in(
5507  Fw::PassiveComponentBase* callComp,
5508  FwIndexType portNum,
5509  U32 key
5510  )
5511  {
5512  FW_ASSERT(callComp != nullptr);
5513  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5514  compPtr->pingIn_handlerBase(
5515  portNum,
5516  key
5517  );
5518  }
5519 
5520  void CmdSequencerComponentBase ::
5521  m_p_schedIn_in(
5522  Fw::PassiveComponentBase* callComp,
5523  FwIndexType portNum,
5524  U32 context
5525  )
5526  {
5527  FW_ASSERT(callComp != nullptr);
5528  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5529  compPtr->schedIn_handlerBase(
5530  portNum,
5531  context
5532  );
5533  }
5534 
5535  void CmdSequencerComponentBase ::
5536  m_p_seqCancelIn_in(
5537  Fw::PassiveComponentBase* callComp,
5538  FwIndexType portNum
5539  )
5540  {
5541  FW_ASSERT(callComp != nullptr);
5542  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5543  compPtr->seqCancelIn_handlerBase(portNum);
5544  }
5545 
5546  void CmdSequencerComponentBase ::
5547  m_p_seqDispatchIn_in(
5548  Fw::PassiveComponentBase* callComp,
5549  FwIndexType portNum,
5550  Fw::StringBase& file_name
5551  )
5552  {
5553  FW_ASSERT(callComp != nullptr);
5554  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5555  compPtr->seqDispatchIn_handlerBase(
5556  portNum,
5557  file_name
5558  );
5559  }
5560 
5561  void CmdSequencerComponentBase ::
5562  m_p_seqRunIn_in(
5563  Fw::PassiveComponentBase* callComp,
5564  FwIndexType portNum,
5565  const Fw::StringBase& filename,
5566  const Svc::SeqArgs& args
5567  )
5568  {
5569  FW_ASSERT(callComp != nullptr);
5570  CmdSequencerComponentBase* compPtr = static_cast<CmdSequencerComponentBase*>(callComp);
5571  compPtr->seqRunIn_handlerBase(
5572  portNum,
5573  filename,
5574  args
5575  );
5576  }
5577 
5578 #if !FW_DIRECT_PORT_CALLS
5579 
5580  // ----------------------------------------------------------------------
5581  // Invocation functions for special output ports
5582  // ----------------------------------------------------------------------
5583 
5584 #if FW_ENABLE_TEXT_LOGGING
5585 
5586  void CmdSequencerComponentBase ::
5587  LogText_out(
5588  FwIndexType portNum,
5589  FwEventIdType id,
5590  Fw::Time& timeTag,
5591  const Fw::LogSeverity& severity,
5592  Fw::TextLogString& text
5593  ) const
5594  {
5595  FW_ASSERT(
5596  (0 <= portNum) && (portNum < this->getNum_LogText_OutputPorts()),
5597  static_cast<FwAssertArgType>(portNum)
5598  );
5599 
5600  FW_ASSERT(
5601  this->m_LogText_OutputPort[portNum].isConnected(),
5602  static_cast<FwAssertArgType>(portNum)
5603  );
5604  this->m_LogText_OutputPort[portNum].invoke(
5605  id,
5606  timeTag,
5607  severity,
5608  text
5609  );
5610  }
5611 
5612 #endif
5613 
5614  void CmdSequencerComponentBase ::
5615  cmdRegOut_out(
5616  FwIndexType portNum,
5617  FwOpcodeType opCode
5618  ) const
5619  {
5620  FW_ASSERT(
5621  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
5622  static_cast<FwAssertArgType>(portNum)
5623  );
5624 
5625  FW_ASSERT(
5626  this->m_cmdRegOut_OutputPort[portNum].isConnected(),
5627  static_cast<FwAssertArgType>(portNum)
5628  );
5629  this->m_cmdRegOut_OutputPort[portNum].invoke(
5630  opCode
5631  );
5632  }
5633 
5634  void CmdSequencerComponentBase ::
5635  cmdResponseOut_out(
5636  FwIndexType portNum,
5637  FwOpcodeType opCode,
5638  U32 cmdSeq,
5639  const Fw::CmdResponse& response
5640  ) const
5641  {
5642  FW_ASSERT(
5643  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
5644  static_cast<FwAssertArgType>(portNum)
5645  );
5646 
5647  FW_ASSERT(
5648  this->m_cmdResponseOut_OutputPort[portNum].isConnected(),
5649  static_cast<FwAssertArgType>(portNum)
5650  );
5651  this->m_cmdResponseOut_OutputPort[portNum].invoke(
5652  opCode,
5653  cmdSeq,
5654  response
5655  );
5656  }
5657 
5658  void CmdSequencerComponentBase ::
5659  logOut_out(
5660  FwIndexType portNum,
5661  FwEventIdType id,
5662  Fw::Time& timeTag,
5663  const Fw::LogSeverity& severity,
5664  Fw::LogBuffer& args
5665  ) const
5666  {
5667  FW_ASSERT(
5668  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
5669  static_cast<FwAssertArgType>(portNum)
5670  );
5671 
5672  FW_ASSERT(
5673  this->m_logOut_OutputPort[portNum].isConnected(),
5674  static_cast<FwAssertArgType>(portNum)
5675  );
5676  this->m_logOut_OutputPort[portNum].invoke(
5677  id,
5678  timeTag,
5679  severity,
5680  args
5681  );
5682  }
5683 
5684  void CmdSequencerComponentBase ::
5685  timeCaller_out(
5686  FwIndexType portNum,
5687  Fw::Time& time
5688  ) const
5689  {
5690  FW_ASSERT(
5691  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
5692  static_cast<FwAssertArgType>(portNum)
5693  );
5694 
5695  FW_ASSERT(
5696  this->m_timeCaller_OutputPort[portNum].isConnected(),
5697  static_cast<FwAssertArgType>(portNum)
5698  );
5699  this->m_timeCaller_OutputPort[portNum].invoke(
5700  time
5701  );
5702  }
5703 
5704  void CmdSequencerComponentBase ::
5705  tlmOut_out(
5706  FwIndexType portNum,
5707  FwChanIdType id,
5708  Fw::Time& timeTag,
5709  Fw::TlmBuffer& val
5710  ) const
5711  {
5712  FW_ASSERT(
5713  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
5714  static_cast<FwAssertArgType>(portNum)
5715  );
5716 
5717  FW_ASSERT(
5718  this->m_tlmOut_OutputPort[portNum].isConnected(),
5719  static_cast<FwAssertArgType>(portNum)
5720  );
5721  this->m_tlmOut_OutputPort[portNum].invoke(
5722  id,
5723  timeTag,
5724  val
5725  );
5726  }
5727 
5728 #endif
5729 
5730 }
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()
The Sequence File Loader could not read the sequence file.
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
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
A local port request to run a sequence was started.
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.
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
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.
void schedIn_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port schedIn.
No time base has been established (Required)
The Command Sequencer issued a command and received a success status in return.
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)
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
A sequence related command came with no active sequence.
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
Message will block until space is available.
Definition: Queue.hpp:47
Perform one step in a command sequence. Valid only if CmdSequencer is in MANUAL run mode...
A command in a sequence was stepped through.
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
The Command Sequencer issued a command and received an error status in return.
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.
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.
The Command Sequencer received a command that was invalid for its current mode.
void init()
Initialization function.
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.
Wait for the current running sequence file complete.
Cannot run new sequence when current sequence file is still running.
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port connection.
Definition: TlmPortAc.cpp:190
Number of records in header doesn&#39;t match number in file.
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)
The size of the serial representation.
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 running time base doesn&#39;t match the time base in the sequence files.
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.
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)
A command status came back when no sequence was running.
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.
void init()
Initialization function.
void incNumMsgDropped()
increment the number of messages dropped
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.
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
message to exit active component task
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.
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
Wait for sequences that are running to finish. Allow user to run multiple seq files in SEQ_NO_BLOCK m...
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
The running time base doesn&#39;t match the time base in the sequence files.
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.