F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencerComponentAc.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencerComponentAc.cpp
3 // \author Generated by fpp-to-cpp
4 // \brief cpp file for FpySequencer 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 
18  // Constant definitions for the state machine signal buffer
19  namespace SmSignalBuffer {
20 
21  // Union for computing the max size of a signal type
22  union SignalTypeUnion {
23  BYTE size_of_Svc_FpySequencer_DebugBreakpointArgs[Svc::FpySequencer_DebugBreakpointArgs::SERIALIZED_SIZE];
24  BYTE size_of_Svc_FpySequencer_SequenceExecutionArgs[Svc::FpySequencer_SequenceExecutionArgs::SERIALIZED_SIZE];
25  };
26 
27  // The serialized size
28  static constexpr FwSizeType SERIALIZED_SIZE =
29  2 * sizeof(FwEnumStoreType) +
30  sizeof(SignalTypeUnion);
31 
32  }
33 
34  enum MsgTypeEnum {
35  FPYSEQUENCER_COMPONENT_EXIT = Fw::ActiveComponentBase::ACTIVE_COMPONENT_EXIT,
36  CHECKTIMERS_SCHED,
37  CMDRESPONSEIN_CMDRESPONSE,
38  PINGIN_PING,
39  SEQRUNIN_CMDSEQIN,
40  TLMWRITE_SCHED,
41  CMD_RUN,
42  CMD_VALIDATE,
43  CMD_RUN_VALIDATED,
44  CMD_CANCEL,
45  CMD_DEBUG_SET_BREAKPOINT,
46  CMD_DEBUG_BREAK,
47  CMD_DEBUG_CONTINUE,
48  CMD_DEBUG_CLEAR_BREAKPOINT,
49  INT_IF_DIRECTIVE_GETPRM,
50  INT_IF_DIRECTIVE_GETTLM,
51  INT_IF_DIRECTIVE_GOTO,
52  INT_IF_DIRECTIVE_IF,
53  INT_IF_DIRECTIVE_NOOP,
54  INT_IF_DIRECTIVE_SETLOCALVAR,
55  INT_IF_DIRECTIVE_WAITABS,
56  INT_IF_DIRECTIVE_WAITREL,
57  INTERNAL_STATE_MACHINE_SIGNAL,
58  };
59 
60  // Get the max size by constructing a union of the async input, command, and
61  // internal port serialization sizes
62  union BuffUnion {
63  BYTE checkTimersPortSize[Svc::InputSchedPort::SERIALIZED_SIZE];
64  BYTE cmdResponseInPortSize[Fw::InputCmdResponsePort::SERIALIZED_SIZE];
69  // Size of directive_getPrm argument list
70  BYTE directive_getPrmIntIfSize[
72  ];
73  // Size of directive_getTlm argument list
74  BYTE directive_getTlmIntIfSize[
76  ];
77  // Size of directive_goto argument list
78  BYTE directive_gotoIntIfSize[
80  ];
81  // Size of directive_if argument list
82  BYTE directive_ifIntIfSize[
84  ];
85  // Size of directive_noOp argument list
86  BYTE directive_noOpIntIfSize[
88  ];
89  // Size of directive_setLocalVar argument list
90  BYTE directive_setLocalVarIntIfSize[
92  ];
93  // Size of directive_waitAbs argument list
94  BYTE directive_waitAbsIntIfSize[
96  ];
97  // Size of directive_waitRel argument list
98  BYTE directive_waitRelIntIfSize[
100  ];
101  // Size of buffer for internal state machine signals
102  // The internal SmSignalBuffer stores the state machine id, the
103  // signal id, and the signal data
104  BYTE internalSmBufferSize[SmSignalBuffer::SERIALIZED_SIZE];
105  };
106 
107  // Define a message buffer class large enough to handle all the
108  // asynchronous inputs to the component
109  class ComponentIpcSerializableBuffer :
111  {
112 
113  public:
114 
115  enum {
116  // Offset into data in buffer: Size of message ID and port number
117  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
118  // Max data size
119  MAX_DATA_SIZE = sizeof(BuffUnion),
120  // Max message size: Size of message id + size of port + max data size
121  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
122  };
123 
124  Fw::Serializable::SizeType getBuffCapacity() const {
125  return sizeof(m_buff);
126  }
127 
128  U8* getBuffAddr() {
129  return m_buff;
130  }
131 
132  const U8* getBuffAddr() const {
133  return m_buff;
134  }
135 
136  private:
137  // Should be the max of all the input ports serialized sizes...
138  U8 m_buff[SERIALIZATION_SIZE];
139 
140  };
141  }
142 
143  // ----------------------------------------------------------------------
144  // Types for internal state machines
145  // ----------------------------------------------------------------------
146 
149  m_component(component)
150  {
151 
152  }
153 
156  {
157  this->initBase(static_cast<FwEnumStoreType>(smId));
158  }
159 
161  getId() const
162  {
163  return static_cast<FpySequencerComponentBase::SmId>(this->m_id);
164  }
165 
166  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
167  action_signalEntered(Signal signal)
168  {
169  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_signalEntered(this->getId(), signal);
170  }
171 
172  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
173  action_setSequenceFilePath(
174  Signal signal,
176  )
177  {
178  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(this->getId(), signal, value);
179  }
180 
181  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
182  action_setSequenceBlockState(
183  Signal signal,
185  )
186  {
187  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(this->getId(), signal, value);
188  }
189 
190  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
191  action_validate(Signal signal)
192  {
193  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_validate(this->getId(), signal);
194  }
195 
196  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
197  action_report_seqSucceeded(Signal signal)
198  {
199  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(this->getId(), signal);
200  }
201 
202  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
203  action_report_seqCancelled(Signal signal)
204  {
205  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(this->getId(), signal);
206  }
207 
208  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
209  action_setGoalState_RUNNING(Signal signal)
210  {
211  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(this->getId(), signal);
212  }
213 
214  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
215  action_setGoalState_VALID(Signal signal)
216  {
217  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(this->getId(), signal);
218  }
219 
220  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
221  action_setGoalState_IDLE(Signal signal)
222  {
223  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(this->getId(), signal);
224  }
225 
226  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
227  action_sendCmdResponse_OK(Signal signal)
228  {
229  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(this->getId(), signal);
230  }
231 
232  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
233  action_sendCmdResponse_EXECUTION_ERROR(Signal signal)
234  {
235  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(this->getId(), signal);
236  }
237 
238  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
239  action_clearSequenceFile(Signal signal)
240  {
241  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(this->getId(), signal);
242  }
243 
244  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
245  action_clearDebugBreakpoint(Signal signal)
246  {
247  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_clearDebugBreakpoint(this->getId(), signal);
248  }
249 
250  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
251  action_checkShouldWake(Signal signal)
252  {
253  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(this->getId(), signal);
254  }
255 
256  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
257  action_dispatchStatement(Signal signal)
258  {
259  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(this->getId(), signal);
260  }
261 
262  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
263  action_resetRuntime(Signal signal)
264  {
265  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(this->getId(), signal);
266  }
267 
268  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
269  action_checkStatementTimeout(Signal signal)
270  {
271  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(this->getId(), signal);
272  }
273 
274  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
275  action_incrementSequenceCounter(Signal signal)
276  {
277  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(this->getId(), signal);
278  }
279 
280  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
281  action_report_debugBroken(Signal signal)
282  {
283  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_debugBroken(this->getId(), signal);
284  }
285 
286  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
287  action_setDebugBreakpoint(
288  Signal signal,
290  )
291  {
292  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setDebugBreakpoint(this->getId(), signal, value);
293  }
294 
295  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
296  guard_goalStateIs_RUNNING(Signal signal) const
297  {
298  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(this->getId(), signal);
299  }
300 
301  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
302  guard_shouldDebugBreak(Signal signal) const
303  {
304  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_shouldDebugBreak(this->getId(), signal);
305  }
306 
307  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
308  guard_debugBreakOnce(Signal signal) const
309  {
310  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_debugBreakOnce(this->getId(), signal);
311  }
312 
313  // ----------------------------------------------------------------------
314  // Component initialization
315  // ----------------------------------------------------------------------
316 
319  FwSizeType queueDepth,
320  FwEnumStoreType instance
321  )
322  {
323  // Initialize base class
325 
326  // Initialize state machine instances
327  this->m_stateMachine_sequencer.init(SmId::sequencer);
328 
329  // Connect input port cmdIn
330  for (
331  FwIndexType port = 0;
332  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
333  port++
334  ) {
335  this->m_cmdIn_InputPort[port].init();
336  this->m_cmdIn_InputPort[port].addCallComp(
337  this,
338  m_p_cmdIn_in
339  );
340  this->m_cmdIn_InputPort[port].setPortNum(port);
341 
342 #if FW_OBJECT_NAMES == 1
343  Fw::ObjectName portName;
344  portName.format(
345  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
346  this->m_objName.toChar(),
347  port
348  );
349  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
350 #endif
351  }
352 
353  // Connect input port checkTimers
354  for (
355  FwIndexType port = 0;
356  port < static_cast<FwIndexType>(this->getNum_checkTimers_InputPorts());
357  port++
358  ) {
359  this->m_checkTimers_InputPort[port].init();
360  this->m_checkTimers_InputPort[port].addCallComp(
361  this,
362  m_p_checkTimers_in
363  );
364  this->m_checkTimers_InputPort[port].setPortNum(port);
365 
366 #if FW_OBJECT_NAMES == 1
367  Fw::ObjectName portName;
368  portName.format(
369  "%s_checkTimers_InputPort[%" PRI_FwIndexType "]",
370  this->m_objName.toChar(),
371  port
372  );
373  this->m_checkTimers_InputPort[port].setObjName(portName.toChar());
374 #endif
375  }
376 
377  // Connect input port cmdResponseIn
378  for (
379  FwIndexType port = 0;
380  port < static_cast<FwIndexType>(this->getNum_cmdResponseIn_InputPorts());
381  port++
382  ) {
383  this->m_cmdResponseIn_InputPort[port].init();
384  this->m_cmdResponseIn_InputPort[port].addCallComp(
385  this,
386  m_p_cmdResponseIn_in
387  );
388  this->m_cmdResponseIn_InputPort[port].setPortNum(port);
389 
390 #if FW_OBJECT_NAMES == 1
391  Fw::ObjectName portName;
392  portName.format(
393  "%s_cmdResponseIn_InputPort[%" PRI_FwIndexType "]",
394  this->m_objName.toChar(),
395  port
396  );
397  this->m_cmdResponseIn_InputPort[port].setObjName(portName.toChar());
398 #endif
399  }
400 
401  // Connect input port pingIn
402  for (
403  FwIndexType port = 0;
404  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
405  port++
406  ) {
407  this->m_pingIn_InputPort[port].init();
408  this->m_pingIn_InputPort[port].addCallComp(
409  this,
410  m_p_pingIn_in
411  );
412  this->m_pingIn_InputPort[port].setPortNum(port);
413 
414 #if FW_OBJECT_NAMES == 1
415  Fw::ObjectName portName;
416  portName.format(
417  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
418  this->m_objName.toChar(),
419  port
420  );
421  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
422 #endif
423  }
424 
425  // Connect input port seqRunIn
426  for (
427  FwIndexType port = 0;
428  port < static_cast<FwIndexType>(this->getNum_seqRunIn_InputPorts());
429  port++
430  ) {
431  this->m_seqRunIn_InputPort[port].init();
432  this->m_seqRunIn_InputPort[port].addCallComp(
433  this,
434  m_p_seqRunIn_in
435  );
436  this->m_seqRunIn_InputPort[port].setPortNum(port);
437 
438 #if FW_OBJECT_NAMES == 1
439  Fw::ObjectName portName;
440  portName.format(
441  "%s_seqRunIn_InputPort[%" PRI_FwIndexType "]",
442  this->m_objName.toChar(),
443  port
444  );
445  this->m_seqRunIn_InputPort[port].setObjName(portName.toChar());
446 #endif
447  }
448 
449  // Connect input port tlmWrite
450  for (
451  FwIndexType port = 0;
452  port < static_cast<FwIndexType>(this->getNum_tlmWrite_InputPorts());
453  port++
454  ) {
455  this->m_tlmWrite_InputPort[port].init();
456  this->m_tlmWrite_InputPort[port].addCallComp(
457  this,
458  m_p_tlmWrite_in
459  );
460  this->m_tlmWrite_InputPort[port].setPortNum(port);
461 
462 #if FW_OBJECT_NAMES == 1
463  Fw::ObjectName portName;
464  portName.format(
465  "%s_tlmWrite_InputPort[%" PRI_FwIndexType "]",
466  this->m_objName.toChar(),
467  port
468  );
469  this->m_tlmWrite_InputPort[port].setObjName(portName.toChar());
470 #endif
471  }
472 
473  // Connect output port cmdRegOut
474  for (
475  FwIndexType port = 0;
476  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
477  port++
478  ) {
479  this->m_cmdRegOut_OutputPort[port].init();
480 
481 #if FW_OBJECT_NAMES == 1
482  Fw::ObjectName portName;
483  portName.format(
484  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
485  this->m_objName.toChar(),
486  port
487  );
488  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
489 #endif
490  }
491 
492  // Connect output port cmdResponseOut
493  for (
494  FwIndexType port = 0;
495  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
496  port++
497  ) {
498  this->m_cmdResponseOut_OutputPort[port].init();
499 
500 #if FW_OBJECT_NAMES == 1
501  Fw::ObjectName portName;
502  portName.format(
503  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
504  this->m_objName.toChar(),
505  port
506  );
507  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
508 #endif
509  }
510 
511  // Connect output port logOut
512  for (
513  FwIndexType port = 0;
514  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
515  port++
516  ) {
517  this->m_logOut_OutputPort[port].init();
518 
519 #if FW_OBJECT_NAMES == 1
520  Fw::ObjectName portName;
521  portName.format(
522  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
523  this->m_objName.toChar(),
524  port
525  );
526  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
527 #endif
528  }
529 
530 #if FW_ENABLE_TEXT_LOGGING == 1
531  // Connect output port logTextOut
532  for (
533  FwIndexType port = 0;
534  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
535  port++
536  ) {
537  this->m_logTextOut_OutputPort[port].init();
538 
539 #if FW_OBJECT_NAMES == 1
540  Fw::ObjectName portName;
541  portName.format(
542  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
543  this->m_objName.toChar(),
544  port
545  );
546  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
547 #endif
548  }
549 #endif
550 
551  // Connect output port prmGet
552  for (
553  FwIndexType port = 0;
554  port < static_cast<FwIndexType>(this->getNum_prmGet_OutputPorts());
555  port++
556  ) {
557  this->m_prmGet_OutputPort[port].init();
558 
559 #if FW_OBJECT_NAMES == 1
560  Fw::ObjectName portName;
561  portName.format(
562  "%s_prmGet_OutputPort[%" PRI_FwIndexType "]",
563  this->m_objName.toChar(),
564  port
565  );
566  this->m_prmGet_OutputPort[port].setObjName(portName.toChar());
567 #endif
568  }
569 
570  // Connect output port prmSet
571  for (
572  FwIndexType port = 0;
573  port < static_cast<FwIndexType>(this->getNum_prmSet_OutputPorts());
574  port++
575  ) {
576  this->m_prmSet_OutputPort[port].init();
577 
578 #if FW_OBJECT_NAMES == 1
579  Fw::ObjectName portName;
580  portName.format(
581  "%s_prmSet_OutputPort[%" PRI_FwIndexType "]",
582  this->m_objName.toChar(),
583  port
584  );
585  this->m_prmSet_OutputPort[port].setObjName(portName.toChar());
586 #endif
587  }
588 
589  // Connect output port timeCaller
590  for (
591  FwIndexType port = 0;
592  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
593  port++
594  ) {
595  this->m_timeCaller_OutputPort[port].init();
596 
597 #if FW_OBJECT_NAMES == 1
598  Fw::ObjectName portName;
599  portName.format(
600  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
601  this->m_objName.toChar(),
602  port
603  );
604  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
605 #endif
606  }
607 
608  // Connect output port tlmOut
609  for (
610  FwIndexType port = 0;
611  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
612  port++
613  ) {
614  this->m_tlmOut_OutputPort[port].init();
615 
616 #if FW_OBJECT_NAMES == 1
617  Fw::ObjectName portName;
618  portName.format(
619  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
620  this->m_objName.toChar(),
621  port
622  );
623  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
624 #endif
625  }
626 
627  // Connect output port cmdOut
628  for (
629  FwIndexType port = 0;
630  port < static_cast<FwIndexType>(this->getNum_cmdOut_OutputPorts());
631  port++
632  ) {
633  this->m_cmdOut_OutputPort[port].init();
634 
635 #if FW_OBJECT_NAMES == 1
636  Fw::ObjectName portName;
637  portName.format(
638  "%s_cmdOut_OutputPort[%" PRI_FwIndexType "]",
639  this->m_objName.toChar(),
640  port
641  );
642  this->m_cmdOut_OutputPort[port].setObjName(portName.toChar());
643 #endif
644  }
645 
646  // Connect output port getParam
647  for (
648  FwIndexType port = 0;
649  port < static_cast<FwIndexType>(this->getNum_getParam_OutputPorts());
650  port++
651  ) {
652  this->m_getParam_OutputPort[port].init();
653 
654 #if FW_OBJECT_NAMES == 1
655  Fw::ObjectName portName;
656  portName.format(
657  "%s_getParam_OutputPort[%" PRI_FwIndexType "]",
658  this->m_objName.toChar(),
659  port
660  );
661  this->m_getParam_OutputPort[port].setObjName(portName.toChar());
662 #endif
663  }
664 
665  // Connect output port getTlmChan
666  for (
667  FwIndexType port = 0;
668  port < static_cast<FwIndexType>(this->getNum_getTlmChan_OutputPorts());
669  port++
670  ) {
671  this->m_getTlmChan_OutputPort[port].init();
672 
673 #if FW_OBJECT_NAMES == 1
674  Fw::ObjectName portName;
675  portName.format(
676  "%s_getTlmChan_OutputPort[%" PRI_FwIndexType "]",
677  this->m_objName.toChar(),
678  port
679  );
680  this->m_getTlmChan_OutputPort[port].setObjName(portName.toChar());
681 #endif
682  }
683 
684  // Connect output port pingOut
685  for (
686  FwIndexType port = 0;
687  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
688  port++
689  ) {
690  this->m_pingOut_OutputPort[port].init();
691 
692 #if FW_OBJECT_NAMES == 1
693  Fw::ObjectName portName;
694  portName.format(
695  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
696  this->m_objName.toChar(),
697  port
698  );
699  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
700 #endif
701  }
702 
703  // Create the queue
704  Os::Queue::Status qStat = this->createQueue(
705  queueDepth,
706  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
707  );
708  FW_ASSERT(
709  Os::Queue::Status::OP_OK == qStat,
710  static_cast<FwAssertArgType>(qStat)
711  );
712  }
713 
714  // ----------------------------------------------------------------------
715  // Getters for special input ports
716  // ----------------------------------------------------------------------
717 
720  {
721  FW_ASSERT(
722  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
723  static_cast<FwAssertArgType>(portNum)
724  );
725 
726  return &this->m_cmdIn_InputPort[portNum];
727  }
728 
729  // ----------------------------------------------------------------------
730  // Getters for typed input ports
731  // ----------------------------------------------------------------------
732 
735  {
736  FW_ASSERT(
737  (0 <= portNum) && (portNum < this->getNum_checkTimers_InputPorts()),
738  static_cast<FwAssertArgType>(portNum)
739  );
740 
741  return &this->m_checkTimers_InputPort[portNum];
742  }
743 
746  {
747  FW_ASSERT(
748  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
749  static_cast<FwAssertArgType>(portNum)
750  );
751 
752  return &this->m_cmdResponseIn_InputPort[portNum];
753  }
754 
757  {
758  FW_ASSERT(
759  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
760  static_cast<FwAssertArgType>(portNum)
761  );
762 
763  return &this->m_pingIn_InputPort[portNum];
764  }
765 
768  {
769  FW_ASSERT(
770  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
771  static_cast<FwAssertArgType>(portNum)
772  );
773 
774  return &this->m_seqRunIn_InputPort[portNum];
775  }
776 
779  {
780  FW_ASSERT(
781  (0 <= portNum) && (portNum < this->getNum_tlmWrite_InputPorts()),
782  static_cast<FwAssertArgType>(portNum)
783  );
784 
785  return &this->m_tlmWrite_InputPort[portNum];
786  }
787 
788  // ----------------------------------------------------------------------
789  // Connect input ports to special output ports
790  // ----------------------------------------------------------------------
791 
794  FwIndexType portNum,
795  Fw::InputCmdRegPort* port
796  )
797  {
798  FW_ASSERT(
799  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
800  static_cast<FwAssertArgType>(portNum)
801  );
802 
803  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
804  }
805 
808  FwIndexType portNum,
810  )
811  {
812  FW_ASSERT(
813  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
814  static_cast<FwAssertArgType>(portNum)
815  );
816 
817  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
818  }
819 
822  FwIndexType portNum,
823  Fw::InputLogPort* port
824  )
825  {
826  FW_ASSERT(
827  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
828  static_cast<FwAssertArgType>(portNum)
829  );
830 
831  this->m_logOut_OutputPort[portNum].addCallPort(port);
832  }
833 
834 #if FW_ENABLE_TEXT_LOGGING == 1
835 
836  void FpySequencerComponentBase ::
837  set_logTextOut_OutputPort(
838  FwIndexType portNum,
840  )
841  {
842  FW_ASSERT(
843  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
844  static_cast<FwAssertArgType>(portNum)
845  );
846 
847  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
848  }
849 
850 #endif
851 
854  FwIndexType portNum,
855  Fw::InputPrmGetPort* port
856  )
857  {
858  FW_ASSERT(
859  (0 <= portNum) && (portNum < this->getNum_prmGet_OutputPorts()),
860  static_cast<FwAssertArgType>(portNum)
861  );
862 
863  this->m_prmGet_OutputPort[portNum].addCallPort(port);
864  }
865 
868  FwIndexType portNum,
869  Fw::InputPrmSetPort* port
870  )
871  {
872  FW_ASSERT(
873  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
874  static_cast<FwAssertArgType>(portNum)
875  );
876 
877  this->m_prmSet_OutputPort[portNum].addCallPort(port);
878  }
879 
882  FwIndexType portNum,
883  Fw::InputTimePort* port
884  )
885  {
886  FW_ASSERT(
887  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
888  static_cast<FwAssertArgType>(portNum)
889  );
890 
891  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
892  }
893 
896  FwIndexType portNum,
897  Fw::InputTlmPort* port
898  )
899  {
900  FW_ASSERT(
901  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
902  static_cast<FwAssertArgType>(portNum)
903  );
904 
905  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
906  }
907 
908  // ----------------------------------------------------------------------
909  // Connect typed input ports to typed output ports
910  // ----------------------------------------------------------------------
911 
914  FwIndexType portNum,
915  Fw::InputComPort* port
916  )
917  {
918  FW_ASSERT(
919  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
920  static_cast<FwAssertArgType>(portNum)
921  );
922 
923  this->m_cmdOut_OutputPort[portNum].addCallPort(port);
924  }
925 
928  FwIndexType portNum,
929  Fw::InputPrmGetPort* port
930  )
931  {
932  FW_ASSERT(
933  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
934  static_cast<FwAssertArgType>(portNum)
935  );
936 
937  this->m_getParam_OutputPort[portNum].addCallPort(port);
938  }
939 
942  FwIndexType portNum,
943  Fw::InputTlmGetPort* port
944  )
945  {
946  FW_ASSERT(
947  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
948  static_cast<FwAssertArgType>(portNum)
949  );
950 
951  this->m_getTlmChan_OutputPort[portNum].addCallPort(port);
952  }
953 
956  FwIndexType portNum,
957  Svc::InputPingPort* port
958  )
959  {
960  FW_ASSERT(
961  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
962  static_cast<FwAssertArgType>(portNum)
963  );
964 
965  this->m_pingOut_OutputPort[portNum].addCallPort(port);
966  }
967 
968 #if FW_PORT_SERIALIZATION
969 
970  // ----------------------------------------------------------------------
971  // Connect serial input ports to special output ports
972  // ----------------------------------------------------------------------
973 
976  FwIndexType portNum,
977  Fw::InputSerializePort* port
978  )
979  {
980  FW_ASSERT(
981  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
982  static_cast<FwAssertArgType>(portNum)
983  );
984 
985  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
986  }
987 
990  FwIndexType portNum,
991  Fw::InputSerializePort* port
992  )
993  {
994  FW_ASSERT(
995  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
996  static_cast<FwAssertArgType>(portNum)
997  );
998 
999  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
1000  }
1001 
1004  FwIndexType portNum,
1005  Fw::InputSerializePort* port
1006  )
1007  {
1008  FW_ASSERT(
1009  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1010  static_cast<FwAssertArgType>(portNum)
1011  );
1012 
1013  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
1014  }
1015 
1016 #if FW_ENABLE_TEXT_LOGGING == 1
1017 
1018  void FpySequencerComponentBase ::
1019  set_logTextOut_OutputPort(
1020  FwIndexType portNum,
1021  Fw::InputSerializePort* port
1022  )
1023  {
1024  FW_ASSERT(
1025  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1026  static_cast<FwAssertArgType>(portNum)
1027  );
1028 
1029  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
1030  }
1031 
1032 #endif
1033 
1036  FwIndexType portNum,
1037  Fw::InputSerializePort* port
1038  )
1039  {
1040  FW_ASSERT(
1041  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
1042  static_cast<FwAssertArgType>(portNum)
1043  );
1044 
1045  this->m_prmSet_OutputPort[portNum].registerSerialPort(port);
1046  }
1047 
1050  FwIndexType portNum,
1051  Fw::InputSerializePort* port
1052  )
1053  {
1054  FW_ASSERT(
1055  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1056  static_cast<FwAssertArgType>(portNum)
1057  );
1058 
1059  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
1060  }
1061 
1064  FwIndexType portNum,
1065  Fw::InputSerializePort* port
1066  )
1067  {
1068  FW_ASSERT(
1069  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1070  static_cast<FwAssertArgType>(portNum)
1071  );
1072 
1073  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
1074  }
1075 
1076 #endif
1077 
1078 #if FW_PORT_SERIALIZATION
1079 
1080  // ----------------------------------------------------------------------
1081  // Connect serial input ports to typed output ports
1082  // ----------------------------------------------------------------------
1083 
1086  FwIndexType portNum,
1087  Fw::InputSerializePort* port
1088  )
1089  {
1090  FW_ASSERT(
1091  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1092  static_cast<FwAssertArgType>(portNum)
1093  );
1094 
1095  this->m_cmdOut_OutputPort[portNum].registerSerialPort(port);
1096  }
1097 
1100  FwIndexType portNum,
1101  Fw::InputSerializePort* port
1102  )
1103  {
1104  FW_ASSERT(
1105  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1106  static_cast<FwAssertArgType>(portNum)
1107  );
1108 
1109  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
1110  }
1111 
1112 #endif
1113 
1114  // ----------------------------------------------------------------------
1115  // Command registration
1116  // ----------------------------------------------------------------------
1117 
1120  {
1121  FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
1122 
1123  this->m_cmdRegOut_OutputPort[0].invoke(
1124  this->getIdBase() + OPCODE_RUN
1125  );
1126 
1127  this->m_cmdRegOut_OutputPort[0].invoke(
1128  this->getIdBase() + OPCODE_VALIDATE
1129  );
1130 
1131  this->m_cmdRegOut_OutputPort[0].invoke(
1133  );
1134 
1135  this->m_cmdRegOut_OutputPort[0].invoke(
1136  this->getIdBase() + OPCODE_CANCEL
1137  );
1138 
1139  this->m_cmdRegOut_OutputPort[0].invoke(
1141  );
1142 
1143  this->m_cmdRegOut_OutputPort[0].invoke(
1144  this->getIdBase() + OPCODE_DEBUG_BREAK
1145  );
1146 
1147  this->m_cmdRegOut_OutputPort[0].invoke(
1149  );
1150 
1151  this->m_cmdRegOut_OutputPort[0].invoke(
1153  );
1154 
1155  this->m_cmdRegOut_OutputPort[0].invoke(
1157  );
1158 
1159  this->m_cmdRegOut_OutputPort[0].invoke(
1161  );
1162  }
1163 
1164  // ----------------------------------------------------------------------
1165  // Parameter loading
1166  // ----------------------------------------------------------------------
1167 
1170  {
1171  Fw::ParamBuffer _buff;
1173  const FwPrmIdType _baseId = static_cast<FwPrmIdType>(this->getIdBase());
1174  FW_ASSERT(this->m_prmGet_OutputPort[0].isConnected());
1175 
1176  FwPrmIdType _id{};
1177 
1178  _id = _baseId + PARAMID_STATEMENT_TIMEOUT_SECS;
1179 
1180  // Get parameter STATEMENT_TIMEOUT_SECS
1181  this->m_param_STATEMENT_TIMEOUT_SECS_valid =
1182  this->m_prmGet_OutputPort[0].invoke(
1183  _id,
1184  _buff
1185  );
1186 
1187  // Deserialize value
1188  this->m_paramLock.lock();
1189 
1190  // If there was a deserialization issue, mark it invalid
1191  if (this->m_param_STATEMENT_TIMEOUT_SECS_valid == Fw::ParamValid::VALID) {
1192  _stat = _buff.deserialize(this->m_STATEMENT_TIMEOUT_SECS);
1193  if (_stat != Fw::FW_SERIALIZE_OK) {
1194  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::DEFAULT;
1195  // Set default value
1196  this->m_STATEMENT_TIMEOUT_SECS = 0.0f;
1197  }
1198  }
1199  else {
1200  // Set default value
1201  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::DEFAULT;
1202  this->m_STATEMENT_TIMEOUT_SECS = 0.0f;
1203  }
1204 
1205  this->m_paramLock.unLock();
1206 
1207  // Call notifier
1208  this->parametersLoaded();
1209  }
1210 
1211  // ----------------------------------------------------------------------
1212  // Component construction and destruction
1213  // ----------------------------------------------------------------------
1214 
1216  FpySequencerComponentBase(const char* compName) :
1217  Fw::ActiveComponentBase(compName),
1218  m_stateMachine_sequencer(*this)
1219  {
1220  // Write telemetry channel State
1221  this->m_first_update_State = true;
1222  this->m_last_State = 0;
1223 
1224  // Write telemetry channel SequencesSucceeded
1225  this->m_first_update_SequencesSucceeded = true;
1226  this->m_last_SequencesSucceeded = 0;
1227 
1228  // Write telemetry channel SequencesFailed
1229  this->m_first_update_SequencesFailed = true;
1230  this->m_last_SequencesFailed = 0;
1231 
1232  // Write telemetry channel SequencesCancelled
1233  this->m_first_update_SequencesCancelled = true;
1234  this->m_last_SequencesCancelled = 0;
1235 
1236  // Write telemetry channel StatementsDispatched
1237  this->m_first_update_StatementsDispatched = true;
1238  this->m_last_StatementsDispatched = 0;
1239 
1240  // Write telemetry channel StatementsFailed
1241  this->m_first_update_StatementsFailed = true;
1242  this->m_last_StatementsFailed = 0;
1243 
1244  // Write telemetry channel SeqPath
1245  this->m_first_update_SeqPath = true;
1246 
1247  // Write telemetry channel DebugBreakpointIdx
1248  this->m_first_update_DebugBreakpointIdx = true;
1249  this->m_last_DebugBreakpointIdx = 0;
1250 
1251  // Write telemetry channel Debug
1252  this->m_first_update_Debug = true;
1253 
1254  // Write telemetry channel STATEMENT_TIMEOUT_SECS
1255  this->m_first_update_STATEMENT_TIMEOUT_SECS = true;
1256  this->m_last_STATEMENT_TIMEOUT_SECS = 0;
1257 
1258  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
1259  }
1260 
1263  {
1264 
1265  }
1266 
1267  // ----------------------------------------------------------------------
1268  // Getters for numbers of special input ports
1269  // ----------------------------------------------------------------------
1270 
1273  {
1274  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdIn_InputPort));
1275  }
1276 
1277  // ----------------------------------------------------------------------
1278  // Getters for numbers of typed input ports
1279  // ----------------------------------------------------------------------
1280 
1283  {
1284  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_checkTimers_InputPort));
1285  }
1286 
1289  {
1290  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseIn_InputPort));
1291  }
1292 
1295  {
1296  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_pingIn_InputPort));
1297  }
1298 
1301  {
1302  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_seqRunIn_InputPort));
1303  }
1304 
1307  {
1308  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_tlmWrite_InputPort));
1309  }
1310 
1311  // ----------------------------------------------------------------------
1312  // Getters for numbers of special output ports
1313  // ----------------------------------------------------------------------
1314 
1317  {
1318  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdRegOut_OutputPort));
1319  }
1320 
1323  {
1324  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseOut_OutputPort));
1325  }
1326 
1329  {
1330  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logOut_OutputPort));
1331  }
1332 
1333 #if FW_ENABLE_TEXT_LOGGING == 1
1334 
1335  FwIndexType FpySequencerComponentBase ::
1336  getNum_logTextOut_OutputPorts() const
1337  {
1338  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logTextOut_OutputPort));
1339  }
1340 
1341 #endif
1342 
1345  {
1346  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_prmGet_OutputPort));
1347  }
1348 
1351  {
1352  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_prmSet_OutputPort));
1353  }
1354 
1357  {
1358  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_timeCaller_OutputPort));
1359  }
1360 
1363  {
1364  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_tlmOut_OutputPort));
1365  }
1366 
1367  // ----------------------------------------------------------------------
1368  // Getters for numbers of typed output ports
1369  // ----------------------------------------------------------------------
1370 
1373  {
1374  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdOut_OutputPort));
1375  }
1376 
1379  {
1380  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_getParam_OutputPort));
1381  }
1382 
1385  {
1386  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_getTlmChan_OutputPort));
1387  }
1388 
1391  {
1392  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_pingOut_OutputPort));
1393  }
1394 
1395  // ----------------------------------------------------------------------
1396  // Connection status queries for special output ports
1397  // ----------------------------------------------------------------------
1398 
1401  {
1402  FW_ASSERT(
1403  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
1404  static_cast<FwAssertArgType>(portNum)
1405  );
1406 
1407  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
1408  }
1409 
1412  {
1413  FW_ASSERT(
1414  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1415  static_cast<FwAssertArgType>(portNum)
1416  );
1417 
1418  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
1419  }
1420 
1423  {
1424  FW_ASSERT(
1425  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1426  static_cast<FwAssertArgType>(portNum)
1427  );
1428 
1429  return this->m_logOut_OutputPort[portNum].isConnected();
1430  }
1431 
1432 #if FW_ENABLE_TEXT_LOGGING == 1
1433 
1434  bool FpySequencerComponentBase ::
1435  isConnected_logTextOut_OutputPort(FwIndexType portNum)
1436  {
1437  FW_ASSERT(
1438  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1439  static_cast<FwAssertArgType>(portNum)
1440  );
1441 
1442  return this->m_logTextOut_OutputPort[portNum].isConnected();
1443  }
1444 
1445 #endif
1446 
1449  {
1450  FW_ASSERT(
1451  (0 <= portNum) && (portNum < this->getNum_prmGet_OutputPorts()),
1452  static_cast<FwAssertArgType>(portNum)
1453  );
1454 
1455  return this->m_prmGet_OutputPort[portNum].isConnected();
1456  }
1457 
1460  {
1461  FW_ASSERT(
1462  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
1463  static_cast<FwAssertArgType>(portNum)
1464  );
1465 
1466  return this->m_prmSet_OutputPort[portNum].isConnected();
1467  }
1468 
1471  {
1472  FW_ASSERT(
1473  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1474  static_cast<FwAssertArgType>(portNum)
1475  );
1476 
1477  return this->m_timeCaller_OutputPort[portNum].isConnected();
1478  }
1479 
1482  {
1483  FW_ASSERT(
1484  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1485  static_cast<FwAssertArgType>(portNum)
1486  );
1487 
1488  return this->m_tlmOut_OutputPort[portNum].isConnected();
1489  }
1490 
1491  // ----------------------------------------------------------------------
1492  // Connection status queries for typed output ports
1493  // ----------------------------------------------------------------------
1494 
1497  {
1498  FW_ASSERT(
1499  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1500  static_cast<FwAssertArgType>(portNum)
1501  );
1502 
1503  return this->m_cmdOut_OutputPort[portNum].isConnected();
1504  }
1505 
1508  {
1509  FW_ASSERT(
1510  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
1511  static_cast<FwAssertArgType>(portNum)
1512  );
1513 
1514  return this->m_getParam_OutputPort[portNum].isConnected();
1515  }
1516 
1519  {
1520  FW_ASSERT(
1521  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
1522  static_cast<FwAssertArgType>(portNum)
1523  );
1524 
1525  return this->m_getTlmChan_OutputPort[portNum].isConnected();
1526  }
1527 
1530  {
1531  FW_ASSERT(
1532  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1533  static_cast<FwAssertArgType>(portNum)
1534  );
1535 
1536  return this->m_pingOut_OutputPort[portNum].isConnected();
1537  }
1538 
1539  // ----------------------------------------------------------------------
1540  // Port handler base-class functions for typed input ports
1541  //
1542  // Call these functions directly to bypass the corresponding ports
1543  // ----------------------------------------------------------------------
1544 
1547  FwIndexType portNum,
1548  U32 context
1549  )
1550  {
1551  // Make sure port number is valid
1552  FW_ASSERT(
1553  (0 <= portNum) && (portNum < this->getNum_checkTimers_InputPorts()),
1554  static_cast<FwAssertArgType>(portNum)
1555  );
1556 
1557  // Call pre-message hook
1559  portNum,
1560  context
1561  );
1562  ComponentIpcSerializableBuffer msg;
1564 
1565  // Serialize message ID
1566  _status = msg.serialize(
1567  static_cast<FwEnumStoreType>(CHECKTIMERS_SCHED)
1568  );
1569  FW_ASSERT(
1570  _status == Fw::FW_SERIALIZE_OK,
1571  static_cast<FwAssertArgType>(_status)
1572  );
1573 
1574  // Serialize port number
1575  _status = msg.serialize(portNum);
1576  FW_ASSERT(
1577  _status == Fw::FW_SERIALIZE_OK,
1578  static_cast<FwAssertArgType>(_status)
1579  );
1580 
1581  // Serialize argument context
1582  _status = msg.serialize(context);
1583  FW_ASSERT(
1584  _status == Fw::FW_SERIALIZE_OK,
1585  static_cast<FwAssertArgType>(_status)
1586  );
1587 
1588  // Send message
1590  Os::Queue::Status qStatus = this->m_queue.send(msg, 4, _block);
1591 
1592  FW_ASSERT(
1593  qStatus == Os::Queue::OP_OK,
1594  static_cast<FwAssertArgType>(qStatus)
1595  );
1596  }
1597 
1600  FwIndexType portNum,
1601  FwOpcodeType opCode,
1602  U32 cmdSeq,
1603  const Fw::CmdResponse& response
1604  )
1605  {
1606  // Make sure port number is valid
1607  FW_ASSERT(
1608  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
1609  static_cast<FwAssertArgType>(portNum)
1610  );
1611 
1612  // Call pre-message hook
1614  portNum,
1615  opCode,
1616  cmdSeq,
1617  response
1618  );
1619  ComponentIpcSerializableBuffer msg;
1621 
1622  // Serialize message ID
1623  _status = msg.serialize(
1624  static_cast<FwEnumStoreType>(CMDRESPONSEIN_CMDRESPONSE)
1625  );
1626  FW_ASSERT(
1627  _status == Fw::FW_SERIALIZE_OK,
1628  static_cast<FwAssertArgType>(_status)
1629  );
1630 
1631  // Serialize port number
1632  _status = msg.serialize(portNum);
1633  FW_ASSERT(
1634  _status == Fw::FW_SERIALIZE_OK,
1635  static_cast<FwAssertArgType>(_status)
1636  );
1637 
1638  // Serialize argument opCode
1639  _status = msg.serialize(opCode);
1640  FW_ASSERT(
1641  _status == Fw::FW_SERIALIZE_OK,
1642  static_cast<FwAssertArgType>(_status)
1643  );
1644 
1645  // Serialize argument cmdSeq
1646  _status = msg.serialize(cmdSeq);
1647  FW_ASSERT(
1648  _status == Fw::FW_SERIALIZE_OK,
1649  static_cast<FwAssertArgType>(_status)
1650  );
1651 
1652  // Serialize argument response
1653  _status = msg.serialize(response);
1654  FW_ASSERT(
1655  _status == Fw::FW_SERIALIZE_OK,
1656  static_cast<FwAssertArgType>(_status)
1657  );
1658 
1659  // Send message
1661  Os::Queue::Status qStatus = this->m_queue.send(msg, 5, _block);
1662 
1663  FW_ASSERT(
1664  qStatus == Os::Queue::OP_OK,
1665  static_cast<FwAssertArgType>(qStatus)
1666  );
1667  }
1668 
1671  FwIndexType portNum,
1672  U32 key
1673  )
1674  {
1675  // Make sure port number is valid
1676  FW_ASSERT(
1677  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
1678  static_cast<FwAssertArgType>(portNum)
1679  );
1680 
1681  // Call pre-message hook
1683  portNum,
1684  key
1685  );
1686  ComponentIpcSerializableBuffer msg;
1688 
1689  // Serialize message ID
1690  _status = msg.serialize(
1691  static_cast<FwEnumStoreType>(PINGIN_PING)
1692  );
1693  FW_ASSERT(
1694  _status == Fw::FW_SERIALIZE_OK,
1695  static_cast<FwAssertArgType>(_status)
1696  );
1697 
1698  // Serialize port number
1699  _status = msg.serialize(portNum);
1700  FW_ASSERT(
1701  _status == Fw::FW_SERIALIZE_OK,
1702  static_cast<FwAssertArgType>(_status)
1703  );
1704 
1705  // Serialize argument key
1706  _status = msg.serialize(key);
1707  FW_ASSERT(
1708  _status == Fw::FW_SERIALIZE_OK,
1709  static_cast<FwAssertArgType>(_status)
1710  );
1711 
1712  // Send message
1714  Os::Queue::Status qStatus = this->m_queue.send(msg, 10, _block);
1715 
1716  FW_ASSERT(
1717  qStatus == Os::Queue::OP_OK,
1718  static_cast<FwAssertArgType>(qStatus)
1719  );
1720  }
1721 
1724  FwIndexType portNum,
1725  const Fw::StringBase& filename
1726  )
1727  {
1728  // Make sure port number is valid
1729  FW_ASSERT(
1730  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
1731  static_cast<FwAssertArgType>(portNum)
1732  );
1733 
1734  // Call pre-message hook
1736  portNum,
1737  filename
1738  );
1739  ComponentIpcSerializableBuffer msg;
1741 
1742  // Serialize message ID
1743  _status = msg.serialize(
1744  static_cast<FwEnumStoreType>(SEQRUNIN_CMDSEQIN)
1745  );
1746  FW_ASSERT(
1747  _status == Fw::FW_SERIALIZE_OK,
1748  static_cast<FwAssertArgType>(_status)
1749  );
1750 
1751  // Serialize port number
1752  _status = msg.serialize(portNum);
1753  FW_ASSERT(
1754  _status == Fw::FW_SERIALIZE_OK,
1755  static_cast<FwAssertArgType>(_status)
1756  );
1757 
1758  // Serialize argument filename
1759  _status = filename.serialize(msg, 240);
1760  FW_ASSERT(
1761  _status == Fw::FW_SERIALIZE_OK,
1762  static_cast<FwAssertArgType>(_status)
1763  );
1764 
1765  // Send message
1767  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
1768 
1769  FW_ASSERT(
1770  qStatus == Os::Queue::OP_OK,
1771  static_cast<FwAssertArgType>(qStatus)
1772  );
1773  }
1774 
1777  FwIndexType portNum,
1778  U32 context
1779  )
1780  {
1781  // Make sure port number is valid
1782  FW_ASSERT(
1783  (0 <= portNum) && (portNum < this->getNum_tlmWrite_InputPorts()),
1784  static_cast<FwAssertArgType>(portNum)
1785  );
1786 
1787  // Call pre-message hook
1789  portNum,
1790  context
1791  );
1792  ComponentIpcSerializableBuffer msg;
1794 
1795  // Serialize message ID
1796  _status = msg.serialize(
1797  static_cast<FwEnumStoreType>(TLMWRITE_SCHED)
1798  );
1799  FW_ASSERT(
1800  _status == Fw::FW_SERIALIZE_OK,
1801  static_cast<FwAssertArgType>(_status)
1802  );
1803 
1804  // Serialize port number
1805  _status = msg.serialize(portNum);
1806  FW_ASSERT(
1807  _status == Fw::FW_SERIALIZE_OK,
1808  static_cast<FwAssertArgType>(_status)
1809  );
1810 
1811  // Serialize argument context
1812  _status = msg.serialize(context);
1813  FW_ASSERT(
1814  _status == Fw::FW_SERIALIZE_OK,
1815  static_cast<FwAssertArgType>(_status)
1816  );
1817 
1818  // Send message
1820  Os::Queue::Status qStatus = this->m_queue.send(msg, 1, _block);
1821 
1822  FW_ASSERT(
1823  qStatus == Os::Queue::OP_OK,
1824  static_cast<FwAssertArgType>(qStatus)
1825  );
1826  }
1827 
1828  // ----------------------------------------------------------------------
1829  // Pre-message hooks for typed async input ports
1830  //
1831  // Each of these functions is invoked just before processing a message
1832  // on the corresponding port. By default, they do nothing. You can
1833  // override them to provide specific pre-message behavior.
1834  // ----------------------------------------------------------------------
1835 
1838  FwIndexType portNum,
1839  U32 context
1840  )
1841  {
1842  // Default: no-op
1843  }
1844 
1847  FwIndexType portNum,
1848  FwOpcodeType opCode,
1849  U32 cmdSeq,
1850  const Fw::CmdResponse& response
1851  )
1852  {
1853  // Default: no-op
1854  }
1855 
1858  FwIndexType portNum,
1859  U32 key
1860  )
1861  {
1862  // Default: no-op
1863  }
1864 
1867  FwIndexType portNum,
1868  const Fw::StringBase& filename
1869  )
1870  {
1871  // Default: no-op
1872  }
1873 
1876  FwIndexType portNum,
1877  U32 context
1878  )
1879  {
1880  // Default: no-op
1881  }
1882 
1883  // ----------------------------------------------------------------------
1884  // Invocation functions for typed output ports
1885  // ----------------------------------------------------------------------
1886 
1889  FwIndexType portNum,
1890  Fw::ComBuffer& data,
1891  U32 context
1892  )
1893  {
1894  FW_ASSERT(
1895  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1896  static_cast<FwAssertArgType>(portNum)
1897  );
1898 
1899  FW_ASSERT(
1900  this->m_cmdOut_OutputPort[portNum].isConnected(),
1901  static_cast<FwAssertArgType>(portNum)
1902  );
1903  this->m_cmdOut_OutputPort[portNum].invoke(
1904  data,
1905  context
1906  );
1907  }
1908 
1911  FwIndexType portNum,
1912  FwPrmIdType id,
1913  Fw::ParamBuffer& val
1914  )
1915  {
1916  FW_ASSERT(
1917  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
1918  static_cast<FwAssertArgType>(portNum)
1919  );
1920 
1921  FW_ASSERT(
1922  this->m_getParam_OutputPort[portNum].isConnected(),
1923  static_cast<FwAssertArgType>(portNum)
1924  );
1925  return this->m_getParam_OutputPort[portNum].invoke(
1926  id,
1927  val
1928  );
1929  }
1930 
1933  FwIndexType portNum,
1934  FwChanIdType id,
1935  Fw::Time& timeTag,
1936  Fw::TlmBuffer& val
1937  )
1938  {
1939  FW_ASSERT(
1940  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
1941  static_cast<FwAssertArgType>(portNum)
1942  );
1943 
1944  FW_ASSERT(
1945  this->m_getTlmChan_OutputPort[portNum].isConnected(),
1946  static_cast<FwAssertArgType>(portNum)
1947  );
1948  return this->m_getTlmChan_OutputPort[portNum].invoke(
1949  id,
1950  timeTag,
1951  val
1952  );
1953  }
1954 
1957  FwIndexType portNum,
1958  U32 key
1959  )
1960  {
1961  FW_ASSERT(
1962  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1963  static_cast<FwAssertArgType>(portNum)
1964  );
1965 
1966  FW_ASSERT(
1967  this->m_pingOut_OutputPort[portNum].isConnected(),
1968  static_cast<FwAssertArgType>(portNum)
1969  );
1970  this->m_pingOut_OutputPort[portNum].invoke(
1971  key
1972  );
1973  }
1974 
1975  // ----------------------------------------------------------------------
1976  // Internal interface base-class functions
1977  // ----------------------------------------------------------------------
1978 
1981  {
1982  ComponentIpcSerializableBuffer msg;
1984 
1985  // Serialize the message ID
1986  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GETPRM));
1987  FW_ASSERT (
1988  _status == Fw::FW_SERIALIZE_OK,
1989  static_cast<FwAssertArgType>(_status)
1990  );
1991 
1992  // Fake port number to make message dequeue work
1993  _status = msg.serialize(static_cast<FwIndexType>(0));
1994  FW_ASSERT (
1995  _status == Fw::FW_SERIALIZE_OK,
1996  static_cast<FwAssertArgType>(_status)
1997  );
1998 
1999  _status = msg.serialize(directive);
2000  FW_ASSERT(
2001  _status == Fw::FW_SERIALIZE_OK,
2002  static_cast<FwAssertArgType>(_status)
2003  );
2004 
2005  // Send message
2007  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2008 
2009  FW_ASSERT(
2010  qStatus == Os::Queue::OP_OK,
2011  static_cast<FwAssertArgType>(qStatus)
2012  );
2013  }
2014 
2017  {
2018  ComponentIpcSerializableBuffer msg;
2020 
2021  // Serialize the message ID
2022  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GETTLM));
2023  FW_ASSERT (
2024  _status == Fw::FW_SERIALIZE_OK,
2025  static_cast<FwAssertArgType>(_status)
2026  );
2027 
2028  // Fake port number to make message dequeue work
2029  _status = msg.serialize(static_cast<FwIndexType>(0));
2030  FW_ASSERT (
2031  _status == Fw::FW_SERIALIZE_OK,
2032  static_cast<FwAssertArgType>(_status)
2033  );
2034 
2035  _status = msg.serialize(directive);
2036  FW_ASSERT(
2037  _status == Fw::FW_SERIALIZE_OK,
2038  static_cast<FwAssertArgType>(_status)
2039  );
2040 
2041  // Send message
2043  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2044 
2045  FW_ASSERT(
2046  qStatus == Os::Queue::OP_OK,
2047  static_cast<FwAssertArgType>(qStatus)
2048  );
2049  }
2050 
2053  {
2054  ComponentIpcSerializableBuffer msg;
2056 
2057  // Serialize the message ID
2058  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GOTO));
2059  FW_ASSERT (
2060  _status == Fw::FW_SERIALIZE_OK,
2061  static_cast<FwAssertArgType>(_status)
2062  );
2063 
2064  // Fake port number to make message dequeue work
2065  _status = msg.serialize(static_cast<FwIndexType>(0));
2066  FW_ASSERT (
2067  _status == Fw::FW_SERIALIZE_OK,
2068  static_cast<FwAssertArgType>(_status)
2069  );
2070 
2071  _status = msg.serialize(directive);
2072  FW_ASSERT(
2073  _status == Fw::FW_SERIALIZE_OK,
2074  static_cast<FwAssertArgType>(_status)
2075  );
2076 
2077  // Send message
2079  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2080 
2081  FW_ASSERT(
2082  qStatus == Os::Queue::OP_OK,
2083  static_cast<FwAssertArgType>(qStatus)
2084  );
2085  }
2086 
2089  {
2090  ComponentIpcSerializableBuffer msg;
2092 
2093  // Serialize the message ID
2094  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_IF));
2095  FW_ASSERT (
2096  _status == Fw::FW_SERIALIZE_OK,
2097  static_cast<FwAssertArgType>(_status)
2098  );
2099 
2100  // Fake port number to make message dequeue work
2101  _status = msg.serialize(static_cast<FwIndexType>(0));
2102  FW_ASSERT (
2103  _status == Fw::FW_SERIALIZE_OK,
2104  static_cast<FwAssertArgType>(_status)
2105  );
2106 
2107  _status = msg.serialize(directive);
2108  FW_ASSERT(
2109  _status == Fw::FW_SERIALIZE_OK,
2110  static_cast<FwAssertArgType>(_status)
2111  );
2112 
2113  // Send message
2115  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2116 
2117  FW_ASSERT(
2118  qStatus == Os::Queue::OP_OK,
2119  static_cast<FwAssertArgType>(qStatus)
2120  );
2121  }
2122 
2125  {
2126  ComponentIpcSerializableBuffer msg;
2128 
2129  // Serialize the message ID
2130  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_NOOP));
2131  FW_ASSERT (
2132  _status == Fw::FW_SERIALIZE_OK,
2133  static_cast<FwAssertArgType>(_status)
2134  );
2135 
2136  // Fake port number to make message dequeue work
2137  _status = msg.serialize(static_cast<FwIndexType>(0));
2138  FW_ASSERT (
2139  _status == Fw::FW_SERIALIZE_OK,
2140  static_cast<FwAssertArgType>(_status)
2141  );
2142 
2143  _status = msg.serialize(directive);
2144  FW_ASSERT(
2145  _status == Fw::FW_SERIALIZE_OK,
2146  static_cast<FwAssertArgType>(_status)
2147  );
2148 
2149  // Send message
2151  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2152 
2153  FW_ASSERT(
2154  qStatus == Os::Queue::OP_OK,
2155  static_cast<FwAssertArgType>(qStatus)
2156  );
2157  }
2158 
2161  {
2162  ComponentIpcSerializableBuffer msg;
2164 
2165  // Serialize the message ID
2166  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_SETLOCALVAR));
2167  FW_ASSERT (
2168  _status == Fw::FW_SERIALIZE_OK,
2169  static_cast<FwAssertArgType>(_status)
2170  );
2171 
2172  // Fake port number to make message dequeue work
2173  _status = msg.serialize(static_cast<FwIndexType>(0));
2174  FW_ASSERT (
2175  _status == Fw::FW_SERIALIZE_OK,
2176  static_cast<FwAssertArgType>(_status)
2177  );
2178 
2179  _status = msg.serialize(directive);
2180  FW_ASSERT(
2181  _status == Fw::FW_SERIALIZE_OK,
2182  static_cast<FwAssertArgType>(_status)
2183  );
2184 
2185  // Send message
2187  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2188 
2189  FW_ASSERT(
2190  qStatus == Os::Queue::OP_OK,
2191  static_cast<FwAssertArgType>(qStatus)
2192  );
2193  }
2194 
2197  {
2198  ComponentIpcSerializableBuffer msg;
2200 
2201  // Serialize the message ID
2202  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_WAITABS));
2203  FW_ASSERT (
2204  _status == Fw::FW_SERIALIZE_OK,
2205  static_cast<FwAssertArgType>(_status)
2206  );
2207 
2208  // Fake port number to make message dequeue work
2209  _status = msg.serialize(static_cast<FwIndexType>(0));
2210  FW_ASSERT (
2211  _status == Fw::FW_SERIALIZE_OK,
2212  static_cast<FwAssertArgType>(_status)
2213  );
2214 
2215  _status = msg.serialize(directive);
2216  FW_ASSERT(
2217  _status == Fw::FW_SERIALIZE_OK,
2218  static_cast<FwAssertArgType>(_status)
2219  );
2220 
2221  // Send message
2223  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2224 
2225  FW_ASSERT(
2226  qStatus == Os::Queue::OP_OK,
2227  static_cast<FwAssertArgType>(qStatus)
2228  );
2229  }
2230 
2233  {
2234  ComponentIpcSerializableBuffer msg;
2236 
2237  // Serialize the message ID
2238  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_WAITREL));
2239  FW_ASSERT (
2240  _status == Fw::FW_SERIALIZE_OK,
2241  static_cast<FwAssertArgType>(_status)
2242  );
2243 
2244  // Fake port number to make message dequeue work
2245  _status = msg.serialize(static_cast<FwIndexType>(0));
2246  FW_ASSERT (
2247  _status == Fw::FW_SERIALIZE_OK,
2248  static_cast<FwAssertArgType>(_status)
2249  );
2250 
2251  _status = msg.serialize(directive);
2252  FW_ASSERT(
2253  _status == Fw::FW_SERIALIZE_OK,
2254  static_cast<FwAssertArgType>(_status)
2255  );
2256 
2257  // Send message
2259  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2260 
2261  FW_ASSERT(
2262  qStatus == Os::Queue::OP_OK,
2263  static_cast<FwAssertArgType>(qStatus)
2264  );
2265  }
2266 
2267  // ----------------------------------------------------------------------
2268  // State getter functions
2269  // ----------------------------------------------------------------------
2270 
2273  {
2274  return this->m_stateMachine_sequencer.getState();
2275  }
2276 
2277  // ----------------------------------------------------------------------
2278  // Signal send functions
2279  // ----------------------------------------------------------------------
2280 
2283  {
2284  ComponentIpcSerializableBuffer buffer;
2285  // Serialize the message type, port number, state ID, and signal
2286  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_VALIDATE), buffer);
2287  // Serialize the signal data
2288  const Fw::SerializeStatus status = buffer.serialize(value);
2289  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2290  // Send the message and handle overflow
2291  this->sequencer_sendSignalFinish(buffer);
2292  }
2293 
2296  {
2297  ComponentIpcSerializableBuffer buffer;
2298  // Serialize the message type, port number, state ID, and signal
2299  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_RUN), buffer);
2300  // Serialize the signal data
2301  const Fw::SerializeStatus status = buffer.serialize(value);
2302  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2303  // Send the message and handle overflow
2304  this->sequencer_sendSignalFinish(buffer);
2305  }
2306 
2309  {
2310  ComponentIpcSerializableBuffer buffer;
2311  // Serialize the message type, port number, state ID, and signal
2312  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_RUN_VALIDATED), buffer);
2313  // Serialize the signal data
2314  const Fw::SerializeStatus status = buffer.serialize(value);
2315  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2316  // Send the message and handle overflow
2317  this->sequencer_sendSignalFinish(buffer);
2318  }
2319 
2322  {
2323  ComponentIpcSerializableBuffer buffer;
2324  // Serialize the message type, port number, state ID, and signal
2325  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_CANCEL), buffer);
2326  // Send the message and handle overflow
2327  this->sequencer_sendSignalFinish(buffer);
2328  }
2329 
2332  {
2333  ComponentIpcSerializableBuffer buffer;
2334  // Serialize the message type, port number, state ID, and signal
2335  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_SET_BREAKPOINT), buffer);
2336  // Serialize the signal data
2337  const Fw::SerializeStatus status = buffer.serialize(value);
2338  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2339  // Send the message and handle overflow
2340  this->sequencer_sendSignalFinish(buffer);
2341  }
2342 
2345  {
2346  ComponentIpcSerializableBuffer buffer;
2347  // Serialize the message type, port number, state ID, and signal
2348  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_CLEAR_BREAKPOINT), buffer);
2349  // Send the message and handle overflow
2350  this->sequencer_sendSignalFinish(buffer);
2351  }
2352 
2355  {
2356  ComponentIpcSerializableBuffer buffer;
2357  // Serialize the message type, port number, state ID, and signal
2358  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_failure), buffer);
2359  // Send the message and handle overflow
2360  this->sequencer_sendSignalFinish(buffer);
2361  }
2362 
2365  {
2366  ComponentIpcSerializableBuffer buffer;
2367  // Serialize the message type, port number, state ID, and signal
2368  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_success), buffer);
2369  // Send the message and handle overflow
2370  this->sequencer_sendSignalFinish(buffer);
2371  }
2372 
2375  {
2376  ComponentIpcSerializableBuffer buffer;
2377  // Serialize the message type, port number, state ID, and signal
2378  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::entered), buffer);
2379  // Send the message and handle overflow
2380  this->sequencer_sendSignalFinish(buffer);
2381  }
2382 
2385  {
2386  ComponentIpcSerializableBuffer buffer;
2387  // Serialize the message type, port number, state ID, and signal
2388  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_success), buffer);
2389  // Send the message and handle overflow
2390  this->sequencer_sendSignalFinish(buffer);
2391  }
2392 
2395  {
2396  ComponentIpcSerializableBuffer buffer;
2397  // Serialize the message type, port number, state ID, and signal
2398  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_failure), buffer);
2399  // Send the message and handle overflow
2400  this->sequencer_sendSignalFinish(buffer);
2401  }
2402 
2405  {
2406  ComponentIpcSerializableBuffer buffer;
2407  // Serialize the message type, port number, state ID, and signal
2408  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_noMoreStatements), buffer);
2409  // Send the message and handle overflow
2410  this->sequencer_sendSignalFinish(buffer);
2411  }
2412 
2415  {
2416  ComponentIpcSerializableBuffer buffer;
2417  // Serialize the message type, port number, state ID, and signal
2418  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::checkTimersIn), buffer);
2419  // Send the message and handle overflow
2420  this->sequencer_sendSignalFinish(buffer);
2421  }
2422 
2425  {
2426  ComponentIpcSerializableBuffer buffer;
2427  // Serialize the message type, port number, state ID, and signal
2428  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkShouldWake_wakeup), buffer);
2429  // Send the message and handle overflow
2430  this->sequencer_sendSignalFinish(buffer);
2431  }
2432 
2435  {
2436  ComponentIpcSerializableBuffer buffer;
2437  // Serialize the message type, port number, state ID, and signal
2438  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkShouldWake_keepSleeping), buffer);
2439  // Send the message and handle overflow
2440  this->sequencer_sendSignalFinish(buffer);
2441  }
2442 
2445  {
2446  ComponentIpcSerializableBuffer buffer;
2447  // Serialize the message type, port number, state ID, and signal
2448  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_timeOpFailed), buffer);
2449  // Send the message and handle overflow
2450  this->sequencer_sendSignalFinish(buffer);
2451  }
2452 
2455  {
2456  ComponentIpcSerializableBuffer buffer;
2457  // Serialize the message type, port number, state ID, and signal
2458  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_beginSleep), buffer);
2459  // Send the message and handle overflow
2460  this->sequencer_sendSignalFinish(buffer);
2461  }
2462 
2465  {
2466  ComponentIpcSerializableBuffer buffer;
2467  // Serialize the message type, port number, state ID, and signal
2468  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_success), buffer);
2469  // Send the message and handle overflow
2470  this->sequencer_sendSignalFinish(buffer);
2471  }
2472 
2475  {
2476  ComponentIpcSerializableBuffer buffer;
2477  // Serialize the message type, port number, state ID, and signal
2478  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_failure), buffer);
2479  // Send the message and handle overflow
2480  this->sequencer_sendSignalFinish(buffer);
2481  }
2482 
2485  {
2486  ComponentIpcSerializableBuffer buffer;
2487  // Serialize the message type, port number, state ID, and signal
2488  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_unexpected), buffer);
2489  // Send the message and handle overflow
2490  this->sequencer_sendSignalFinish(buffer);
2491  }
2492 
2495  {
2496  ComponentIpcSerializableBuffer buffer;
2497  // Serialize the message type, port number, state ID, and signal
2498  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkStatementTimeout_statementTimeout), buffer);
2499  // Send the message and handle overflow
2500  this->sequencer_sendSignalFinish(buffer);
2501  }
2502 
2505  {
2506  ComponentIpcSerializableBuffer buffer;
2507  // Serialize the message type, port number, state ID, and signal
2508  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkStatementTimeout_noTimeout), buffer);
2509  // Send the message and handle overflow
2510  this->sequencer_sendSignalFinish(buffer);
2511  }
2512 
2515  {
2516  ComponentIpcSerializableBuffer buffer;
2517  // Serialize the message type, port number, state ID, and signal
2518  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_CONTINUE), buffer);
2519  // Send the message and handle overflow
2520  this->sequencer_sendSignalFinish(buffer);
2521  }
2522 
2525  {
2526  ComponentIpcSerializableBuffer buffer;
2527  // Serialize the message type, port number, state ID, and signal
2528  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_BREAK), buffer);
2529  // Serialize the signal data
2530  const Fw::SerializeStatus status = buffer.serialize(value);
2531  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2532  // Send the message and handle overflow
2533  this->sequencer_sendSignalFinish(buffer);
2534  }
2535 
2536  // ----------------------------------------------------------------------
2537  // Command response
2538  // ----------------------------------------------------------------------
2539 
2542  FwOpcodeType opCode,
2543  U32 cmdSeq,
2544  Fw::CmdResponse response
2545  )
2546  {
2547  FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
2548  this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
2549  }
2550 
2551  // ----------------------------------------------------------------------
2552  // Command handler base-class functions
2553  //
2554  // Call these functions directly to bypass the command input port
2555  // ----------------------------------------------------------------------
2556 
2559  FwOpcodeType opCode,
2560  U32 cmdSeq,
2561  Fw::CmdArgBuffer& args
2562  )
2563  {
2564  // Call pre-message hook
2565  this->RUN_preMsgHook(opCode,cmdSeq);
2566 
2567  // Defer deserializing arguments to the message dispatcher
2568  // to avoid deserializing and reserializing just for IPC
2569  ComponentIpcSerializableBuffer msg;
2571 
2572  // Serialize for IPC
2573  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_RUN));
2574  FW_ASSERT (
2575  _status == Fw::FW_SERIALIZE_OK,
2576  static_cast<FwAssertArgType>(_status)
2577  );
2578 
2579  // Fake port number to make message dequeue work
2580  FwIndexType port = 0;
2581 
2582  _status = msg.serialize(port);
2583  FW_ASSERT (
2584  _status == Fw::FW_SERIALIZE_OK,
2585  static_cast<FwAssertArgType>(_status)
2586  );
2587 
2588  _status = msg.serialize(opCode);
2589  FW_ASSERT (
2590  _status == Fw::FW_SERIALIZE_OK,
2591  static_cast<FwAssertArgType>(_status)
2592  );
2593 
2594  _status = msg.serialize(cmdSeq);
2595  FW_ASSERT (
2596  _status == Fw::FW_SERIALIZE_OK,
2597  static_cast<FwAssertArgType>(_status)
2598  );
2599 
2600  _status = msg.serialize(args);
2601  FW_ASSERT (
2602  _status == Fw::FW_SERIALIZE_OK,
2603  static_cast<FwAssertArgType>(_status)
2604  );
2605 
2606  // Send message
2608  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2609 
2610  FW_ASSERT(
2611  qStatus == Os::Queue::OP_OK,
2612  static_cast<FwAssertArgType>(qStatus)
2613  );
2614  }
2615 
2618  FwOpcodeType opCode,
2619  U32 cmdSeq,
2620  Fw::CmdArgBuffer& args
2621  )
2622  {
2623  // Call pre-message hook
2624  this->VALIDATE_preMsgHook(opCode,cmdSeq);
2625 
2626  // Defer deserializing arguments to the message dispatcher
2627  // to avoid deserializing and reserializing just for IPC
2628  ComponentIpcSerializableBuffer msg;
2630 
2631  // Serialize for IPC
2632  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_VALIDATE));
2633  FW_ASSERT (
2634  _status == Fw::FW_SERIALIZE_OK,
2635  static_cast<FwAssertArgType>(_status)
2636  );
2637 
2638  // Fake port number to make message dequeue work
2639  FwIndexType port = 0;
2640 
2641  _status = msg.serialize(port);
2642  FW_ASSERT (
2643  _status == Fw::FW_SERIALIZE_OK,
2644  static_cast<FwAssertArgType>(_status)
2645  );
2646 
2647  _status = msg.serialize(opCode);
2648  FW_ASSERT (
2649  _status == Fw::FW_SERIALIZE_OK,
2650  static_cast<FwAssertArgType>(_status)
2651  );
2652 
2653  _status = msg.serialize(cmdSeq);
2654  FW_ASSERT (
2655  _status == Fw::FW_SERIALIZE_OK,
2656  static_cast<FwAssertArgType>(_status)
2657  );
2658 
2659  _status = msg.serialize(args);
2660  FW_ASSERT (
2661  _status == Fw::FW_SERIALIZE_OK,
2662  static_cast<FwAssertArgType>(_status)
2663  );
2664 
2665  // Send message
2667  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2668 
2669  FW_ASSERT(
2670  qStatus == Os::Queue::OP_OK,
2671  static_cast<FwAssertArgType>(qStatus)
2672  );
2673  }
2674 
2677  FwOpcodeType opCode,
2678  U32 cmdSeq,
2679  Fw::CmdArgBuffer& args
2680  )
2681  {
2682  // Call pre-message hook
2683  this->RUN_VALIDATED_preMsgHook(opCode,cmdSeq);
2684 
2685  // Defer deserializing arguments to the message dispatcher
2686  // to avoid deserializing and reserializing just for IPC
2687  ComponentIpcSerializableBuffer msg;
2689 
2690  // Serialize for IPC
2691  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_RUN_VALIDATED));
2692  FW_ASSERT (
2693  _status == Fw::FW_SERIALIZE_OK,
2694  static_cast<FwAssertArgType>(_status)
2695  );
2696 
2697  // Fake port number to make message dequeue work
2698  FwIndexType port = 0;
2699 
2700  _status = msg.serialize(port);
2701  FW_ASSERT (
2702  _status == Fw::FW_SERIALIZE_OK,
2703  static_cast<FwAssertArgType>(_status)
2704  );
2705 
2706  _status = msg.serialize(opCode);
2707  FW_ASSERT (
2708  _status == Fw::FW_SERIALIZE_OK,
2709  static_cast<FwAssertArgType>(_status)
2710  );
2711 
2712  _status = msg.serialize(cmdSeq);
2713  FW_ASSERT (
2714  _status == Fw::FW_SERIALIZE_OK,
2715  static_cast<FwAssertArgType>(_status)
2716  );
2717 
2718  _status = msg.serialize(args);
2719  FW_ASSERT (
2720  _status == Fw::FW_SERIALIZE_OK,
2721  static_cast<FwAssertArgType>(_status)
2722  );
2723 
2724  // Send message
2726  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2727 
2728  FW_ASSERT(
2729  qStatus == Os::Queue::OP_OK,
2730  static_cast<FwAssertArgType>(qStatus)
2731  );
2732  }
2733 
2736  FwOpcodeType opCode,
2737  U32 cmdSeq,
2738  Fw::CmdArgBuffer& args
2739  )
2740  {
2741  // Call pre-message hook
2742  this->CANCEL_preMsgHook(opCode,cmdSeq);
2743 
2744  // Defer deserializing arguments to the message dispatcher
2745  // to avoid deserializing and reserializing just for IPC
2746  ComponentIpcSerializableBuffer msg;
2748 
2749  // Serialize for IPC
2750  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CANCEL));
2751  FW_ASSERT (
2752  _status == Fw::FW_SERIALIZE_OK,
2753  static_cast<FwAssertArgType>(_status)
2754  );
2755 
2756  // Fake port number to make message dequeue work
2757  FwIndexType port = 0;
2758 
2759  _status = msg.serialize(port);
2760  FW_ASSERT (
2761  _status == Fw::FW_SERIALIZE_OK,
2762  static_cast<FwAssertArgType>(_status)
2763  );
2764 
2765  _status = msg.serialize(opCode);
2766  FW_ASSERT (
2767  _status == Fw::FW_SERIALIZE_OK,
2768  static_cast<FwAssertArgType>(_status)
2769  );
2770 
2771  _status = msg.serialize(cmdSeq);
2772  FW_ASSERT (
2773  _status == Fw::FW_SERIALIZE_OK,
2774  static_cast<FwAssertArgType>(_status)
2775  );
2776 
2777  _status = msg.serialize(args);
2778  FW_ASSERT (
2779  _status == Fw::FW_SERIALIZE_OK,
2780  static_cast<FwAssertArgType>(_status)
2781  );
2782 
2783  // Send message
2785  Os::Queue::Status qStatus = this->m_queue.send(msg, 8, _block);
2786 
2787  FW_ASSERT(
2788  qStatus == Os::Queue::OP_OK,
2789  static_cast<FwAssertArgType>(qStatus)
2790  );
2791  }
2792 
2795  FwOpcodeType opCode,
2796  U32 cmdSeq,
2797  Fw::CmdArgBuffer& args
2798  )
2799  {
2800  // Call pre-message hook
2801  this->DEBUG_SET_BREAKPOINT_preMsgHook(opCode,cmdSeq);
2802 
2803  // Defer deserializing arguments to the message dispatcher
2804  // to avoid deserializing and reserializing just for IPC
2805  ComponentIpcSerializableBuffer msg;
2807 
2808  // Serialize for IPC
2809  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_SET_BREAKPOINT));
2810  FW_ASSERT (
2811  _status == Fw::FW_SERIALIZE_OK,
2812  static_cast<FwAssertArgType>(_status)
2813  );
2814 
2815  // Fake port number to make message dequeue work
2816  FwIndexType port = 0;
2817 
2818  _status = msg.serialize(port);
2819  FW_ASSERT (
2820  _status == Fw::FW_SERIALIZE_OK,
2821  static_cast<FwAssertArgType>(_status)
2822  );
2823 
2824  _status = msg.serialize(opCode);
2825  FW_ASSERT (
2826  _status == Fw::FW_SERIALIZE_OK,
2827  static_cast<FwAssertArgType>(_status)
2828  );
2829 
2830  _status = msg.serialize(cmdSeq);
2831  FW_ASSERT (
2832  _status == Fw::FW_SERIALIZE_OK,
2833  static_cast<FwAssertArgType>(_status)
2834  );
2835 
2836  _status = msg.serialize(args);
2837  FW_ASSERT (
2838  _status == Fw::FW_SERIALIZE_OK,
2839  static_cast<FwAssertArgType>(_status)
2840  );
2841 
2842  // Send message
2844  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2845 
2846  FW_ASSERT(
2847  qStatus == Os::Queue::OP_OK,
2848  static_cast<FwAssertArgType>(qStatus)
2849  );
2850  }
2851 
2854  FwOpcodeType opCode,
2855  U32 cmdSeq,
2856  Fw::CmdArgBuffer& args
2857  )
2858  {
2859  // Call pre-message hook
2860  this->DEBUG_BREAK_preMsgHook(opCode,cmdSeq);
2861 
2862  // Defer deserializing arguments to the message dispatcher
2863  // to avoid deserializing and reserializing just for IPC
2864  ComponentIpcSerializableBuffer msg;
2866 
2867  // Serialize for IPC
2868  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_BREAK));
2869  FW_ASSERT (
2870  _status == Fw::FW_SERIALIZE_OK,
2871  static_cast<FwAssertArgType>(_status)
2872  );
2873 
2874  // Fake port number to make message dequeue work
2875  FwIndexType port = 0;
2876 
2877  _status = msg.serialize(port);
2878  FW_ASSERT (
2879  _status == Fw::FW_SERIALIZE_OK,
2880  static_cast<FwAssertArgType>(_status)
2881  );
2882 
2883  _status = msg.serialize(opCode);
2884  FW_ASSERT (
2885  _status == Fw::FW_SERIALIZE_OK,
2886  static_cast<FwAssertArgType>(_status)
2887  );
2888 
2889  _status = msg.serialize(cmdSeq);
2890  FW_ASSERT (
2891  _status == Fw::FW_SERIALIZE_OK,
2892  static_cast<FwAssertArgType>(_status)
2893  );
2894 
2895  _status = msg.serialize(args);
2896  FW_ASSERT (
2897  _status == Fw::FW_SERIALIZE_OK,
2898  static_cast<FwAssertArgType>(_status)
2899  );
2900 
2901  // Send message
2903  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2904 
2905  FW_ASSERT(
2906  qStatus == Os::Queue::OP_OK,
2907  static_cast<FwAssertArgType>(qStatus)
2908  );
2909  }
2910 
2913  FwOpcodeType opCode,
2914  U32 cmdSeq,
2915  Fw::CmdArgBuffer& args
2916  )
2917  {
2918  // Call pre-message hook
2919  this->DEBUG_CONTINUE_preMsgHook(opCode,cmdSeq);
2920 
2921  // Defer deserializing arguments to the message dispatcher
2922  // to avoid deserializing and reserializing just for IPC
2923  ComponentIpcSerializableBuffer msg;
2925 
2926  // Serialize for IPC
2927  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_CONTINUE));
2928  FW_ASSERT (
2929  _status == Fw::FW_SERIALIZE_OK,
2930  static_cast<FwAssertArgType>(_status)
2931  );
2932 
2933  // Fake port number to make message dequeue work
2934  FwIndexType port = 0;
2935 
2936  _status = msg.serialize(port);
2937  FW_ASSERT (
2938  _status == Fw::FW_SERIALIZE_OK,
2939  static_cast<FwAssertArgType>(_status)
2940  );
2941 
2942  _status = msg.serialize(opCode);
2943  FW_ASSERT (
2944  _status == Fw::FW_SERIALIZE_OK,
2945  static_cast<FwAssertArgType>(_status)
2946  );
2947 
2948  _status = msg.serialize(cmdSeq);
2949  FW_ASSERT (
2950  _status == Fw::FW_SERIALIZE_OK,
2951  static_cast<FwAssertArgType>(_status)
2952  );
2953 
2954  _status = msg.serialize(args);
2955  FW_ASSERT (
2956  _status == Fw::FW_SERIALIZE_OK,
2957  static_cast<FwAssertArgType>(_status)
2958  );
2959 
2960  // Send message
2962  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
2963 
2964  FW_ASSERT(
2965  qStatus == Os::Queue::OP_OK,
2966  static_cast<FwAssertArgType>(qStatus)
2967  );
2968  }
2969 
2972  FwOpcodeType opCode,
2973  U32 cmdSeq,
2974  Fw::CmdArgBuffer& args
2975  )
2976  {
2977  // Call pre-message hook
2978  this->DEBUG_CLEAR_BREAKPOINT_preMsgHook(opCode,cmdSeq);
2979 
2980  // Defer deserializing arguments to the message dispatcher
2981  // to avoid deserializing and reserializing just for IPC
2982  ComponentIpcSerializableBuffer msg;
2984 
2985  // Serialize for IPC
2986  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_CLEAR_BREAKPOINT));
2987  FW_ASSERT (
2988  _status == Fw::FW_SERIALIZE_OK,
2989  static_cast<FwAssertArgType>(_status)
2990  );
2991 
2992  // Fake port number to make message dequeue work
2993  FwIndexType port = 0;
2994 
2995  _status = msg.serialize(port);
2996  FW_ASSERT (
2997  _status == Fw::FW_SERIALIZE_OK,
2998  static_cast<FwAssertArgType>(_status)
2999  );
3000 
3001  _status = msg.serialize(opCode);
3002  FW_ASSERT (
3003  _status == Fw::FW_SERIALIZE_OK,
3004  static_cast<FwAssertArgType>(_status)
3005  );
3006 
3007  _status = msg.serialize(cmdSeq);
3008  FW_ASSERT (
3009  _status == Fw::FW_SERIALIZE_OK,
3010  static_cast<FwAssertArgType>(_status)
3011  );
3012 
3013  _status = msg.serialize(args);
3014  FW_ASSERT (
3015  _status == Fw::FW_SERIALIZE_OK,
3016  static_cast<FwAssertArgType>(_status)
3017  );
3018 
3019  // Send message
3021  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3022 
3023  FW_ASSERT(
3024  qStatus == Os::Queue::OP_OK,
3025  static_cast<FwAssertArgType>(qStatus)
3026  );
3027  }
3028 
3029  // ----------------------------------------------------------------------
3030  // Pre-message hooks for async commands
3031  //
3032  // Each of these functions is invoked just before processing the
3033  // corresponding command. By default they do nothing. You can
3034  // override them to provide specific pre-command behavior.
3035  // ----------------------------------------------------------------------
3036 
3039  FwOpcodeType opCode,
3040  U32 cmdSeq
3041  )
3042  {
3043  // Defaults to no-op; can be overridden
3044  (void) opCode;
3045  (void) cmdSeq;
3046  }
3047 
3050  FwOpcodeType opCode,
3051  U32 cmdSeq
3052  )
3053  {
3054  // Defaults to no-op; can be overridden
3055  (void) opCode;
3056  (void) cmdSeq;
3057  }
3058 
3061  FwOpcodeType opCode,
3062  U32 cmdSeq
3063  )
3064  {
3065  // Defaults to no-op; can be overridden
3066  (void) opCode;
3067  (void) cmdSeq;
3068  }
3069 
3072  FwOpcodeType opCode,
3073  U32 cmdSeq
3074  )
3075  {
3076  // Defaults to no-op; can be overridden
3077  (void) opCode;
3078  (void) cmdSeq;
3079  }
3080 
3083  FwOpcodeType opCode,
3084  U32 cmdSeq
3085  )
3086  {
3087  // Defaults to no-op; can be overridden
3088  (void) opCode;
3089  (void) cmdSeq;
3090  }
3091 
3094  FwOpcodeType opCode,
3095  U32 cmdSeq
3096  )
3097  {
3098  // Defaults to no-op; can be overridden
3099  (void) opCode;
3100  (void) cmdSeq;
3101  }
3102 
3105  FwOpcodeType opCode,
3106  U32 cmdSeq
3107  )
3108  {
3109  // Defaults to no-op; can be overridden
3110  (void) opCode;
3111  (void) cmdSeq;
3112  }
3113 
3116  FwOpcodeType opCode,
3117  U32 cmdSeq
3118  )
3119  {
3120  // Defaults to no-op; can be overridden
3121  (void) opCode;
3122  (void) cmdSeq;
3123  }
3124 
3125  // ----------------------------------------------------------------------
3126  // Event logging functions
3127  // ----------------------------------------------------------------------
3128 
3131  {
3132  // Get the time
3133  Fw::Time _logTime;
3134  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3135  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3136  }
3137 
3138  FwEventIdType _id = static_cast<FwEventIdType>(0);
3139 
3140  _id = this->getIdBase() + EVENTID_INVALIDCOMMAND;
3141 
3142  // Emit the event on the log port
3143  if (this->m_logOut_OutputPort[0].isConnected()) {
3144  Fw::LogBuffer _logBuff;
3146 
3147 #if FW_AMPCS_COMPATIBLE
3148  // Serialize the number of arguments
3149  _status = _logBuff.serialize(static_cast<U8>(1));
3150  FW_ASSERT(
3151  _status == Fw::FW_SERIALIZE_OK,
3152  static_cast<FwAssertArgType>(_status)
3153  );
3154 #endif
3155 
3156 #if FW_AMPCS_COMPATIBLE
3157  // Serialize the argument size
3158  _status = _logBuff.serialize(
3159  static_cast<U8>(sizeof(I32))
3160  );
3161  FW_ASSERT(
3162  _status == Fw::FW_SERIALIZE_OK,
3163  static_cast<FwAssertArgType>(_status)
3164  );
3165 #endif
3166  _status = _logBuff.serialize(state);
3167  FW_ASSERT(
3168  _status == Fw::FW_SERIALIZE_OK,
3169  static_cast<FwAssertArgType>(_status)
3170  );
3171 
3172  this->m_logOut_OutputPort[0].invoke(
3173  _id,
3174  _logTime,
3176  _logBuff
3177  );
3178  }
3179 
3180  // Emit the event on the text log port
3181 #if FW_ENABLE_TEXT_LOGGING
3182  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3183 #if FW_OBJECT_NAMES == 1
3184  const char* _formatString =
3185  "(%s) %s: Cannot run command in state %" PRIi32 "";
3186 #else
3187  const char* _formatString =
3188  "%s: Cannot run command in state %" PRIi32 "";
3189 #endif
3190 
3191  Fw::TextLogString _logString;
3192  _logString.format(
3193  _formatString,
3194 #if FW_OBJECT_NAMES == 1
3195  this->m_objName.toChar(),
3196 #endif
3197  "InvalidCommand ",
3198  state
3199  );
3200 
3201  this->m_logTextOut_OutputPort[0].invoke(
3202  _id,
3203  _logTime,
3205  _logString
3206  );
3207  }
3208 #endif
3209  }
3210 
3213  {
3214  // Get the time
3215  Fw::Time _logTime;
3216  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3217  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3218  }
3219 
3220  FwEventIdType _id = static_cast<FwEventIdType>(0);
3221 
3222  _id = this->getIdBase() + EVENTID_INVALIDSEQRUNCALL;
3223 
3224  // Emit the event on the log port
3225  if (this->m_logOut_OutputPort[0].isConnected()) {
3226  Fw::LogBuffer _logBuff;
3228 
3229 #if FW_AMPCS_COMPATIBLE
3230  // Serialize the number of arguments
3231  _status = _logBuff.serialize(static_cast<U8>(1));
3232  FW_ASSERT(
3233  _status == Fw::FW_SERIALIZE_OK,
3234  static_cast<FwAssertArgType>(_status)
3235  );
3236 #endif
3237 
3238 #if FW_AMPCS_COMPATIBLE
3239  // Serialize the argument size
3240  _status = _logBuff.serialize(
3241  static_cast<U8>(sizeof(I32))
3242  );
3243  FW_ASSERT(
3244  _status == Fw::FW_SERIALIZE_OK,
3245  static_cast<FwAssertArgType>(_status)
3246  );
3247 #endif
3248  _status = _logBuff.serialize(state);
3249  FW_ASSERT(
3250  _status == Fw::FW_SERIALIZE_OK,
3251  static_cast<FwAssertArgType>(_status)
3252  );
3253 
3254  this->m_logOut_OutputPort[0].invoke(
3255  _id,
3256  _logTime,
3258  _logBuff
3259  );
3260  }
3261 
3262  // Emit the event on the text log port
3263 #if FW_ENABLE_TEXT_LOGGING
3264  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3265 #if FW_OBJECT_NAMES == 1
3266  const char* _formatString =
3267  "(%s) %s: Cannot run sequence from a port in state %" PRIi32 "";
3268 #else
3269  const char* _formatString =
3270  "%s: Cannot run sequence from a port in state %" PRIi32 "";
3271 #endif
3272 
3273  Fw::TextLogString _logString;
3274  _logString.format(
3275  _formatString,
3276 #if FW_OBJECT_NAMES == 1
3277  this->m_objName.toChar(),
3278 #endif
3279  "InvalidSeqRunCall ",
3280  state
3281  );
3282 
3283  this->m_logTextOut_OutputPort[0].invoke(
3284  _id,
3285  _logTime,
3287  _logString
3288  );
3289  }
3290 #endif
3291  }
3292 
3295  const Fw::StringBase& filePath,
3296  I32 errorCode
3297  ) const
3298  {
3299  // Get the time
3300  Fw::Time _logTime;
3301  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3302  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3303  }
3304 
3305  FwEventIdType _id = static_cast<FwEventIdType>(0);
3306 
3307  _id = this->getIdBase() + EVENTID_FILEOPENERROR;
3308 
3309  // Emit the event on the log port
3310  if (this->m_logOut_OutputPort[0].isConnected()) {
3311  Fw::LogBuffer _logBuff;
3313 
3314 #if FW_AMPCS_COMPATIBLE
3315  // Serialize the number of arguments
3316  _status = _logBuff.serialize(static_cast<U8>(2));
3317  FW_ASSERT(
3318  _status == Fw::FW_SERIALIZE_OK,
3319  static_cast<FwAssertArgType>(_status)
3320  );
3321 #endif
3322 
3323  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3324  FW_ASSERT(
3325  _status == Fw::FW_SERIALIZE_OK,
3326  static_cast<FwAssertArgType>(_status)
3327  );
3328 
3329 #if FW_AMPCS_COMPATIBLE
3330  // Serialize the argument size
3331  _status = _logBuff.serialize(
3332  static_cast<U8>(sizeof(I32))
3333  );
3334  FW_ASSERT(
3335  _status == Fw::FW_SERIALIZE_OK,
3336  static_cast<FwAssertArgType>(_status)
3337  );
3338 #endif
3339  _status = _logBuff.serialize(errorCode);
3340  FW_ASSERT(
3341  _status == Fw::FW_SERIALIZE_OK,
3342  static_cast<FwAssertArgType>(_status)
3343  );
3344 
3345  this->m_logOut_OutputPort[0].invoke(
3346  _id,
3347  _logTime,
3349  _logBuff
3350  );
3351  }
3352 
3353  // Emit the event on the text log port
3354 #if FW_ENABLE_TEXT_LOGGING
3355  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3356 #if FW_OBJECT_NAMES == 1
3357  const char* _formatString =
3358  "(%s) %s: File open error encountered while opening %s: %" PRIi32 "";
3359 #else
3360  const char* _formatString =
3361  "%s: File open error encountered while opening %s: %" PRIi32 "";
3362 #endif
3363 
3364  Fw::TextLogString _logString;
3365  _logString.format(
3366  _formatString,
3367 #if FW_OBJECT_NAMES == 1
3368  this->m_objName.toChar(),
3369 #endif
3370  "FileOpenError ",
3371  filePath.toChar(),
3372  errorCode
3373  );
3374 
3375  this->m_logTextOut_OutputPort[0].invoke(
3376  _id,
3377  _logTime,
3379  _logString
3380  );
3381  }
3382 #endif
3383  }
3384 
3387  const Fw::StringBase& filePath,
3388  I32 errorCode
3389  ) const
3390  {
3391  // Get the time
3392  Fw::Time _logTime;
3393  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3394  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3395  }
3396 
3397  FwEventIdType _id = static_cast<FwEventIdType>(0);
3398 
3399  _id = this->getIdBase() + EVENTID_FILEREADERROR;
3400 
3401  // Emit the event on the log port
3402  if (this->m_logOut_OutputPort[0].isConnected()) {
3403  Fw::LogBuffer _logBuff;
3405 
3406 #if FW_AMPCS_COMPATIBLE
3407  // Serialize the number of arguments
3408  _status = _logBuff.serialize(static_cast<U8>(2));
3409  FW_ASSERT(
3410  _status == Fw::FW_SERIALIZE_OK,
3411  static_cast<FwAssertArgType>(_status)
3412  );
3413 #endif
3414 
3415  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3416  FW_ASSERT(
3417  _status == Fw::FW_SERIALIZE_OK,
3418  static_cast<FwAssertArgType>(_status)
3419  );
3420 
3421 #if FW_AMPCS_COMPATIBLE
3422  // Serialize the argument size
3423  _status = _logBuff.serialize(
3424  static_cast<U8>(sizeof(I32))
3425  );
3426  FW_ASSERT(
3427  _status == Fw::FW_SERIALIZE_OK,
3428  static_cast<FwAssertArgType>(_status)
3429  );
3430 #endif
3431  _status = _logBuff.serialize(errorCode);
3432  FW_ASSERT(
3433  _status == Fw::FW_SERIALIZE_OK,
3434  static_cast<FwAssertArgType>(_status)
3435  );
3436 
3437  this->m_logOut_OutputPort[0].invoke(
3438  _id,
3439  _logTime,
3441  _logBuff
3442  );
3443  }
3444 
3445  // Emit the event on the text log port
3446 #if FW_ENABLE_TEXT_LOGGING
3447  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3448 #if FW_OBJECT_NAMES == 1
3449  const char* _formatString =
3450  "(%s) %s: File read error encountered while reading %s: %" PRIi32 "";
3451 #else
3452  const char* _formatString =
3453  "%s: File read error encountered while reading %s: %" PRIi32 "";
3454 #endif
3455 
3456  Fw::TextLogString _logString;
3457  _logString.format(
3458  _formatString,
3459 #if FW_OBJECT_NAMES == 1
3460  this->m_objName.toChar(),
3461 #endif
3462  "FileReadError ",
3463  filePath.toChar(),
3464  errorCode
3465  );
3466 
3467  this->m_logTextOut_OutputPort[0].invoke(
3468  _id,
3469  _logTime,
3471  _logString
3472  );
3473  }
3474 #endif
3475  }
3476 
3479  {
3480  // Get the time
3481  Fw::Time _logTime;
3482  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3483  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3484  }
3485 
3486  FwEventIdType _id = static_cast<FwEventIdType>(0);
3487 
3488  _id = this->getIdBase() + EVENTID_ENDOFFILEERROR;
3489 
3490  // Emit the event on the log port
3491  if (this->m_logOut_OutputPort[0].isConnected()) {
3492  Fw::LogBuffer _logBuff;
3494 
3495 #if FW_AMPCS_COMPATIBLE
3496  // Serialize the number of arguments
3497  _status = _logBuff.serialize(static_cast<U8>(1));
3498  FW_ASSERT(
3499  _status == Fw::FW_SERIALIZE_OK,
3500  static_cast<FwAssertArgType>(_status)
3501  );
3502 #endif
3503 
3504  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3505  FW_ASSERT(
3506  _status == Fw::FW_SERIALIZE_OK,
3507  static_cast<FwAssertArgType>(_status)
3508  );
3509 
3510  this->m_logOut_OutputPort[0].invoke(
3511  _id,
3512  _logTime,
3514  _logBuff
3515  );
3516  }
3517 
3518  // Emit the event on the text log port
3519 #if FW_ENABLE_TEXT_LOGGING
3520  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3521 #if FW_OBJECT_NAMES == 1
3522  const char* _formatString =
3523  "(%s) %s: End of file encountered unexpectedly while reading %s";
3524 #else
3525  const char* _formatString =
3526  "%s: End of file encountered unexpectedly while reading %s";
3527 #endif
3528 
3529  Fw::TextLogString _logString;
3530  _logString.format(
3531  _formatString,
3532 #if FW_OBJECT_NAMES == 1
3533  this->m_objName.toChar(),
3534 #endif
3535  "EndOfFileError ",
3536  filePath.toChar()
3537  );
3538 
3539  this->m_logTextOut_OutputPort[0].invoke(
3540  _id,
3541  _logTime,
3543  _logString
3544  );
3545  }
3546 #endif
3547  }
3548 
3551  const Fw::StringBase& filePath,
3552  I32 errorCode,
3553  U64 buffLeft,
3554  U64 buffLength
3555  ) const
3556  {
3557  // Get the time
3558  Fw::Time _logTime;
3559  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3560  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3561  }
3562 
3563  FwEventIdType _id = static_cast<FwEventIdType>(0);
3564 
3566 
3567  // Emit the event on the log port
3568  if (this->m_logOut_OutputPort[0].isConnected()) {
3569  Fw::LogBuffer _logBuff;
3571 
3572 #if FW_AMPCS_COMPATIBLE
3573  // Serialize the number of arguments
3574  _status = _logBuff.serialize(static_cast<U8>(4));
3575  FW_ASSERT(
3576  _status == Fw::FW_SERIALIZE_OK,
3577  static_cast<FwAssertArgType>(_status)
3578  );
3579 #endif
3580 
3581  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3582  FW_ASSERT(
3583  _status == Fw::FW_SERIALIZE_OK,
3584  static_cast<FwAssertArgType>(_status)
3585  );
3586 
3587 #if FW_AMPCS_COMPATIBLE
3588  // Serialize the argument size
3589  _status = _logBuff.serialize(
3590  static_cast<U8>(sizeof(I32))
3591  );
3592  FW_ASSERT(
3593  _status == Fw::FW_SERIALIZE_OK,
3594  static_cast<FwAssertArgType>(_status)
3595  );
3596 #endif
3597  _status = _logBuff.serialize(errorCode);
3598  FW_ASSERT(
3599  _status == Fw::FW_SERIALIZE_OK,
3600  static_cast<FwAssertArgType>(_status)
3601  );
3602 
3603 #if FW_AMPCS_COMPATIBLE
3604  // Serialize the argument size
3605  _status = _logBuff.serialize(
3606  static_cast<U8>(sizeof(U64))
3607  );
3608  FW_ASSERT(
3609  _status == Fw::FW_SERIALIZE_OK,
3610  static_cast<FwAssertArgType>(_status)
3611  );
3612 #endif
3613  _status = _logBuff.serialize(buffLeft);
3614  FW_ASSERT(
3615  _status == Fw::FW_SERIALIZE_OK,
3616  static_cast<FwAssertArgType>(_status)
3617  );
3618 
3619 #if FW_AMPCS_COMPATIBLE
3620  // Serialize the argument size
3621  _status = _logBuff.serialize(
3622  static_cast<U8>(sizeof(U64))
3623  );
3624  FW_ASSERT(
3625  _status == Fw::FW_SERIALIZE_OK,
3626  static_cast<FwAssertArgType>(_status)
3627  );
3628 #endif
3629  _status = _logBuff.serialize(buffLength);
3630  FW_ASSERT(
3631  _status == Fw::FW_SERIALIZE_OK,
3632  static_cast<FwAssertArgType>(_status)
3633  );
3634 
3635  this->m_logOut_OutputPort[0].invoke(
3636  _id,
3637  _logTime,
3639  _logBuff
3640  );
3641  }
3642 
3643  // Emit the event on the text log port
3644 #if FW_ENABLE_TEXT_LOGGING
3645  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3646 #if FW_OBJECT_NAMES == 1
3647  const char* _formatString =
3648  "(%s) %s: Deserialize error encountered while reading %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
3649 #else
3650  const char* _formatString =
3651  "%s: Deserialize error encountered while reading %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
3652 #endif
3653 
3654  Fw::TextLogString _logString;
3655  _logString.format(
3656  _formatString,
3657 #if FW_OBJECT_NAMES == 1
3658  this->m_objName.toChar(),
3659 #endif
3660  "FileReadDeserializeError ",
3661  filePath.toChar(),
3662  errorCode,
3663  buffLeft,
3664  buffLength
3665  );
3666 
3667  this->m_logTextOut_OutputPort[0].invoke(
3668  _id,
3669  _logTime,
3671  _logString
3672  );
3673  }
3674 #endif
3675  }
3676 
3679  U8 expected,
3680  U8 actual
3681  ) const
3682  {
3683  // Get the time
3684  Fw::Time _logTime;
3685  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3686  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3687  }
3688 
3689  FwEventIdType _id = static_cast<FwEventIdType>(0);
3690 
3691  _id = this->getIdBase() + EVENTID_WRONGSCHEMAVERSION;
3692 
3693  // Emit the event on the log port
3694  if (this->m_logOut_OutputPort[0].isConnected()) {
3695  Fw::LogBuffer _logBuff;
3697 
3698 #if FW_AMPCS_COMPATIBLE
3699  // Serialize the number of arguments
3700  _status = _logBuff.serialize(static_cast<U8>(2));
3701  FW_ASSERT(
3702  _status == Fw::FW_SERIALIZE_OK,
3703  static_cast<FwAssertArgType>(_status)
3704  );
3705 #endif
3706 
3707 #if FW_AMPCS_COMPATIBLE
3708  // Serialize the argument size
3709  _status = _logBuff.serialize(
3710  static_cast<U8>(sizeof(U8))
3711  );
3712  FW_ASSERT(
3713  _status == Fw::FW_SERIALIZE_OK,
3714  static_cast<FwAssertArgType>(_status)
3715  );
3716 #endif
3717  _status = _logBuff.serialize(expected);
3718  FW_ASSERT(
3719  _status == Fw::FW_SERIALIZE_OK,
3720  static_cast<FwAssertArgType>(_status)
3721  );
3722 
3723 #if FW_AMPCS_COMPATIBLE
3724  // Serialize the argument size
3725  _status = _logBuff.serialize(
3726  static_cast<U8>(sizeof(U8))
3727  );
3728  FW_ASSERT(
3729  _status == Fw::FW_SERIALIZE_OK,
3730  static_cast<FwAssertArgType>(_status)
3731  );
3732 #endif
3733  _status = _logBuff.serialize(actual);
3734  FW_ASSERT(
3735  _status == Fw::FW_SERIALIZE_OK,
3736  static_cast<FwAssertArgType>(_status)
3737  );
3738 
3739  this->m_logOut_OutputPort[0].invoke(
3740  _id,
3741  _logTime,
3743  _logBuff
3744  );
3745  }
3746 
3747  // Emit the event on the text log port
3748 #if FW_ENABLE_TEXT_LOGGING
3749  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3750 #if FW_OBJECT_NAMES == 1
3751  const char* _formatString =
3752  "(%s) %s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
3753 #else
3754  const char* _formatString =
3755  "%s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
3756 #endif
3757 
3758  Fw::TextLogString _logString;
3759  _logString.format(
3760  _formatString,
3761 #if FW_OBJECT_NAMES == 1
3762  this->m_objName.toChar(),
3763 #endif
3764  "WrongSchemaVersion ",
3765  expected,
3766  actual
3767  );
3768 
3769  this->m_logTextOut_OutputPort[0].invoke(
3770  _id,
3771  _logTime,
3773  _logString
3774  );
3775  }
3776 #endif
3777  }
3778 
3781  U32 expected,
3782  U32 actual
3783  ) const
3784  {
3785  // Get the time
3786  Fw::Time _logTime;
3787  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3788  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3789  }
3790 
3791  FwEventIdType _id = static_cast<FwEventIdType>(0);
3792 
3793  _id = this->getIdBase() + EVENTID_WRONGCRC;
3794 
3795  // Emit the event on the log port
3796  if (this->m_logOut_OutputPort[0].isConnected()) {
3797  Fw::LogBuffer _logBuff;
3799 
3800 #if FW_AMPCS_COMPATIBLE
3801  // Serialize the number of arguments
3802  _status = _logBuff.serialize(static_cast<U8>(2));
3803  FW_ASSERT(
3804  _status == Fw::FW_SERIALIZE_OK,
3805  static_cast<FwAssertArgType>(_status)
3806  );
3807 #endif
3808 
3809 #if FW_AMPCS_COMPATIBLE
3810  // Serialize the argument size
3811  _status = _logBuff.serialize(
3812  static_cast<U8>(sizeof(U32))
3813  );
3814  FW_ASSERT(
3815  _status == Fw::FW_SERIALIZE_OK,
3816  static_cast<FwAssertArgType>(_status)
3817  );
3818 #endif
3819  _status = _logBuff.serialize(expected);
3820  FW_ASSERT(
3821  _status == Fw::FW_SERIALIZE_OK,
3822  static_cast<FwAssertArgType>(_status)
3823  );
3824 
3825 #if FW_AMPCS_COMPATIBLE
3826  // Serialize the argument size
3827  _status = _logBuff.serialize(
3828  static_cast<U8>(sizeof(U32))
3829  );
3830  FW_ASSERT(
3831  _status == Fw::FW_SERIALIZE_OK,
3832  static_cast<FwAssertArgType>(_status)
3833  );
3834 #endif
3835  _status = _logBuff.serialize(actual);
3836  FW_ASSERT(
3837  _status == Fw::FW_SERIALIZE_OK,
3838  static_cast<FwAssertArgType>(_status)
3839  );
3840 
3841  this->m_logOut_OutputPort[0].invoke(
3842  _id,
3843  _logTime,
3845  _logBuff
3846  );
3847  }
3848 
3849  // Emit the event on the text log port
3850 #if FW_ENABLE_TEXT_LOGGING
3851  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3852 #if FW_OBJECT_NAMES == 1
3853  const char* _formatString =
3854  "(%s) %s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
3855 #else
3856  const char* _formatString =
3857  "%s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
3858 #endif
3859 
3860  Fw::TextLogString _logString;
3861  _logString.format(
3862  _formatString,
3863 #if FW_OBJECT_NAMES == 1
3864  this->m_objName.toChar(),
3865 #endif
3866  "WrongCRC ",
3867  expected,
3868  actual
3869  );
3870 
3871  this->m_logTextOut_OutputPort[0].invoke(
3872  _id,
3873  _logTime,
3875  _logString
3876  );
3877  }
3878 #endif
3879  }
3880 
3883  {
3884  // Get the time
3885  Fw::Time _logTime;
3886  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3887  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3888  }
3889 
3890  FwEventIdType _id = static_cast<FwEventIdType>(0);
3891 
3892  _id = this->getIdBase() + EVENTID_EXTRABYTESINSEQUENCE;
3893 
3894  // Emit the event on the log port
3895  if (this->m_logOut_OutputPort[0].isConnected()) {
3896  Fw::LogBuffer _logBuff;
3898 
3899 #if FW_AMPCS_COMPATIBLE
3900  // Serialize the number of arguments
3901  _status = _logBuff.serialize(static_cast<U8>(1));
3902  FW_ASSERT(
3903  _status == Fw::FW_SERIALIZE_OK,
3904  static_cast<FwAssertArgType>(_status)
3905  );
3906 #endif
3907 
3908 #if FW_AMPCS_COMPATIBLE
3909  // Serialize the argument size
3910  _status = _logBuff.serialize(
3911  static_cast<U8>(sizeof(U32))
3912  );
3913  FW_ASSERT(
3914  _status == Fw::FW_SERIALIZE_OK,
3915  static_cast<FwAssertArgType>(_status)
3916  );
3917 #endif
3918  _status = _logBuff.serialize(remaining);
3919  FW_ASSERT(
3920  _status == Fw::FW_SERIALIZE_OK,
3921  static_cast<FwAssertArgType>(_status)
3922  );
3923 
3924  this->m_logOut_OutputPort[0].invoke(
3925  _id,
3926  _logTime,
3928  _logBuff
3929  );
3930  }
3931 
3932  // Emit the event on the text log port
3933 #if FW_ENABLE_TEXT_LOGGING
3934  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3935 #if FW_OBJECT_NAMES == 1
3936  const char* _formatString =
3937  "(%s) %s: File had %" PRIu32 " extra bytes at the end";
3938 #else
3939  const char* _formatString =
3940  "%s: File had %" PRIu32 " extra bytes at the end";
3941 #endif
3942 
3943  Fw::TextLogString _logString;
3944  _logString.format(
3945  _formatString,
3946 #if FW_OBJECT_NAMES == 1
3947  this->m_objName.toChar(),
3948 #endif
3949  "ExtraBytesInSequence ",
3950  remaining
3951  );
3952 
3953  this->m_logTextOut_OutputPort[0].invoke(
3954  _id,
3955  _logTime,
3957  _logString
3958  );
3959  }
3960 #endif
3961  }
3962 
3965  U64 bufferSize,
3966  const Fw::StringBase& filePath
3967  ) const
3968  {
3969  // Get the time
3970  Fw::Time _logTime;
3971  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3972  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3973  }
3974 
3975  FwEventIdType _id = static_cast<FwEventIdType>(0);
3976 
3978 
3979  // Emit the event on the log port
3980  if (this->m_logOut_OutputPort[0].isConnected()) {
3981  Fw::LogBuffer _logBuff;
3983 
3984 #if FW_AMPCS_COMPATIBLE
3985  // Serialize the number of arguments
3986  _status = _logBuff.serialize(static_cast<U8>(2));
3987  FW_ASSERT(
3988  _status == Fw::FW_SERIALIZE_OK,
3989  static_cast<FwAssertArgType>(_status)
3990  );
3991 #endif
3992 
3993 #if FW_AMPCS_COMPATIBLE
3994  // Serialize the argument size
3995  _status = _logBuff.serialize(
3996  static_cast<U8>(sizeof(U64))
3997  );
3998  FW_ASSERT(
3999  _status == Fw::FW_SERIALIZE_OK,
4000  static_cast<FwAssertArgType>(_status)
4001  );
4002 #endif
4003  _status = _logBuff.serialize(bufferSize);
4004  FW_ASSERT(
4005  _status == Fw::FW_SERIALIZE_OK,
4006  static_cast<FwAssertArgType>(_status)
4007  );
4008 
4009  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4010  FW_ASSERT(
4011  _status == Fw::FW_SERIALIZE_OK,
4012  static_cast<FwAssertArgType>(_status)
4013  );
4014 
4015  this->m_logOut_OutputPort[0].invoke(
4016  _id,
4017  _logTime,
4019  _logBuff
4020  );
4021  }
4022 
4023  // Emit the event on the text log port
4024 #if FW_ENABLE_TEXT_LOGGING
4025  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4026 #if FW_OBJECT_NAMES == 1
4027  const char* _formatString =
4028  "(%s) %s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4029 #else
4030  const char* _formatString =
4031  "%s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4032 #endif
4033 
4034  Fw::TextLogString _logString;
4035  _logString.format(
4036  _formatString,
4037 #if FW_OBJECT_NAMES == 1
4038  this->m_objName.toChar(),
4039 #endif
4040  "InsufficientBufferSpace ",
4041  bufferSize,
4042  filePath.toChar()
4043  );
4044 
4045  this->m_logTextOut_OutputPort[0].invoke(
4046  _id,
4047  _logTime,
4049  _logString
4050  );
4051  }
4052 #endif
4053  }
4054 
4057  Svc::Fpy::StatementType stmtType,
4058  U32 stmtOpcode,
4059  U32 stmtIdx,
4060  const Fw::StringBase& filePath,
4061  Fw::CmdResponse response
4062  ) const
4063  {
4064  // Get the time
4065  Fw::Time _logTime;
4066  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4067  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4068  }
4069 
4070  FwEventIdType _id = static_cast<FwEventIdType>(0);
4071 
4072  _id = this->getIdBase() + EVENTID_STATEMENTFAILED;
4073 
4074  // Emit the event on the log port
4075  if (this->m_logOut_OutputPort[0].isConnected()) {
4076  Fw::LogBuffer _logBuff;
4078 
4079 #if FW_AMPCS_COMPATIBLE
4080  // Serialize the number of arguments
4081  _status = _logBuff.serialize(static_cast<U8>(5));
4082  FW_ASSERT(
4083  _status == Fw::FW_SERIALIZE_OK,
4084  static_cast<FwAssertArgType>(_status)
4085  );
4086 #endif
4087 
4088 #if FW_AMPCS_COMPATIBLE
4089  // Serialize the argument size
4090  _status = _logBuff.serialize(
4092  );
4093  FW_ASSERT(
4094  _status == Fw::FW_SERIALIZE_OK,
4095  static_cast<FwAssertArgType>(_status)
4096  );
4097 #endif
4098  _status = _logBuff.serialize(stmtType);
4099  FW_ASSERT(
4100  _status == Fw::FW_SERIALIZE_OK,
4101  static_cast<FwAssertArgType>(_status)
4102  );
4103 
4104 #if FW_AMPCS_COMPATIBLE
4105  // Serialize the argument size
4106  _status = _logBuff.serialize(
4107  static_cast<U8>(sizeof(U32))
4108  );
4109  FW_ASSERT(
4110  _status == Fw::FW_SERIALIZE_OK,
4111  static_cast<FwAssertArgType>(_status)
4112  );
4113 #endif
4114  _status = _logBuff.serialize(stmtOpcode);
4115  FW_ASSERT(
4116  _status == Fw::FW_SERIALIZE_OK,
4117  static_cast<FwAssertArgType>(_status)
4118  );
4119 
4120 #if FW_AMPCS_COMPATIBLE
4121  // Serialize the argument size
4122  _status = _logBuff.serialize(
4123  static_cast<U8>(sizeof(U32))
4124  );
4125  FW_ASSERT(
4126  _status == Fw::FW_SERIALIZE_OK,
4127  static_cast<FwAssertArgType>(_status)
4128  );
4129 #endif
4130  _status = _logBuff.serialize(stmtIdx);
4131  FW_ASSERT(
4132  _status == Fw::FW_SERIALIZE_OK,
4133  static_cast<FwAssertArgType>(_status)
4134  );
4135 
4136  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4137  FW_ASSERT(
4138  _status == Fw::FW_SERIALIZE_OK,
4139  static_cast<FwAssertArgType>(_status)
4140  );
4141 
4142 #if FW_AMPCS_COMPATIBLE
4143  // Serialize the argument size
4144  _status = _logBuff.serialize(
4145  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4146  );
4147  FW_ASSERT(
4148  _status == Fw::FW_SERIALIZE_OK,
4149  static_cast<FwAssertArgType>(_status)
4150  );
4151 #endif
4152  _status = _logBuff.serialize(response);
4153  FW_ASSERT(
4154  _status == Fw::FW_SERIALIZE_OK,
4155  static_cast<FwAssertArgType>(_status)
4156  );
4157 
4158  this->m_logOut_OutputPort[0].invoke(
4159  _id,
4160  _logTime,
4162  _logBuff
4163  );
4164  }
4165 
4166  // Emit the event on the text log port
4167 #if FW_ENABLE_TEXT_LOGGING
4168  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4169 #if FW_OBJECT_NAMES == 1
4170  const char* _formatString =
4171  "(%s) %s: Failed to execute statement type %s opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4172 #else
4173  const char* _formatString =
4174  "%s: Failed to execute statement type %s opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4175 #endif
4176 
4177  Fw::String stmtTypeStr;
4178  stmtType.toString(stmtTypeStr);
4179  Fw::String responseStr;
4180  response.toString(responseStr);
4181 
4182  Fw::TextLogString _logString;
4183  _logString.format(
4184  _formatString,
4185 #if FW_OBJECT_NAMES == 1
4186  this->m_objName.toChar(),
4187 #endif
4188  "StatementFailed ",
4189  stmtTypeStr.toChar(),
4190  stmtOpcode,
4191  stmtIdx,
4192  filePath.toChar(),
4193  responseStr.toChar()
4194  );
4195 
4196  this->m_logTextOut_OutputPort[0].invoke(
4197  _id,
4198  _logTime,
4200  _logString
4201  );
4202  }
4203 #endif
4204  }
4205 
4208  {
4209  // Get the time
4210  Fw::Time _logTime;
4211  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4212  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4213  }
4214 
4215  FwEventIdType _id = static_cast<FwEventIdType>(0);
4216 
4217  _id = this->getIdBase() + EVENTID_SEQUENCEDONE;
4218 
4219  // Emit the event on the log port
4220  if (this->m_logOut_OutputPort[0].isConnected()) {
4221  Fw::LogBuffer _logBuff;
4223 
4224 #if FW_AMPCS_COMPATIBLE
4225  // Serialize the number of arguments
4226  _status = _logBuff.serialize(static_cast<U8>(1));
4227  FW_ASSERT(
4228  _status == Fw::FW_SERIALIZE_OK,
4229  static_cast<FwAssertArgType>(_status)
4230  );
4231 #endif
4232 
4233  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4234  FW_ASSERT(
4235  _status == Fw::FW_SERIALIZE_OK,
4236  static_cast<FwAssertArgType>(_status)
4237  );
4238 
4239  this->m_logOut_OutputPort[0].invoke(
4240  _id,
4241  _logTime,
4243  _logBuff
4244  );
4245  }
4246 
4247  // Emit the event on the text log port
4248 #if FW_ENABLE_TEXT_LOGGING
4249  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4250 #if FW_OBJECT_NAMES == 1
4251  const char* _formatString =
4252  "(%s) %s: Completed sequence file %s";
4253 #else
4254  const char* _formatString =
4255  "%s: Completed sequence file %s";
4256 #endif
4257 
4258  Fw::TextLogString _logString;
4259  _logString.format(
4260  _formatString,
4261 #if FW_OBJECT_NAMES == 1
4262  this->m_objName.toChar(),
4263 #endif
4264  "SequenceDone ",
4265  filePath.toChar()
4266  );
4267 
4268  this->m_logTextOut_OutputPort[0].invoke(
4269  _id,
4270  _logTime,
4272  _logString
4273  );
4274  }
4275 #endif
4276  }
4277 
4280  {
4281  // Get the time
4282  Fw::Time _logTime;
4283  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4284  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4285  }
4286 
4287  FwEventIdType _id = static_cast<FwEventIdType>(0);
4288 
4289  _id = this->getIdBase() + EVENTID_SEQUENCECANCELLED;
4290 
4291  // Emit the event on the log port
4292  if (this->m_logOut_OutputPort[0].isConnected()) {
4293  Fw::LogBuffer _logBuff;
4295 
4296 #if FW_AMPCS_COMPATIBLE
4297  // Serialize the number of arguments
4298  _status = _logBuff.serialize(static_cast<U8>(1));
4299  FW_ASSERT(
4300  _status == Fw::FW_SERIALIZE_OK,
4301  static_cast<FwAssertArgType>(_status)
4302  );
4303 #endif
4304 
4305  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4306  FW_ASSERT(
4307  _status == Fw::FW_SERIALIZE_OK,
4308  static_cast<FwAssertArgType>(_status)
4309  );
4310 
4311  this->m_logOut_OutputPort[0].invoke(
4312  _id,
4313  _logTime,
4315  _logBuff
4316  );
4317  }
4318 
4319  // Emit the event on the text log port
4320 #if FW_ENABLE_TEXT_LOGGING
4321  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4322 #if FW_OBJECT_NAMES == 1
4323  const char* _formatString =
4324  "(%s) %s: Cancelled sequence file %s";
4325 #else
4326  const char* _formatString =
4327  "%s: Cancelled sequence file %s";
4328 #endif
4329 
4330  Fw::TextLogString _logString;
4331  _logString.format(
4332  _formatString,
4333 #if FW_OBJECT_NAMES == 1
4334  this->m_objName.toChar(),
4335 #endif
4336  "SequenceCancelled ",
4337  filePath.toChar()
4338  );
4339 
4340  this->m_logTextOut_OutputPort[0].invoke(
4341  _id,
4342  _logTime,
4344  _logString
4345  );
4346  }
4347 #endif
4348  }
4349 
4352  U32 opcode,
4353  U32 stmtIdx,
4354  const Fw::StringBase& filePath
4355  ) const
4356  {
4357  // Get the time
4358  Fw::Time _logTime;
4359  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4360  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4361  }
4362 
4363  FwEventIdType _id = static_cast<FwEventIdType>(0);
4364 
4366 
4367  // Emit the event on the log port
4368  if (this->m_logOut_OutputPort[0].isConnected()) {
4369  Fw::LogBuffer _logBuff;
4371 
4372 #if FW_AMPCS_COMPATIBLE
4373  // Serialize the number of arguments
4374  _status = _logBuff.serialize(static_cast<U8>(3));
4375  FW_ASSERT(
4376  _status == Fw::FW_SERIALIZE_OK,
4377  static_cast<FwAssertArgType>(_status)
4378  );
4379 #endif
4380 
4381 #if FW_AMPCS_COMPATIBLE
4382  // Serialize the argument size
4383  _status = _logBuff.serialize(
4384  static_cast<U8>(sizeof(U32))
4385  );
4386  FW_ASSERT(
4387  _status == Fw::FW_SERIALIZE_OK,
4388  static_cast<FwAssertArgType>(_status)
4389  );
4390 #endif
4391  _status = _logBuff.serialize(opcode);
4392  FW_ASSERT(
4393  _status == Fw::FW_SERIALIZE_OK,
4394  static_cast<FwAssertArgType>(_status)
4395  );
4396 
4397 #if FW_AMPCS_COMPATIBLE
4398  // Serialize the argument size
4399  _status = _logBuff.serialize(
4400  static_cast<U8>(sizeof(U32))
4401  );
4402  FW_ASSERT(
4403  _status == Fw::FW_SERIALIZE_OK,
4404  static_cast<FwAssertArgType>(_status)
4405  );
4406 #endif
4407  _status = _logBuff.serialize(stmtIdx);
4408  FW_ASSERT(
4409  _status == Fw::FW_SERIALIZE_OK,
4410  static_cast<FwAssertArgType>(_status)
4411  );
4412 
4413  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4414  FW_ASSERT(
4415  _status == Fw::FW_SERIALIZE_OK,
4416  static_cast<FwAssertArgType>(_status)
4417  );
4418 
4419  this->m_logOut_OutputPort[0].invoke(
4420  _id,
4421  _logTime,
4423  _logBuff
4424  );
4425  }
4426 
4427  // Emit the event on the text log port
4428 #if FW_ENABLE_TEXT_LOGGING
4429  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4430 #if FW_OBJECT_NAMES == 1
4431  const char* _formatString =
4432  "(%s) %s: Unknown sequencer directive id %" PRIu32 " at index %" PRIu32 " in file %s";
4433 #else
4434  const char* _formatString =
4435  "%s: Unknown sequencer directive id %" PRIu32 " at index %" PRIu32 " in file %s";
4436 #endif
4437 
4438  Fw::TextLogString _logString;
4439  _logString.format(
4440  _formatString,
4441 #if FW_OBJECT_NAMES == 1
4442  this->m_objName.toChar(),
4443 #endif
4444  "UnknownSequencerDirective ",
4445  opcode,
4446  stmtIdx,
4447  filePath.toChar()
4448  );
4449 
4450  this->m_logTextOut_OutputPort[0].invoke(
4451  _id,
4452  _logTime,
4454  _logString
4455  );
4456  }
4457 #endif
4458  }
4459 
4462  U32 cmdOpcode,
4463  U64 bufCapacity,
4464  U64 curPos,
4465  U64 writeSize,
4466  U8 errorCode,
4467  U32 stmtIdx
4468  ) const
4469  {
4470  // Get the time
4471  Fw::Time _logTime;
4472  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4473  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4474  }
4475 
4476  FwEventIdType _id = static_cast<FwEventIdType>(0);
4477 
4478  _id = this->getIdBase() + EVENTID_COMMANDSERIALIZEERROR;
4479 
4480  // Emit the event on the log port
4481  if (this->m_logOut_OutputPort[0].isConnected()) {
4482  Fw::LogBuffer _logBuff;
4484 
4485 #if FW_AMPCS_COMPATIBLE
4486  // Serialize the number of arguments
4487  _status = _logBuff.serialize(static_cast<U8>(6));
4488  FW_ASSERT(
4489  _status == Fw::FW_SERIALIZE_OK,
4490  static_cast<FwAssertArgType>(_status)
4491  );
4492 #endif
4493 
4494 #if FW_AMPCS_COMPATIBLE
4495  // Serialize the argument size
4496  _status = _logBuff.serialize(
4497  static_cast<U8>(sizeof(U32))
4498  );
4499  FW_ASSERT(
4500  _status == Fw::FW_SERIALIZE_OK,
4501  static_cast<FwAssertArgType>(_status)
4502  );
4503 #endif
4504  _status = _logBuff.serialize(cmdOpcode);
4505  FW_ASSERT(
4506  _status == Fw::FW_SERIALIZE_OK,
4507  static_cast<FwAssertArgType>(_status)
4508  );
4509 
4510 #if FW_AMPCS_COMPATIBLE
4511  // Serialize the argument size
4512  _status = _logBuff.serialize(
4513  static_cast<U8>(sizeof(U64))
4514  );
4515  FW_ASSERT(
4516  _status == Fw::FW_SERIALIZE_OK,
4517  static_cast<FwAssertArgType>(_status)
4518  );
4519 #endif
4520  _status = _logBuff.serialize(bufCapacity);
4521  FW_ASSERT(
4522  _status == Fw::FW_SERIALIZE_OK,
4523  static_cast<FwAssertArgType>(_status)
4524  );
4525 
4526 #if FW_AMPCS_COMPATIBLE
4527  // Serialize the argument size
4528  _status = _logBuff.serialize(
4529  static_cast<U8>(sizeof(U64))
4530  );
4531  FW_ASSERT(
4532  _status == Fw::FW_SERIALIZE_OK,
4533  static_cast<FwAssertArgType>(_status)
4534  );
4535 #endif
4536  _status = _logBuff.serialize(curPos);
4537  FW_ASSERT(
4538  _status == Fw::FW_SERIALIZE_OK,
4539  static_cast<FwAssertArgType>(_status)
4540  );
4541 
4542 #if FW_AMPCS_COMPATIBLE
4543  // Serialize the argument size
4544  _status = _logBuff.serialize(
4545  static_cast<U8>(sizeof(U64))
4546  );
4547  FW_ASSERT(
4548  _status == Fw::FW_SERIALIZE_OK,
4549  static_cast<FwAssertArgType>(_status)
4550  );
4551 #endif
4552  _status = _logBuff.serialize(writeSize);
4553  FW_ASSERT(
4554  _status == Fw::FW_SERIALIZE_OK,
4555  static_cast<FwAssertArgType>(_status)
4556  );
4557 
4558 #if FW_AMPCS_COMPATIBLE
4559  // Serialize the argument size
4560  _status = _logBuff.serialize(
4561  static_cast<U8>(sizeof(U8))
4562  );
4563  FW_ASSERT(
4564  _status == Fw::FW_SERIALIZE_OK,
4565  static_cast<FwAssertArgType>(_status)
4566  );
4567 #endif
4568  _status = _logBuff.serialize(errorCode);
4569  FW_ASSERT(
4570  _status == Fw::FW_SERIALIZE_OK,
4571  static_cast<FwAssertArgType>(_status)
4572  );
4573 
4574 #if FW_AMPCS_COMPATIBLE
4575  // Serialize the argument size
4576  _status = _logBuff.serialize(
4577  static_cast<U8>(sizeof(U32))
4578  );
4579  FW_ASSERT(
4580  _status == Fw::FW_SERIALIZE_OK,
4581  static_cast<FwAssertArgType>(_status)
4582  );
4583 #endif
4584  _status = _logBuff.serialize(stmtIdx);
4585  FW_ASSERT(
4586  _status == Fw::FW_SERIALIZE_OK,
4587  static_cast<FwAssertArgType>(_status)
4588  );
4589 
4590  this->m_logOut_OutputPort[0].invoke(
4591  _id,
4592  _logTime,
4594  _logBuff
4595  );
4596  }
4597 
4598  // Emit the event on the text log port
4599 #if FW_ENABLE_TEXT_LOGGING
4600  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4601 #if FW_OBJECT_NAMES == 1
4602  const char* _formatString =
4603  "(%s) %s: Failure while serializing cmd opcode %" PRIu32 ": buf capacity %" PRIu64 ", cur write pos %" PRIu64 ", write size %" PRIu64 ", error code %" PRIu8 ", current statement index %" PRIu32 "";
4604 #else
4605  const char* _formatString =
4606  "%s: Failure while serializing cmd opcode %" PRIu32 ": buf capacity %" PRIu64 ", cur write pos %" PRIu64 ", write size %" PRIu64 ", error code %" PRIu8 ", current statement index %" PRIu32 "";
4607 #endif
4608 
4609  Fw::TextLogString _logString;
4610  _logString.format(
4611  _formatString,
4612 #if FW_OBJECT_NAMES == 1
4613  this->m_objName.toChar(),
4614 #endif
4615  "CommandSerializeError ",
4616  cmdOpcode,
4617  bufCapacity,
4618  curPos,
4619  writeSize,
4620  errorCode,
4621  stmtIdx
4622  );
4623 
4624  this->m_logTextOut_OutputPort[0].invoke(
4625  _id,
4626  _logTime,
4628  _logString
4629  );
4630  }
4631 #endif
4632  }
4633 
4636  I32 state,
4637  U32 opcode,
4638  Fw::CmdResponse response
4639  ) const
4640  {
4641  // Get the time
4642  Fw::Time _logTime;
4643  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4644  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4645  }
4646 
4647  FwEventIdType _id = static_cast<FwEventIdType>(0);
4648 
4650 
4651  // Emit the event on the log port
4652  if (this->m_logOut_OutputPort[0].isConnected()) {
4653  Fw::LogBuffer _logBuff;
4655 
4656 #if FW_AMPCS_COMPATIBLE
4657  // Serialize the number of arguments
4658  _status = _logBuff.serialize(static_cast<U8>(3));
4659  FW_ASSERT(
4660  _status == Fw::FW_SERIALIZE_OK,
4661  static_cast<FwAssertArgType>(_status)
4662  );
4663 #endif
4664 
4665 #if FW_AMPCS_COMPATIBLE
4666  // Serialize the argument size
4667  _status = _logBuff.serialize(
4668  static_cast<U8>(sizeof(I32))
4669  );
4670  FW_ASSERT(
4671  _status == Fw::FW_SERIALIZE_OK,
4672  static_cast<FwAssertArgType>(_status)
4673  );
4674 #endif
4675  _status = _logBuff.serialize(state);
4676  FW_ASSERT(
4677  _status == Fw::FW_SERIALIZE_OK,
4678  static_cast<FwAssertArgType>(_status)
4679  );
4680 
4681 #if FW_AMPCS_COMPATIBLE
4682  // Serialize the argument size
4683  _status = _logBuff.serialize(
4684  static_cast<U8>(sizeof(U32))
4685  );
4686  FW_ASSERT(
4687  _status == Fw::FW_SERIALIZE_OK,
4688  static_cast<FwAssertArgType>(_status)
4689  );
4690 #endif
4691  _status = _logBuff.serialize(opcode);
4692  FW_ASSERT(
4693  _status == Fw::FW_SERIALIZE_OK,
4694  static_cast<FwAssertArgType>(_status)
4695  );
4696 
4697 #if FW_AMPCS_COMPATIBLE
4698  // Serialize the argument size
4699  _status = _logBuff.serialize(
4700  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4701  );
4702  FW_ASSERT(
4703  _status == Fw::FW_SERIALIZE_OK,
4704  static_cast<FwAssertArgType>(_status)
4705  );
4706 #endif
4707  _status = _logBuff.serialize(response);
4708  FW_ASSERT(
4709  _status == Fw::FW_SERIALIZE_OK,
4710  static_cast<FwAssertArgType>(_status)
4711  );
4712 
4713  this->m_logOut_OutputPort[0].invoke(
4714  _id,
4715  _logTime,
4717  _logBuff
4718  );
4719  }
4720 
4721  // Emit the event on the text log port
4722 #if FW_ENABLE_TEXT_LOGGING
4723  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4724 #if FW_OBJECT_NAMES == 1
4725  const char* _formatString =
4726  "(%s) %s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
4727 #else
4728  const char* _formatString =
4729  "%s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
4730 #endif
4731 
4732  Fw::String responseStr;
4733  response.toString(responseStr);
4734 
4735  Fw::TextLogString _logString;
4736  _logString.format(
4737  _formatString,
4738 #if FW_OBJECT_NAMES == 1
4739  this->m_objName.toChar(),
4740 #endif
4741  "CmdResponseWhileNotRunningSequence ",
4742  state,
4743  opcode,
4744  responseStr.toChar()
4745  );
4746 
4747  this->m_logTextOut_OutputPort[0].invoke(
4748  _id,
4749  _logTime,
4751  _logString
4752  );
4753  }
4754 #endif
4755  }
4756 
4759  U32 opcode,
4760  Fw::CmdResponse response,
4761  U16 oldSequenceIdx,
4762  U16 currentSequenceIdx
4763  ) const
4764  {
4765  // Get the time
4766  Fw::Time _logTime;
4767  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4768  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4769  }
4770 
4771  FwEventIdType _id = static_cast<FwEventIdType>(0);
4772 
4774 
4775  // Emit the event on the log port
4776  if (this->m_logOut_OutputPort[0].isConnected()) {
4777  Fw::LogBuffer _logBuff;
4779 
4780 #if FW_AMPCS_COMPATIBLE
4781  // Serialize the number of arguments
4782  _status = _logBuff.serialize(static_cast<U8>(4));
4783  FW_ASSERT(
4784  _status == Fw::FW_SERIALIZE_OK,
4785  static_cast<FwAssertArgType>(_status)
4786  );
4787 #endif
4788 
4789 #if FW_AMPCS_COMPATIBLE
4790  // Serialize the argument size
4791  _status = _logBuff.serialize(
4792  static_cast<U8>(sizeof(U32))
4793  );
4794  FW_ASSERT(
4795  _status == Fw::FW_SERIALIZE_OK,
4796  static_cast<FwAssertArgType>(_status)
4797  );
4798 #endif
4799  _status = _logBuff.serialize(opcode);
4800  FW_ASSERT(
4801  _status == Fw::FW_SERIALIZE_OK,
4802  static_cast<FwAssertArgType>(_status)
4803  );
4804 
4805 #if FW_AMPCS_COMPATIBLE
4806  // Serialize the argument size
4807  _status = _logBuff.serialize(
4808  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4809  );
4810  FW_ASSERT(
4811  _status == Fw::FW_SERIALIZE_OK,
4812  static_cast<FwAssertArgType>(_status)
4813  );
4814 #endif
4815  _status = _logBuff.serialize(response);
4816  FW_ASSERT(
4817  _status == Fw::FW_SERIALIZE_OK,
4818  static_cast<FwAssertArgType>(_status)
4819  );
4820 
4821 #if FW_AMPCS_COMPATIBLE
4822  // Serialize the argument size
4823  _status = _logBuff.serialize(
4824  static_cast<U8>(sizeof(U16))
4825  );
4826  FW_ASSERT(
4827  _status == Fw::FW_SERIALIZE_OK,
4828  static_cast<FwAssertArgType>(_status)
4829  );
4830 #endif
4831  _status = _logBuff.serialize(oldSequenceIdx);
4832  FW_ASSERT(
4833  _status == Fw::FW_SERIALIZE_OK,
4834  static_cast<FwAssertArgType>(_status)
4835  );
4836 
4837 #if FW_AMPCS_COMPATIBLE
4838  // Serialize the argument size
4839  _status = _logBuff.serialize(
4840  static_cast<U8>(sizeof(U16))
4841  );
4842  FW_ASSERT(
4843  _status == Fw::FW_SERIALIZE_OK,
4844  static_cast<FwAssertArgType>(_status)
4845  );
4846 #endif
4847  _status = _logBuff.serialize(currentSequenceIdx);
4848  FW_ASSERT(
4849  _status == Fw::FW_SERIALIZE_OK,
4850  static_cast<FwAssertArgType>(_status)
4851  );
4852 
4853  this->m_logOut_OutputPort[0].invoke(
4854  _id,
4855  _logTime,
4857  _logBuff
4858  );
4859  }
4860 
4861  // Emit the event on the text log port
4862 #if FW_ENABLE_TEXT_LOGGING
4863  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4864 #if FW_OBJECT_NAMES == 1
4865  const char* _formatString =
4866  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s), but it was from a previous sequence, not the current one (old idx: %" PRIu16 ", current idx: %" PRIu16 ")";
4867 #else
4868  const char* _formatString =
4869  "%s: Received a response from cmd opcode %" PRIu32 " (response %s), but it was from a previous sequence, not the current one (old idx: %" PRIu16 ", current idx: %" PRIu16 ")";
4870 #endif
4871 
4872  Fw::String responseStr;
4873  response.toString(responseStr);
4874 
4875  Fw::TextLogString _logString;
4876  _logString.format(
4877  _formatString,
4878 #if FW_OBJECT_NAMES == 1
4879  this->m_objName.toChar(),
4880 #endif
4881  "CmdResponseFromOldSequence ",
4882  opcode,
4883  responseStr.toChar(),
4884  oldSequenceIdx,
4885  currentSequenceIdx
4886  );
4887 
4888  this->m_logTextOut_OutputPort[0].invoke(
4889  _id,
4890  _logTime,
4892  _logString
4893  );
4894  }
4895 #endif
4896  }
4897 
4900  U32 opcode,
4901  Fw::CmdResponse response
4902  ) const
4903  {
4904  // Get the time
4905  Fw::Time _logTime;
4906  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4907  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4908  }
4909 
4910  FwEventIdType _id = static_cast<FwEventIdType>(0);
4911 
4913 
4914  // Emit the event on the log port
4915  if (this->m_logOut_OutputPort[0].isConnected()) {
4916  Fw::LogBuffer _logBuff;
4918 
4919 #if FW_AMPCS_COMPATIBLE
4920  // Serialize the number of arguments
4921  _status = _logBuff.serialize(static_cast<U8>(2));
4922  FW_ASSERT(
4923  _status == Fw::FW_SERIALIZE_OK,
4924  static_cast<FwAssertArgType>(_status)
4925  );
4926 #endif
4927 
4928 #if FW_AMPCS_COMPATIBLE
4929  // Serialize the argument size
4930  _status = _logBuff.serialize(
4931  static_cast<U8>(sizeof(U32))
4932  );
4933  FW_ASSERT(
4934  _status == Fw::FW_SERIALIZE_OK,
4935  static_cast<FwAssertArgType>(_status)
4936  );
4937 #endif
4938  _status = _logBuff.serialize(opcode);
4939  FW_ASSERT(
4940  _status == Fw::FW_SERIALIZE_OK,
4941  static_cast<FwAssertArgType>(_status)
4942  );
4943 
4944 #if FW_AMPCS_COMPATIBLE
4945  // Serialize the argument size
4946  _status = _logBuff.serialize(
4947  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4948  );
4949  FW_ASSERT(
4950  _status == Fw::FW_SERIALIZE_OK,
4951  static_cast<FwAssertArgType>(_status)
4952  );
4953 #endif
4954  _status = _logBuff.serialize(response);
4955  FW_ASSERT(
4956  _status == Fw::FW_SERIALIZE_OK,
4957  static_cast<FwAssertArgType>(_status)
4958  );
4959 
4960  this->m_logOut_OutputPort[0].invoke(
4961  _id,
4962  _logTime,
4964  _logBuff
4965  );
4966  }
4967 
4968  // Emit the event on the text log port
4969 #if FW_ENABLE_TEXT_LOGGING
4970  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4971 #if FW_OBJECT_NAMES == 1
4972  const char* _formatString =
4973  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
4974 #else
4975  const char* _formatString =
4976  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
4977 #endif
4978 
4979  Fw::String responseStr;
4980  response.toString(responseStr);
4981 
4982  Fw::TextLogString _logString;
4983  _logString.format(
4984  _formatString,
4985 #if FW_OBJECT_NAMES == 1
4986  this->m_objName.toChar(),
4987 #endif
4988  "CmdResponseWhileNotAwaiting ",
4989  opcode,
4990  responseStr.toChar()
4991  );
4992 
4993  this->m_logTextOut_OutputPort[0].invoke(
4994  _id,
4995  _logTime,
4997  _logString
4998  );
4999  }
5000 #endif
5001  }
5002 
5005  U32 opcode,
5006  Fw::CmdResponse response,
5007  U32 expectedOpcode
5008  ) const
5009  {
5010  // Get the time
5011  Fw::Time _logTime;
5012  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5013  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5014  }
5015 
5016  FwEventIdType _id = static_cast<FwEventIdType>(0);
5017 
5018  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEOPCODE;
5019 
5020  // Emit the event on the log port
5021  if (this->m_logOut_OutputPort[0].isConnected()) {
5022  Fw::LogBuffer _logBuff;
5024 
5025 #if FW_AMPCS_COMPATIBLE
5026  // Serialize the number of arguments
5027  _status = _logBuff.serialize(static_cast<U8>(3));
5028  FW_ASSERT(
5029  _status == Fw::FW_SERIALIZE_OK,
5030  static_cast<FwAssertArgType>(_status)
5031  );
5032 #endif
5033 
5034 #if FW_AMPCS_COMPATIBLE
5035  // Serialize the argument size
5036  _status = _logBuff.serialize(
5037  static_cast<U8>(sizeof(U32))
5038  );
5039  FW_ASSERT(
5040  _status == Fw::FW_SERIALIZE_OK,
5041  static_cast<FwAssertArgType>(_status)
5042  );
5043 #endif
5044  _status = _logBuff.serialize(opcode);
5045  FW_ASSERT(
5046  _status == Fw::FW_SERIALIZE_OK,
5047  static_cast<FwAssertArgType>(_status)
5048  );
5049 
5050 #if FW_AMPCS_COMPATIBLE
5051  // Serialize the argument size
5052  _status = _logBuff.serialize(
5053  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5054  );
5055  FW_ASSERT(
5056  _status == Fw::FW_SERIALIZE_OK,
5057  static_cast<FwAssertArgType>(_status)
5058  );
5059 #endif
5060  _status = _logBuff.serialize(response);
5061  FW_ASSERT(
5062  _status == Fw::FW_SERIALIZE_OK,
5063  static_cast<FwAssertArgType>(_status)
5064  );
5065 
5066 #if FW_AMPCS_COMPATIBLE
5067  // Serialize the argument size
5068  _status = _logBuff.serialize(
5069  static_cast<U8>(sizeof(U32))
5070  );
5071  FW_ASSERT(
5072  _status == Fw::FW_SERIALIZE_OK,
5073  static_cast<FwAssertArgType>(_status)
5074  );
5075 #endif
5076  _status = _logBuff.serialize(expectedOpcode);
5077  FW_ASSERT(
5078  _status == Fw::FW_SERIALIZE_OK,
5079  static_cast<FwAssertArgType>(_status)
5080  );
5081 
5082  this->m_logOut_OutputPort[0].invoke(
5083  _id,
5084  _logTime,
5086  _logBuff
5087  );
5088  }
5089 
5090  // Emit the event on the text log port
5091 #if FW_ENABLE_TEXT_LOGGING
5092  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5093 #if FW_OBJECT_NAMES == 1
5094  const char* _formatString =
5095  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5096 #else
5097  const char* _formatString =
5098  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5099 #endif
5100 
5101  Fw::String responseStr;
5102  response.toString(responseStr);
5103 
5104  Fw::TextLogString _logString;
5105  _logString.format(
5106  _formatString,
5107 #if FW_OBJECT_NAMES == 1
5108  this->m_objName.toChar(),
5109 #endif
5110  "WrongCmdResponseOpcode ",
5111  opcode,
5112  responseStr.toChar(),
5113  expectedOpcode
5114  );
5115 
5116  this->m_logTextOut_OutputPort[0].invoke(
5117  _id,
5118  _logTime,
5120  _logString
5121  );
5122  }
5123 #endif
5124  }
5125 
5128  U32 opcode,
5129  Fw::CmdResponse response,
5130  U16 actualCmdIdx,
5131  U16 expectedCmdIdx
5132  ) const
5133  {
5134  // Get the time
5135  Fw::Time _logTime;
5136  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5137  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5138  }
5139 
5140  FwEventIdType _id = static_cast<FwEventIdType>(0);
5141 
5142  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEINDEX;
5143 
5144  // Emit the event on the log port
5145  if (this->m_logOut_OutputPort[0].isConnected()) {
5146  Fw::LogBuffer _logBuff;
5148 
5149 #if FW_AMPCS_COMPATIBLE
5150  // Serialize the number of arguments
5151  _status = _logBuff.serialize(static_cast<U8>(4));
5152  FW_ASSERT(
5153  _status == Fw::FW_SERIALIZE_OK,
5154  static_cast<FwAssertArgType>(_status)
5155  );
5156 #endif
5157 
5158 #if FW_AMPCS_COMPATIBLE
5159  // Serialize the argument size
5160  _status = _logBuff.serialize(
5161  static_cast<U8>(sizeof(U32))
5162  );
5163  FW_ASSERT(
5164  _status == Fw::FW_SERIALIZE_OK,
5165  static_cast<FwAssertArgType>(_status)
5166  );
5167 #endif
5168  _status = _logBuff.serialize(opcode);
5169  FW_ASSERT(
5170  _status == Fw::FW_SERIALIZE_OK,
5171  static_cast<FwAssertArgType>(_status)
5172  );
5173 
5174 #if FW_AMPCS_COMPATIBLE
5175  // Serialize the argument size
5176  _status = _logBuff.serialize(
5177  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5178  );
5179  FW_ASSERT(
5180  _status == Fw::FW_SERIALIZE_OK,
5181  static_cast<FwAssertArgType>(_status)
5182  );
5183 #endif
5184  _status = _logBuff.serialize(response);
5185  FW_ASSERT(
5186  _status == Fw::FW_SERIALIZE_OK,
5187  static_cast<FwAssertArgType>(_status)
5188  );
5189 
5190 #if FW_AMPCS_COMPATIBLE
5191  // Serialize the argument size
5192  _status = _logBuff.serialize(
5193  static_cast<U8>(sizeof(U16))
5194  );
5195  FW_ASSERT(
5196  _status == Fw::FW_SERIALIZE_OK,
5197  static_cast<FwAssertArgType>(_status)
5198  );
5199 #endif
5200  _status = _logBuff.serialize(actualCmdIdx);
5201  FW_ASSERT(
5202  _status == Fw::FW_SERIALIZE_OK,
5203  static_cast<FwAssertArgType>(_status)
5204  );
5205 
5206 #if FW_AMPCS_COMPATIBLE
5207  // Serialize the argument size
5208  _status = _logBuff.serialize(
5209  static_cast<U8>(sizeof(U16))
5210  );
5211  FW_ASSERT(
5212  _status == Fw::FW_SERIALIZE_OK,
5213  static_cast<FwAssertArgType>(_status)
5214  );
5215 #endif
5216  _status = _logBuff.serialize(expectedCmdIdx);
5217  FW_ASSERT(
5218  _status == Fw::FW_SERIALIZE_OK,
5219  static_cast<FwAssertArgType>(_status)
5220  );
5221 
5222  this->m_logOut_OutputPort[0].invoke(
5223  _id,
5224  _logTime,
5226  _logBuff
5227  );
5228  }
5229 
5230  // Emit the event on the text log port
5231 #if FW_ENABLE_TEXT_LOGGING
5232  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5233 #if FW_OBJECT_NAMES == 1
5234  const char* _formatString =
5235  "(%s) %s: Received a response from the correct cmd (opcode %" PRIu32 " response %s), but it was for a different instance of that opcode in the same sequence (actual idx %" PRIu16 " expected %" PRIu16 ")";
5236 #else
5237  const char* _formatString =
5238  "%s: Received a response from the correct cmd (opcode %" PRIu32 " response %s), but it was for a different instance of that opcode in the same sequence (actual idx %" PRIu16 " expected %" PRIu16 ")";
5239 #endif
5240 
5241  Fw::String responseStr;
5242  response.toString(responseStr);
5243 
5244  Fw::TextLogString _logString;
5245  _logString.format(
5246  _formatString,
5247 #if FW_OBJECT_NAMES == 1
5248  this->m_objName.toChar(),
5249 #endif
5250  "WrongCmdResponseIndex ",
5251  opcode,
5252  responseStr.toChar(),
5253  actualCmdIdx,
5254  expectedCmdIdx
5255  );
5256 
5257  this->m_logTextOut_OutputPort[0].invoke(
5258  _id,
5259  _logTime,
5261  _logString
5262  );
5263  }
5264 #endif
5265  }
5266 
5269  U32 opcode,
5270  U32 stmtIdx,
5271  I32 errorCode,
5272  U64 buffLeft,
5273  U64 buffLength
5274  ) const
5275  {
5276  // Get the time
5277  Fw::Time _logTime;
5278  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5279  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5280  }
5281 
5282  FwEventIdType _id = static_cast<FwEventIdType>(0);
5283 
5285 
5286  // Emit the event on the log port
5287  if (this->m_logOut_OutputPort[0].isConnected()) {
5288  Fw::LogBuffer _logBuff;
5290 
5291 #if FW_AMPCS_COMPATIBLE
5292  // Serialize the number of arguments
5293  _status = _logBuff.serialize(static_cast<U8>(5));
5294  FW_ASSERT(
5295  _status == Fw::FW_SERIALIZE_OK,
5296  static_cast<FwAssertArgType>(_status)
5297  );
5298 #endif
5299 
5300 #if FW_AMPCS_COMPATIBLE
5301  // Serialize the argument size
5302  _status = _logBuff.serialize(
5303  static_cast<U8>(sizeof(U32))
5304  );
5305  FW_ASSERT(
5306  _status == Fw::FW_SERIALIZE_OK,
5307  static_cast<FwAssertArgType>(_status)
5308  );
5309 #endif
5310  _status = _logBuff.serialize(opcode);
5311  FW_ASSERT(
5312  _status == Fw::FW_SERIALIZE_OK,
5313  static_cast<FwAssertArgType>(_status)
5314  );
5315 
5316 #if FW_AMPCS_COMPATIBLE
5317  // Serialize the argument size
5318  _status = _logBuff.serialize(
5319  static_cast<U8>(sizeof(U32))
5320  );
5321  FW_ASSERT(
5322  _status == Fw::FW_SERIALIZE_OK,
5323  static_cast<FwAssertArgType>(_status)
5324  );
5325 #endif
5326  _status = _logBuff.serialize(stmtIdx);
5327  FW_ASSERT(
5328  _status == Fw::FW_SERIALIZE_OK,
5329  static_cast<FwAssertArgType>(_status)
5330  );
5331 
5332 #if FW_AMPCS_COMPATIBLE
5333  // Serialize the argument size
5334  _status = _logBuff.serialize(
5335  static_cast<U8>(sizeof(I32))
5336  );
5337  FW_ASSERT(
5338  _status == Fw::FW_SERIALIZE_OK,
5339  static_cast<FwAssertArgType>(_status)
5340  );
5341 #endif
5342  _status = _logBuff.serialize(errorCode);
5343  FW_ASSERT(
5344  _status == Fw::FW_SERIALIZE_OK,
5345  static_cast<FwAssertArgType>(_status)
5346  );
5347 
5348 #if FW_AMPCS_COMPATIBLE
5349  // Serialize the argument size
5350  _status = _logBuff.serialize(
5351  static_cast<U8>(sizeof(U64))
5352  );
5353  FW_ASSERT(
5354  _status == Fw::FW_SERIALIZE_OK,
5355  static_cast<FwAssertArgType>(_status)
5356  );
5357 #endif
5358  _status = _logBuff.serialize(buffLeft);
5359  FW_ASSERT(
5360  _status == Fw::FW_SERIALIZE_OK,
5361  static_cast<FwAssertArgType>(_status)
5362  );
5363 
5364 #if FW_AMPCS_COMPATIBLE
5365  // Serialize the argument size
5366  _status = _logBuff.serialize(
5367  static_cast<U8>(sizeof(U64))
5368  );
5369  FW_ASSERT(
5370  _status == Fw::FW_SERIALIZE_OK,
5371  static_cast<FwAssertArgType>(_status)
5372  );
5373 #endif
5374  _status = _logBuff.serialize(buffLength);
5375  FW_ASSERT(
5376  _status == Fw::FW_SERIALIZE_OK,
5377  static_cast<FwAssertArgType>(_status)
5378  );
5379 
5380  this->m_logOut_OutputPort[0].invoke(
5381  _id,
5382  _logTime,
5384  _logBuff
5385  );
5386  }
5387 
5388  // Emit the event on the text log port
5389 #if FW_ENABLE_TEXT_LOGGING
5390  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5391 #if FW_OBJECT_NAMES == 1
5392  const char* _formatString =
5393  "(%s) %s: Deserialize error encountered while reading directive opcode %" PRIu32 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5394 #else
5395  const char* _formatString =
5396  "%s: Deserialize error encountered while reading directive opcode %" PRIu32 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5397 #endif
5398 
5399  Fw::TextLogString _logString;
5400  _logString.format(
5401  _formatString,
5402 #if FW_OBJECT_NAMES == 1
5403  this->m_objName.toChar(),
5404 #endif
5405  "DirectiveDeserializeError ",
5406  opcode,
5407  stmtIdx,
5408  errorCode,
5409  buffLeft,
5410  buffLength
5411  );
5412 
5413  this->m_logTextOut_OutputPort[0].invoke(
5414  _id,
5415  _logTime,
5417  _logString
5418  );
5419  }
5420 #endif
5421  }
5422 
5425  I32 internalTimeBase,
5426  I32 otherTimeBase
5427  ) const
5428  {
5429  // Get the time
5430  Fw::Time _logTime;
5431  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5432  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5433  }
5434 
5435  FwEventIdType _id = static_cast<FwEventIdType>(0);
5436 
5437  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMEBASE;
5438 
5439  // Emit the event on the log port
5440  if (this->m_logOut_OutputPort[0].isConnected()) {
5441  Fw::LogBuffer _logBuff;
5443 
5444 #if FW_AMPCS_COMPATIBLE
5445  // Serialize the number of arguments
5446  _status = _logBuff.serialize(static_cast<U8>(2));
5447  FW_ASSERT(
5448  _status == Fw::FW_SERIALIZE_OK,
5449  static_cast<FwAssertArgType>(_status)
5450  );
5451 #endif
5452 
5453 #if FW_AMPCS_COMPATIBLE
5454  // Serialize the argument size
5455  _status = _logBuff.serialize(
5456  static_cast<U8>(sizeof(I32))
5457  );
5458  FW_ASSERT(
5459  _status == Fw::FW_SERIALIZE_OK,
5460  static_cast<FwAssertArgType>(_status)
5461  );
5462 #endif
5463  _status = _logBuff.serialize(internalTimeBase);
5464  FW_ASSERT(
5465  _status == Fw::FW_SERIALIZE_OK,
5466  static_cast<FwAssertArgType>(_status)
5467  );
5468 
5469 #if FW_AMPCS_COMPATIBLE
5470  // Serialize the argument size
5471  _status = _logBuff.serialize(
5472  static_cast<U8>(sizeof(I32))
5473  );
5474  FW_ASSERT(
5475  _status == Fw::FW_SERIALIZE_OK,
5476  static_cast<FwAssertArgType>(_status)
5477  );
5478 #endif
5479  _status = _logBuff.serialize(otherTimeBase);
5480  FW_ASSERT(
5481  _status == Fw::FW_SERIALIZE_OK,
5482  static_cast<FwAssertArgType>(_status)
5483  );
5484 
5485  this->m_logOut_OutputPort[0].invoke(
5486  _id,
5487  _logTime,
5489  _logBuff
5490  );
5491  }
5492 
5493  // Emit the event on the text log port
5494 #if FW_ENABLE_TEXT_LOGGING
5495  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5496 #if FW_OBJECT_NAMES == 1
5497  const char* _formatString =
5498  "(%s) %s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5499 #else
5500  const char* _formatString =
5501  "%s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5502 #endif
5503 
5504  Fw::TextLogString _logString;
5505  _logString.format(
5506  _formatString,
5507 #if FW_OBJECT_NAMES == 1
5508  this->m_objName.toChar(),
5509 #endif
5510  "MismatchedTimeBase ",
5511  internalTimeBase,
5512  otherTimeBase
5513  );
5514 
5515  this->m_logTextOut_OutputPort[0].invoke(
5516  _id,
5517  _logTime,
5519  _logString
5520  );
5521  }
5522 #endif
5523  }
5524 
5527  I32 internalTimeContext,
5528  I32 otherTimeContext
5529  ) const
5530  {
5531  // Get the time
5532  Fw::Time _logTime;
5533  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5534  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5535  }
5536 
5537  FwEventIdType _id = static_cast<FwEventIdType>(0);
5538 
5539  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMECONTEXT;
5540 
5541  // Emit the event on the log port
5542  if (this->m_logOut_OutputPort[0].isConnected()) {
5543  Fw::LogBuffer _logBuff;
5545 
5546 #if FW_AMPCS_COMPATIBLE
5547  // Serialize the number of arguments
5548  _status = _logBuff.serialize(static_cast<U8>(2));
5549  FW_ASSERT(
5550  _status == Fw::FW_SERIALIZE_OK,
5551  static_cast<FwAssertArgType>(_status)
5552  );
5553 #endif
5554 
5555 #if FW_AMPCS_COMPATIBLE
5556  // Serialize the argument size
5557  _status = _logBuff.serialize(
5558  static_cast<U8>(sizeof(I32))
5559  );
5560  FW_ASSERT(
5561  _status == Fw::FW_SERIALIZE_OK,
5562  static_cast<FwAssertArgType>(_status)
5563  );
5564 #endif
5565  _status = _logBuff.serialize(internalTimeContext);
5566  FW_ASSERT(
5567  _status == Fw::FW_SERIALIZE_OK,
5568  static_cast<FwAssertArgType>(_status)
5569  );
5570 
5571 #if FW_AMPCS_COMPATIBLE
5572  // Serialize the argument size
5573  _status = _logBuff.serialize(
5574  static_cast<U8>(sizeof(I32))
5575  );
5576  FW_ASSERT(
5577  _status == Fw::FW_SERIALIZE_OK,
5578  static_cast<FwAssertArgType>(_status)
5579  );
5580 #endif
5581  _status = _logBuff.serialize(otherTimeContext);
5582  FW_ASSERT(
5583  _status == Fw::FW_SERIALIZE_OK,
5584  static_cast<FwAssertArgType>(_status)
5585  );
5586 
5587  this->m_logOut_OutputPort[0].invoke(
5588  _id,
5589  _logTime,
5591  _logBuff
5592  );
5593  }
5594 
5595  // Emit the event on the text log port
5596 #if FW_ENABLE_TEXT_LOGGING
5597  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5598 #if FW_OBJECT_NAMES == 1
5599  const char* _formatString =
5600  "(%s) %s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
5601 #else
5602  const char* _formatString =
5603  "%s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
5604 #endif
5605 
5606  Fw::TextLogString _logString;
5607  _logString.format(
5608  _formatString,
5609 #if FW_OBJECT_NAMES == 1
5610  this->m_objName.toChar(),
5611 #endif
5612  "MismatchedTimeContext ",
5613  internalTimeContext,
5614  otherTimeContext
5615  );
5616 
5617  this->m_logTextOut_OutputPort[0].invoke(
5618  _id,
5619  _logTime,
5621  _logString
5622  );
5623  }
5624 #endif
5625  }
5626 
5629  Svc::Fpy::StatementType stmtType,
5630  U32 stmtOpcode,
5631  U32 stmtIdx,
5632  const Fw::StringBase& filePath
5633  ) const
5634  {
5635  // Get the time
5636  Fw::Time _logTime;
5637  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5638  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5639  }
5640 
5641  FwEventIdType _id = static_cast<FwEventIdType>(0);
5642 
5643  _id = this->getIdBase() + EVENTID_STATEMENTTIMEDOUT;
5644 
5645  // Emit the event on the log port
5646  if (this->m_logOut_OutputPort[0].isConnected()) {
5647  Fw::LogBuffer _logBuff;
5649 
5650 #if FW_AMPCS_COMPATIBLE
5651  // Serialize the number of arguments
5652  _status = _logBuff.serialize(static_cast<U8>(4));
5653  FW_ASSERT(
5654  _status == Fw::FW_SERIALIZE_OK,
5655  static_cast<FwAssertArgType>(_status)
5656  );
5657 #endif
5658 
5659 #if FW_AMPCS_COMPATIBLE
5660  // Serialize the argument size
5661  _status = _logBuff.serialize(
5663  );
5664  FW_ASSERT(
5665  _status == Fw::FW_SERIALIZE_OK,
5666  static_cast<FwAssertArgType>(_status)
5667  );
5668 #endif
5669  _status = _logBuff.serialize(stmtType);
5670  FW_ASSERT(
5671  _status == Fw::FW_SERIALIZE_OK,
5672  static_cast<FwAssertArgType>(_status)
5673  );
5674 
5675 #if FW_AMPCS_COMPATIBLE
5676  // Serialize the argument size
5677  _status = _logBuff.serialize(
5678  static_cast<U8>(sizeof(U32))
5679  );
5680  FW_ASSERT(
5681  _status == Fw::FW_SERIALIZE_OK,
5682  static_cast<FwAssertArgType>(_status)
5683  );
5684 #endif
5685  _status = _logBuff.serialize(stmtOpcode);
5686  FW_ASSERT(
5687  _status == Fw::FW_SERIALIZE_OK,
5688  static_cast<FwAssertArgType>(_status)
5689  );
5690 
5691 #if FW_AMPCS_COMPATIBLE
5692  // Serialize the argument size
5693  _status = _logBuff.serialize(
5694  static_cast<U8>(sizeof(U32))
5695  );
5696  FW_ASSERT(
5697  _status == Fw::FW_SERIALIZE_OK,
5698  static_cast<FwAssertArgType>(_status)
5699  );
5700 #endif
5701  _status = _logBuff.serialize(stmtIdx);
5702  FW_ASSERT(
5703  _status == Fw::FW_SERIALIZE_OK,
5704  static_cast<FwAssertArgType>(_status)
5705  );
5706 
5707  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
5708  FW_ASSERT(
5709  _status == Fw::FW_SERIALIZE_OK,
5710  static_cast<FwAssertArgType>(_status)
5711  );
5712 
5713  this->m_logOut_OutputPort[0].invoke(
5714  _id,
5715  _logTime,
5717  _logBuff
5718  );
5719  }
5720 
5721  // Emit the event on the text log port
5722 #if FW_ENABLE_TEXT_LOGGING
5723  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5724 #if FW_OBJECT_NAMES == 1
5725  const char* _formatString =
5726  "(%s) %s: A statement type %s opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
5727 #else
5728  const char* _formatString =
5729  "%s: A statement type %s opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
5730 #endif
5731 
5732  Fw::String stmtTypeStr;
5733  stmtType.toString(stmtTypeStr);
5734 
5735  Fw::TextLogString _logString;
5736  _logString.format(
5737  _formatString,
5738 #if FW_OBJECT_NAMES == 1
5739  this->m_objName.toChar(),
5740 #endif
5741  "StatementTimedOut ",
5742  stmtTypeStr.toChar(),
5743  stmtOpcode,
5744  stmtIdx,
5745  filePath.toChar()
5746  );
5747 
5748  this->m_logTextOut_OutputPort[0].invoke(
5749  _id,
5750  _logTime,
5752  _logString
5753  );
5754  }
5755 #endif
5756  }
5757 
5760  U8 count,
5761  U8 max
5762  ) const
5763  {
5764  // Get the time
5765  Fw::Time _logTime;
5766  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5767  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5768  }
5769 
5770  FwEventIdType _id = static_cast<FwEventIdType>(0);
5771 
5772  _id = this->getIdBase() + EVENTID_TOOMANYSEQUENCEARGS;
5773 
5774  // Emit the event on the log port
5775  if (this->m_logOut_OutputPort[0].isConnected()) {
5776  Fw::LogBuffer _logBuff;
5778 
5779 #if FW_AMPCS_COMPATIBLE
5780  // Serialize the number of arguments
5781  _status = _logBuff.serialize(static_cast<U8>(2));
5782  FW_ASSERT(
5783  _status == Fw::FW_SERIALIZE_OK,
5784  static_cast<FwAssertArgType>(_status)
5785  );
5786 #endif
5787 
5788 #if FW_AMPCS_COMPATIBLE
5789  // Serialize the argument size
5790  _status = _logBuff.serialize(
5791  static_cast<U8>(sizeof(U8))
5792  );
5793  FW_ASSERT(
5794  _status == Fw::FW_SERIALIZE_OK,
5795  static_cast<FwAssertArgType>(_status)
5796  );
5797 #endif
5798  _status = _logBuff.serialize(count);
5799  FW_ASSERT(
5800  _status == Fw::FW_SERIALIZE_OK,
5801  static_cast<FwAssertArgType>(_status)
5802  );
5803 
5804 #if FW_AMPCS_COMPATIBLE
5805  // Serialize the argument size
5806  _status = _logBuff.serialize(
5807  static_cast<U8>(sizeof(U8))
5808  );
5809  FW_ASSERT(
5810  _status == Fw::FW_SERIALIZE_OK,
5811  static_cast<FwAssertArgType>(_status)
5812  );
5813 #endif
5814  _status = _logBuff.serialize(max);
5815  FW_ASSERT(
5816  _status == Fw::FW_SERIALIZE_OK,
5817  static_cast<FwAssertArgType>(_status)
5818  );
5819 
5820  this->m_logOut_OutputPort[0].invoke(
5821  _id,
5822  _logTime,
5824  _logBuff
5825  );
5826  }
5827 
5828  // Emit the event on the text log port
5829 #if FW_ENABLE_TEXT_LOGGING
5830  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5831 #if FW_OBJECT_NAMES == 1
5832  const char* _formatString =
5833  "(%s) %s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
5834 #else
5835  const char* _formatString =
5836  "%s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
5837 #endif
5838 
5839  Fw::TextLogString _logString;
5840  _logString.format(
5841  _formatString,
5842 #if FW_OBJECT_NAMES == 1
5843  this->m_objName.toChar(),
5844 #endif
5845  "TooManySequenceArgs ",
5846  count,
5847  max
5848  );
5849 
5850  this->m_logTextOut_OutputPort[0].invoke(
5851  _id,
5852  _logTime,
5854  _logString
5855  );
5856  }
5857 #endif
5858  }
5859 
5862  U16 count,
5863  U16 max
5864  ) const
5865  {
5866  // Get the time
5867  Fw::Time _logTime;
5868  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5869  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5870  }
5871 
5872  FwEventIdType _id = static_cast<FwEventIdType>(0);
5873 
5875 
5876  // Emit the event on the log port
5877  if (this->m_logOut_OutputPort[0].isConnected()) {
5878  Fw::LogBuffer _logBuff;
5880 
5881 #if FW_AMPCS_COMPATIBLE
5882  // Serialize the number of arguments
5883  _status = _logBuff.serialize(static_cast<U8>(2));
5884  FW_ASSERT(
5885  _status == Fw::FW_SERIALIZE_OK,
5886  static_cast<FwAssertArgType>(_status)
5887  );
5888 #endif
5889 
5890 #if FW_AMPCS_COMPATIBLE
5891  // Serialize the argument size
5892  _status = _logBuff.serialize(
5893  static_cast<U8>(sizeof(U16))
5894  );
5895  FW_ASSERT(
5896  _status == Fw::FW_SERIALIZE_OK,
5897  static_cast<FwAssertArgType>(_status)
5898  );
5899 #endif
5900  _status = _logBuff.serialize(count);
5901  FW_ASSERT(
5902  _status == Fw::FW_SERIALIZE_OK,
5903  static_cast<FwAssertArgType>(_status)
5904  );
5905 
5906 #if FW_AMPCS_COMPATIBLE
5907  // Serialize the argument size
5908  _status = _logBuff.serialize(
5909  static_cast<U8>(sizeof(U16))
5910  );
5911  FW_ASSERT(
5912  _status == Fw::FW_SERIALIZE_OK,
5913  static_cast<FwAssertArgType>(_status)
5914  );
5915 #endif
5916  _status = _logBuff.serialize(max);
5917  FW_ASSERT(
5918  _status == Fw::FW_SERIALIZE_OK,
5919  static_cast<FwAssertArgType>(_status)
5920  );
5921 
5922  this->m_logOut_OutputPort[0].invoke(
5923  _id,
5924  _logTime,
5926  _logBuff
5927  );
5928  }
5929 
5930  // Emit the event on the text log port
5931 #if FW_ENABLE_TEXT_LOGGING
5932  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5933 #if FW_OBJECT_NAMES == 1
5934  const char* _formatString =
5935  "(%s) %s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
5936 #else
5937  const char* _formatString =
5938  "%s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
5939 #endif
5940 
5941  Fw::TextLogString _logString;
5942  _logString.format(
5943  _formatString,
5944 #if FW_OBJECT_NAMES == 1
5945  this->m_objName.toChar(),
5946 #endif
5947  "TooManySequenceStatements ",
5948  count,
5949  max
5950  );
5951 
5952  this->m_logTextOut_OutputPort[0].invoke(
5953  _id,
5954  _logTime,
5956  _logString
5957  );
5958  }
5959 #endif
5960  }
5961 
5964  U32 stmtIdx,
5965  bool breakOnce
5966  ) const
5967  {
5968  // Get the time
5969  Fw::Time _logTime;
5970  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5971  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5972  }
5973 
5974  FwEventIdType _id = static_cast<FwEventIdType>(0);
5975 
5976  _id = this->getIdBase() + EVENTID_DEBUGBROKEN;
5977 
5978  // Emit the event on the log port
5979  if (this->m_logOut_OutputPort[0].isConnected()) {
5980  Fw::LogBuffer _logBuff;
5982 
5983 #if FW_AMPCS_COMPATIBLE
5984  // Serialize the number of arguments
5985  _status = _logBuff.serialize(static_cast<U8>(2));
5986  FW_ASSERT(
5987  _status == Fw::FW_SERIALIZE_OK,
5988  static_cast<FwAssertArgType>(_status)
5989  );
5990 #endif
5991 
5992 #if FW_AMPCS_COMPATIBLE
5993  // Serialize the argument size
5994  _status = _logBuff.serialize(
5995  static_cast<U8>(sizeof(U32))
5996  );
5997  FW_ASSERT(
5998  _status == Fw::FW_SERIALIZE_OK,
5999  static_cast<FwAssertArgType>(_status)
6000  );
6001 #endif
6002  _status = _logBuff.serialize(stmtIdx);
6003  FW_ASSERT(
6004  _status == Fw::FW_SERIALIZE_OK,
6005  static_cast<FwAssertArgType>(_status)
6006  );
6007 
6008 #if FW_AMPCS_COMPATIBLE
6009  // Serialize the argument size
6010  _status = _logBuff.serialize(
6011  static_cast<U8>(sizeof(U8))
6012  );
6013  FW_ASSERT(
6014  _status == Fw::FW_SERIALIZE_OK,
6015  static_cast<FwAssertArgType>(_status)
6016  );
6017 #endif
6018  _status = _logBuff.serialize(breakOnce);
6019  FW_ASSERT(
6020  _status == Fw::FW_SERIALIZE_OK,
6021  static_cast<FwAssertArgType>(_status)
6022  );
6023 
6024  this->m_logOut_OutputPort[0].invoke(
6025  _id,
6026  _logTime,
6028  _logBuff
6029  );
6030  }
6031 
6032  // Emit the event on the text log port
6033 #if FW_ENABLE_TEXT_LOGGING
6034  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6035 #if FW_OBJECT_NAMES == 1
6036  const char* _formatString =
6037  "(%s) %s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6038 #else
6039  const char* _formatString =
6040  "%s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6041 #endif
6042 
6043  Fw::TextLogString _logString;
6044  _logString.format(
6045  _formatString,
6046 #if FW_OBJECT_NAMES == 1
6047  this->m_objName.toChar(),
6048 #endif
6049  "DebugBroken ",
6050  stmtIdx,
6051  breakOnce
6052  );
6053 
6054  this->m_logTextOut_OutputPort[0].invoke(
6055  _id,
6056  _logTime,
6058  _logString
6059  );
6060  }
6061 #endif
6062  }
6063 
6066  U32 breakpointIdx,
6067  bool breakOnce
6068  ) const
6069  {
6070  // Get the time
6071  Fw::Time _logTime;
6072  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6073  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6074  }
6075 
6076  FwEventIdType _id = static_cast<FwEventIdType>(0);
6077 
6078  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTSET;
6079 
6080  // Emit the event on the log port
6081  if (this->m_logOut_OutputPort[0].isConnected()) {
6082  Fw::LogBuffer _logBuff;
6084 
6085 #if FW_AMPCS_COMPATIBLE
6086  // Serialize the number of arguments
6087  _status = _logBuff.serialize(static_cast<U8>(2));
6088  FW_ASSERT(
6089  _status == Fw::FW_SERIALIZE_OK,
6090  static_cast<FwAssertArgType>(_status)
6091  );
6092 #endif
6093 
6094 #if FW_AMPCS_COMPATIBLE
6095  // Serialize the argument size
6096  _status = _logBuff.serialize(
6097  static_cast<U8>(sizeof(U32))
6098  );
6099  FW_ASSERT(
6100  _status == Fw::FW_SERIALIZE_OK,
6101  static_cast<FwAssertArgType>(_status)
6102  );
6103 #endif
6104  _status = _logBuff.serialize(breakpointIdx);
6105  FW_ASSERT(
6106  _status == Fw::FW_SERIALIZE_OK,
6107  static_cast<FwAssertArgType>(_status)
6108  );
6109 
6110 #if FW_AMPCS_COMPATIBLE
6111  // Serialize the argument size
6112  _status = _logBuff.serialize(
6113  static_cast<U8>(sizeof(U8))
6114  );
6115  FW_ASSERT(
6116  _status == Fw::FW_SERIALIZE_OK,
6117  static_cast<FwAssertArgType>(_status)
6118  );
6119 #endif
6120  _status = _logBuff.serialize(breakOnce);
6121  FW_ASSERT(
6122  _status == Fw::FW_SERIALIZE_OK,
6123  static_cast<FwAssertArgType>(_status)
6124  );
6125 
6126  this->m_logOut_OutputPort[0].invoke(
6127  _id,
6128  _logTime,
6130  _logBuff
6131  );
6132  }
6133 
6134  // Emit the event on the text log port
6135 #if FW_ENABLE_TEXT_LOGGING
6136  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6137 #if FW_OBJECT_NAMES == 1
6138  const char* _formatString =
6139  "(%s) %s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6140 #else
6141  const char* _formatString =
6142  "%s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6143 #endif
6144 
6145  Fw::TextLogString _logString;
6146  _logString.format(
6147  _formatString,
6148 #if FW_OBJECT_NAMES == 1
6149  this->m_objName.toChar(),
6150 #endif
6151  "DebugBreakpointSet ",
6152  breakpointIdx,
6153  breakOnce
6154  );
6155 
6156  this->m_logTextOut_OutputPort[0].invoke(
6157  _id,
6158  _logTime,
6160  _logString
6161  );
6162  }
6163 #endif
6164  }
6165 
6168  {
6169  // Get the time
6170  Fw::Time _logTime;
6171  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6172  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6173  }
6174 
6175  FwEventIdType _id = static_cast<FwEventIdType>(0);
6176 
6177  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTCLEARED;
6178 
6179  // Emit the event on the log port
6180  if (this->m_logOut_OutputPort[0].isConnected()) {
6181  Fw::LogBuffer _logBuff;
6182 
6183 #if FW_AMPCS_COMPATIBLE
6185  // Serialize the number of arguments
6186  _status = _logBuff.serialize(static_cast<U8>(0));
6187  FW_ASSERT(
6188  _status == Fw::FW_SERIALIZE_OK,
6189  static_cast<FwAssertArgType>(_status)
6190  );
6191 #endif
6192 
6193  this->m_logOut_OutputPort[0].invoke(
6194  _id,
6195  _logTime,
6197  _logBuff
6198  );
6199  }
6200 
6201  // Emit the event on the text log port
6202 #if FW_ENABLE_TEXT_LOGGING
6203  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6204 #if FW_OBJECT_NAMES == 1
6205  const char* _formatString =
6206  "(%s) %s: Debug breakpoint cleared";
6207 #else
6208  const char* _formatString =
6209  "%s: Debug breakpoint cleared";
6210 #endif
6211 
6212  Fw::TextLogString _logString;
6213  _logString.format(
6214  _formatString,
6215 #if FW_OBJECT_NAMES == 1
6216  this->m_objName.toChar(),
6217 #endif
6218  "DebugBreakpointCleared "
6219  );
6220 
6221  this->m_logTextOut_OutputPort[0].invoke(
6222  _id,
6223  _logTime,
6225  _logString
6226  );
6227  }
6228 #endif
6229  }
6230 
6231  // ----------------------------------------------------------------------
6232  // Telemetry write functions
6233  // ----------------------------------------------------------------------
6234 
6237  I32 arg,
6238  Fw::Time _tlmTime
6239  )
6240  {
6241  // Check to see if it is the first time
6242  if (not this->m_first_update_State) {
6243  // Check to see if value has changed. If not, don't write it.
6244  if (arg == this->m_last_State) {
6245  return;
6246  }
6247  else {
6248  this->m_last_State = arg;
6249  }
6250  }
6251  else {
6252  this->m_first_update_State = false;
6253  this->m_last_State = arg;
6254  }
6255 
6256  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6257  if (
6258  this->m_timeCaller_OutputPort[0].isConnected() &&
6259  (_tlmTime == Fw::ZERO_TIME)
6260  ) {
6261  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6262  }
6263 
6264  Fw::TlmBuffer _tlmBuff;
6265  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6266  FW_ASSERT(
6267  _stat == Fw::FW_SERIALIZE_OK,
6268  static_cast<FwAssertArgType>(_stat)
6269  );
6270 
6271  FwChanIdType _id;
6272 
6273  _id = this->getIdBase() + CHANNELID_STATE;
6274 
6275  this->m_tlmOut_OutputPort[0].invoke(
6276  _id,
6277  _tlmTime,
6278  _tlmBuff
6279  );
6280  }
6281  }
6282 
6285  U64 arg,
6286  Fw::Time _tlmTime
6287  )
6288  {
6289  // Check to see if it is the first time
6290  if (not this->m_first_update_SequencesSucceeded) {
6291  // Check to see if value has changed. If not, don't write it.
6292  if (arg == this->m_last_SequencesSucceeded) {
6293  return;
6294  }
6295  else {
6296  this->m_last_SequencesSucceeded = arg;
6297  }
6298  }
6299  else {
6300  this->m_first_update_SequencesSucceeded = false;
6301  this->m_last_SequencesSucceeded = arg;
6302  }
6303 
6304  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6305  if (
6306  this->m_timeCaller_OutputPort[0].isConnected() &&
6307  (_tlmTime == Fw::ZERO_TIME)
6308  ) {
6309  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6310  }
6311 
6312  Fw::TlmBuffer _tlmBuff;
6313  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6314  FW_ASSERT(
6315  _stat == Fw::FW_SERIALIZE_OK,
6316  static_cast<FwAssertArgType>(_stat)
6317  );
6318 
6319  FwChanIdType _id;
6320 
6321  _id = this->getIdBase() + CHANNELID_SEQUENCESSUCCEEDED;
6322 
6323  this->m_tlmOut_OutputPort[0].invoke(
6324  _id,
6325  _tlmTime,
6326  _tlmBuff
6327  );
6328  }
6329  }
6330 
6333  U64 arg,
6334  Fw::Time _tlmTime
6335  )
6336  {
6337  // Check to see if it is the first time
6338  if (not this->m_first_update_SequencesFailed) {
6339  // Check to see if value has changed. If not, don't write it.
6340  if (arg == this->m_last_SequencesFailed) {
6341  return;
6342  }
6343  else {
6344  this->m_last_SequencesFailed = arg;
6345  }
6346  }
6347  else {
6348  this->m_first_update_SequencesFailed = false;
6349  this->m_last_SequencesFailed = arg;
6350  }
6351 
6352  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6353  if (
6354  this->m_timeCaller_OutputPort[0].isConnected() &&
6355  (_tlmTime == Fw::ZERO_TIME)
6356  ) {
6357  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6358  }
6359 
6360  Fw::TlmBuffer _tlmBuff;
6361  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6362  FW_ASSERT(
6363  _stat == Fw::FW_SERIALIZE_OK,
6364  static_cast<FwAssertArgType>(_stat)
6365  );
6366 
6367  FwChanIdType _id;
6368 
6369  _id = this->getIdBase() + CHANNELID_SEQUENCESFAILED;
6370 
6371  this->m_tlmOut_OutputPort[0].invoke(
6372  _id,
6373  _tlmTime,
6374  _tlmBuff
6375  );
6376  }
6377  }
6378 
6381  U64 arg,
6382  Fw::Time _tlmTime
6383  )
6384  {
6385  // Check to see if it is the first time
6386  if (not this->m_first_update_SequencesCancelled) {
6387  // Check to see if value has changed. If not, don't write it.
6388  if (arg == this->m_last_SequencesCancelled) {
6389  return;
6390  }
6391  else {
6392  this->m_last_SequencesCancelled = arg;
6393  }
6394  }
6395  else {
6396  this->m_first_update_SequencesCancelled = false;
6397  this->m_last_SequencesCancelled = arg;
6398  }
6399 
6400  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6401  if (
6402  this->m_timeCaller_OutputPort[0].isConnected() &&
6403  (_tlmTime == Fw::ZERO_TIME)
6404  ) {
6405  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6406  }
6407 
6408  Fw::TlmBuffer _tlmBuff;
6409  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6410  FW_ASSERT(
6411  _stat == Fw::FW_SERIALIZE_OK,
6412  static_cast<FwAssertArgType>(_stat)
6413  );
6414 
6415  FwChanIdType _id;
6416 
6417  _id = this->getIdBase() + CHANNELID_SEQUENCESCANCELLED;
6418 
6419  this->m_tlmOut_OutputPort[0].invoke(
6420  _id,
6421  _tlmTime,
6422  _tlmBuff
6423  );
6424  }
6425  }
6426 
6429  U64 arg,
6430  Fw::Time _tlmTime
6431  )
6432  {
6433  // Check to see if it is the first time
6434  if (not this->m_first_update_StatementsDispatched) {
6435  // Check to see if value has changed. If not, don't write it.
6436  if (arg == this->m_last_StatementsDispatched) {
6437  return;
6438  }
6439  else {
6440  this->m_last_StatementsDispatched = arg;
6441  }
6442  }
6443  else {
6444  this->m_first_update_StatementsDispatched = false;
6445  this->m_last_StatementsDispatched = arg;
6446  }
6447 
6448  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6449  if (
6450  this->m_timeCaller_OutputPort[0].isConnected() &&
6451  (_tlmTime == Fw::ZERO_TIME)
6452  ) {
6453  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6454  }
6455 
6456  Fw::TlmBuffer _tlmBuff;
6457  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6458  FW_ASSERT(
6459  _stat == Fw::FW_SERIALIZE_OK,
6460  static_cast<FwAssertArgType>(_stat)
6461  );
6462 
6463  FwChanIdType _id;
6464 
6465  _id = this->getIdBase() + CHANNELID_STATEMENTSDISPATCHED;
6466 
6467  this->m_tlmOut_OutputPort[0].invoke(
6468  _id,
6469  _tlmTime,
6470  _tlmBuff
6471  );
6472  }
6473  }
6474 
6477  U64 arg,
6478  Fw::Time _tlmTime
6479  )
6480  {
6481  // Check to see if it is the first time
6482  if (not this->m_first_update_StatementsFailed) {
6483  // Check to see if value has changed. If not, don't write it.
6484  if (arg == this->m_last_StatementsFailed) {
6485  return;
6486  }
6487  else {
6488  this->m_last_StatementsFailed = arg;
6489  }
6490  }
6491  else {
6492  this->m_first_update_StatementsFailed = false;
6493  this->m_last_StatementsFailed = arg;
6494  }
6495 
6496  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6497  if (
6498  this->m_timeCaller_OutputPort[0].isConnected() &&
6499  (_tlmTime == Fw::ZERO_TIME)
6500  ) {
6501  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6502  }
6503 
6504  Fw::TlmBuffer _tlmBuff;
6505  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6506  FW_ASSERT(
6507  _stat == Fw::FW_SERIALIZE_OK,
6508  static_cast<FwAssertArgType>(_stat)
6509  );
6510 
6511  FwChanIdType _id;
6512 
6513  _id = this->getIdBase() + CHANNELID_STATEMENTSFAILED;
6514 
6515  this->m_tlmOut_OutputPort[0].invoke(
6516  _id,
6517  _tlmTime,
6518  _tlmBuff
6519  );
6520  }
6521  }
6522 
6525  const Fw::StringBase& arg,
6526  Fw::Time _tlmTime
6527  )
6528  {
6529  // Check to see if it is the first time
6530  if (not this->m_first_update_SeqPath) {
6531  // Check to see if value has changed. If not, don't write it.
6532  if (arg == this->m_last_SeqPath) {
6533  return;
6534  }
6535  else {
6536  this->m_last_SeqPath = arg;
6537  }
6538  }
6539  else {
6540  this->m_first_update_SeqPath = false;
6541  this->m_last_SeqPath = arg;
6542  }
6543 
6544  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6545  if (
6546  this->m_timeCaller_OutputPort[0].isConnected() &&
6547  (_tlmTime == Fw::ZERO_TIME)
6548  ) {
6549  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6550  }
6551 
6552  Fw::TlmBuffer _tlmBuff;
6553  Fw::SerializeStatus _stat = arg.serialize(_tlmBuff, FW_MIN(FW_TLM_STRING_MAX_SIZE, 200));
6554  FW_ASSERT(
6555  _stat == Fw::FW_SERIALIZE_OK,
6556  static_cast<FwAssertArgType>(_stat)
6557  );
6558 
6559  FwChanIdType _id;
6560 
6561  _id = this->getIdBase() + CHANNELID_SEQPATH;
6562 
6563  this->m_tlmOut_OutputPort[0].invoke(
6564  _id,
6565  _tlmTime,
6566  _tlmBuff
6567  );
6568  }
6569  }
6570 
6573  U32 arg,
6574  Fw::Time _tlmTime
6575  )
6576  {
6577  // Check to see if it is the first time
6578  if (not this->m_first_update_DebugBreakpointIdx) {
6579  // Check to see if value has changed. If not, don't write it.
6580  if (arg == this->m_last_DebugBreakpointIdx) {
6581  return;
6582  }
6583  else {
6584  this->m_last_DebugBreakpointIdx = arg;
6585  }
6586  }
6587  else {
6588  this->m_first_update_DebugBreakpointIdx = false;
6589  this->m_last_DebugBreakpointIdx = arg;
6590  }
6591 
6592  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6593  if (
6594  this->m_timeCaller_OutputPort[0].isConnected() &&
6595  (_tlmTime == Fw::ZERO_TIME)
6596  ) {
6597  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6598  }
6599 
6600  Fw::TlmBuffer _tlmBuff;
6601  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6602  FW_ASSERT(
6603  _stat == Fw::FW_SERIALIZE_OK,
6604  static_cast<FwAssertArgType>(_stat)
6605  );
6606 
6607  FwChanIdType _id;
6608 
6609  _id = this->getIdBase() + CHANNELID_DEBUGBREAKPOINTIDX;
6610 
6611  this->m_tlmOut_OutputPort[0].invoke(
6612  _id,
6613  _tlmTime,
6614  _tlmBuff
6615  );
6616  }
6617  }
6618 
6622  Fw::Time _tlmTime
6623  )
6624  {
6625  // Check to see if it is the first time
6626  if (not this->m_first_update_Debug) {
6627  // Check to see if value has changed. If not, don't write it.
6628  if (arg == this->m_last_Debug) {
6629  return;
6630  }
6631  else {
6632  this->m_last_Debug = arg;
6633  }
6634  }
6635  else {
6636  this->m_first_update_Debug = false;
6637  this->m_last_Debug = arg;
6638  }
6639 
6640  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6641  if (
6642  this->m_timeCaller_OutputPort[0].isConnected() &&
6643  (_tlmTime == Fw::ZERO_TIME)
6644  ) {
6645  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6646  }
6647 
6648  Fw::TlmBuffer _tlmBuff;
6649  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6650  FW_ASSERT(
6651  _stat == Fw::FW_SERIALIZE_OK,
6652  static_cast<FwAssertArgType>(_stat)
6653  );
6654 
6655  FwChanIdType _id;
6656 
6657  _id = this->getIdBase() + CHANNELID_DEBUG;
6658 
6659  this->m_tlmOut_OutputPort[0].invoke(
6660  _id,
6661  _tlmTime,
6662  _tlmBuff
6663  );
6664  }
6665  }
6666 
6669  F32 arg,
6670  Fw::Time _tlmTime
6671  )
6672  {
6673  // Check to see if it is the first time
6674  if (not this->m_first_update_STATEMENT_TIMEOUT_SECS) {
6675  // Check to see if value has changed. If not, don't write it.
6676  if (arg == this->m_last_STATEMENT_TIMEOUT_SECS) {
6677  return;
6678  }
6679  else {
6680  this->m_last_STATEMENT_TIMEOUT_SECS = arg;
6681  }
6682  }
6683  else {
6684  this->m_first_update_STATEMENT_TIMEOUT_SECS = false;
6685  this->m_last_STATEMENT_TIMEOUT_SECS = arg;
6686  }
6687 
6688  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6689  if (
6690  this->m_timeCaller_OutputPort[0].isConnected() &&
6691  (_tlmTime == Fw::ZERO_TIME)
6692  ) {
6693  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6694  }
6695 
6696  Fw::TlmBuffer _tlmBuff;
6697  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6698  FW_ASSERT(
6699  _stat == Fw::FW_SERIALIZE_OK,
6700  static_cast<FwAssertArgType>(_stat)
6701  );
6702 
6703  FwChanIdType _id;
6704 
6706 
6707  this->m_tlmOut_OutputPort[0].invoke(
6708  _id,
6709  _tlmTime,
6710  _tlmBuff
6711  );
6712  }
6713  }
6714 
6715  // ----------------------------------------------------------------------
6716  // Parameter update hook
6717  // ----------------------------------------------------------------------
6718 
6721  {
6722  // Do nothing by default
6723  }
6724 
6727  {
6728  // Do nothing by default
6729  }
6730 
6731  // ----------------------------------------------------------------------
6732  // Parameter get functions
6733  // ----------------------------------------------------------------------
6734 
6737  {
6738  F32 _local{};
6739  this->m_paramLock.lock();
6740  valid = this->m_param_STATEMENT_TIMEOUT_SECS_valid;
6741  _local = this->m_STATEMENT_TIMEOUT_SECS;
6742  this->m_paramLock.unLock();
6743  return _local;
6744  }
6745 
6746  // ----------------------------------------------------------------------
6747  // Time
6748  // ----------------------------------------------------------------------
6749 
6751  getTime() const
6752  {
6753  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6754  Fw::Time _time;
6755  this->m_timeCaller_OutputPort[0].invoke(_time);
6756  return _time;
6757  }
6758  else {
6759  return Fw::Time(TB_NONE, 0, 0);
6760  }
6761  }
6762 
6763  // ----------------------------------------------------------------------
6764  // Message dispatch functions
6765  // ----------------------------------------------------------------------
6766 
6767  Fw::QueuedComponentBase::MsgDispatchStatus FpySequencerComponentBase ::
6768  doDispatch()
6769  {
6770  ComponentIpcSerializableBuffer _msg;
6771  FwQueuePriorityType _priority = 0;
6772 
6773  Os::Queue::Status _msgStatus = this->m_queue.receive(
6774  _msg,
6776  _priority
6777  );
6778  FW_ASSERT(
6779  _msgStatus == Os::Queue::OP_OK,
6780  static_cast<FwAssertArgType>(_msgStatus)
6781  );
6782 
6783  // Reset to beginning of buffer
6784  _msg.resetDeser();
6785 
6786  FwEnumStoreType _desMsg = 0;
6787  Fw::SerializeStatus _deserStatus = _msg.deserialize(_desMsg);
6788  FW_ASSERT(
6789  _deserStatus == Fw::FW_SERIALIZE_OK,
6790  static_cast<FwAssertArgType>(_deserStatus)
6791  );
6792 
6793  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
6794 
6795  if (_msgType == FPYSEQUENCER_COMPONENT_EXIT) {
6796  return MSG_DISPATCH_EXIT;
6797  }
6798 
6799  FwIndexType portNum = 0;
6800  _deserStatus = _msg.deserialize(portNum);
6801  FW_ASSERT(
6802  _deserStatus == Fw::FW_SERIALIZE_OK,
6803  static_cast<FwAssertArgType>(_deserStatus)
6804  );
6805 
6806  switch (_msgType) {
6807  // Handle async input port checkTimers
6808  case CHECKTIMERS_SCHED: {
6809  // Deserialize argument context
6810  U32 context;
6811  _deserStatus = _msg.deserialize(context);
6812  FW_ASSERT(
6813  _deserStatus == Fw::FW_SERIALIZE_OK,
6814  static_cast<FwAssertArgType>(_deserStatus)
6815  );
6816  // Call handler function
6817  this->checkTimers_handler(
6818  portNum,
6819  context
6820  );
6821 
6822  break;
6823  }
6824 
6825  // Handle async input port cmdResponseIn
6826  case CMDRESPONSEIN_CMDRESPONSE: {
6827  // Deserialize argument opCode
6828  FwOpcodeType opCode;
6829  _deserStatus = _msg.deserialize(opCode);
6830  FW_ASSERT(
6831  _deserStatus == Fw::FW_SERIALIZE_OK,
6832  static_cast<FwAssertArgType>(_deserStatus)
6833  );
6834 
6835  // Deserialize argument cmdSeq
6836  U32 cmdSeq;
6837  _deserStatus = _msg.deserialize(cmdSeq);
6838  FW_ASSERT(
6839  _deserStatus == Fw::FW_SERIALIZE_OK,
6840  static_cast<FwAssertArgType>(_deserStatus)
6841  );
6842 
6843  // Deserialize argument response
6844  Fw::CmdResponse response;
6845  _deserStatus = _msg.deserialize(response);
6846  FW_ASSERT(
6847  _deserStatus == Fw::FW_SERIALIZE_OK,
6848  static_cast<FwAssertArgType>(_deserStatus)
6849  );
6850  // Call handler function
6851  this->cmdResponseIn_handler(
6852  portNum,
6853  opCode,
6854  cmdSeq,
6855  response
6856  );
6857 
6858  break;
6859  }
6860 
6861  // Handle async input port pingIn
6862  case PINGIN_PING: {
6863  // Deserialize argument key
6864  U32 key;
6865  _deserStatus = _msg.deserialize(key);
6866  FW_ASSERT(
6867  _deserStatus == Fw::FW_SERIALIZE_OK,
6868  static_cast<FwAssertArgType>(_deserStatus)
6869  );
6870  // Call handler function
6871  this->pingIn_handler(
6872  portNum,
6873  key
6874  );
6875 
6876  break;
6877  }
6878 
6879  // Handle async input port seqRunIn
6880  case SEQRUNIN_CMDSEQIN: {
6881  // Deserialize argument filename
6882  char __fprime_ac_filename_buffer[Fw::StringBase::BUFFER_SIZE(240)];
6883  Fw::ExternalString filename(__fprime_ac_filename_buffer, sizeof __fprime_ac_filename_buffer);
6884  _deserStatus = _msg.deserialize(filename);
6885  FW_ASSERT(
6886  _deserStatus == Fw::FW_SERIALIZE_OK,
6887  static_cast<FwAssertArgType>(_deserStatus)
6888  );
6889  // Call handler function
6890  this->seqRunIn_handler(
6891  portNum,
6892  filename
6893  );
6894 
6895  break;
6896  }
6897 
6898  // Handle async input port tlmWrite
6899  case TLMWRITE_SCHED: {
6900  // Deserialize argument context
6901  U32 context;
6902  _deserStatus = _msg.deserialize(context);
6903  FW_ASSERT(
6904  _deserStatus == Fw::FW_SERIALIZE_OK,
6905  static_cast<FwAssertArgType>(_deserStatus)
6906  );
6907  // Call handler function
6908  this->tlmWrite_handler(
6909  portNum,
6910  context
6911  );
6912 
6913  break;
6914  }
6915 
6916  // Handle command RUN
6917  case CMD_RUN: {
6918  // Deserialize opcode
6919  FwOpcodeType _opCode = 0;
6920  _deserStatus = _msg.deserialize(_opCode);
6921  FW_ASSERT (
6922  _deserStatus == Fw::FW_SERIALIZE_OK,
6923  static_cast<FwAssertArgType>(_deserStatus)
6924  );
6925 
6926  // Deserialize command sequence
6927  U32 _cmdSeq = 0;
6928  _deserStatus = _msg.deserialize(_cmdSeq);
6929  FW_ASSERT (
6930  _deserStatus == Fw::FW_SERIALIZE_OK,
6931  static_cast<FwAssertArgType>(_deserStatus)
6932  );
6933 
6934  // Deserialize command argument buffer
6935  Fw::CmdArgBuffer args;
6936  _deserStatus = _msg.deserialize(args);
6937  FW_ASSERT (
6938  _deserStatus == Fw::FW_SERIALIZE_OK,
6939  static_cast<FwAssertArgType>(_deserStatus)
6940  );
6941 
6942  // Reset buffer
6943  args.resetDeser();
6944 
6945  // Deserialize argument fileName
6946  Fw::CmdStringArg fileName;
6947  _deserStatus = args.deserialize(fileName);
6948  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
6949  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
6950  this->cmdResponse_out(
6951  _opCode,
6952  _cmdSeq,
6954  );
6955  }
6956  // Don't crash the task if bad arguments were passed from the ground
6957  break;
6958  }
6959 
6960  // Deserialize argument block
6962  _deserStatus = args.deserialize(block);
6963  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
6964  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
6965  this->cmdResponse_out(
6966  _opCode,
6967  _cmdSeq,
6969  );
6970  }
6971  // Don't crash the task if bad arguments were passed from the ground
6972  break;
6973  }
6974 
6975  // Make sure there was no data left over.
6976  // That means the argument buffer size was incorrect.
6977 #if FW_CMD_CHECK_RESIDUAL
6978  if (args.getBuffLeft() != 0) {
6979  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
6980  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
6981  }
6982  // Don't crash the task if bad arguments were passed from the ground
6983  break;
6984  }
6985 #endif
6986 
6987  // Call handler function
6988  this->RUN_cmdHandler(
6989  _opCode, _cmdSeq,
6990  fileName,
6991  block
6992  );
6993 
6994  break;
6995  }
6996 
6997  // Handle command VALIDATE
6998  case CMD_VALIDATE: {
6999  // Deserialize opcode
7000  FwOpcodeType _opCode = 0;
7001  _deserStatus = _msg.deserialize(_opCode);
7002  FW_ASSERT (
7003  _deserStatus == Fw::FW_SERIALIZE_OK,
7004  static_cast<FwAssertArgType>(_deserStatus)
7005  );
7006 
7007  // Deserialize command sequence
7008  U32 _cmdSeq = 0;
7009  _deserStatus = _msg.deserialize(_cmdSeq);
7010  FW_ASSERT (
7011  _deserStatus == Fw::FW_SERIALIZE_OK,
7012  static_cast<FwAssertArgType>(_deserStatus)
7013  );
7014 
7015  // Deserialize command argument buffer
7016  Fw::CmdArgBuffer args;
7017  _deserStatus = _msg.deserialize(args);
7018  FW_ASSERT (
7019  _deserStatus == Fw::FW_SERIALIZE_OK,
7020  static_cast<FwAssertArgType>(_deserStatus)
7021  );
7022 
7023  // Reset buffer
7024  args.resetDeser();
7025 
7026  // Deserialize argument fileName
7027  Fw::CmdStringArg fileName;
7028  _deserStatus = args.deserialize(fileName);
7029  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7030  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7031  this->cmdResponse_out(
7032  _opCode,
7033  _cmdSeq,
7035  );
7036  }
7037  // Don't crash the task if bad arguments were passed from the ground
7038  break;
7039  }
7040 
7041  // Make sure there was no data left over.
7042  // That means the argument buffer size was incorrect.
7043 #if FW_CMD_CHECK_RESIDUAL
7044  if (args.getBuffLeft() != 0) {
7045  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7046  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7047  }
7048  // Don't crash the task if bad arguments were passed from the ground
7049  break;
7050  }
7051 #endif
7052 
7053  // Call handler function
7054  this->VALIDATE_cmdHandler(
7055  _opCode, _cmdSeq,
7056  fileName
7057  );
7058 
7059  break;
7060  }
7061 
7062  // Handle command RUN_VALIDATED
7063  case CMD_RUN_VALIDATED: {
7064  // Deserialize opcode
7065  FwOpcodeType _opCode = 0;
7066  _deserStatus = _msg.deserialize(_opCode);
7067  FW_ASSERT (
7068  _deserStatus == Fw::FW_SERIALIZE_OK,
7069  static_cast<FwAssertArgType>(_deserStatus)
7070  );
7071 
7072  // Deserialize command sequence
7073  U32 _cmdSeq = 0;
7074  _deserStatus = _msg.deserialize(_cmdSeq);
7075  FW_ASSERT (
7076  _deserStatus == Fw::FW_SERIALIZE_OK,
7077  static_cast<FwAssertArgType>(_deserStatus)
7078  );
7079 
7080  // Deserialize command argument buffer
7081  Fw::CmdArgBuffer args;
7082  _deserStatus = _msg.deserialize(args);
7083  FW_ASSERT (
7084  _deserStatus == Fw::FW_SERIALIZE_OK,
7085  static_cast<FwAssertArgType>(_deserStatus)
7086  );
7087 
7088  // Reset buffer
7089  args.resetDeser();
7090 
7091  // Deserialize argument block
7093  _deserStatus = args.deserialize(block);
7094  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7095  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7096  this->cmdResponse_out(
7097  _opCode,
7098  _cmdSeq,
7100  );
7101  }
7102  // Don't crash the task if bad arguments were passed from the ground
7103  break;
7104  }
7105 
7106  // Make sure there was no data left over.
7107  // That means the argument buffer size was incorrect.
7108 #if FW_CMD_CHECK_RESIDUAL
7109  if (args.getBuffLeft() != 0) {
7110  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7111  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7112  }
7113  // Don't crash the task if bad arguments were passed from the ground
7114  break;
7115  }
7116 #endif
7117 
7118  // Call handler function
7120  _opCode, _cmdSeq,
7121  block
7122  );
7123 
7124  break;
7125  }
7126 
7127  // Handle command CANCEL
7128  case CMD_CANCEL: {
7129  // Deserialize opcode
7130  FwOpcodeType _opCode = 0;
7131  _deserStatus = _msg.deserialize(_opCode);
7132  FW_ASSERT (
7133  _deserStatus == Fw::FW_SERIALIZE_OK,
7134  static_cast<FwAssertArgType>(_deserStatus)
7135  );
7136 
7137  // Deserialize command sequence
7138  U32 _cmdSeq = 0;
7139  _deserStatus = _msg.deserialize(_cmdSeq);
7140  FW_ASSERT (
7141  _deserStatus == Fw::FW_SERIALIZE_OK,
7142  static_cast<FwAssertArgType>(_deserStatus)
7143  );
7144 
7145  // Deserialize command argument buffer
7146  Fw::CmdArgBuffer args;
7147  _deserStatus = _msg.deserialize(args);
7148  FW_ASSERT (
7149  _deserStatus == Fw::FW_SERIALIZE_OK,
7150  static_cast<FwAssertArgType>(_deserStatus)
7151  );
7152 
7153  // Reset buffer
7154  args.resetDeser();
7155 
7156  // Make sure there was no data left over.
7157  // That means the argument buffer size was incorrect.
7158 #if FW_CMD_CHECK_RESIDUAL
7159  if (args.getBuffLeft() != 0) {
7160  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7161  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7162  }
7163  // Don't crash the task if bad arguments were passed from the ground
7164  break;
7165  }
7166 #endif
7167 
7168  // Call handler function
7169  this->CANCEL_cmdHandler(_opCode, _cmdSeq);
7170 
7171  break;
7172  }
7173 
7174  // Handle command DEBUG_SET_BREAKPOINT
7175  case CMD_DEBUG_SET_BREAKPOINT: {
7176  // Deserialize opcode
7177  FwOpcodeType _opCode = 0;
7178  _deserStatus = _msg.deserialize(_opCode);
7179  FW_ASSERT (
7180  _deserStatus == Fw::FW_SERIALIZE_OK,
7181  static_cast<FwAssertArgType>(_deserStatus)
7182  );
7183 
7184  // Deserialize command sequence
7185  U32 _cmdSeq = 0;
7186  _deserStatus = _msg.deserialize(_cmdSeq);
7187  FW_ASSERT (
7188  _deserStatus == Fw::FW_SERIALIZE_OK,
7189  static_cast<FwAssertArgType>(_deserStatus)
7190  );
7191 
7192  // Deserialize command argument buffer
7193  Fw::CmdArgBuffer args;
7194  _deserStatus = _msg.deserialize(args);
7195  FW_ASSERT (
7196  _deserStatus == Fw::FW_SERIALIZE_OK,
7197  static_cast<FwAssertArgType>(_deserStatus)
7198  );
7199 
7200  // Reset buffer
7201  args.resetDeser();
7202 
7203  // Deserialize argument stmtIdx
7204  U32 stmtIdx;
7205  _deserStatus = args.deserialize(stmtIdx);
7206  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7207  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7208  this->cmdResponse_out(
7209  _opCode,
7210  _cmdSeq,
7212  );
7213  }
7214  // Don't crash the task if bad arguments were passed from the ground
7215  break;
7216  }
7217 
7218  // Deserialize argument breakOnce
7219  bool breakOnce;
7220  _deserStatus = args.deserialize(breakOnce);
7221  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7222  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7223  this->cmdResponse_out(
7224  _opCode,
7225  _cmdSeq,
7227  );
7228  }
7229  // Don't crash the task if bad arguments were passed from the ground
7230  break;
7231  }
7232 
7233  // Make sure there was no data left over.
7234  // That means the argument buffer size was incorrect.
7235 #if FW_CMD_CHECK_RESIDUAL
7236  if (args.getBuffLeft() != 0) {
7237  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7238  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7239  }
7240  // Don't crash the task if bad arguments were passed from the ground
7241  break;
7242  }
7243 #endif
7244 
7245  // Call handler function
7247  _opCode, _cmdSeq,
7248  stmtIdx,
7249  breakOnce
7250  );
7251 
7252  break;
7253  }
7254 
7255  // Handle command DEBUG_BREAK
7256  case CMD_DEBUG_BREAK: {
7257  // Deserialize opcode
7258  FwOpcodeType _opCode = 0;
7259  _deserStatus = _msg.deserialize(_opCode);
7260  FW_ASSERT (
7261  _deserStatus == Fw::FW_SERIALIZE_OK,
7262  static_cast<FwAssertArgType>(_deserStatus)
7263  );
7264 
7265  // Deserialize command sequence
7266  U32 _cmdSeq = 0;
7267  _deserStatus = _msg.deserialize(_cmdSeq);
7268  FW_ASSERT (
7269  _deserStatus == Fw::FW_SERIALIZE_OK,
7270  static_cast<FwAssertArgType>(_deserStatus)
7271  );
7272 
7273  // Deserialize command argument buffer
7274  Fw::CmdArgBuffer args;
7275  _deserStatus = _msg.deserialize(args);
7276  FW_ASSERT (
7277  _deserStatus == Fw::FW_SERIALIZE_OK,
7278  static_cast<FwAssertArgType>(_deserStatus)
7279  );
7280 
7281  // Reset buffer
7282  args.resetDeser();
7283 
7284  // Deserialize argument breakOnce
7285  bool breakOnce;
7286  _deserStatus = args.deserialize(breakOnce);
7287  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7288  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7289  this->cmdResponse_out(
7290  _opCode,
7291  _cmdSeq,
7293  );
7294  }
7295  // Don't crash the task if bad arguments were passed from the ground
7296  break;
7297  }
7298 
7299  // Make sure there was no data left over.
7300  // That means the argument buffer size was incorrect.
7301 #if FW_CMD_CHECK_RESIDUAL
7302  if (args.getBuffLeft() != 0) {
7303  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7304  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7305  }
7306  // Don't crash the task if bad arguments were passed from the ground
7307  break;
7308  }
7309 #endif
7310 
7311  // Call handler function
7312  this->DEBUG_BREAK_cmdHandler(
7313  _opCode, _cmdSeq,
7314  breakOnce
7315  );
7316 
7317  break;
7318  }
7319 
7320  // Handle command DEBUG_CONTINUE
7321  case CMD_DEBUG_CONTINUE: {
7322  // Deserialize opcode
7323  FwOpcodeType _opCode = 0;
7324  _deserStatus = _msg.deserialize(_opCode);
7325  FW_ASSERT (
7326  _deserStatus == Fw::FW_SERIALIZE_OK,
7327  static_cast<FwAssertArgType>(_deserStatus)
7328  );
7329 
7330  // Deserialize command sequence
7331  U32 _cmdSeq = 0;
7332  _deserStatus = _msg.deserialize(_cmdSeq);
7333  FW_ASSERT (
7334  _deserStatus == Fw::FW_SERIALIZE_OK,
7335  static_cast<FwAssertArgType>(_deserStatus)
7336  );
7337 
7338  // Deserialize command argument buffer
7339  Fw::CmdArgBuffer args;
7340  _deserStatus = _msg.deserialize(args);
7341  FW_ASSERT (
7342  _deserStatus == Fw::FW_SERIALIZE_OK,
7343  static_cast<FwAssertArgType>(_deserStatus)
7344  );
7345 
7346  // Reset buffer
7347  args.resetDeser();
7348 
7349  // Make sure there was no data left over.
7350  // That means the argument buffer size was incorrect.
7351 #if FW_CMD_CHECK_RESIDUAL
7352  if (args.getBuffLeft() != 0) {
7353  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7354  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7355  }
7356  // Don't crash the task if bad arguments were passed from the ground
7357  break;
7358  }
7359 #endif
7360 
7361  // Call handler function
7362  this->DEBUG_CONTINUE_cmdHandler(_opCode, _cmdSeq);
7363 
7364  break;
7365  }
7366 
7367  // Handle command DEBUG_CLEAR_BREAKPOINT
7368  case CMD_DEBUG_CLEAR_BREAKPOINT: {
7369  // Deserialize opcode
7370  FwOpcodeType _opCode = 0;
7371  _deserStatus = _msg.deserialize(_opCode);
7372  FW_ASSERT (
7373  _deserStatus == Fw::FW_SERIALIZE_OK,
7374  static_cast<FwAssertArgType>(_deserStatus)
7375  );
7376 
7377  // Deserialize command sequence
7378  U32 _cmdSeq = 0;
7379  _deserStatus = _msg.deserialize(_cmdSeq);
7380  FW_ASSERT (
7381  _deserStatus == Fw::FW_SERIALIZE_OK,
7382  static_cast<FwAssertArgType>(_deserStatus)
7383  );
7384 
7385  // Deserialize command argument buffer
7386  Fw::CmdArgBuffer args;
7387  _deserStatus = _msg.deserialize(args);
7388  FW_ASSERT (
7389  _deserStatus == Fw::FW_SERIALIZE_OK,
7390  static_cast<FwAssertArgType>(_deserStatus)
7391  );
7392 
7393  // Reset buffer
7394  args.resetDeser();
7395 
7396  // Make sure there was no data left over.
7397  // That means the argument buffer size was incorrect.
7398 #if FW_CMD_CHECK_RESIDUAL
7399  if (args.getBuffLeft() != 0) {
7400  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7401  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7402  }
7403  // Don't crash the task if bad arguments were passed from the ground
7404  break;
7405  }
7406 #endif
7407 
7408  // Call handler function
7409  this->DEBUG_CLEAR_BREAKPOINT_cmdHandler(_opCode, _cmdSeq);
7410 
7411  break;
7412  }
7413 
7414  // Handle internal interface directive_getPrm
7415  case INT_IF_DIRECTIVE_GETPRM: {
7417  _deserStatus = _msg.deserialize(directive);
7418 
7419  // Internal interface should always deserialize
7420  FW_ASSERT(
7421  Fw::FW_SERIALIZE_OK == _deserStatus,
7422  static_cast<FwAssertArgType>(_deserStatus)
7423  );
7424 
7425  // Make sure there was no data left over.
7426  // That means the buffer size was incorrect.
7427  FW_ASSERT(
7428  _msg.getBuffLeft() == 0,
7429  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7430  );
7431 
7432  // Call handler function
7434  directive
7435  );
7436 
7437  break;
7438  }
7439 
7440  // Handle internal interface directive_getTlm
7441  case INT_IF_DIRECTIVE_GETTLM: {
7443  _deserStatus = _msg.deserialize(directive);
7444 
7445  // Internal interface should always deserialize
7446  FW_ASSERT(
7447  Fw::FW_SERIALIZE_OK == _deserStatus,
7448  static_cast<FwAssertArgType>(_deserStatus)
7449  );
7450 
7451  // Make sure there was no data left over.
7452  // That means the buffer size was incorrect.
7453  FW_ASSERT(
7454  _msg.getBuffLeft() == 0,
7455  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7456  );
7457 
7458  // Call handler function
7460  directive
7461  );
7462 
7463  break;
7464  }
7465 
7466  // Handle internal interface directive_goto
7467  case INT_IF_DIRECTIVE_GOTO: {
7469  _deserStatus = _msg.deserialize(directive);
7470 
7471  // Internal interface should always deserialize
7472  FW_ASSERT(
7473  Fw::FW_SERIALIZE_OK == _deserStatus,
7474  static_cast<FwAssertArgType>(_deserStatus)
7475  );
7476 
7477  // Make sure there was no data left over.
7478  // That means the buffer size was incorrect.
7479  FW_ASSERT(
7480  _msg.getBuffLeft() == 0,
7481  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7482  );
7483 
7484  // Call handler function
7486  directive
7487  );
7488 
7489  break;
7490  }
7491 
7492  // Handle internal interface directive_if
7493  case INT_IF_DIRECTIVE_IF: {
7495  _deserStatus = _msg.deserialize(directive);
7496 
7497  // Internal interface should always deserialize
7498  FW_ASSERT(
7499  Fw::FW_SERIALIZE_OK == _deserStatus,
7500  static_cast<FwAssertArgType>(_deserStatus)
7501  );
7502 
7503  // Make sure there was no data left over.
7504  // That means the buffer size was incorrect.
7505  FW_ASSERT(
7506  _msg.getBuffLeft() == 0,
7507  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7508  );
7509 
7510  // Call handler function
7512  directive
7513  );
7514 
7515  break;
7516  }
7517 
7518  // Handle internal interface directive_noOp
7519  case INT_IF_DIRECTIVE_NOOP: {
7521  _deserStatus = _msg.deserialize(directive);
7522 
7523  // Internal interface should always deserialize
7524  FW_ASSERT(
7525  Fw::FW_SERIALIZE_OK == _deserStatus,
7526  static_cast<FwAssertArgType>(_deserStatus)
7527  );
7528 
7529  // Make sure there was no data left over.
7530  // That means the buffer size was incorrect.
7531  FW_ASSERT(
7532  _msg.getBuffLeft() == 0,
7533  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7534  );
7535 
7536  // Call handler function
7538  directive
7539  );
7540 
7541  break;
7542  }
7543 
7544  // Handle internal interface directive_setLocalVar
7545  case INT_IF_DIRECTIVE_SETLOCALVAR: {
7547  _deserStatus = _msg.deserialize(directive);
7548 
7549  // Internal interface should always deserialize
7550  FW_ASSERT(
7551  Fw::FW_SERIALIZE_OK == _deserStatus,
7552  static_cast<FwAssertArgType>(_deserStatus)
7553  );
7554 
7555  // Make sure there was no data left over.
7556  // That means the buffer size was incorrect.
7557  FW_ASSERT(
7558  _msg.getBuffLeft() == 0,
7559  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7560  );
7561 
7562  // Call handler function
7564  directive
7565  );
7566 
7567  break;
7568  }
7569 
7570  // Handle internal interface directive_waitAbs
7571  case INT_IF_DIRECTIVE_WAITABS: {
7573  _deserStatus = _msg.deserialize(directive);
7574 
7575  // Internal interface should always deserialize
7576  FW_ASSERT(
7577  Fw::FW_SERIALIZE_OK == _deserStatus,
7578  static_cast<FwAssertArgType>(_deserStatus)
7579  );
7580 
7581  // Make sure there was no data left over.
7582  // That means the buffer size was incorrect.
7583  FW_ASSERT(
7584  _msg.getBuffLeft() == 0,
7585  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7586  );
7587 
7588  // Call handler function
7590  directive
7591  );
7592 
7593  break;
7594  }
7595 
7596  // Handle internal interface directive_waitRel
7597  case INT_IF_DIRECTIVE_WAITREL: {
7599  _deserStatus = _msg.deserialize(directive);
7600 
7601  // Internal interface should always deserialize
7602  FW_ASSERT(
7603  Fw::FW_SERIALIZE_OK == _deserStatus,
7604  static_cast<FwAssertArgType>(_deserStatus)
7605  );
7606 
7607  // Make sure there was no data left over.
7608  // That means the buffer size was incorrect.
7609  FW_ASSERT(
7610  _msg.getBuffLeft() == 0,
7611  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7612  );
7613 
7614  // Call handler function
7616  directive
7617  );
7618 
7619  break;
7620  }
7621 
7622 
7623  // Handle signals to internal state machines
7624  case INTERNAL_STATE_MACHINE_SIGNAL:
7625  this->smDispatch(_msg);
7626  break;
7627 
7628  default:
7629  return MSG_DISPATCH_ERROR;
7630  }
7631 
7632  return MSG_DISPATCH_OK;
7633  }
7634 
7635  // ----------------------------------------------------------------------
7636  // Calls for messages received on special input ports
7637  // ----------------------------------------------------------------------
7638 
7639  void FpySequencerComponentBase ::
7640  m_p_cmdIn_in(
7641  Fw::PassiveComponentBase* callComp,
7642  FwIndexType portNum,
7643  FwOpcodeType opCode,
7644  U32 cmdSeq,
7645  Fw::CmdArgBuffer& args
7646  )
7647  {
7648  FW_ASSERT(callComp);
7649  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7650 
7651  const U32 idBase = callComp->getIdBase();
7652  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
7653 
7654  // Select base class function based on opcode
7655  switch (opCode - idBase) {
7656  case OPCODE_RUN: {
7657  compPtr->RUN_cmdHandlerBase(
7658  opCode,
7659  cmdSeq,
7660  args
7661  );
7662  break;
7663  }
7664 
7665  case OPCODE_VALIDATE: {
7666  compPtr->VALIDATE_cmdHandlerBase(
7667  opCode,
7668  cmdSeq,
7669  args
7670  );
7671  break;
7672  }
7673 
7674  case OPCODE_RUN_VALIDATED: {
7675  compPtr->RUN_VALIDATED_cmdHandlerBase(
7676  opCode,
7677  cmdSeq,
7678  args
7679  );
7680  break;
7681  }
7682 
7683  case OPCODE_CANCEL: {
7684  compPtr->CANCEL_cmdHandlerBase(
7685  opCode,
7686  cmdSeq,
7687  args
7688  );
7689  break;
7690  }
7691 
7693  compPtr->DEBUG_SET_BREAKPOINT_cmdHandlerBase(
7694  opCode,
7695  cmdSeq,
7696  args
7697  );
7698  break;
7699  }
7700 
7701  case OPCODE_DEBUG_BREAK: {
7702  compPtr->DEBUG_BREAK_cmdHandlerBase(
7703  opCode,
7704  cmdSeq,
7705  args
7706  );
7707  break;
7708  }
7709 
7710  case OPCODE_DEBUG_CONTINUE: {
7711  compPtr->DEBUG_CONTINUE_cmdHandlerBase(
7712  opCode,
7713  cmdSeq,
7714  args
7715  );
7716  break;
7717  }
7718 
7720  compPtr->DEBUG_CLEAR_BREAKPOINT_cmdHandlerBase(
7721  opCode,
7722  cmdSeq,
7723  args
7724  );
7725  break;
7726  }
7727 
7729  Fw::CmdResponse _cstat = compPtr->paramSet_STATEMENT_TIMEOUT_SECS(args);
7730  compPtr->cmdResponse_out(
7731  opCode,
7732  cmdSeq,
7733  _cstat
7734  );
7735  break;
7736  }
7737 
7739  Fw::CmdResponse _cstat = compPtr->paramSave_STATEMENT_TIMEOUT_SECS();
7740  compPtr->cmdResponse_out(
7741  opCode,
7742  cmdSeq,
7743  _cstat
7744  );
7745  break;
7746  }
7747  }
7748  }
7749 
7750  // ----------------------------------------------------------------------
7751  // Calls for messages received on typed input ports
7752  // ----------------------------------------------------------------------
7753 
7754  void FpySequencerComponentBase ::
7755  m_p_checkTimers_in(
7756  Fw::PassiveComponentBase* callComp,
7757  FwIndexType portNum,
7758  U32 context
7759  )
7760  {
7761  FW_ASSERT(callComp);
7762  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7763  compPtr->checkTimers_handlerBase(
7764  portNum,
7765  context
7766  );
7767  }
7768 
7769  void FpySequencerComponentBase ::
7770  m_p_cmdResponseIn_in(
7771  Fw::PassiveComponentBase* callComp,
7772  FwIndexType portNum,
7773  FwOpcodeType opCode,
7774  U32 cmdSeq,
7775  const Fw::CmdResponse& response
7776  )
7777  {
7778  FW_ASSERT(callComp);
7779  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7780  compPtr->cmdResponseIn_handlerBase(
7781  portNum,
7782  opCode,
7783  cmdSeq,
7784  response
7785  );
7786  }
7787 
7788  void FpySequencerComponentBase ::
7789  m_p_pingIn_in(
7790  Fw::PassiveComponentBase* callComp,
7791  FwIndexType portNum,
7792  U32 key
7793  )
7794  {
7795  FW_ASSERT(callComp);
7796  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7797  compPtr->pingIn_handlerBase(
7798  portNum,
7799  key
7800  );
7801  }
7802 
7803  void FpySequencerComponentBase ::
7804  m_p_seqRunIn_in(
7805  Fw::PassiveComponentBase* callComp,
7806  FwIndexType portNum,
7807  const Fw::StringBase& filename
7808  )
7809  {
7810  FW_ASSERT(callComp);
7811  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7812  compPtr->seqRunIn_handlerBase(
7813  portNum,
7814  filename
7815  );
7816  }
7817 
7818  void FpySequencerComponentBase ::
7819  m_p_tlmWrite_in(
7820  Fw::PassiveComponentBase* callComp,
7821  FwIndexType portNum,
7822  U32 context
7823  )
7824  {
7825  FW_ASSERT(callComp);
7826  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
7827  compPtr->tlmWrite_handlerBase(
7828  portNum,
7829  context
7830  );
7831  }
7832 
7833  // ----------------------------------------------------------------------
7834  // Send signal helper functions
7835  // ----------------------------------------------------------------------
7836 
7837  void FpySequencerComponentBase ::
7838  sendSignalStart(
7839  SmId smId,
7840  FwEnumStoreType signal,
7841  Fw::SerializeBufferBase& buffer
7842  )
7843  {
7845 
7846  // Serialize the message type
7847  status = buffer.serialize(static_cast<FwEnumStoreType>(INTERNAL_STATE_MACHINE_SIGNAL));
7848  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7849 
7850  // Serialize the port number
7851  status = buffer.serialize(static_cast<FwIndexType>(0));
7852  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7853 
7854  // Serialize the state machine ID
7855  status = buffer.serialize(static_cast<FwEnumStoreType>(smId));
7856  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7857 
7858  // Serialize the signal
7859  status = buffer.serialize(static_cast<FwEnumStoreType>(signal));
7860  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7861  }
7862 
7863  void FpySequencerComponentBase ::
7864  sequencer_sendSignalFinish(Fw::SerializeBufferBase& buffer)
7865  {
7866  // Send message
7868  Os::Queue::Status qStatus = this->m_queue.send(buffer, 9, _block);
7869 
7870  FW_ASSERT(
7871  qStatus == Os::Queue::OP_OK,
7872  static_cast<FwAssertArgType>(qStatus)
7873  );
7874  }
7875 
7876  // ----------------------------------------------------------------------
7877  // Helper functions for state machine dispatch
7878  // ----------------------------------------------------------------------
7879 
7880  void FpySequencerComponentBase ::
7881  smDispatch(Fw::SerializeBufferBase& buffer)
7882  {
7883  // Deserialize the state machine ID and signal
7884  FwEnumStoreType storedSmId;
7885  FwEnumStoreType storedSignal;
7886  FpySequencerComponentBase::deserializeSmIdAndSignal(buffer, storedSmId, storedSignal);
7887 
7888  // Select the target state machine instance
7889  const SmId smId = static_cast<SmId>(storedSmId);
7890  switch (smId) {
7891  case SmId::sequencer: {
7893  this->Svc_FpySequencer_SequencerStateMachine_smDispatch(buffer, this->m_stateMachine_sequencer, signal);
7894  break;
7895  }
7896  default:
7897  FW_ASSERT(0, static_cast<FwAssertArgType>(smId));
7898  break;
7899  }
7900  }
7901 
7902  void FpySequencerComponentBase ::
7903  deserializeSmIdAndSignal(
7904  Fw::SerializeBufferBase& buffer,
7905  FwEnumStoreType& smId,
7906  FwEnumStoreType& signal
7907  )
7908  {
7909  // Move deserialization beyond the message type and port number
7910  Fw::SerializeStatus status =
7911  buffer.moveDeserToOffset(ComponentIpcSerializableBuffer::DATA_OFFSET);
7912  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7913 
7914  // Deserialize the state machine ID
7915  status = buffer.deserialize(smId);
7916  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7917 
7918  // Deserialize the signal
7919  status = buffer.deserialize(signal);
7920  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7921  }
7922 
7923  void FpySequencerComponentBase ::
7924  Svc_FpySequencer_SequencerStateMachine_smDispatch(
7925  Fw::SerializeBufferBase& buffer,
7926  Svc_FpySequencer_SequencerStateMachine& sm,
7928  )
7929  {
7930  switch (signal) {
7932  // Deserialize the data
7934  const Fw::SerializeStatus status = buffer.deserialize(value);
7935  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7936  // Assert no data left in buffer
7937  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7938  // Call the sendSignal function for sm and cmd_VALIDATE
7939  sm.sendSignal_cmd_VALIDATE(value);
7940  break;
7941  }
7943  // Deserialize the data
7945  const Fw::SerializeStatus status = buffer.deserialize(value);
7946  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7947  // Assert no data left in buffer
7948  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7949  // Call the sendSignal function for sm and cmd_RUN
7950  sm.sendSignal_cmd_RUN(value);
7951  break;
7952  }
7954  // Deserialize the data
7956  const Fw::SerializeStatus status = buffer.deserialize(value);
7957  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7958  // Assert no data left in buffer
7959  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7960  // Call the sendSignal function for sm and cmd_RUN_VALIDATED
7961  sm.sendSignal_cmd_RUN_VALIDATED(value);
7962  break;
7963  }
7965  // Assert no data left in buffer
7966  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7967  // Call the sendSignal function for sm and cmd_CANCEL
7968  sm.sendSignal_cmd_CANCEL();
7969  break;
7970  }
7972  // Deserialize the data
7974  const Fw::SerializeStatus status = buffer.deserialize(value);
7975  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
7976  // Assert no data left in buffer
7977  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7978  // Call the sendSignal function for sm and cmd_DEBUG_SET_BREAKPOINT
7979  sm.sendSignal_cmd_DEBUG_SET_BREAKPOINT(value);
7980  break;
7981  }
7983  // Assert no data left in buffer
7984  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7985  // Call the sendSignal function for sm and cmd_DEBUG_CLEAR_BREAKPOINT
7986  sm.sendSignal_cmd_DEBUG_CLEAR_BREAKPOINT();
7987  break;
7988  }
7990  // Assert no data left in buffer
7991  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7992  // Call the sendSignal function for sm and result_failure
7993  sm.sendSignal_result_failure();
7994  break;
7995  }
7997  // Assert no data left in buffer
7998  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
7999  // Call the sendSignal function for sm and result_success
8000  sm.sendSignal_result_success();
8001  break;
8002  }
8004  // Assert no data left in buffer
8005  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8006  // Call the sendSignal function for sm and entered
8007  sm.sendSignal_entered();
8008  break;
8009  }
8011  // Assert no data left in buffer
8012  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8013  // Call the sendSignal function for sm and result_dispatchStatement_success
8014  sm.sendSignal_result_dispatchStatement_success();
8015  break;
8016  }
8018  // Assert no data left in buffer
8019  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8020  // Call the sendSignal function for sm and result_dispatchStatement_failure
8021  sm.sendSignal_result_dispatchStatement_failure();
8022  break;
8023  }
8025  // Assert no data left in buffer
8026  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8027  // Call the sendSignal function for sm and result_dispatchStatement_noMoreStatements
8028  sm.sendSignal_result_dispatchStatement_noMoreStatements();
8029  break;
8030  }
8032  // Assert no data left in buffer
8033  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8034  // Call the sendSignal function for sm and checkTimersIn
8035  sm.sendSignal_checkTimersIn();
8036  break;
8037  }
8039  // Assert no data left in buffer
8040  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8041  // Call the sendSignal function for sm and result_checkShouldWake_wakeup
8042  sm.sendSignal_result_checkShouldWake_wakeup();
8043  break;
8044  }
8046  // Assert no data left in buffer
8047  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8048  // Call the sendSignal function for sm and result_checkShouldWake_keepSleeping
8049  sm.sendSignal_result_checkShouldWake_keepSleeping();
8050  break;
8051  }
8053  // Assert no data left in buffer
8054  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8055  // Call the sendSignal function for sm and result_timeOpFailed
8056  sm.sendSignal_result_timeOpFailed();
8057  break;
8058  }
8060  // Assert no data left in buffer
8061  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8062  // Call the sendSignal function for sm and stmtResponse_beginSleep
8063  sm.sendSignal_stmtResponse_beginSleep();
8064  break;
8065  }
8067  // Assert no data left in buffer
8068  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8069  // Call the sendSignal function for sm and stmtResponse_success
8070  sm.sendSignal_stmtResponse_success();
8071  break;
8072  }
8074  // Assert no data left in buffer
8075  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8076  // Call the sendSignal function for sm and stmtResponse_failure
8077  sm.sendSignal_stmtResponse_failure();
8078  break;
8079  }
8081  // Assert no data left in buffer
8082  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8083  // Call the sendSignal function for sm and stmtResponse_unexpected
8084  sm.sendSignal_stmtResponse_unexpected();
8085  break;
8086  }
8088  // Assert no data left in buffer
8089  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8090  // Call the sendSignal function for sm and result_checkStatementTimeout_statementTimeout
8091  sm.sendSignal_result_checkStatementTimeout_statementTimeout();
8092  break;
8093  }
8095  // Assert no data left in buffer
8096  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8097  // Call the sendSignal function for sm and result_checkStatementTimeout_noTimeout
8098  sm.sendSignal_result_checkStatementTimeout_noTimeout();
8099  break;
8100  }
8102  // Assert no data left in buffer
8103  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8104  // Call the sendSignal function for sm and cmd_DEBUG_CONTINUE
8105  sm.sendSignal_cmd_DEBUG_CONTINUE();
8106  break;
8107  }
8109  // Deserialize the data
8111  const Fw::SerializeStatus status = buffer.deserialize(value);
8112  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8113  // Assert no data left in buffer
8114  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8115  // Call the sendSignal function for sm and cmd_DEBUG_BREAK
8116  sm.sendSignal_cmd_DEBUG_BREAK(value);
8117  break;
8118  }
8119  default:
8120  FW_ASSERT(0, static_cast<FwAssertArgType>(signal));
8121  break;
8122  }
8123  }
8124 
8125  // ----------------------------------------------------------------------
8126  // Parameter set functions
8127  // ----------------------------------------------------------------------
8128 
8129  Fw::CmdResponse FpySequencerComponentBase ::
8130  paramSet_STATEMENT_TIMEOUT_SECS(Fw::SerializeBufferBase& val)
8131  {
8132  F32 _localVal{};
8133  const Fw::SerializeStatus _stat = val.deserialize(_localVal);
8134  if (_stat != Fw::FW_SERIALIZE_OK) {
8136  }
8137 
8138  // Assign value only if successfully deserialized
8139  this->m_paramLock.lock();
8140  this->m_STATEMENT_TIMEOUT_SECS = _localVal;
8141  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::VALID;
8142  this->m_paramLock.unLock();
8143 
8144  // Call notifier
8146  return Fw::CmdResponse::OK;
8147  }
8148 
8149  // ----------------------------------------------------------------------
8150  // Parameter save functions
8151  // ----------------------------------------------------------------------
8152 
8153  Fw::CmdResponse FpySequencerComponentBase ::
8154  paramSave_STATEMENT_TIMEOUT_SECS()
8155  {
8156  Fw::ParamBuffer _saveBuff;
8157  FwPrmIdType _id;
8158  Fw::SerializeStatus _stat;
8159  if (this->m_prmSet_OutputPort[0].isConnected()) {
8160  this->m_paramLock.lock();
8161 
8162  _stat = _saveBuff.serialize(m_STATEMENT_TIMEOUT_SECS);
8163 
8164  this->m_paramLock.unLock();
8165  if (_stat != Fw::FW_SERIALIZE_OK) {
8167  }
8168 
8169  _id = static_cast<FwPrmIdType>(this->getIdBase() + PARAMID_STATEMENT_TIMEOUT_SECS);
8170 
8171  // Save the parameter
8172  this->m_prmSet_OutputPort[0].invoke(
8173  _id,
8174  _saveBuff
8175  );
8176 
8177  return Fw::CmdResponse::OK;
8178  }
8179 
8181  }
8182 
8183 }
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
The size of the serial representation.
called in DEBUG_CONTINUE cmd. only raised in RUNNING.DEBUG_BROKEN state
Serialization/Deserialization operation was successful.
The size of the serial representations of the port arguments.
Definition: CmdPortAc.hpp:38
void sequencer_sendSignal_result_dispatchStatement_noMoreStatements()
Send signal result_dispatchStatement_noMoreStatements to state machine sequencer. ...
called in DEBUG_BREAK cmd. only raised in RUNNING state
void sequencer_sendSignal_result_checkShouldWake_keepSleeping()
Send signal result_checkShouldWake_keepSleeping to state machine sequencer.
called when an unexpected or incorrect statement response comes in. only raised in the RUNNING state ...
virtual void directive_waitRel_internalInterfaceHandler(const Svc::FpySequencer_WaitRelDirective &directive)=0
Internal interface handler for directive_waitRel.
called in dispatchStatement method when a statement was unable to be sent out
void addCallPort(InputTimePort *callPort)
Register an input port.
Definition: TimePortAc.cpp:134
void invoke(Fw::ComBuffer &data, U32 context) const
Invoke a port interface.
Definition: ComPortAc.cpp:156
Definition: Time.hpp:9
The size of the serial representations of the port arguments.
void init()
Initialization function.
Definition: ComPortAc.cpp:137
The size of the serial representations of the port arguments.
virtual void DEBUG_SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_SET_BREAKPOINT.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
Operation succeeded.
Definition: Os.hpp:26
void set_cmdOut_OutputPort(FwIndexType portNum, Fw::InputComPort *port)
Connect port to cmdOut[portNum].
called in dispatchStatement method when there were no more statements in the sequence ...
virtual void parametersLoaded()
Called whenever parameters are loaded.
void log_WARNING_HI_StatementFailed(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event StatementFailed.
void log_WARNING_HI_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
PlatformSizeType FwSizeType
FwIndexType getNum_cmdResponseOut_OutputPorts() const
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Definition: Queue.cpp:59
void log_WARNING_HI_CmdResponseWhileNotAwaiting(U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
I32 FwEnumStoreType
virtual void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)=0
Handler for input port cmdResponseIn.
void sequencer_sendSignal_result_dispatchStatement_success()
Send signal result_dispatchStatement_success to state machine sequencer.
void log_WARNING_HI_WrongCRC(U32 expected, U32 actual) const
Log event WrongCRC.
Status
status returned from the queue send function
Definition: Queue.hpp:30
virtual void DEBUG_CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void parameterUpdated(FwPrmIdType id)
Called whenever a parameter is updated.
#define FW_LOG_STRING_MAX_SIZE
Max size of log string parameter type.
Definition: FpConfig.h:219
Loads, validates and runs a sequence.
called when the expected statement response comes in, and it is OK. only raised in the RUNNING...
SerializeStatus serialize(U8 val)
serialize 8-bit unsigned int
called on VALIDATE cmd with the path of the sequence file to validate. only raised in IDLE state ...
called on RUN cmd with the path of the sequence file to run. only raised in IDLE state ...
called on RUN_VALIDATED cmd. only raised in AWAITING_CMD_RUN_VALIDATED state
void init()
Initialization function.
Definition: SchedPortAc.cpp:56
virtual void tlmWrite_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port tlmWrite.
const char * toChar() const
Definition: String.hpp:50
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void init()
Initialization function.
Definition: CmdPortAc.cpp:56
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void sequencer_sendSignal_cmd_DEBUG_SET_BREAKPOINT(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_SET_BREAKPOINT to state machine sequencer.
void set_tlmOut_OutputPort(FwIndexType portNum, Fw::InputTlmPort *port)
Connect port to tlmOut[portNum].
void unLock()
unlock the mutex and assert success
Definition: Mutex.cpp:40
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
U32 FwChanIdType
The type of a telemetry channel identifier.
virtual void CANCEL_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
void tlmWrite_State(I32 arg, Fw::Time _tlmTime=Fw::Time())
void invoke(U32 key) const
Invoke a port interface.
Definition: PingPortAc.cpp:147
void addCallPort(InputTlmGetPort *callPort)
Register an input port.
void log_WARNING_HI_FileReadError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
void sequencer_sendSignal_result_checkShouldWake_wakeup()
Send signal result_checkShouldWake_wakeup to state machine sequencer.
virtual void directive_goto_internalInterfaceHandler(const Svc::FpySequencer_GotoDirective &directive)=0
Internal interface handler for directive_goto.
void directive_if_internalInterfaceInvoke(const Svc::FpySequencer_IfDirective &directive)
Internal interface base-class function for directive_if.
const Time ZERO_TIME
Definition: Time.cpp:5
void sequencer_sendSignal_result_success()
Send signal result_success to state machine sequencer.
void log_WARNING_HI_FileReadDeserializeError(const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
void cmdResponseIn_handlerBase(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Handler base-class function for input port cmdResponseIn.
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
virtual ~FpySequencerComponentBase()
Destroy FpySequencerComponentBase object.
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
void directive_noOp_internalInterfaceInvoke(const Svc::FpySequencer_NoOpDirective &directive)
Internal interface base-class function for directive_noOp.
void init()
Initialization function.
Definition: TlmPortAc.cpp:144
Enum representing a command response.
virtual void RUN_VALIDATED_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN_VALIDATED.
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
void init()
Initialization function.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::FpySequencer_BlockState block)=0
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Os::Queue m_queue
queue object for active component
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
virtual void RUN_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName, Svc::FpySequencer_BlockState block)=0
void sequencer_sendSignal_result_dispatchStatement_failure()
Send signal result_dispatchStatement_failure to state machine sequencer.
virtual void pingIn_handler(FwIndexType portNum, U32 key)=0
Handler for input port pingIn.
Svc::InputSchedPort * get_checkTimers_InputPort(FwIndexType portNum)
void addCallPort(InputTlmPort *callPort)
Register an input port.
Definition: TlmPortAc.cpp:150
void addCallPort(InputPrmGetPort *callPort)
Register an input port.
void RUN_VALIDATED_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void init()
Object initializer.
Definition: ObjBase.cpp:26
void DEBUG_SET_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_pingOut_OutputPort(FwIndexType portNum, Svc::InputPingPort *port)
Connect port to pingOut[portNum].
U32 FwEventIdType
The type of an event identifier.
SerializeStatus
forward declaration for string
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void set_getTlmChan_OutputPort(FwIndexType portNum, Fw::InputTlmGetPort *port)
Connect port to getTlmChan[portNum].
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: CmdPortAc.cpp:62
float F32
32-bit floating point
Definition: BasicTypes.h:86
virtual void checkTimers_handler(FwIndexType portNum, U32 context)=0
Handler for input port checkTimers.
Message will block until space is available.
Definition: Queue.hpp:47
bool isConnected_timeCaller_OutputPort(FwIndexType portNum)
void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const
Log event ExtraBytesInSequence.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_StatementTimedOut(Svc::Fpy::StatementType stmtType, U32 stmtOpcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event StatementTimedOut.
void regCommands()
Register commands with the Command Dispatcher.
void invoke(FwOpcodeType opCode) const
Invoke a port interface.
called in dispatchStatement method when a statement was successfully dispatched
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
void log_WARNING_HI_EndOfFileError(const Fw::StringBase &filePath) const
Log event EndOfFileError.
void log_WARNING_HI_WrongCmdResponseOpcode(U32 opcode, Fw::CmdResponse response, U32 expectedOpcode) const
Log event WrongCmdResponseOpcode.
U32 FwOpcodeType
The type of a command opcode.
Fw::TlmValid invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
#define FW_OBJECT_NAMES
Indicates whether or not object names are stored (more memory, can be used for tracking objects) ...
Definition: FpConfig.h:53
Serializable::SizeType getBuffLeft() const
returns how much deserialization buffer is left
void init()
Initialization function.
Definition: TimePortAc.cpp:128
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
Os::Queue::Status createQueue(FwSizeType depth, FwSizeType msgSize)
Svc::InputPingPort * get_pingIn_InputPort(FwIndexType portNum)
void tlmWrite_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port tlmWrite.
bool isConnected_prmSet_OutputPort(FwIndexType portNum)
#define FW_MIN(a, b)
MIN macro.
Definition: BasicTypes.h:95
A less serious but recoverable event.
Fw::ParamValid invoke(FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke a port interface.
ActiveComponentBase(const char *name)
Constructor.
void init()
Initialization function.
Definition: PingPortAc.cpp:128
Fw::InputCmdPort * get_cmdIn_InputPort(FwIndexType portNum)
void tlmWrite_DebugBreakpointIdx(U32 arg, Fw::Time _tlmTime=Fw::Time())
void DEBUG_CONTINUE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void invoke(Fw::Time &time) const
Invoke a port interface.
Definition: TimePortAc.cpp:147
void sequencer_sendSignal_cmd_DEBUG_CLEAR_BREAKPOINT()
Send signal cmd_DEBUG_CLEAR_BREAKPOINT to state machine sequencer.
void pingIn_handlerBase(FwIndexType portNum, U32 key)
Handler base-class function for input port pingIn.
void set_timeCaller_OutputPort(FwIndexType portNum, Fw::InputTimePort *port)
Connect port to timeCaller[portNum].
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
const char * toChar() const
Definition: ObjectName.hpp:50
void invoke(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) const
Invoke a port interface.
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
Svc_FpySequencer_SequencerStateMachine(FpySequencerComponentBase &component)
Constructor.
FwSizeType SizeType
void set_cmdResponseOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to cmdResponseOut[portNum].
void addCallPort(InputPingPort *callPort)
Register an input port.
Definition: PingPortAc.cpp:134
virtual void DEBUG_CLEAR_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_CLEAR_BREAKPOINT.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:42
void log_WARNING_HI_WrongCmdResponseIndex(U32 opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
void init()
Initialization function.
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_DebugBreakpointCleared() const
Log event DebugBreakpointCleared.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
void VALIDATE_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
Must be called after VALIDATE. Runs the sequence that was validated.
void resetDeser()
reset deserialization to beginning
virtual void seqRunIn_preMsgHook(FwIndexType portNum, const Fw::StringBase &filename)
Pre-message hook for async input port seqRunIn.
bool isConnected_getParam_OutputPort(FwIndexType portNum)
message to exit active component task
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, U32 opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
A string backed by an external buffer.
A serious but recoverable event.
void CANCEL_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void directive_waitAbs_internalInterfaceInvoke(const Svc::FpySequencer_WaitAbsDirective &directive)
Internal interface base-class function for directive_waitAbs.
void log_WARNING_HI_DirectiveDeserializeError(U32 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
void directive_setLocalVar_internalInterfaceInvoke(const Svc::FpySequencer_SetLocalVarDirective &directive)
Internal interface base-class function for directive_setLocalVar.
void set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
The size of the serial representations of the port arguments.
Definition: PingPortAc.hpp:36
void invoke(FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val) const
Invoke a port interface.
Definition: TlmPortAc.cpp:163
bool isConnected() const
Definition: PortBase.cpp:42
void sequencer_sendSignal_result_checkStatementTimeout_noTimeout()
Send signal result_checkStatementTimeout_noTimeout to state machine sequencer.
void directive_getTlm_internalInterfaceInvoke(const Svc::FpySequencer_GetTlmDirective &directive)
Internal interface base-class function for directive_getTlm.
U32 FwPrmIdType
The type of a parameter identifier.
SerializeStatus moveDeserToOffset(FwSizeType offset)
Moves deserialization to the specified offset.
virtual void tlmWrite_handler(FwIndexType portNum, U32 context)=0
Handler for input port tlmWrite.
Svc::InputCmdSeqInPort * get_seqRunIn_InputPort(FwIndexType portNum)
void loadParameters()
Load the parameters from a parameter source.
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
virtual void directive_if_internalInterfaceHandler(const Svc::FpySequencer_IfDirective &directive)=0
Internal interface handler for directive_if.
#define PRI_FwIndexType
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
Definition: StringBase.cpp:55
void init()
Initialization function.
Definition: LogPortAc.cpp:151
Command successfully executed.
void log_WARNING_HI_CommandSerializeError(U32 cmdOpcode, U64 bufCapacity, U64 curPos, U64 writeSize, U8 errorCode, U32 stmtIdx) const
Log event CommandSerializeError.
The size of the serial representations of the port arguments.
Definition: SchedPortAc.hpp:36
void setPortNum(FwIndexType portNum)
void log_ACTIVITY_HI_DebugBroken(U32 stmtIdx, bool breakOnce) const
Log event DebugBroken.
virtual void DEBUG_SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, U32 stmtIdx, bool breakOnce)=0
uint8_t U8
8-bit unsigned integer
Definition: BasicTypes.h:56
virtual void directive_noOp_internalInterfaceHandler(const Svc::FpySequencer_NoOpDirective &directive)=0
Internal interface handler for directive_noOp.
BlockingType
message type
Definition: Queue.hpp:46
void log_WARNING_HI_TooManySequenceStatements(U16 count, U16 max) const
Log event TooManySequenceStatements.
void tlmWrite_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
virtual void directive_setLocalVar_internalInterfaceHandler(const Svc::FpySequencer_SetLocalVarDirective &directive)=0
Internal interface handler for directive_setLocalVar.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void init(FpySequencerComponentBase::SmId smId)
Initialize the state machine.
void set_prmSet_OutputPort(FwIndexType portNum, Fw::InputPrmSetPort *port)
Connect port to prmSet[portNum].
Command failed to deserialize.
The size of the serial representation.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Command had execution error.
Important informational events.
virtual void directive_getTlm_internalInterfaceHandler(const Svc::FpySequencer_GetTlmDirective &directive)=0
Internal interface handler for directive_getTlm.
virtual void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename)=0
Handler for input port seqRunIn.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void sequencer_sendSignal_result_checkStatementTimeout_statementTimeout()
Send signal result_checkStatementTimeout_statementTimeout to state machine sequencer.
virtual void DEBUG_CONTINUE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq)=0
virtual void directive_getPrm_internalInterfaceHandler(const Svc::FpySequencer_GetPrmDirective &directive)=0
Internal interface handler for directive_getPrm.
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: SchedPortAc.cpp:62
void invoke(FwEventIdType id, Fw::Time &timeTag, const Fw::LogSeverity &severity, Fw::LogBuffer &args) const
Invoke a port interface.
Definition: LogPortAc.cpp:170
void init()
Initialization function.
bool isConnected_cmdResponseOut_OutputPort(FwIndexType portNum)
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
void log_ACTIVITY_HI_SequenceCancelled(const Fw::StringBase &filePath) const
Log event SequenceCancelled.
virtual void RUN_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command RUN.
void init()
Initialization function.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
void log_WARNING_LO_CmdResponseFromOldSequence(U32 opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
static constexpr SizeType BUFFER_SIZE(SizeType maxLength)
Get the size of a null-terminated string buffer.
Definition: StringBase.hpp:42
bool isConnected_cmdOut_OutputPort(FwIndexType portNum)
A message was sent requesting an exit of the loop.
called when the expected statement response comes in, and it is not OK. only raised in the RUNNING...
FpySequencer_SequencerStateMachineStateMachineBase::State getState() const
Get the state.
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
No time base has been established.
Definition: FpConfig.h:30
void sequencer_sendSignal_cmd_DEBUG_BREAK(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_BREAK to state machine sequencer.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
SerializeStatus deserialize(U8 &val)
deserialize 8-bit unsigned int
PlatformIndexType FwIndexType
virtual void VALIDATE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command VALIDATE.
void DEBUG_BREAK_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void tlmWrite_Debug(const Svc::FpySequencer_DebugTelemetry &arg, Fw::Time _tlmTime=Fw::Time())
bool isConnected_prmGet_OutputPort(FwIndexType portNum)
void log_WARNING_HI_MismatchedTimeContext(I32 internalTimeContext, I32 otherTimeContext) const
Log event MismatchedTimeContext.
#define FW_NUM_ARRAY_ELEMENTS(a)
number of elements in an array
Definition: BasicTypes.h:93
Svc::InputSchedPort * get_tlmWrite_InputPort(FwIndexType portNum)
void log_WARNING_HI_WrongSchemaVersion(U8 expected, U8 actual) const
Log event WrongSchemaVersion.
void addCallPort(InputLogPort *callPort)
Register an input port.
Definition: LogPortAc.cpp:157
void DEBUG_CLEAR_BREAKPOINT_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void cmdOut_out(FwIndexType portNum, Fw::ComBuffer &data, U32 context)
Invoke output port cmdOut.
virtual void VALIDATE_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdStringArg &fileName)=0
void init()
Initialization function.
void init()
Initialization function.
Definition: PingPortAc.cpp:56
Command failed validation.
RateGroupDivider component implementation.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void directive_getPrm_internalInterfaceInvoke(const Svc::FpySequencer_GetPrmDirective &directive)
Internal interface base-class function for directive_getPrm.
virtual void cmdResponseIn_preMsgHook(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Pre-message hook for async input port cmdResponseIn.
message sent/received okay
Definition: Queue.hpp:31
void seqRunIn_handlerBase(FwIndexType portNum, const Fw::StringBase &filename)
Handler base-class function for input port seqRunIn.
Enum representing parameter validity.
U8 BYTE
byte type
Definition: BasicTypes.h:59
void log_WARNING_HI_TooManySequenceArgs(U8 count, U8 max) const
Log event TooManySequenceArgs.
void log_WARNING_HI_MismatchedTimeBase(I32 internalTimeBase, I32 otherTimeBase) const
Log event MismatchedTimeBase.
void invoke(FwPrmIdType id, Fw::ParamBuffer &val) const
Invoke a port interface.
void sequencer_sendSignal_result_failure()
Send signal result_failure to state machine sequencer.
called on CANCEL cmd. raised in all states except IDLE
virtual void checkTimers_preMsgHook(FwIndexType portNum, U32 context)
Pre-message hook for async input port checkTimers.
void addCallPort(InputComPort *callPort)
Register an input port.
Definition: ComPortAc.cpp:143
void sequencer_sendSignal_entered()
Send signal entered to state machine sequencer.
virtual void DEBUG_CONTINUE_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_CONTINUE.
virtual void DEBUG_BREAK_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, bool breakOnce)=0
Fw::ParamValid getParam_out(FwIndexType portNum, FwPrmIdType id, Fw::ParamBuffer &val)
Invoke output port getParam.
virtual SerializeStatus serialize(SerializeBufferBase &buffer) const
serialization function
Definition: StringBase.cpp:142
void addCallComp(Fw::PassiveComponentBase *callComp, CompFuncPtr funcPtr)
Register a component.
Definition: PingPortAc.cpp:62
void log_ACTIVITY_HI_DebugBreakpointSet(U32 breakpointIdx, bool breakOnce) const
Log event DebugBreakpointSet.
FpySequencerComponentBase::SmId getId() const
Get the state machine id.
void log_ACTIVITY_HI_SequenceDone(const Fw::StringBase &filePath) const
Log event SequenceDone.
void directive_goto_internalInterfaceInvoke(const Svc::FpySequencer_GotoDirective &directive)
Internal interface base-class function for directive_goto.
void directive_waitRel_internalInterfaceInvoke(const Svc::FpySequencer_WaitRelDirective &directive)
Internal interface base-class function for directive_waitRel.
Message will return with status when space is unavailable.
Definition: Queue.hpp:48
Auto-generated base for FpySequencer component.
void sequencer_sendSignal_cmd_RUN(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN to state machine sequencer.
void init()
Initialization function.
void checkTimers_handlerBase(FwIndexType portNum, U32 context)
Handler base-class function for input port checkTimers.
void init()
Initialization function.
virtual void CANCEL_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command CANCEL.
bool isConnected_getTlmChan_OutputPort(FwIndexType portNum)
void log_WARNING_HI_UnknownSequencerDirective(U32 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
void sequencer_sendSignal_cmd_DEBUG_CONTINUE()
Send signal cmd_DEBUG_CONTINUE to state machine sequencer.
FpySequencer_SequencerStateMachineStateMachineBase::Signal Signal
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
#define FW_ASSERT(...)
Definition: Assert.hpp:14
#define FW_TLM_STRING_MAX_SIZE
Max size of channelized telemetry string type.
Definition: FpConfig.h:234
virtual void DEBUG_BREAK_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_BREAK.
void set_prmGet_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to prmGet[portNum].
void set_getParam_OutputPort(FwIndexType portNum, Fw::InputPrmGetPort *port)
Connect port to getParam[portNum].
PlatformAssertArgType FwAssertArgType
The type of arguments to assert functions.
virtual const CHAR * toChar() const =0
void addCallPort(InputCmdResponsePort *callPort)
Register an input port.
void lock()
lock the mutex and assert success
Definition: Mutex.cpp:34
#define U64(C)
Definition: sha.h:180