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_BINARYREGOP,
50  INT_IF_DIRECTIVE_CMD,
51  INT_IF_DIRECTIVE_DESERSERREG,
52  INT_IF_DIRECTIVE_EXIT,
53  INT_IF_DIRECTIVE_GETPRM,
54  INT_IF_DIRECTIVE_GETTLM,
55  INT_IF_DIRECTIVE_GOTO,
56  INT_IF_DIRECTIVE_IF,
57  INT_IF_DIRECTIVE_NOOP,
58  INT_IF_DIRECTIVE_SETREG,
59  INT_IF_DIRECTIVE_SETSERREG,
60  INT_IF_DIRECTIVE_UNARYREGOP,
61  INT_IF_DIRECTIVE_WAITABS,
62  INT_IF_DIRECTIVE_WAITREL,
63  INTERNAL_STATE_MACHINE_SIGNAL,
64  };
65 
66  // Get the max size by constructing a union of the async input, command, and
67  // internal port serialization sizes
68  union BuffUnion {
69  BYTE checkTimersPortSize[Svc::InputSchedPort::SERIALIZED_SIZE];
70  BYTE cmdResponseInPortSize[Fw::InputCmdResponsePort::SERIALIZED_SIZE];
75  // Size of directive_binaryRegOp argument list
76  BYTE directive_binaryRegOpIntIfSize[
78  ];
79  // Size of directive_cmd argument list
80  BYTE directive_cmdIntIfSize[
82  ];
83  // Size of directive_deserSerReg argument list
84  BYTE directive_deserSerRegIntIfSize[
86  ];
87  // Size of directive_exit argument list
88  BYTE directive_exitIntIfSize[
90  ];
91  // Size of directive_getPrm argument list
92  BYTE directive_getPrmIntIfSize[
94  ];
95  // Size of directive_getTlm argument list
96  BYTE directive_getTlmIntIfSize[
98  ];
99  // Size of directive_goto argument list
100  BYTE directive_gotoIntIfSize[
102  ];
103  // Size of directive_if argument list
104  BYTE directive_ifIntIfSize[
106  ];
107  // Size of directive_noOp argument list
108  BYTE directive_noOpIntIfSize[
110  ];
111  // Size of directive_setReg argument list
112  BYTE directive_setRegIntIfSize[
114  ];
115  // Size of directive_setSerReg argument list
116  BYTE directive_setSerRegIntIfSize[
118  ];
119  // Size of directive_unaryRegOp argument list
120  BYTE directive_unaryRegOpIntIfSize[
122  ];
123  // Size of directive_waitAbs argument list
124  BYTE directive_waitAbsIntIfSize[
126  ];
127  // Size of directive_waitRel argument list
128  BYTE directive_waitRelIntIfSize[
130  ];
131  // Size of buffer for internal state machine signals
132  // The internal SmSignalBuffer stores the state machine id, the
133  // signal id, and the signal data
134  BYTE internalSmBufferSize[SmSignalBuffer::SERIALIZED_SIZE];
135  };
136 
137  // Define a message buffer class large enough to handle all the
138  // asynchronous inputs to the component
139  class ComponentIpcSerializableBuffer :
141  {
142 
143  public:
144 
145  enum {
146  // Offset into data in buffer: Size of message ID and port number
147  DATA_OFFSET = sizeof(FwEnumStoreType) + sizeof(FwIndexType),
148  // Max data size
149  MAX_DATA_SIZE = sizeof(BuffUnion),
150  // Max message size: Size of message id + size of port + max data size
151  SERIALIZATION_SIZE = DATA_OFFSET + MAX_DATA_SIZE
152  };
153 
154  Fw::Serializable::SizeType getBuffCapacity() const {
155  return sizeof(m_buff);
156  }
157 
158  U8* getBuffAddr() {
159  return m_buff;
160  }
161 
162  const U8* getBuffAddr() const {
163  return m_buff;
164  }
165 
166  private:
167  // Should be the max of all the input ports serialized sizes...
168  U8 m_buff[SERIALIZATION_SIZE];
169 
170  };
171  }
172 
173  // ----------------------------------------------------------------------
174  // Types for internal state machines
175  // ----------------------------------------------------------------------
176 
179  m_component(component)
180  {
181 
182  }
183 
186  {
187  this->initBase(static_cast<FwEnumStoreType>(smId));
188  }
189 
191  getId() const
192  {
193  return static_cast<FpySequencerComponentBase::SmId>(this->m_id);
194  }
195 
196  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
197  action_signalEntered(Signal signal)
198  {
199  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_signalEntered(this->getId(), signal);
200  }
201 
202  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
203  action_setSequenceFilePath(
204  Signal signal,
206  )
207  {
208  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setSequenceFilePath(this->getId(), signal, value);
209  }
210 
211  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
212  action_setSequenceBlockState(
213  Signal signal,
215  )
216  {
217  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setSequenceBlockState(this->getId(), signal, value);
218  }
219 
220  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
221  action_validate(Signal signal)
222  {
223  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_validate(this->getId(), signal);
224  }
225 
226  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
227  action_report_seqSucceeded(Signal signal)
228  {
229  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqSucceeded(this->getId(), signal);
230  }
231 
232  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
233  action_report_seqCancelled(Signal signal)
234  {
235  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqCancelled(this->getId(), signal);
236  }
237 
238  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
239  action_report_seqFailed(Signal signal)
240  {
241  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqFailed(this->getId(), signal);
242  }
243 
244  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
245  action_report_seqStarted(Signal signal)
246  {
247  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_seqStarted(this->getId(), signal);
248  }
249 
250  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
251  action_setGoalState_RUNNING(Signal signal)
252  {
253  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_RUNNING(this->getId(), signal);
254  }
255 
256  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
257  action_setGoalState_VALID(Signal signal)
258  {
259  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_VALID(this->getId(), signal);
260  }
261 
262  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
263  action_setGoalState_IDLE(Signal signal)
264  {
265  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setGoalState_IDLE(this->getId(), signal);
266  }
267 
268  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
269  action_sendCmdResponse_OK(Signal signal)
270  {
271  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_OK(this->getId(), signal);
272  }
273 
274  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
275  action_sendCmdResponse_EXECUTION_ERROR(Signal signal)
276  {
277  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_sendCmdResponse_EXECUTION_ERROR(this->getId(), signal);
278  }
279 
280  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
281  action_clearSequenceFile(Signal signal)
282  {
283  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_clearSequenceFile(this->getId(), signal);
284  }
285 
286  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
287  action_clearDebugBreakpoint(Signal signal)
288  {
289  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_clearDebugBreakpoint(this->getId(), signal);
290  }
291 
292  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
293  action_checkShouldWake(Signal signal)
294  {
295  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_checkShouldWake(this->getId(), signal);
296  }
297 
298  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
299  action_dispatchStatement(Signal signal)
300  {
301  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_dispatchStatement(this->getId(), signal);
302  }
303 
304  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
305  action_resetRuntime(Signal signal)
306  {
307  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_resetRuntime(this->getId(), signal);
308  }
309 
310  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
311  action_checkStatementTimeout(Signal signal)
312  {
313  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_checkStatementTimeout(this->getId(), signal);
314  }
315 
316  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
317  action_incrementSequenceCounter(Signal signal)
318  {
319  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_incrementSequenceCounter(this->getId(), signal);
320  }
321 
322  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
323  action_report_debugBroken(Signal signal)
324  {
325  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_report_debugBroken(this->getId(), signal);
326  }
327 
328  void FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
329  action_setDebugBreakpoint(
330  Signal signal,
332  )
333  {
334  this->m_component.Svc_FpySequencer_SequencerStateMachine_action_setDebugBreakpoint(this->getId(), signal, value);
335  }
336 
337  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
338  guard_goalStateIs_RUNNING(Signal signal) const
339  {
340  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_goalStateIs_RUNNING(this->getId(), signal);
341  }
342 
343  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
344  guard_shouldDebugBreak(Signal signal) const
345  {
346  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_shouldDebugBreak(this->getId(), signal);
347  }
348 
349  bool FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine ::
350  guard_debugBreakOnce(Signal signal) const
351  {
352  return this->m_component.Svc_FpySequencer_SequencerStateMachine_guard_debugBreakOnce(this->getId(), signal);
353  }
354 
355  // ----------------------------------------------------------------------
356  // Component initialization
357  // ----------------------------------------------------------------------
358 
361  FwSizeType queueDepth,
362  FwEnumStoreType instance
363  )
364  {
365  // Initialize base class
367 
368  // Initialize state machine instances
369  this->m_stateMachine_sequencer.init(SmId::sequencer);
370 
371  // Connect input port cmdIn
372  for (
373  FwIndexType port = 0;
374  port < static_cast<FwIndexType>(this->getNum_cmdIn_InputPorts());
375  port++
376  ) {
377  this->m_cmdIn_InputPort[port].init();
378  this->m_cmdIn_InputPort[port].addCallComp(
379  this,
380  m_p_cmdIn_in
381  );
382  this->m_cmdIn_InputPort[port].setPortNum(port);
383 
384 #if FW_OBJECT_NAMES == 1
385  Fw::ObjectName portName;
386  portName.format(
387  "%s_cmdIn_InputPort[%" PRI_FwIndexType "]",
388  this->m_objName.toChar(),
389  port
390  );
391  this->m_cmdIn_InputPort[port].setObjName(portName.toChar());
392 #endif
393  }
394 
395  // Connect input port checkTimers
396  for (
397  FwIndexType port = 0;
398  port < static_cast<FwIndexType>(this->getNum_checkTimers_InputPorts());
399  port++
400  ) {
401  this->m_checkTimers_InputPort[port].init();
402  this->m_checkTimers_InputPort[port].addCallComp(
403  this,
404  m_p_checkTimers_in
405  );
406  this->m_checkTimers_InputPort[port].setPortNum(port);
407 
408 #if FW_OBJECT_NAMES == 1
409  Fw::ObjectName portName;
410  portName.format(
411  "%s_checkTimers_InputPort[%" PRI_FwIndexType "]",
412  this->m_objName.toChar(),
413  port
414  );
415  this->m_checkTimers_InputPort[port].setObjName(portName.toChar());
416 #endif
417  }
418 
419  // Connect input port cmdResponseIn
420  for (
421  FwIndexType port = 0;
422  port < static_cast<FwIndexType>(this->getNum_cmdResponseIn_InputPorts());
423  port++
424  ) {
425  this->m_cmdResponseIn_InputPort[port].init();
426  this->m_cmdResponseIn_InputPort[port].addCallComp(
427  this,
428  m_p_cmdResponseIn_in
429  );
430  this->m_cmdResponseIn_InputPort[port].setPortNum(port);
431 
432 #if FW_OBJECT_NAMES == 1
433  Fw::ObjectName portName;
434  portName.format(
435  "%s_cmdResponseIn_InputPort[%" PRI_FwIndexType "]",
436  this->m_objName.toChar(),
437  port
438  );
439  this->m_cmdResponseIn_InputPort[port].setObjName(portName.toChar());
440 #endif
441  }
442 
443  // Connect input port pingIn
444  for (
445  FwIndexType port = 0;
446  port < static_cast<FwIndexType>(this->getNum_pingIn_InputPorts());
447  port++
448  ) {
449  this->m_pingIn_InputPort[port].init();
450  this->m_pingIn_InputPort[port].addCallComp(
451  this,
452  m_p_pingIn_in
453  );
454  this->m_pingIn_InputPort[port].setPortNum(port);
455 
456 #if FW_OBJECT_NAMES == 1
457  Fw::ObjectName portName;
458  portName.format(
459  "%s_pingIn_InputPort[%" PRI_FwIndexType "]",
460  this->m_objName.toChar(),
461  port
462  );
463  this->m_pingIn_InputPort[port].setObjName(portName.toChar());
464 #endif
465  }
466 
467  // Connect input port seqRunIn
468  for (
469  FwIndexType port = 0;
470  port < static_cast<FwIndexType>(this->getNum_seqRunIn_InputPorts());
471  port++
472  ) {
473  this->m_seqRunIn_InputPort[port].init();
474  this->m_seqRunIn_InputPort[port].addCallComp(
475  this,
476  m_p_seqRunIn_in
477  );
478  this->m_seqRunIn_InputPort[port].setPortNum(port);
479 
480 #if FW_OBJECT_NAMES == 1
481  Fw::ObjectName portName;
482  portName.format(
483  "%s_seqRunIn_InputPort[%" PRI_FwIndexType "]",
484  this->m_objName.toChar(),
485  port
486  );
487  this->m_seqRunIn_InputPort[port].setObjName(portName.toChar());
488 #endif
489  }
490 
491  // Connect input port tlmWrite
492  for (
493  FwIndexType port = 0;
494  port < static_cast<FwIndexType>(this->getNum_tlmWrite_InputPorts());
495  port++
496  ) {
497  this->m_tlmWrite_InputPort[port].init();
498  this->m_tlmWrite_InputPort[port].addCallComp(
499  this,
500  m_p_tlmWrite_in
501  );
502  this->m_tlmWrite_InputPort[port].setPortNum(port);
503 
504 #if FW_OBJECT_NAMES == 1
505  Fw::ObjectName portName;
506  portName.format(
507  "%s_tlmWrite_InputPort[%" PRI_FwIndexType "]",
508  this->m_objName.toChar(),
509  port
510  );
511  this->m_tlmWrite_InputPort[port].setObjName(portName.toChar());
512 #endif
513  }
514 
515  // Connect output port cmdRegOut
516  for (
517  FwIndexType port = 0;
518  port < static_cast<FwIndexType>(this->getNum_cmdRegOut_OutputPorts());
519  port++
520  ) {
521  this->m_cmdRegOut_OutputPort[port].init();
522 
523 #if FW_OBJECT_NAMES == 1
524  Fw::ObjectName portName;
525  portName.format(
526  "%s_cmdRegOut_OutputPort[%" PRI_FwIndexType "]",
527  this->m_objName.toChar(),
528  port
529  );
530  this->m_cmdRegOut_OutputPort[port].setObjName(portName.toChar());
531 #endif
532  }
533 
534  // Connect output port cmdResponseOut
535  for (
536  FwIndexType port = 0;
537  port < static_cast<FwIndexType>(this->getNum_cmdResponseOut_OutputPorts());
538  port++
539  ) {
540  this->m_cmdResponseOut_OutputPort[port].init();
541 
542 #if FW_OBJECT_NAMES == 1
543  Fw::ObjectName portName;
544  portName.format(
545  "%s_cmdResponseOut_OutputPort[%" PRI_FwIndexType "]",
546  this->m_objName.toChar(),
547  port
548  );
549  this->m_cmdResponseOut_OutputPort[port].setObjName(portName.toChar());
550 #endif
551  }
552 
553  // Connect output port logOut
554  for (
555  FwIndexType port = 0;
556  port < static_cast<FwIndexType>(this->getNum_logOut_OutputPorts());
557  port++
558  ) {
559  this->m_logOut_OutputPort[port].init();
560 
561 #if FW_OBJECT_NAMES == 1
562  Fw::ObjectName portName;
563  portName.format(
564  "%s_logOut_OutputPort[%" PRI_FwIndexType "]",
565  this->m_objName.toChar(),
566  port
567  );
568  this->m_logOut_OutputPort[port].setObjName(portName.toChar());
569 #endif
570  }
571 
572 #if FW_ENABLE_TEXT_LOGGING == 1
573  // Connect output port logTextOut
574  for (
575  FwIndexType port = 0;
576  port < static_cast<FwIndexType>(this->getNum_logTextOut_OutputPorts());
577  port++
578  ) {
579  this->m_logTextOut_OutputPort[port].init();
580 
581 #if FW_OBJECT_NAMES == 1
582  Fw::ObjectName portName;
583  portName.format(
584  "%s_logTextOut_OutputPort[%" PRI_FwIndexType "]",
585  this->m_objName.toChar(),
586  port
587  );
588  this->m_logTextOut_OutputPort[port].setObjName(portName.toChar());
589 #endif
590  }
591 #endif
592 
593  // Connect output port prmGet
594  for (
595  FwIndexType port = 0;
596  port < static_cast<FwIndexType>(this->getNum_prmGet_OutputPorts());
597  port++
598  ) {
599  this->m_prmGet_OutputPort[port].init();
600 
601 #if FW_OBJECT_NAMES == 1
602  Fw::ObjectName portName;
603  portName.format(
604  "%s_prmGet_OutputPort[%" PRI_FwIndexType "]",
605  this->m_objName.toChar(),
606  port
607  );
608  this->m_prmGet_OutputPort[port].setObjName(portName.toChar());
609 #endif
610  }
611 
612  // Connect output port prmSet
613  for (
614  FwIndexType port = 0;
615  port < static_cast<FwIndexType>(this->getNum_prmSet_OutputPorts());
616  port++
617  ) {
618  this->m_prmSet_OutputPort[port].init();
619 
620 #if FW_OBJECT_NAMES == 1
621  Fw::ObjectName portName;
622  portName.format(
623  "%s_prmSet_OutputPort[%" PRI_FwIndexType "]",
624  this->m_objName.toChar(),
625  port
626  );
627  this->m_prmSet_OutputPort[port].setObjName(portName.toChar());
628 #endif
629  }
630 
631  // Connect output port timeCaller
632  for (
633  FwIndexType port = 0;
634  port < static_cast<FwIndexType>(this->getNum_timeCaller_OutputPorts());
635  port++
636  ) {
637  this->m_timeCaller_OutputPort[port].init();
638 
639 #if FW_OBJECT_NAMES == 1
640  Fw::ObjectName portName;
641  portName.format(
642  "%s_timeCaller_OutputPort[%" PRI_FwIndexType "]",
643  this->m_objName.toChar(),
644  port
645  );
646  this->m_timeCaller_OutputPort[port].setObjName(portName.toChar());
647 #endif
648  }
649 
650  // Connect output port tlmOut
651  for (
652  FwIndexType port = 0;
653  port < static_cast<FwIndexType>(this->getNum_tlmOut_OutputPorts());
654  port++
655  ) {
656  this->m_tlmOut_OutputPort[port].init();
657 
658 #if FW_OBJECT_NAMES == 1
659  Fw::ObjectName portName;
660  portName.format(
661  "%s_tlmOut_OutputPort[%" PRI_FwIndexType "]",
662  this->m_objName.toChar(),
663  port
664  );
665  this->m_tlmOut_OutputPort[port].setObjName(portName.toChar());
666 #endif
667  }
668 
669  // Connect output port cmdOut
670  for (
671  FwIndexType port = 0;
672  port < static_cast<FwIndexType>(this->getNum_cmdOut_OutputPorts());
673  port++
674  ) {
675  this->m_cmdOut_OutputPort[port].init();
676 
677 #if FW_OBJECT_NAMES == 1
678  Fw::ObjectName portName;
679  portName.format(
680  "%s_cmdOut_OutputPort[%" PRI_FwIndexType "]",
681  this->m_objName.toChar(),
682  port
683  );
684  this->m_cmdOut_OutputPort[port].setObjName(portName.toChar());
685 #endif
686  }
687 
688  // Connect output port getParam
689  for (
690  FwIndexType port = 0;
691  port < static_cast<FwIndexType>(this->getNum_getParam_OutputPorts());
692  port++
693  ) {
694  this->m_getParam_OutputPort[port].init();
695 
696 #if FW_OBJECT_NAMES == 1
697  Fw::ObjectName portName;
698  portName.format(
699  "%s_getParam_OutputPort[%" PRI_FwIndexType "]",
700  this->m_objName.toChar(),
701  port
702  );
703  this->m_getParam_OutputPort[port].setObjName(portName.toChar());
704 #endif
705  }
706 
707  // Connect output port getTlmChan
708  for (
709  FwIndexType port = 0;
710  port < static_cast<FwIndexType>(this->getNum_getTlmChan_OutputPorts());
711  port++
712  ) {
713  this->m_getTlmChan_OutputPort[port].init();
714 
715 #if FW_OBJECT_NAMES == 1
716  Fw::ObjectName portName;
717  portName.format(
718  "%s_getTlmChan_OutputPort[%" PRI_FwIndexType "]",
719  this->m_objName.toChar(),
720  port
721  );
722  this->m_getTlmChan_OutputPort[port].setObjName(portName.toChar());
723 #endif
724  }
725 
726  // Connect output port pingOut
727  for (
728  FwIndexType port = 0;
729  port < static_cast<FwIndexType>(this->getNum_pingOut_OutputPorts());
730  port++
731  ) {
732  this->m_pingOut_OutputPort[port].init();
733 
734 #if FW_OBJECT_NAMES == 1
735  Fw::ObjectName portName;
736  portName.format(
737  "%s_pingOut_OutputPort[%" PRI_FwIndexType "]",
738  this->m_objName.toChar(),
739  port
740  );
741  this->m_pingOut_OutputPort[port].setObjName(portName.toChar());
742 #endif
743  }
744 
745  // Connect output port seqDoneOut
746  for (
747  FwIndexType port = 0;
748  port < static_cast<FwIndexType>(this->getNum_seqDoneOut_OutputPorts());
749  port++
750  ) {
751  this->m_seqDoneOut_OutputPort[port].init();
752 
753 #if FW_OBJECT_NAMES == 1
754  Fw::ObjectName portName;
755  portName.format(
756  "%s_seqDoneOut_OutputPort[%" PRI_FwIndexType "]",
757  this->m_objName.toChar(),
758  port
759  );
760  this->m_seqDoneOut_OutputPort[port].setObjName(portName.toChar());
761 #endif
762  }
763 
764  // Connect output port seqStartOut
765  for (
766  FwIndexType port = 0;
767  port < static_cast<FwIndexType>(this->getNum_seqStartOut_OutputPorts());
768  port++
769  ) {
770  this->m_seqStartOut_OutputPort[port].init();
771 
772 #if FW_OBJECT_NAMES == 1
773  Fw::ObjectName portName;
774  portName.format(
775  "%s_seqStartOut_OutputPort[%" PRI_FwIndexType "]",
776  this->m_objName.toChar(),
777  port
778  );
779  this->m_seqStartOut_OutputPort[port].setObjName(portName.toChar());
780 #endif
781  }
782 
783  // Create the queue
784  Os::Queue::Status qStat = this->createQueue(
785  queueDepth,
786  static_cast<FwSizeType>(ComponentIpcSerializableBuffer::SERIALIZATION_SIZE)
787  );
788  FW_ASSERT(
789  Os::Queue::Status::OP_OK == qStat,
790  static_cast<FwAssertArgType>(qStat)
791  );
792  }
793 
794  // ----------------------------------------------------------------------
795  // Getters for special input ports
796  // ----------------------------------------------------------------------
797 
800  {
801  FW_ASSERT(
802  (0 <= portNum) && (portNum < this->getNum_cmdIn_InputPorts()),
803  static_cast<FwAssertArgType>(portNum)
804  );
805 
806  return &this->m_cmdIn_InputPort[portNum];
807  }
808 
809  // ----------------------------------------------------------------------
810  // Getters for typed input ports
811  // ----------------------------------------------------------------------
812 
815  {
816  FW_ASSERT(
817  (0 <= portNum) && (portNum < this->getNum_checkTimers_InputPorts()),
818  static_cast<FwAssertArgType>(portNum)
819  );
820 
821  return &this->m_checkTimers_InputPort[portNum];
822  }
823 
826  {
827  FW_ASSERT(
828  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
829  static_cast<FwAssertArgType>(portNum)
830  );
831 
832  return &this->m_cmdResponseIn_InputPort[portNum];
833  }
834 
837  {
838  FW_ASSERT(
839  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
840  static_cast<FwAssertArgType>(portNum)
841  );
842 
843  return &this->m_pingIn_InputPort[portNum];
844  }
845 
848  {
849  FW_ASSERT(
850  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
851  static_cast<FwAssertArgType>(portNum)
852  );
853 
854  return &this->m_seqRunIn_InputPort[portNum];
855  }
856 
859  {
860  FW_ASSERT(
861  (0 <= portNum) && (portNum < this->getNum_tlmWrite_InputPorts()),
862  static_cast<FwAssertArgType>(portNum)
863  );
864 
865  return &this->m_tlmWrite_InputPort[portNum];
866  }
867 
868  // ----------------------------------------------------------------------
869  // Connect input ports to special output ports
870  // ----------------------------------------------------------------------
871 
874  FwIndexType portNum,
875  Fw::InputCmdRegPort* port
876  )
877  {
878  FW_ASSERT(
879  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
880  static_cast<FwAssertArgType>(portNum)
881  );
882 
883  this->m_cmdRegOut_OutputPort[portNum].addCallPort(port);
884  }
885 
888  FwIndexType portNum,
890  )
891  {
892  FW_ASSERT(
893  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
894  static_cast<FwAssertArgType>(portNum)
895  );
896 
897  this->m_cmdResponseOut_OutputPort[portNum].addCallPort(port);
898  }
899 
902  FwIndexType portNum,
903  Fw::InputLogPort* port
904  )
905  {
906  FW_ASSERT(
907  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
908  static_cast<FwAssertArgType>(portNum)
909  );
910 
911  this->m_logOut_OutputPort[portNum].addCallPort(port);
912  }
913 
914 #if FW_ENABLE_TEXT_LOGGING == 1
915 
916  void FpySequencerComponentBase ::
917  set_logTextOut_OutputPort(
918  FwIndexType portNum,
920  )
921  {
922  FW_ASSERT(
923  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
924  static_cast<FwAssertArgType>(portNum)
925  );
926 
927  this->m_logTextOut_OutputPort[portNum].addCallPort(port);
928  }
929 
930 #endif
931 
934  FwIndexType portNum,
935  Fw::InputPrmGetPort* port
936  )
937  {
938  FW_ASSERT(
939  (0 <= portNum) && (portNum < this->getNum_prmGet_OutputPorts()),
940  static_cast<FwAssertArgType>(portNum)
941  );
942 
943  this->m_prmGet_OutputPort[portNum].addCallPort(port);
944  }
945 
948  FwIndexType portNum,
949  Fw::InputPrmSetPort* port
950  )
951  {
952  FW_ASSERT(
953  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
954  static_cast<FwAssertArgType>(portNum)
955  );
956 
957  this->m_prmSet_OutputPort[portNum].addCallPort(port);
958  }
959 
962  FwIndexType portNum,
963  Fw::InputTimePort* port
964  )
965  {
966  FW_ASSERT(
967  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
968  static_cast<FwAssertArgType>(portNum)
969  );
970 
971  this->m_timeCaller_OutputPort[portNum].addCallPort(port);
972  }
973 
976  FwIndexType portNum,
977  Fw::InputTlmPort* port
978  )
979  {
980  FW_ASSERT(
981  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
982  static_cast<FwAssertArgType>(portNum)
983  );
984 
985  this->m_tlmOut_OutputPort[portNum].addCallPort(port);
986  }
987 
988  // ----------------------------------------------------------------------
989  // Connect typed input ports to typed output ports
990  // ----------------------------------------------------------------------
991 
994  FwIndexType portNum,
995  Fw::InputComPort* port
996  )
997  {
998  FW_ASSERT(
999  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1000  static_cast<FwAssertArgType>(portNum)
1001  );
1002 
1003  this->m_cmdOut_OutputPort[portNum].addCallPort(port);
1004  }
1005 
1008  FwIndexType portNum,
1009  Fw::InputPrmGetPort* port
1010  )
1011  {
1012  FW_ASSERT(
1013  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
1014  static_cast<FwAssertArgType>(portNum)
1015  );
1016 
1017  this->m_getParam_OutputPort[portNum].addCallPort(port);
1018  }
1019 
1022  FwIndexType portNum,
1023  Fw::InputTlmGetPort* port
1024  )
1025  {
1026  FW_ASSERT(
1027  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
1028  static_cast<FwAssertArgType>(portNum)
1029  );
1030 
1031  this->m_getTlmChan_OutputPort[portNum].addCallPort(port);
1032  }
1033 
1036  FwIndexType portNum,
1037  Svc::InputPingPort* port
1038  )
1039  {
1040  FW_ASSERT(
1041  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1042  static_cast<FwAssertArgType>(portNum)
1043  );
1044 
1045  this->m_pingOut_OutputPort[portNum].addCallPort(port);
1046  }
1047 
1050  FwIndexType portNum,
1052  )
1053  {
1054  FW_ASSERT(
1055  (0 <= portNum) && (portNum < this->getNum_seqDoneOut_OutputPorts()),
1056  static_cast<FwAssertArgType>(portNum)
1057  );
1058 
1059  this->m_seqDoneOut_OutputPort[portNum].addCallPort(port);
1060  }
1061 
1064  FwIndexType portNum,
1066  )
1067  {
1068  FW_ASSERT(
1069  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1070  static_cast<FwAssertArgType>(portNum)
1071  );
1072 
1073  this->m_seqStartOut_OutputPort[portNum].addCallPort(port);
1074  }
1075 
1076 #if FW_PORT_SERIALIZATION
1077 
1078  // ----------------------------------------------------------------------
1079  // Connect serial input ports to special output ports
1080  // ----------------------------------------------------------------------
1081 
1084  FwIndexType portNum,
1085  Fw::InputSerializePort* port
1086  )
1087  {
1088  FW_ASSERT(
1089  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
1090  static_cast<FwAssertArgType>(portNum)
1091  );
1092 
1093  this->m_cmdRegOut_OutputPort[portNum].registerSerialPort(port);
1094  }
1095 
1098  FwIndexType portNum,
1099  Fw::InputSerializePort* port
1100  )
1101  {
1102  FW_ASSERT(
1103  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1104  static_cast<FwAssertArgType>(portNum)
1105  );
1106 
1107  this->m_cmdResponseOut_OutputPort[portNum].registerSerialPort(port);
1108  }
1109 
1112  FwIndexType portNum,
1113  Fw::InputSerializePort* port
1114  )
1115  {
1116  FW_ASSERT(
1117  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1118  static_cast<FwAssertArgType>(portNum)
1119  );
1120 
1121  this->m_logOut_OutputPort[portNum].registerSerialPort(port);
1122  }
1123 
1124 #if FW_ENABLE_TEXT_LOGGING == 1
1125 
1126  void FpySequencerComponentBase ::
1127  set_logTextOut_OutputPort(
1128  FwIndexType portNum,
1129  Fw::InputSerializePort* port
1130  )
1131  {
1132  FW_ASSERT(
1133  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1134  static_cast<FwAssertArgType>(portNum)
1135  );
1136 
1137  this->m_logTextOut_OutputPort[portNum].registerSerialPort(port);
1138  }
1139 
1140 #endif
1141 
1144  FwIndexType portNum,
1145  Fw::InputSerializePort* port
1146  )
1147  {
1148  FW_ASSERT(
1149  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
1150  static_cast<FwAssertArgType>(portNum)
1151  );
1152 
1153  this->m_prmSet_OutputPort[portNum].registerSerialPort(port);
1154  }
1155 
1158  FwIndexType portNum,
1159  Fw::InputSerializePort* port
1160  )
1161  {
1162  FW_ASSERT(
1163  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1164  static_cast<FwAssertArgType>(portNum)
1165  );
1166 
1167  this->m_timeCaller_OutputPort[portNum].registerSerialPort(port);
1168  }
1169 
1172  FwIndexType portNum,
1173  Fw::InputSerializePort* port
1174  )
1175  {
1176  FW_ASSERT(
1177  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1178  static_cast<FwAssertArgType>(portNum)
1179  );
1180 
1181  this->m_tlmOut_OutputPort[portNum].registerSerialPort(port);
1182  }
1183 
1184 #endif
1185 
1186 #if FW_PORT_SERIALIZATION
1187 
1188  // ----------------------------------------------------------------------
1189  // Connect serial input ports to typed output ports
1190  // ----------------------------------------------------------------------
1191 
1194  FwIndexType portNum,
1195  Fw::InputSerializePort* port
1196  )
1197  {
1198  FW_ASSERT(
1199  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1200  static_cast<FwAssertArgType>(portNum)
1201  );
1202 
1203  this->m_cmdOut_OutputPort[portNum].registerSerialPort(port);
1204  }
1205 
1208  FwIndexType portNum,
1209  Fw::InputSerializePort* port
1210  )
1211  {
1212  FW_ASSERT(
1213  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1214  static_cast<FwAssertArgType>(portNum)
1215  );
1216 
1217  this->m_pingOut_OutputPort[portNum].registerSerialPort(port);
1218  }
1219 
1222  FwIndexType portNum,
1223  Fw::InputSerializePort* port
1224  )
1225  {
1226  FW_ASSERT(
1227  (0 <= portNum) && (portNum < this->getNum_seqDoneOut_OutputPorts()),
1228  static_cast<FwAssertArgType>(portNum)
1229  );
1230 
1231  this->m_seqDoneOut_OutputPort[portNum].registerSerialPort(port);
1232  }
1233 
1236  FwIndexType portNum,
1237  Fw::InputSerializePort* port
1238  )
1239  {
1240  FW_ASSERT(
1241  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1242  static_cast<FwAssertArgType>(portNum)
1243  );
1244 
1245  this->m_seqStartOut_OutputPort[portNum].registerSerialPort(port);
1246  }
1247 
1248 #endif
1249 
1250  // ----------------------------------------------------------------------
1251  // Command registration
1252  // ----------------------------------------------------------------------
1253 
1256  {
1257  FW_ASSERT(this->m_cmdRegOut_OutputPort[0].isConnected());
1258 
1259  this->m_cmdRegOut_OutputPort[0].invoke(
1260  this->getIdBase() + OPCODE_RUN
1261  );
1262 
1263  this->m_cmdRegOut_OutputPort[0].invoke(
1264  this->getIdBase() + OPCODE_VALIDATE
1265  );
1266 
1267  this->m_cmdRegOut_OutputPort[0].invoke(
1269  );
1270 
1271  this->m_cmdRegOut_OutputPort[0].invoke(
1272  this->getIdBase() + OPCODE_CANCEL
1273  );
1274 
1275  this->m_cmdRegOut_OutputPort[0].invoke(
1277  );
1278 
1279  this->m_cmdRegOut_OutputPort[0].invoke(
1280  this->getIdBase() + OPCODE_DEBUG_BREAK
1281  );
1282 
1283  this->m_cmdRegOut_OutputPort[0].invoke(
1285  );
1286 
1287  this->m_cmdRegOut_OutputPort[0].invoke(
1289  );
1290 
1291  this->m_cmdRegOut_OutputPort[0].invoke(
1293  );
1294 
1295  this->m_cmdRegOut_OutputPort[0].invoke(
1297  );
1298  }
1299 
1300  // ----------------------------------------------------------------------
1301  // Parameter loading
1302  // ----------------------------------------------------------------------
1303 
1306  {
1307  Fw::ParamBuffer _buff;
1309  const FwPrmIdType _baseId = static_cast<FwPrmIdType>(this->getIdBase());
1310  FW_ASSERT(this->m_prmGet_OutputPort[0].isConnected());
1311 
1312  FwPrmIdType _id{};
1313 
1314  _id = _baseId + PARAMID_STATEMENT_TIMEOUT_SECS;
1315 
1316  // Get parameter STATEMENT_TIMEOUT_SECS
1317  this->m_param_STATEMENT_TIMEOUT_SECS_valid =
1318  this->m_prmGet_OutputPort[0].invoke(
1319  _id,
1320  _buff
1321  );
1322 
1323  // Deserialize value
1324  this->m_paramLock.lock();
1325 
1326  // If there was a deserialization issue, mark it invalid
1327  if (this->m_param_STATEMENT_TIMEOUT_SECS_valid == Fw::ParamValid::VALID) {
1328  _stat = _buff.deserialize(this->m_STATEMENT_TIMEOUT_SECS);
1329  if (_stat != Fw::FW_SERIALIZE_OK) {
1330  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::DEFAULT;
1331  // Set default value
1332  this->m_STATEMENT_TIMEOUT_SECS = 0.0f;
1333  }
1334  }
1335  else {
1336  // Set default value
1337  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::DEFAULT;
1338  this->m_STATEMENT_TIMEOUT_SECS = 0.0f;
1339  }
1340 
1341  this->m_paramLock.unLock();
1342 
1343  // Call notifier
1344  this->parametersLoaded();
1345  }
1346 
1347  // ----------------------------------------------------------------------
1348  // Component construction and destruction
1349  // ----------------------------------------------------------------------
1350 
1352  FpySequencerComponentBase(const char* compName) :
1353  Fw::ActiveComponentBase(compName),
1354  m_stateMachine_sequencer(*this)
1355  {
1356  // Write telemetry channel State
1357  this->m_first_update_State = true;
1358  this->m_last_State = 0;
1359 
1360  // Write telemetry channel SequencesSucceeded
1361  this->m_first_update_SequencesSucceeded = true;
1362  this->m_last_SequencesSucceeded = 0;
1363 
1364  // Write telemetry channel SequencesFailed
1365  this->m_first_update_SequencesFailed = true;
1366  this->m_last_SequencesFailed = 0;
1367 
1368  // Write telemetry channel SequencesCancelled
1369  this->m_first_update_SequencesCancelled = true;
1370  this->m_last_SequencesCancelled = 0;
1371 
1372  // Write telemetry channel StatementsDispatched
1373  this->m_first_update_StatementsDispatched = true;
1374  this->m_last_StatementsDispatched = 0;
1375 
1376  // Write telemetry channel StatementsFailed
1377  this->m_first_update_StatementsFailed = true;
1378  this->m_last_StatementsFailed = 0;
1379 
1380  // Write telemetry channel LastDirectiveError
1381  this->m_first_update_LastDirectiveError = true;
1382 
1383  // Write telemetry channel SeqPath
1384  this->m_first_update_SeqPath = true;
1385 
1386  // Write telemetry channel DebugBreakpointIdx
1387  this->m_first_update_DebugBreakpointIdx = true;
1388  this->m_last_DebugBreakpointIdx = 0;
1389 
1390  // Write telemetry channel Debug
1391  this->m_first_update_Debug = true;
1392 
1393  // Write telemetry channel PRM_STATEMENT_TIMEOUT_SECS
1394  this->m_first_update_PRM_STATEMENT_TIMEOUT_SECS = true;
1395  this->m_last_PRM_STATEMENT_TIMEOUT_SECS = 0;
1396 
1397  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::UNINIT;
1398  }
1399 
1402  {
1403 
1404  }
1405 
1406  // ----------------------------------------------------------------------
1407  // Getters for numbers of special input ports
1408  // ----------------------------------------------------------------------
1409 
1412  {
1413  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdIn_InputPort));
1414  }
1415 
1416  // ----------------------------------------------------------------------
1417  // Getters for numbers of typed input ports
1418  // ----------------------------------------------------------------------
1419 
1422  {
1423  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_checkTimers_InputPort));
1424  }
1425 
1428  {
1429  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseIn_InputPort));
1430  }
1431 
1434  {
1435  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_pingIn_InputPort));
1436  }
1437 
1440  {
1441  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_seqRunIn_InputPort));
1442  }
1443 
1446  {
1447  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_tlmWrite_InputPort));
1448  }
1449 
1450  // ----------------------------------------------------------------------
1451  // Getters for numbers of special output ports
1452  // ----------------------------------------------------------------------
1453 
1456  {
1457  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdRegOut_OutputPort));
1458  }
1459 
1462  {
1463  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdResponseOut_OutputPort));
1464  }
1465 
1468  {
1469  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logOut_OutputPort));
1470  }
1471 
1472 #if FW_ENABLE_TEXT_LOGGING == 1
1473 
1474  FwIndexType FpySequencerComponentBase ::
1475  getNum_logTextOut_OutputPorts() const
1476  {
1477  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_logTextOut_OutputPort));
1478  }
1479 
1480 #endif
1481 
1484  {
1485  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_prmGet_OutputPort));
1486  }
1487 
1490  {
1491  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_prmSet_OutputPort));
1492  }
1493 
1496  {
1497  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_timeCaller_OutputPort));
1498  }
1499 
1502  {
1503  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_tlmOut_OutputPort));
1504  }
1505 
1506  // ----------------------------------------------------------------------
1507  // Getters for numbers of typed output ports
1508  // ----------------------------------------------------------------------
1509 
1512  {
1513  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_cmdOut_OutputPort));
1514  }
1515 
1518  {
1519  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_getParam_OutputPort));
1520  }
1521 
1524  {
1525  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_getTlmChan_OutputPort));
1526  }
1527 
1530  {
1531  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_pingOut_OutputPort));
1532  }
1533 
1536  {
1537  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_seqDoneOut_OutputPort));
1538  }
1539 
1542  {
1543  return static_cast<FwIndexType>(FW_NUM_ARRAY_ELEMENTS(this->m_seqStartOut_OutputPort));
1544  }
1545 
1546  // ----------------------------------------------------------------------
1547  // Connection status queries for special output ports
1548  // ----------------------------------------------------------------------
1549 
1552  {
1553  FW_ASSERT(
1554  (0 <= portNum) && (portNum < this->getNum_cmdRegOut_OutputPorts()),
1555  static_cast<FwAssertArgType>(portNum)
1556  );
1557 
1558  return this->m_cmdRegOut_OutputPort[portNum].isConnected();
1559  }
1560 
1563  {
1564  FW_ASSERT(
1565  (0 <= portNum) && (portNum < this->getNum_cmdResponseOut_OutputPorts()),
1566  static_cast<FwAssertArgType>(portNum)
1567  );
1568 
1569  return this->m_cmdResponseOut_OutputPort[portNum].isConnected();
1570  }
1571 
1574  {
1575  FW_ASSERT(
1576  (0 <= portNum) && (portNum < this->getNum_logOut_OutputPorts()),
1577  static_cast<FwAssertArgType>(portNum)
1578  );
1579 
1580  return this->m_logOut_OutputPort[portNum].isConnected();
1581  }
1582 
1583 #if FW_ENABLE_TEXT_LOGGING == 1
1584 
1585  bool FpySequencerComponentBase ::
1586  isConnected_logTextOut_OutputPort(FwIndexType portNum)
1587  {
1588  FW_ASSERT(
1589  (0 <= portNum) && (portNum < this->getNum_logTextOut_OutputPorts()),
1590  static_cast<FwAssertArgType>(portNum)
1591  );
1592 
1593  return this->m_logTextOut_OutputPort[portNum].isConnected();
1594  }
1595 
1596 #endif
1597 
1600  {
1601  FW_ASSERT(
1602  (0 <= portNum) && (portNum < this->getNum_prmGet_OutputPorts()),
1603  static_cast<FwAssertArgType>(portNum)
1604  );
1605 
1606  return this->m_prmGet_OutputPort[portNum].isConnected();
1607  }
1608 
1611  {
1612  FW_ASSERT(
1613  (0 <= portNum) && (portNum < this->getNum_prmSet_OutputPorts()),
1614  static_cast<FwAssertArgType>(portNum)
1615  );
1616 
1617  return this->m_prmSet_OutputPort[portNum].isConnected();
1618  }
1619 
1622  {
1623  FW_ASSERT(
1624  (0 <= portNum) && (portNum < this->getNum_timeCaller_OutputPorts()),
1625  static_cast<FwAssertArgType>(portNum)
1626  );
1627 
1628  return this->m_timeCaller_OutputPort[portNum].isConnected();
1629  }
1630 
1633  {
1634  FW_ASSERT(
1635  (0 <= portNum) && (portNum < this->getNum_tlmOut_OutputPorts()),
1636  static_cast<FwAssertArgType>(portNum)
1637  );
1638 
1639  return this->m_tlmOut_OutputPort[portNum].isConnected();
1640  }
1641 
1642  // ----------------------------------------------------------------------
1643  // Connection status queries for typed output ports
1644  // ----------------------------------------------------------------------
1645 
1648  {
1649  FW_ASSERT(
1650  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
1651  static_cast<FwAssertArgType>(portNum)
1652  );
1653 
1654  return this->m_cmdOut_OutputPort[portNum].isConnected();
1655  }
1656 
1659  {
1660  FW_ASSERT(
1661  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
1662  static_cast<FwAssertArgType>(portNum)
1663  );
1664 
1665  return this->m_getParam_OutputPort[portNum].isConnected();
1666  }
1667 
1670  {
1671  FW_ASSERT(
1672  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
1673  static_cast<FwAssertArgType>(portNum)
1674  );
1675 
1676  return this->m_getTlmChan_OutputPort[portNum].isConnected();
1677  }
1678 
1681  {
1682  FW_ASSERT(
1683  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
1684  static_cast<FwAssertArgType>(portNum)
1685  );
1686 
1687  return this->m_pingOut_OutputPort[portNum].isConnected();
1688  }
1689 
1692  {
1693  FW_ASSERT(
1694  (0 <= portNum) && (portNum < this->getNum_seqDoneOut_OutputPorts()),
1695  static_cast<FwAssertArgType>(portNum)
1696  );
1697 
1698  return this->m_seqDoneOut_OutputPort[portNum].isConnected();
1699  }
1700 
1703  {
1704  FW_ASSERT(
1705  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
1706  static_cast<FwAssertArgType>(portNum)
1707  );
1708 
1709  return this->m_seqStartOut_OutputPort[portNum].isConnected();
1710  }
1711 
1712  // ----------------------------------------------------------------------
1713  // Port handler base-class functions for typed input ports
1714  //
1715  // Call these functions directly to bypass the corresponding ports
1716  // ----------------------------------------------------------------------
1717 
1720  FwIndexType portNum,
1721  U32 context
1722  )
1723  {
1724  // Make sure port number is valid
1725  FW_ASSERT(
1726  (0 <= portNum) && (portNum < this->getNum_checkTimers_InputPorts()),
1727  static_cast<FwAssertArgType>(portNum)
1728  );
1729 
1730  // Call pre-message hook
1732  portNum,
1733  context
1734  );
1735  ComponentIpcSerializableBuffer msg;
1737 
1738  // Serialize message ID
1739  _status = msg.serialize(
1740  static_cast<FwEnumStoreType>(CHECKTIMERS_SCHED)
1741  );
1742  FW_ASSERT(
1743  _status == Fw::FW_SERIALIZE_OK,
1744  static_cast<FwAssertArgType>(_status)
1745  );
1746 
1747  // Serialize port number
1748  _status = msg.serialize(portNum);
1749  FW_ASSERT(
1750  _status == Fw::FW_SERIALIZE_OK,
1751  static_cast<FwAssertArgType>(_status)
1752  );
1753 
1754  // Serialize argument context
1755  _status = msg.serialize(context);
1756  FW_ASSERT(
1757  _status == Fw::FW_SERIALIZE_OK,
1758  static_cast<FwAssertArgType>(_status)
1759  );
1760 
1761  // Send message
1763  Os::Queue::Status qStatus = this->m_queue.send(msg, 4, _block);
1764 
1765  FW_ASSERT(
1766  qStatus == Os::Queue::OP_OK,
1767  static_cast<FwAssertArgType>(qStatus)
1768  );
1769  }
1770 
1773  FwIndexType portNum,
1774  FwOpcodeType opCode,
1775  U32 cmdSeq,
1776  const Fw::CmdResponse& response
1777  )
1778  {
1779  // Make sure port number is valid
1780  FW_ASSERT(
1781  (0 <= portNum) && (portNum < this->getNum_cmdResponseIn_InputPorts()),
1782  static_cast<FwAssertArgType>(portNum)
1783  );
1784 
1785  // Call pre-message hook
1787  portNum,
1788  opCode,
1789  cmdSeq,
1790  response
1791  );
1792  ComponentIpcSerializableBuffer msg;
1794 
1795  // Serialize message ID
1796  _status = msg.serialize(
1797  static_cast<FwEnumStoreType>(CMDRESPONSEIN_CMDRESPONSE)
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 opCode
1812  _status = msg.serialize(opCode);
1813  FW_ASSERT(
1814  _status == Fw::FW_SERIALIZE_OK,
1815  static_cast<FwAssertArgType>(_status)
1816  );
1817 
1818  // Serialize argument cmdSeq
1819  _status = msg.serialize(cmdSeq);
1820  FW_ASSERT(
1821  _status == Fw::FW_SERIALIZE_OK,
1822  static_cast<FwAssertArgType>(_status)
1823  );
1824 
1825  // Serialize argument response
1826  _status = msg.serialize(response);
1827  FW_ASSERT(
1828  _status == Fw::FW_SERIALIZE_OK,
1829  static_cast<FwAssertArgType>(_status)
1830  );
1831 
1832  // Send message
1834  Os::Queue::Status qStatus = this->m_queue.send(msg, 5, _block);
1835 
1836  FW_ASSERT(
1837  qStatus == Os::Queue::OP_OK,
1838  static_cast<FwAssertArgType>(qStatus)
1839  );
1840  }
1841 
1844  FwIndexType portNum,
1845  U32 key
1846  )
1847  {
1848  // Make sure port number is valid
1849  FW_ASSERT(
1850  (0 <= portNum) && (portNum < this->getNum_pingIn_InputPorts()),
1851  static_cast<FwAssertArgType>(portNum)
1852  );
1853 
1854  // Call pre-message hook
1856  portNum,
1857  key
1858  );
1859  ComponentIpcSerializableBuffer msg;
1861 
1862  // Serialize message ID
1863  _status = msg.serialize(
1864  static_cast<FwEnumStoreType>(PINGIN_PING)
1865  );
1866  FW_ASSERT(
1867  _status == Fw::FW_SERIALIZE_OK,
1868  static_cast<FwAssertArgType>(_status)
1869  );
1870 
1871  // Serialize port number
1872  _status = msg.serialize(portNum);
1873  FW_ASSERT(
1874  _status == Fw::FW_SERIALIZE_OK,
1875  static_cast<FwAssertArgType>(_status)
1876  );
1877 
1878  // Serialize argument key
1879  _status = msg.serialize(key);
1880  FW_ASSERT(
1881  _status == Fw::FW_SERIALIZE_OK,
1882  static_cast<FwAssertArgType>(_status)
1883  );
1884 
1885  // Send message
1887  Os::Queue::Status qStatus = this->m_queue.send(msg, 10, _block);
1888 
1889  FW_ASSERT(
1890  qStatus == Os::Queue::OP_OK,
1891  static_cast<FwAssertArgType>(qStatus)
1892  );
1893  }
1894 
1897  FwIndexType portNum,
1898  const Fw::StringBase& filename
1899  )
1900  {
1901  // Make sure port number is valid
1902  FW_ASSERT(
1903  (0 <= portNum) && (portNum < this->getNum_seqRunIn_InputPorts()),
1904  static_cast<FwAssertArgType>(portNum)
1905  );
1906 
1907  // Call pre-message hook
1909  portNum,
1910  filename
1911  );
1912  ComponentIpcSerializableBuffer msg;
1914 
1915  // Serialize message ID
1916  _status = msg.serialize(
1917  static_cast<FwEnumStoreType>(SEQRUNIN_CMDSEQIN)
1918  );
1919  FW_ASSERT(
1920  _status == Fw::FW_SERIALIZE_OK,
1921  static_cast<FwAssertArgType>(_status)
1922  );
1923 
1924  // Serialize port number
1925  _status = msg.serialize(portNum);
1926  FW_ASSERT(
1927  _status == Fw::FW_SERIALIZE_OK,
1928  static_cast<FwAssertArgType>(_status)
1929  );
1930 
1931  // Serialize argument filename
1932  _status = filename.serialize(msg, 240);
1933  FW_ASSERT(
1934  _status == Fw::FW_SERIALIZE_OK,
1935  static_cast<FwAssertArgType>(_status)
1936  );
1937 
1938  // Send message
1940  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
1941 
1942  FW_ASSERT(
1943  qStatus == Os::Queue::OP_OK,
1944  static_cast<FwAssertArgType>(qStatus)
1945  );
1946  }
1947 
1950  FwIndexType portNum,
1951  U32 context
1952  )
1953  {
1954  // Make sure port number is valid
1955  FW_ASSERT(
1956  (0 <= portNum) && (portNum < this->getNum_tlmWrite_InputPorts()),
1957  static_cast<FwAssertArgType>(portNum)
1958  );
1959 
1960  // Call pre-message hook
1962  portNum,
1963  context
1964  );
1965  ComponentIpcSerializableBuffer msg;
1967 
1968  // Serialize message ID
1969  _status = msg.serialize(
1970  static_cast<FwEnumStoreType>(TLMWRITE_SCHED)
1971  );
1972  FW_ASSERT(
1973  _status == Fw::FW_SERIALIZE_OK,
1974  static_cast<FwAssertArgType>(_status)
1975  );
1976 
1977  // Serialize port number
1978  _status = msg.serialize(portNum);
1979  FW_ASSERT(
1980  _status == Fw::FW_SERIALIZE_OK,
1981  static_cast<FwAssertArgType>(_status)
1982  );
1983 
1984  // Serialize argument context
1985  _status = msg.serialize(context);
1986  FW_ASSERT(
1987  _status == Fw::FW_SERIALIZE_OK,
1988  static_cast<FwAssertArgType>(_status)
1989  );
1990 
1991  // Send message
1993  Os::Queue::Status qStatus = this->m_queue.send(msg, 1, _block);
1994 
1995  FW_ASSERT(
1996  qStatus == Os::Queue::OP_OK,
1997  static_cast<FwAssertArgType>(qStatus)
1998  );
1999  }
2000 
2001  // ----------------------------------------------------------------------
2002  // Pre-message hooks for typed async input ports
2003  //
2004  // Each of these functions is invoked just before processing a message
2005  // on the corresponding port. By default, they do nothing. You can
2006  // override them to provide specific pre-message behavior.
2007  // ----------------------------------------------------------------------
2008 
2011  FwIndexType portNum,
2012  U32 context
2013  )
2014  {
2015  // Default: no-op
2016  }
2017 
2020  FwIndexType portNum,
2021  FwOpcodeType opCode,
2022  U32 cmdSeq,
2023  const Fw::CmdResponse& response
2024  )
2025  {
2026  // Default: no-op
2027  }
2028 
2031  FwIndexType portNum,
2032  U32 key
2033  )
2034  {
2035  // Default: no-op
2036  }
2037 
2040  FwIndexType portNum,
2041  const Fw::StringBase& filename
2042  )
2043  {
2044  // Default: no-op
2045  }
2046 
2049  FwIndexType portNum,
2050  U32 context
2051  )
2052  {
2053  // Default: no-op
2054  }
2055 
2056  // ----------------------------------------------------------------------
2057  // Invocation functions for typed output ports
2058  // ----------------------------------------------------------------------
2059 
2062  FwIndexType portNum,
2063  Fw::ComBuffer& data,
2064  U32 context
2065  )
2066  {
2067  FW_ASSERT(
2068  (0 <= portNum) && (portNum < this->getNum_cmdOut_OutputPorts()),
2069  static_cast<FwAssertArgType>(portNum)
2070  );
2071 
2072  FW_ASSERT(
2073  this->m_cmdOut_OutputPort[portNum].isConnected(),
2074  static_cast<FwAssertArgType>(portNum)
2075  );
2076  this->m_cmdOut_OutputPort[portNum].invoke(
2077  data,
2078  context
2079  );
2080  }
2081 
2084  FwIndexType portNum,
2085  FwPrmIdType id,
2086  Fw::ParamBuffer& val
2087  )
2088  {
2089  FW_ASSERT(
2090  (0 <= portNum) && (portNum < this->getNum_getParam_OutputPorts()),
2091  static_cast<FwAssertArgType>(portNum)
2092  );
2093 
2094  FW_ASSERT(
2095  this->m_getParam_OutputPort[portNum].isConnected(),
2096  static_cast<FwAssertArgType>(portNum)
2097  );
2098  return this->m_getParam_OutputPort[portNum].invoke(
2099  id,
2100  val
2101  );
2102  }
2103 
2106  FwIndexType portNum,
2107  FwChanIdType id,
2108  Fw::Time& timeTag,
2109  Fw::TlmBuffer& val
2110  )
2111  {
2112  FW_ASSERT(
2113  (0 <= portNum) && (portNum < this->getNum_getTlmChan_OutputPorts()),
2114  static_cast<FwAssertArgType>(portNum)
2115  );
2116 
2117  FW_ASSERT(
2118  this->m_getTlmChan_OutputPort[portNum].isConnected(),
2119  static_cast<FwAssertArgType>(portNum)
2120  );
2121  return this->m_getTlmChan_OutputPort[portNum].invoke(
2122  id,
2123  timeTag,
2124  val
2125  );
2126  }
2127 
2130  FwIndexType portNum,
2131  U32 key
2132  )
2133  {
2134  FW_ASSERT(
2135  (0 <= portNum) && (portNum < this->getNum_pingOut_OutputPorts()),
2136  static_cast<FwAssertArgType>(portNum)
2137  );
2138 
2139  FW_ASSERT(
2140  this->m_pingOut_OutputPort[portNum].isConnected(),
2141  static_cast<FwAssertArgType>(portNum)
2142  );
2143  this->m_pingOut_OutputPort[portNum].invoke(
2144  key
2145  );
2146  }
2147 
2150  FwIndexType portNum,
2151  FwOpcodeType opCode,
2152  U32 cmdSeq,
2153  const Fw::CmdResponse& response
2154  )
2155  {
2156  FW_ASSERT(
2157  (0 <= portNum) && (portNum < this->getNum_seqDoneOut_OutputPorts()),
2158  static_cast<FwAssertArgType>(portNum)
2159  );
2160 
2161  FW_ASSERT(
2162  this->m_seqDoneOut_OutputPort[portNum].isConnected(),
2163  static_cast<FwAssertArgType>(portNum)
2164  );
2165  this->m_seqDoneOut_OutputPort[portNum].invoke(
2166  opCode,
2167  cmdSeq,
2168  response
2169  );
2170  }
2171 
2174  FwIndexType portNum,
2175  const Fw::StringBase& filename
2176  )
2177  {
2178  FW_ASSERT(
2179  (0 <= portNum) && (portNum < this->getNum_seqStartOut_OutputPorts()),
2180  static_cast<FwAssertArgType>(portNum)
2181  );
2182 
2183  FW_ASSERT(
2184  this->m_seqStartOut_OutputPort[portNum].isConnected(),
2185  static_cast<FwAssertArgType>(portNum)
2186  );
2187  this->m_seqStartOut_OutputPort[portNum].invoke(
2188  filename
2189  );
2190  }
2191 
2192  // ----------------------------------------------------------------------
2193  // Internal interface base-class functions
2194  // ----------------------------------------------------------------------
2195 
2198  {
2199  ComponentIpcSerializableBuffer msg;
2201 
2202  // Serialize the message ID
2203  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_BINARYREGOP));
2204  FW_ASSERT (
2205  _status == Fw::FW_SERIALIZE_OK,
2206  static_cast<FwAssertArgType>(_status)
2207  );
2208 
2209  // Fake port number to make message dequeue work
2210  _status = msg.serialize(static_cast<FwIndexType>(0));
2211  FW_ASSERT (
2212  _status == Fw::FW_SERIALIZE_OK,
2213  static_cast<FwAssertArgType>(_status)
2214  );
2215 
2216  _status = msg.serialize(directive);
2217  FW_ASSERT(
2218  _status == Fw::FW_SERIALIZE_OK,
2219  static_cast<FwAssertArgType>(_status)
2220  );
2221 
2222  // Send message
2224  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2225 
2226  FW_ASSERT(
2227  qStatus == Os::Queue::OP_OK,
2228  static_cast<FwAssertArgType>(qStatus)
2229  );
2230  }
2231 
2234  {
2235  ComponentIpcSerializableBuffer msg;
2237 
2238  // Serialize the message ID
2239  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_CMD));
2240  FW_ASSERT (
2241  _status == Fw::FW_SERIALIZE_OK,
2242  static_cast<FwAssertArgType>(_status)
2243  );
2244 
2245  // Fake port number to make message dequeue work
2246  _status = msg.serialize(static_cast<FwIndexType>(0));
2247  FW_ASSERT (
2248  _status == Fw::FW_SERIALIZE_OK,
2249  static_cast<FwAssertArgType>(_status)
2250  );
2251 
2252  _status = msg.serialize(directive);
2253  FW_ASSERT(
2254  _status == Fw::FW_SERIALIZE_OK,
2255  static_cast<FwAssertArgType>(_status)
2256  );
2257 
2258  // Send message
2260  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2261 
2262  FW_ASSERT(
2263  qStatus == Os::Queue::OP_OK,
2264  static_cast<FwAssertArgType>(qStatus)
2265  );
2266  }
2267 
2270  {
2271  ComponentIpcSerializableBuffer msg;
2273 
2274  // Serialize the message ID
2275  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_DESERSERREG));
2276  FW_ASSERT (
2277  _status == Fw::FW_SERIALIZE_OK,
2278  static_cast<FwAssertArgType>(_status)
2279  );
2280 
2281  // Fake port number to make message dequeue work
2282  _status = msg.serialize(static_cast<FwIndexType>(0));
2283  FW_ASSERT (
2284  _status == Fw::FW_SERIALIZE_OK,
2285  static_cast<FwAssertArgType>(_status)
2286  );
2287 
2288  _status = msg.serialize(directive);
2289  FW_ASSERT(
2290  _status == Fw::FW_SERIALIZE_OK,
2291  static_cast<FwAssertArgType>(_status)
2292  );
2293 
2294  // Send message
2296  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2297 
2298  FW_ASSERT(
2299  qStatus == Os::Queue::OP_OK,
2300  static_cast<FwAssertArgType>(qStatus)
2301  );
2302  }
2303 
2306  {
2307  ComponentIpcSerializableBuffer msg;
2309 
2310  // Serialize the message ID
2311  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_EXIT));
2312  FW_ASSERT (
2313  _status == Fw::FW_SERIALIZE_OK,
2314  static_cast<FwAssertArgType>(_status)
2315  );
2316 
2317  // Fake port number to make message dequeue work
2318  _status = msg.serialize(static_cast<FwIndexType>(0));
2319  FW_ASSERT (
2320  _status == Fw::FW_SERIALIZE_OK,
2321  static_cast<FwAssertArgType>(_status)
2322  );
2323 
2324  _status = msg.serialize(directive);
2325  FW_ASSERT(
2326  _status == Fw::FW_SERIALIZE_OK,
2327  static_cast<FwAssertArgType>(_status)
2328  );
2329 
2330  // Send message
2332  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2333 
2334  FW_ASSERT(
2335  qStatus == Os::Queue::OP_OK,
2336  static_cast<FwAssertArgType>(qStatus)
2337  );
2338  }
2339 
2342  {
2343  ComponentIpcSerializableBuffer msg;
2345 
2346  // Serialize the message ID
2347  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GETPRM));
2348  FW_ASSERT (
2349  _status == Fw::FW_SERIALIZE_OK,
2350  static_cast<FwAssertArgType>(_status)
2351  );
2352 
2353  // Fake port number to make message dequeue work
2354  _status = msg.serialize(static_cast<FwIndexType>(0));
2355  FW_ASSERT (
2356  _status == Fw::FW_SERIALIZE_OK,
2357  static_cast<FwAssertArgType>(_status)
2358  );
2359 
2360  _status = msg.serialize(directive);
2361  FW_ASSERT(
2362  _status == Fw::FW_SERIALIZE_OK,
2363  static_cast<FwAssertArgType>(_status)
2364  );
2365 
2366  // Send message
2368  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2369 
2370  FW_ASSERT(
2371  qStatus == Os::Queue::OP_OK,
2372  static_cast<FwAssertArgType>(qStatus)
2373  );
2374  }
2375 
2378  {
2379  ComponentIpcSerializableBuffer msg;
2381 
2382  // Serialize the message ID
2383  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GETTLM));
2384  FW_ASSERT (
2385  _status == Fw::FW_SERIALIZE_OK,
2386  static_cast<FwAssertArgType>(_status)
2387  );
2388 
2389  // Fake port number to make message dequeue work
2390  _status = msg.serialize(static_cast<FwIndexType>(0));
2391  FW_ASSERT (
2392  _status == Fw::FW_SERIALIZE_OK,
2393  static_cast<FwAssertArgType>(_status)
2394  );
2395 
2396  _status = msg.serialize(directive);
2397  FW_ASSERT(
2398  _status == Fw::FW_SERIALIZE_OK,
2399  static_cast<FwAssertArgType>(_status)
2400  );
2401 
2402  // Send message
2404  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2405 
2406  FW_ASSERT(
2407  qStatus == Os::Queue::OP_OK,
2408  static_cast<FwAssertArgType>(qStatus)
2409  );
2410  }
2411 
2414  {
2415  ComponentIpcSerializableBuffer msg;
2417 
2418  // Serialize the message ID
2419  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_GOTO));
2420  FW_ASSERT (
2421  _status == Fw::FW_SERIALIZE_OK,
2422  static_cast<FwAssertArgType>(_status)
2423  );
2424 
2425  // Fake port number to make message dequeue work
2426  _status = msg.serialize(static_cast<FwIndexType>(0));
2427  FW_ASSERT (
2428  _status == Fw::FW_SERIALIZE_OK,
2429  static_cast<FwAssertArgType>(_status)
2430  );
2431 
2432  _status = msg.serialize(directive);
2433  FW_ASSERT(
2434  _status == Fw::FW_SERIALIZE_OK,
2435  static_cast<FwAssertArgType>(_status)
2436  );
2437 
2438  // Send message
2440  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2441 
2442  FW_ASSERT(
2443  qStatus == Os::Queue::OP_OK,
2444  static_cast<FwAssertArgType>(qStatus)
2445  );
2446  }
2447 
2450  {
2451  ComponentIpcSerializableBuffer msg;
2453 
2454  // Serialize the message ID
2455  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_IF));
2456  FW_ASSERT (
2457  _status == Fw::FW_SERIALIZE_OK,
2458  static_cast<FwAssertArgType>(_status)
2459  );
2460 
2461  // Fake port number to make message dequeue work
2462  _status = msg.serialize(static_cast<FwIndexType>(0));
2463  FW_ASSERT (
2464  _status == Fw::FW_SERIALIZE_OK,
2465  static_cast<FwAssertArgType>(_status)
2466  );
2467 
2468  _status = msg.serialize(directive);
2469  FW_ASSERT(
2470  _status == Fw::FW_SERIALIZE_OK,
2471  static_cast<FwAssertArgType>(_status)
2472  );
2473 
2474  // Send message
2476  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2477 
2478  FW_ASSERT(
2479  qStatus == Os::Queue::OP_OK,
2480  static_cast<FwAssertArgType>(qStatus)
2481  );
2482  }
2483 
2486  {
2487  ComponentIpcSerializableBuffer msg;
2489 
2490  // Serialize the message ID
2491  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_NOOP));
2492  FW_ASSERT (
2493  _status == Fw::FW_SERIALIZE_OK,
2494  static_cast<FwAssertArgType>(_status)
2495  );
2496 
2497  // Fake port number to make message dequeue work
2498  _status = msg.serialize(static_cast<FwIndexType>(0));
2499  FW_ASSERT (
2500  _status == Fw::FW_SERIALIZE_OK,
2501  static_cast<FwAssertArgType>(_status)
2502  );
2503 
2504  _status = msg.serialize(directive);
2505  FW_ASSERT(
2506  _status == Fw::FW_SERIALIZE_OK,
2507  static_cast<FwAssertArgType>(_status)
2508  );
2509 
2510  // Send message
2512  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2513 
2514  FW_ASSERT(
2515  qStatus == Os::Queue::OP_OK,
2516  static_cast<FwAssertArgType>(qStatus)
2517  );
2518  }
2519 
2522  {
2523  ComponentIpcSerializableBuffer msg;
2525 
2526  // Serialize the message ID
2527  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_SETREG));
2528  FW_ASSERT (
2529  _status == Fw::FW_SERIALIZE_OK,
2530  static_cast<FwAssertArgType>(_status)
2531  );
2532 
2533  // Fake port number to make message dequeue work
2534  _status = msg.serialize(static_cast<FwIndexType>(0));
2535  FW_ASSERT (
2536  _status == Fw::FW_SERIALIZE_OK,
2537  static_cast<FwAssertArgType>(_status)
2538  );
2539 
2540  _status = msg.serialize(directive);
2541  FW_ASSERT(
2542  _status == Fw::FW_SERIALIZE_OK,
2543  static_cast<FwAssertArgType>(_status)
2544  );
2545 
2546  // Send message
2548  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2549 
2550  FW_ASSERT(
2551  qStatus == Os::Queue::OP_OK,
2552  static_cast<FwAssertArgType>(qStatus)
2553  );
2554  }
2555 
2558  {
2559  ComponentIpcSerializableBuffer msg;
2561 
2562  // Serialize the message ID
2563  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_SETSERREG));
2564  FW_ASSERT (
2565  _status == Fw::FW_SERIALIZE_OK,
2566  static_cast<FwAssertArgType>(_status)
2567  );
2568 
2569  // Fake port number to make message dequeue work
2570  _status = msg.serialize(static_cast<FwIndexType>(0));
2571  FW_ASSERT (
2572  _status == Fw::FW_SERIALIZE_OK,
2573  static_cast<FwAssertArgType>(_status)
2574  );
2575 
2576  _status = msg.serialize(directive);
2577  FW_ASSERT(
2578  _status == Fw::FW_SERIALIZE_OK,
2579  static_cast<FwAssertArgType>(_status)
2580  );
2581 
2582  // Send message
2584  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2585 
2586  FW_ASSERT(
2587  qStatus == Os::Queue::OP_OK,
2588  static_cast<FwAssertArgType>(qStatus)
2589  );
2590  }
2591 
2594  {
2595  ComponentIpcSerializableBuffer msg;
2597 
2598  // Serialize the message ID
2599  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_UNARYREGOP));
2600  FW_ASSERT (
2601  _status == Fw::FW_SERIALIZE_OK,
2602  static_cast<FwAssertArgType>(_status)
2603  );
2604 
2605  // Fake port number to make message dequeue work
2606  _status = msg.serialize(static_cast<FwIndexType>(0));
2607  FW_ASSERT (
2608  _status == Fw::FW_SERIALIZE_OK,
2609  static_cast<FwAssertArgType>(_status)
2610  );
2611 
2612  _status = msg.serialize(directive);
2613  FW_ASSERT(
2614  _status == Fw::FW_SERIALIZE_OK,
2615  static_cast<FwAssertArgType>(_status)
2616  );
2617 
2618  // Send message
2620  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2621 
2622  FW_ASSERT(
2623  qStatus == Os::Queue::OP_OK,
2624  static_cast<FwAssertArgType>(qStatus)
2625  );
2626  }
2627 
2630  {
2631  ComponentIpcSerializableBuffer msg;
2633 
2634  // Serialize the message ID
2635  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_WAITABS));
2636  FW_ASSERT (
2637  _status == Fw::FW_SERIALIZE_OK,
2638  static_cast<FwAssertArgType>(_status)
2639  );
2640 
2641  // Fake port number to make message dequeue work
2642  _status = msg.serialize(static_cast<FwIndexType>(0));
2643  FW_ASSERT (
2644  _status == Fw::FW_SERIALIZE_OK,
2645  static_cast<FwAssertArgType>(_status)
2646  );
2647 
2648  _status = msg.serialize(directive);
2649  FW_ASSERT(
2650  _status == Fw::FW_SERIALIZE_OK,
2651  static_cast<FwAssertArgType>(_status)
2652  );
2653 
2654  // Send message
2656  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2657 
2658  FW_ASSERT(
2659  qStatus == Os::Queue::OP_OK,
2660  static_cast<FwAssertArgType>(qStatus)
2661  );
2662  }
2663 
2666  {
2667  ComponentIpcSerializableBuffer msg;
2669 
2670  // Serialize the message ID
2671  _status = msg.serialize(static_cast<FwEnumStoreType>(INT_IF_DIRECTIVE_WAITREL));
2672  FW_ASSERT (
2673  _status == Fw::FW_SERIALIZE_OK,
2674  static_cast<FwAssertArgType>(_status)
2675  );
2676 
2677  // Fake port number to make message dequeue work
2678  _status = msg.serialize(static_cast<FwIndexType>(0));
2679  FW_ASSERT (
2680  _status == Fw::FW_SERIALIZE_OK,
2681  static_cast<FwAssertArgType>(_status)
2682  );
2683 
2684  _status = msg.serialize(directive);
2685  FW_ASSERT(
2686  _status == Fw::FW_SERIALIZE_OK,
2687  static_cast<FwAssertArgType>(_status)
2688  );
2689 
2690  // Send message
2692  Os::Queue::Status qStatus = this->m_queue.send(msg, 6, _block);
2693 
2694  FW_ASSERT(
2695  qStatus == Os::Queue::OP_OK,
2696  static_cast<FwAssertArgType>(qStatus)
2697  );
2698  }
2699 
2700  // ----------------------------------------------------------------------
2701  // State getter functions
2702  // ----------------------------------------------------------------------
2703 
2706  {
2707  return this->m_stateMachine_sequencer.getState();
2708  }
2709 
2710  // ----------------------------------------------------------------------
2711  // Signal send functions
2712  // ----------------------------------------------------------------------
2713 
2716  {
2717  ComponentIpcSerializableBuffer buffer;
2718  // Serialize the message type, port number, state ID, and signal
2719  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_VALIDATE), buffer);
2720  // Serialize the signal data
2721  const Fw::SerializeStatus status = buffer.serialize(value);
2722  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2723  // Send the message and handle overflow
2724  this->sequencer_sendSignalFinish(buffer);
2725  }
2726 
2729  {
2730  ComponentIpcSerializableBuffer buffer;
2731  // Serialize the message type, port number, state ID, and signal
2732  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_RUN), buffer);
2733  // Serialize the signal data
2734  const Fw::SerializeStatus status = buffer.serialize(value);
2735  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2736  // Send the message and handle overflow
2737  this->sequencer_sendSignalFinish(buffer);
2738  }
2739 
2742  {
2743  ComponentIpcSerializableBuffer buffer;
2744  // Serialize the message type, port number, state ID, and signal
2745  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_RUN_VALIDATED), buffer);
2746  // Serialize the signal data
2747  const Fw::SerializeStatus status = buffer.serialize(value);
2748  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2749  // Send the message and handle overflow
2750  this->sequencer_sendSignalFinish(buffer);
2751  }
2752 
2755  {
2756  ComponentIpcSerializableBuffer buffer;
2757  // Serialize the message type, port number, state ID, and signal
2758  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_CANCEL), buffer);
2759  // Send the message and handle overflow
2760  this->sequencer_sendSignalFinish(buffer);
2761  }
2762 
2765  {
2766  ComponentIpcSerializableBuffer buffer;
2767  // Serialize the message type, port number, state ID, and signal
2768  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_SET_BREAKPOINT), buffer);
2769  // Serialize the signal data
2770  const Fw::SerializeStatus status = buffer.serialize(value);
2771  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2772  // Send the message and handle overflow
2773  this->sequencer_sendSignalFinish(buffer);
2774  }
2775 
2778  {
2779  ComponentIpcSerializableBuffer buffer;
2780  // Serialize the message type, port number, state ID, and signal
2781  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_CLEAR_BREAKPOINT), buffer);
2782  // Send the message and handle overflow
2783  this->sequencer_sendSignalFinish(buffer);
2784  }
2785 
2788  {
2789  ComponentIpcSerializableBuffer buffer;
2790  // Serialize the message type, port number, state ID, and signal
2791  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_failure), buffer);
2792  // Send the message and handle overflow
2793  this->sequencer_sendSignalFinish(buffer);
2794  }
2795 
2798  {
2799  ComponentIpcSerializableBuffer buffer;
2800  // Serialize the message type, port number, state ID, and signal
2801  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_success), buffer);
2802  // Send the message and handle overflow
2803  this->sequencer_sendSignalFinish(buffer);
2804  }
2805 
2808  {
2809  ComponentIpcSerializableBuffer buffer;
2810  // Serialize the message type, port number, state ID, and signal
2811  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::entered), buffer);
2812  // Send the message and handle overflow
2813  this->sequencer_sendSignalFinish(buffer);
2814  }
2815 
2818  {
2819  ComponentIpcSerializableBuffer buffer;
2820  // Serialize the message type, port number, state ID, and signal
2821  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_success), buffer);
2822  // Send the message and handle overflow
2823  this->sequencer_sendSignalFinish(buffer);
2824  }
2825 
2828  {
2829  ComponentIpcSerializableBuffer buffer;
2830  // Serialize the message type, port number, state ID, and signal
2831  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_failure), buffer);
2832  // Send the message and handle overflow
2833  this->sequencer_sendSignalFinish(buffer);
2834  }
2835 
2838  {
2839  ComponentIpcSerializableBuffer buffer;
2840  // Serialize the message type, port number, state ID, and signal
2841  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_dispatchStatement_noMoreStatements), buffer);
2842  // Send the message and handle overflow
2843  this->sequencer_sendSignalFinish(buffer);
2844  }
2845 
2848  {
2849  ComponentIpcSerializableBuffer buffer;
2850  // Serialize the message type, port number, state ID, and signal
2851  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::checkTimersIn), buffer);
2852  // Send the message and handle overflow
2853  this->sequencer_sendSignalFinish(buffer);
2854  }
2855 
2858  {
2859  ComponentIpcSerializableBuffer buffer;
2860  // Serialize the message type, port number, state ID, and signal
2861  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkShouldWake_wakeup), buffer);
2862  // Send the message and handle overflow
2863  this->sequencer_sendSignalFinish(buffer);
2864  }
2865 
2868  {
2869  ComponentIpcSerializableBuffer buffer;
2870  // Serialize the message type, port number, state ID, and signal
2871  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkShouldWake_keepSleeping), buffer);
2872  // Send the message and handle overflow
2873  this->sequencer_sendSignalFinish(buffer);
2874  }
2875 
2878  {
2879  ComponentIpcSerializableBuffer buffer;
2880  // Serialize the message type, port number, state ID, and signal
2881  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_timeOpFailed), buffer);
2882  // Send the message and handle overflow
2883  this->sequencer_sendSignalFinish(buffer);
2884  }
2885 
2888  {
2889  ComponentIpcSerializableBuffer buffer;
2890  // Serialize the message type, port number, state ID, and signal
2891  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_beginSleep), buffer);
2892  // Send the message and handle overflow
2893  this->sequencer_sendSignalFinish(buffer);
2894  }
2895 
2898  {
2899  ComponentIpcSerializableBuffer buffer;
2900  // Serialize the message type, port number, state ID, and signal
2901  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_success), buffer);
2902  // Send the message and handle overflow
2903  this->sequencer_sendSignalFinish(buffer);
2904  }
2905 
2908  {
2909  ComponentIpcSerializableBuffer buffer;
2910  // Serialize the message type, port number, state ID, and signal
2911  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_failure), buffer);
2912  // Send the message and handle overflow
2913  this->sequencer_sendSignalFinish(buffer);
2914  }
2915 
2918  {
2919  ComponentIpcSerializableBuffer buffer;
2920  // Serialize the message type, port number, state ID, and signal
2921  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_unexpected), buffer);
2922  // Send the message and handle overflow
2923  this->sequencer_sendSignalFinish(buffer);
2924  }
2925 
2928  {
2929  ComponentIpcSerializableBuffer buffer;
2930  // Serialize the message type, port number, state ID, and signal
2931  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::stmtResponse_keepWaiting), buffer);
2932  // Send the message and handle overflow
2933  this->sequencer_sendSignalFinish(buffer);
2934  }
2935 
2938  {
2939  ComponentIpcSerializableBuffer buffer;
2940  // Serialize the message type, port number, state ID, and signal
2941  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkStatementTimeout_statementTimeout), buffer);
2942  // Send the message and handle overflow
2943  this->sequencer_sendSignalFinish(buffer);
2944  }
2945 
2948  {
2949  ComponentIpcSerializableBuffer buffer;
2950  // Serialize the message type, port number, state ID, and signal
2951  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::result_checkStatementTimeout_noTimeout), buffer);
2952  // Send the message and handle overflow
2953  this->sequencer_sendSignalFinish(buffer);
2954  }
2955 
2958  {
2959  ComponentIpcSerializableBuffer buffer;
2960  // Serialize the message type, port number, state ID, and signal
2961  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_CONTINUE), buffer);
2962  // Send the message and handle overflow
2963  this->sequencer_sendSignalFinish(buffer);
2964  }
2965 
2968  {
2969  ComponentIpcSerializableBuffer buffer;
2970  // Serialize the message type, port number, state ID, and signal
2971  this->sendSignalStart(SmId::sequencer, static_cast<FwEnumStoreType>(Svc_FpySequencer_SequencerStateMachine::Signal::cmd_DEBUG_BREAK), buffer);
2972  // Serialize the signal data
2973  const Fw::SerializeStatus status = buffer.serialize(value);
2974  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
2975  // Send the message and handle overflow
2976  this->sequencer_sendSignalFinish(buffer);
2977  }
2978 
2979  // ----------------------------------------------------------------------
2980  // Command response
2981  // ----------------------------------------------------------------------
2982 
2985  FwOpcodeType opCode,
2986  U32 cmdSeq,
2987  Fw::CmdResponse response
2988  )
2989  {
2990  FW_ASSERT(this->m_cmdResponseOut_OutputPort[0].isConnected());
2991  this->m_cmdResponseOut_OutputPort[0].invoke(opCode, cmdSeq, response);
2992  }
2993 
2994  // ----------------------------------------------------------------------
2995  // Command handler base-class functions
2996  //
2997  // Call these functions directly to bypass the command input port
2998  // ----------------------------------------------------------------------
2999 
3002  FwOpcodeType opCode,
3003  U32 cmdSeq,
3004  Fw::CmdArgBuffer& args
3005  )
3006  {
3007  // Call pre-message hook
3008  this->RUN_preMsgHook(opCode,cmdSeq);
3009 
3010  // Defer deserializing arguments to the message dispatcher
3011  // to avoid deserializing and reserializing just for IPC
3012  ComponentIpcSerializableBuffer msg;
3014 
3015  // Serialize for IPC
3016  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_RUN));
3017  FW_ASSERT (
3018  _status == Fw::FW_SERIALIZE_OK,
3019  static_cast<FwAssertArgType>(_status)
3020  );
3021 
3022  // Fake port number to make message dequeue work
3023  FwIndexType port = 0;
3024 
3025  _status = msg.serialize(port);
3026  FW_ASSERT (
3027  _status == Fw::FW_SERIALIZE_OK,
3028  static_cast<FwAssertArgType>(_status)
3029  );
3030 
3031  _status = msg.serialize(opCode);
3032  FW_ASSERT (
3033  _status == Fw::FW_SERIALIZE_OK,
3034  static_cast<FwAssertArgType>(_status)
3035  );
3036 
3037  _status = msg.serialize(cmdSeq);
3038  FW_ASSERT (
3039  _status == Fw::FW_SERIALIZE_OK,
3040  static_cast<FwAssertArgType>(_status)
3041  );
3042 
3043  _status = msg.serialize(args);
3044  FW_ASSERT (
3045  _status == Fw::FW_SERIALIZE_OK,
3046  static_cast<FwAssertArgType>(_status)
3047  );
3048 
3049  // Send message
3051  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3052 
3053  FW_ASSERT(
3054  qStatus == Os::Queue::OP_OK,
3055  static_cast<FwAssertArgType>(qStatus)
3056  );
3057  }
3058 
3061  FwOpcodeType opCode,
3062  U32 cmdSeq,
3063  Fw::CmdArgBuffer& args
3064  )
3065  {
3066  // Call pre-message hook
3067  this->VALIDATE_preMsgHook(opCode,cmdSeq);
3068 
3069  // Defer deserializing arguments to the message dispatcher
3070  // to avoid deserializing and reserializing just for IPC
3071  ComponentIpcSerializableBuffer msg;
3073 
3074  // Serialize for IPC
3075  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_VALIDATE));
3076  FW_ASSERT (
3077  _status == Fw::FW_SERIALIZE_OK,
3078  static_cast<FwAssertArgType>(_status)
3079  );
3080 
3081  // Fake port number to make message dequeue work
3082  FwIndexType port = 0;
3083 
3084  _status = msg.serialize(port);
3085  FW_ASSERT (
3086  _status == Fw::FW_SERIALIZE_OK,
3087  static_cast<FwAssertArgType>(_status)
3088  );
3089 
3090  _status = msg.serialize(opCode);
3091  FW_ASSERT (
3092  _status == Fw::FW_SERIALIZE_OK,
3093  static_cast<FwAssertArgType>(_status)
3094  );
3095 
3096  _status = msg.serialize(cmdSeq);
3097  FW_ASSERT (
3098  _status == Fw::FW_SERIALIZE_OK,
3099  static_cast<FwAssertArgType>(_status)
3100  );
3101 
3102  _status = msg.serialize(args);
3103  FW_ASSERT (
3104  _status == Fw::FW_SERIALIZE_OK,
3105  static_cast<FwAssertArgType>(_status)
3106  );
3107 
3108  // Send message
3110  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3111 
3112  FW_ASSERT(
3113  qStatus == Os::Queue::OP_OK,
3114  static_cast<FwAssertArgType>(qStatus)
3115  );
3116  }
3117 
3120  FwOpcodeType opCode,
3121  U32 cmdSeq,
3122  Fw::CmdArgBuffer& args
3123  )
3124  {
3125  // Call pre-message hook
3126  this->RUN_VALIDATED_preMsgHook(opCode,cmdSeq);
3127 
3128  // Defer deserializing arguments to the message dispatcher
3129  // to avoid deserializing and reserializing just for IPC
3130  ComponentIpcSerializableBuffer msg;
3132 
3133  // Serialize for IPC
3134  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_RUN_VALIDATED));
3135  FW_ASSERT (
3136  _status == Fw::FW_SERIALIZE_OK,
3137  static_cast<FwAssertArgType>(_status)
3138  );
3139 
3140  // Fake port number to make message dequeue work
3141  FwIndexType port = 0;
3142 
3143  _status = msg.serialize(port);
3144  FW_ASSERT (
3145  _status == Fw::FW_SERIALIZE_OK,
3146  static_cast<FwAssertArgType>(_status)
3147  );
3148 
3149  _status = msg.serialize(opCode);
3150  FW_ASSERT (
3151  _status == Fw::FW_SERIALIZE_OK,
3152  static_cast<FwAssertArgType>(_status)
3153  );
3154 
3155  _status = msg.serialize(cmdSeq);
3156  FW_ASSERT (
3157  _status == Fw::FW_SERIALIZE_OK,
3158  static_cast<FwAssertArgType>(_status)
3159  );
3160 
3161  _status = msg.serialize(args);
3162  FW_ASSERT (
3163  _status == Fw::FW_SERIALIZE_OK,
3164  static_cast<FwAssertArgType>(_status)
3165  );
3166 
3167  // Send message
3169  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3170 
3171  FW_ASSERT(
3172  qStatus == Os::Queue::OP_OK,
3173  static_cast<FwAssertArgType>(qStatus)
3174  );
3175  }
3176 
3179  FwOpcodeType opCode,
3180  U32 cmdSeq,
3181  Fw::CmdArgBuffer& args
3182  )
3183  {
3184  // Call pre-message hook
3185  this->CANCEL_preMsgHook(opCode,cmdSeq);
3186 
3187  // Defer deserializing arguments to the message dispatcher
3188  // to avoid deserializing and reserializing just for IPC
3189  ComponentIpcSerializableBuffer msg;
3191 
3192  // Serialize for IPC
3193  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_CANCEL));
3194  FW_ASSERT (
3195  _status == Fw::FW_SERIALIZE_OK,
3196  static_cast<FwAssertArgType>(_status)
3197  );
3198 
3199  // Fake port number to make message dequeue work
3200  FwIndexType port = 0;
3201 
3202  _status = msg.serialize(port);
3203  FW_ASSERT (
3204  _status == Fw::FW_SERIALIZE_OK,
3205  static_cast<FwAssertArgType>(_status)
3206  );
3207 
3208  _status = msg.serialize(opCode);
3209  FW_ASSERT (
3210  _status == Fw::FW_SERIALIZE_OK,
3211  static_cast<FwAssertArgType>(_status)
3212  );
3213 
3214  _status = msg.serialize(cmdSeq);
3215  FW_ASSERT (
3216  _status == Fw::FW_SERIALIZE_OK,
3217  static_cast<FwAssertArgType>(_status)
3218  );
3219 
3220  _status = msg.serialize(args);
3221  FW_ASSERT (
3222  _status == Fw::FW_SERIALIZE_OK,
3223  static_cast<FwAssertArgType>(_status)
3224  );
3225 
3226  // Send message
3228  Os::Queue::Status qStatus = this->m_queue.send(msg, 8, _block);
3229 
3230  FW_ASSERT(
3231  qStatus == Os::Queue::OP_OK,
3232  static_cast<FwAssertArgType>(qStatus)
3233  );
3234  }
3235 
3238  FwOpcodeType opCode,
3239  U32 cmdSeq,
3240  Fw::CmdArgBuffer& args
3241  )
3242  {
3243  // Call pre-message hook
3245 
3246  // Defer deserializing arguments to the message dispatcher
3247  // to avoid deserializing and reserializing just for IPC
3248  ComponentIpcSerializableBuffer msg;
3250 
3251  // Serialize for IPC
3252  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_SET_BREAKPOINT));
3253  FW_ASSERT (
3254  _status == Fw::FW_SERIALIZE_OK,
3255  static_cast<FwAssertArgType>(_status)
3256  );
3257 
3258  // Fake port number to make message dequeue work
3259  FwIndexType port = 0;
3260 
3261  _status = msg.serialize(port);
3262  FW_ASSERT (
3263  _status == Fw::FW_SERIALIZE_OK,
3264  static_cast<FwAssertArgType>(_status)
3265  );
3266 
3267  _status = msg.serialize(opCode);
3268  FW_ASSERT (
3269  _status == Fw::FW_SERIALIZE_OK,
3270  static_cast<FwAssertArgType>(_status)
3271  );
3272 
3273  _status = msg.serialize(cmdSeq);
3274  FW_ASSERT (
3275  _status == Fw::FW_SERIALIZE_OK,
3276  static_cast<FwAssertArgType>(_status)
3277  );
3278 
3279  _status = msg.serialize(args);
3280  FW_ASSERT (
3281  _status == Fw::FW_SERIALIZE_OK,
3282  static_cast<FwAssertArgType>(_status)
3283  );
3284 
3285  // Send message
3287  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3288 
3289  FW_ASSERT(
3290  qStatus == Os::Queue::OP_OK,
3291  static_cast<FwAssertArgType>(qStatus)
3292  );
3293  }
3294 
3297  FwOpcodeType opCode,
3298  U32 cmdSeq,
3299  Fw::CmdArgBuffer& args
3300  )
3301  {
3302  // Call pre-message hook
3303  this->DEBUG_BREAK_preMsgHook(opCode,cmdSeq);
3304 
3305  // Defer deserializing arguments to the message dispatcher
3306  // to avoid deserializing and reserializing just for IPC
3307  ComponentIpcSerializableBuffer msg;
3309 
3310  // Serialize for IPC
3311  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_BREAK));
3312  FW_ASSERT (
3313  _status == Fw::FW_SERIALIZE_OK,
3314  static_cast<FwAssertArgType>(_status)
3315  );
3316 
3317  // Fake port number to make message dequeue work
3318  FwIndexType port = 0;
3319 
3320  _status = msg.serialize(port);
3321  FW_ASSERT (
3322  _status == Fw::FW_SERIALIZE_OK,
3323  static_cast<FwAssertArgType>(_status)
3324  );
3325 
3326  _status = msg.serialize(opCode);
3327  FW_ASSERT (
3328  _status == Fw::FW_SERIALIZE_OK,
3329  static_cast<FwAssertArgType>(_status)
3330  );
3331 
3332  _status = msg.serialize(cmdSeq);
3333  FW_ASSERT (
3334  _status == Fw::FW_SERIALIZE_OK,
3335  static_cast<FwAssertArgType>(_status)
3336  );
3337 
3338  _status = msg.serialize(args);
3339  FW_ASSERT (
3340  _status == Fw::FW_SERIALIZE_OK,
3341  static_cast<FwAssertArgType>(_status)
3342  );
3343 
3344  // Send message
3346  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3347 
3348  FW_ASSERT(
3349  qStatus == Os::Queue::OP_OK,
3350  static_cast<FwAssertArgType>(qStatus)
3351  );
3352  }
3353 
3356  FwOpcodeType opCode,
3357  U32 cmdSeq,
3358  Fw::CmdArgBuffer& args
3359  )
3360  {
3361  // Call pre-message hook
3362  this->DEBUG_CONTINUE_preMsgHook(opCode,cmdSeq);
3363 
3364  // Defer deserializing arguments to the message dispatcher
3365  // to avoid deserializing and reserializing just for IPC
3366  ComponentIpcSerializableBuffer msg;
3368 
3369  // Serialize for IPC
3370  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_CONTINUE));
3371  FW_ASSERT (
3372  _status == Fw::FW_SERIALIZE_OK,
3373  static_cast<FwAssertArgType>(_status)
3374  );
3375 
3376  // Fake port number to make message dequeue work
3377  FwIndexType port = 0;
3378 
3379  _status = msg.serialize(port);
3380  FW_ASSERT (
3381  _status == Fw::FW_SERIALIZE_OK,
3382  static_cast<FwAssertArgType>(_status)
3383  );
3384 
3385  _status = msg.serialize(opCode);
3386  FW_ASSERT (
3387  _status == Fw::FW_SERIALIZE_OK,
3388  static_cast<FwAssertArgType>(_status)
3389  );
3390 
3391  _status = msg.serialize(cmdSeq);
3392  FW_ASSERT (
3393  _status == Fw::FW_SERIALIZE_OK,
3394  static_cast<FwAssertArgType>(_status)
3395  );
3396 
3397  _status = msg.serialize(args);
3398  FW_ASSERT (
3399  _status == Fw::FW_SERIALIZE_OK,
3400  static_cast<FwAssertArgType>(_status)
3401  );
3402 
3403  // Send message
3405  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3406 
3407  FW_ASSERT(
3408  qStatus == Os::Queue::OP_OK,
3409  static_cast<FwAssertArgType>(qStatus)
3410  );
3411  }
3412 
3415  FwOpcodeType opCode,
3416  U32 cmdSeq,
3417  Fw::CmdArgBuffer& args
3418  )
3419  {
3420  // Call pre-message hook
3422 
3423  // Defer deserializing arguments to the message dispatcher
3424  // to avoid deserializing and reserializing just for IPC
3425  ComponentIpcSerializableBuffer msg;
3427 
3428  // Serialize for IPC
3429  _status = msg.serialize(static_cast<FwEnumStoreType>(CMD_DEBUG_CLEAR_BREAKPOINT));
3430  FW_ASSERT (
3431  _status == Fw::FW_SERIALIZE_OK,
3432  static_cast<FwAssertArgType>(_status)
3433  );
3434 
3435  // Fake port number to make message dequeue work
3436  FwIndexType port = 0;
3437 
3438  _status = msg.serialize(port);
3439  FW_ASSERT (
3440  _status == Fw::FW_SERIALIZE_OK,
3441  static_cast<FwAssertArgType>(_status)
3442  );
3443 
3444  _status = msg.serialize(opCode);
3445  FW_ASSERT (
3446  _status == Fw::FW_SERIALIZE_OK,
3447  static_cast<FwAssertArgType>(_status)
3448  );
3449 
3450  _status = msg.serialize(cmdSeq);
3451  FW_ASSERT (
3452  _status == Fw::FW_SERIALIZE_OK,
3453  static_cast<FwAssertArgType>(_status)
3454  );
3455 
3456  _status = msg.serialize(args);
3457  FW_ASSERT (
3458  _status == Fw::FW_SERIALIZE_OK,
3459  static_cast<FwAssertArgType>(_status)
3460  );
3461 
3462  // Send message
3464  Os::Queue::Status qStatus = this->m_queue.send(msg, 7, _block);
3465 
3466  FW_ASSERT(
3467  qStatus == Os::Queue::OP_OK,
3468  static_cast<FwAssertArgType>(qStatus)
3469  );
3470  }
3471 
3472  // ----------------------------------------------------------------------
3473  // Pre-message hooks for async commands
3474  //
3475  // Each of these functions is invoked just before processing the
3476  // corresponding command. By default they do nothing. You can
3477  // override them to provide specific pre-command behavior.
3478  // ----------------------------------------------------------------------
3479 
3482  FwOpcodeType opCode,
3483  U32 cmdSeq
3484  )
3485  {
3486  // Defaults to no-op; can be overridden
3487  (void) opCode;
3488  (void) cmdSeq;
3489  }
3490 
3493  FwOpcodeType opCode,
3494  U32 cmdSeq
3495  )
3496  {
3497  // Defaults to no-op; can be overridden
3498  (void) opCode;
3499  (void) cmdSeq;
3500  }
3501 
3504  FwOpcodeType opCode,
3505  U32 cmdSeq
3506  )
3507  {
3508  // Defaults to no-op; can be overridden
3509  (void) opCode;
3510  (void) cmdSeq;
3511  }
3512 
3515  FwOpcodeType opCode,
3516  U32 cmdSeq
3517  )
3518  {
3519  // Defaults to no-op; can be overridden
3520  (void) opCode;
3521  (void) cmdSeq;
3522  }
3523 
3526  FwOpcodeType opCode,
3527  U32 cmdSeq
3528  )
3529  {
3530  // Defaults to no-op; can be overridden
3531  (void) opCode;
3532  (void) cmdSeq;
3533  }
3534 
3537  FwOpcodeType opCode,
3538  U32 cmdSeq
3539  )
3540  {
3541  // Defaults to no-op; can be overridden
3542  (void) opCode;
3543  (void) cmdSeq;
3544  }
3545 
3548  FwOpcodeType opCode,
3549  U32 cmdSeq
3550  )
3551  {
3552  // Defaults to no-op; can be overridden
3553  (void) opCode;
3554  (void) cmdSeq;
3555  }
3556 
3559  FwOpcodeType opCode,
3560  U32 cmdSeq
3561  )
3562  {
3563  // Defaults to no-op; can be overridden
3564  (void) opCode;
3565  (void) cmdSeq;
3566  }
3567 
3568  // ----------------------------------------------------------------------
3569  // Event logging functions
3570  // ----------------------------------------------------------------------
3571 
3574  {
3575  // Get the time
3576  Fw::Time _logTime;
3577  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3578  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3579  }
3580 
3581  FwEventIdType _id = static_cast<FwEventIdType>(0);
3582 
3583  _id = this->getIdBase() + EVENTID_INVALIDCOMMAND;
3584 
3585  // Emit the event on the log port
3586  if (this->m_logOut_OutputPort[0].isConnected()) {
3587  Fw::LogBuffer _logBuff;
3589 
3590 #if FW_AMPCS_COMPATIBLE
3591  // Serialize the number of arguments
3592  _status = _logBuff.serialize(static_cast<U8>(1));
3593  FW_ASSERT(
3594  _status == Fw::FW_SERIALIZE_OK,
3595  static_cast<FwAssertArgType>(_status)
3596  );
3597 #endif
3598 
3599 #if FW_AMPCS_COMPATIBLE
3600  // Serialize the argument size
3601  _status = _logBuff.serialize(
3602  static_cast<U8>(sizeof(I32))
3603  );
3604  FW_ASSERT(
3605  _status == Fw::FW_SERIALIZE_OK,
3606  static_cast<FwAssertArgType>(_status)
3607  );
3608 #endif
3609  _status = _logBuff.serialize(state);
3610  FW_ASSERT(
3611  _status == Fw::FW_SERIALIZE_OK,
3612  static_cast<FwAssertArgType>(_status)
3613  );
3614 
3615  this->m_logOut_OutputPort[0].invoke(
3616  _id,
3617  _logTime,
3619  _logBuff
3620  );
3621  }
3622 
3623  // Emit the event on the text log port
3624 #if FW_ENABLE_TEXT_LOGGING
3625  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3626 #if FW_OBJECT_NAMES == 1
3627  const char* _formatString =
3628  "(%s) %s: Cannot run command in state %" PRIi32 "";
3629 #else
3630  const char* _formatString =
3631  "%s: Cannot run command in state %" PRIi32 "";
3632 #endif
3633 
3634  Fw::TextLogString _logString;
3635  _logString.format(
3636  _formatString,
3637 #if FW_OBJECT_NAMES == 1
3638  this->m_objName.toChar(),
3639 #endif
3640  "InvalidCommand ",
3641  state
3642  );
3643 
3644  this->m_logTextOut_OutputPort[0].invoke(
3645  _id,
3646  _logTime,
3648  _logString
3649  );
3650  }
3651 #endif
3652  }
3653 
3656  {
3657  // Get the time
3658  Fw::Time _logTime;
3659  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3660  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3661  }
3662 
3663  FwEventIdType _id = static_cast<FwEventIdType>(0);
3664 
3665  _id = this->getIdBase() + EVENTID_INVALIDSEQRUNCALL;
3666 
3667  // Emit the event on the log port
3668  if (this->m_logOut_OutputPort[0].isConnected()) {
3669  Fw::LogBuffer _logBuff;
3671 
3672 #if FW_AMPCS_COMPATIBLE
3673  // Serialize the number of arguments
3674  _status = _logBuff.serialize(static_cast<U8>(1));
3675  FW_ASSERT(
3676  _status == Fw::FW_SERIALIZE_OK,
3677  static_cast<FwAssertArgType>(_status)
3678  );
3679 #endif
3680 
3681 #if FW_AMPCS_COMPATIBLE
3682  // Serialize the argument size
3683  _status = _logBuff.serialize(
3684  static_cast<U8>(sizeof(I32))
3685  );
3686  FW_ASSERT(
3687  _status == Fw::FW_SERIALIZE_OK,
3688  static_cast<FwAssertArgType>(_status)
3689  );
3690 #endif
3691  _status = _logBuff.serialize(state);
3692  FW_ASSERT(
3693  _status == Fw::FW_SERIALIZE_OK,
3694  static_cast<FwAssertArgType>(_status)
3695  );
3696 
3697  this->m_logOut_OutputPort[0].invoke(
3698  _id,
3699  _logTime,
3701  _logBuff
3702  );
3703  }
3704 
3705  // Emit the event on the text log port
3706 #if FW_ENABLE_TEXT_LOGGING
3707  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3708 #if FW_OBJECT_NAMES == 1
3709  const char* _formatString =
3710  "(%s) %s: Cannot run sequence from a port in state %" PRIi32 "";
3711 #else
3712  const char* _formatString =
3713  "%s: Cannot run sequence from a port in state %" PRIi32 "";
3714 #endif
3715 
3716  Fw::TextLogString _logString;
3717  _logString.format(
3718  _formatString,
3719 #if FW_OBJECT_NAMES == 1
3720  this->m_objName.toChar(),
3721 #endif
3722  "InvalidSeqRunCall ",
3723  state
3724  );
3725 
3726  this->m_logTextOut_OutputPort[0].invoke(
3727  _id,
3728  _logTime,
3730  _logString
3731  );
3732  }
3733 #endif
3734  }
3735 
3738  const Fw::StringBase& filePath,
3739  I32 errorCode
3740  ) const
3741  {
3742  // Get the time
3743  Fw::Time _logTime;
3744  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3745  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3746  }
3747 
3748  FwEventIdType _id = static_cast<FwEventIdType>(0);
3749 
3750  _id = this->getIdBase() + EVENTID_FILEOPENERROR;
3751 
3752  // Emit the event on the log port
3753  if (this->m_logOut_OutputPort[0].isConnected()) {
3754  Fw::LogBuffer _logBuff;
3756 
3757 #if FW_AMPCS_COMPATIBLE
3758  // Serialize the number of arguments
3759  _status = _logBuff.serialize(static_cast<U8>(2));
3760  FW_ASSERT(
3761  _status == Fw::FW_SERIALIZE_OK,
3762  static_cast<FwAssertArgType>(_status)
3763  );
3764 #endif
3765 
3766  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3767  FW_ASSERT(
3768  _status == Fw::FW_SERIALIZE_OK,
3769  static_cast<FwAssertArgType>(_status)
3770  );
3771 
3772 #if FW_AMPCS_COMPATIBLE
3773  // Serialize the argument size
3774  _status = _logBuff.serialize(
3775  static_cast<U8>(sizeof(I32))
3776  );
3777  FW_ASSERT(
3778  _status == Fw::FW_SERIALIZE_OK,
3779  static_cast<FwAssertArgType>(_status)
3780  );
3781 #endif
3782  _status = _logBuff.serialize(errorCode);
3783  FW_ASSERT(
3784  _status == Fw::FW_SERIALIZE_OK,
3785  static_cast<FwAssertArgType>(_status)
3786  );
3787 
3788  this->m_logOut_OutputPort[0].invoke(
3789  _id,
3790  _logTime,
3792  _logBuff
3793  );
3794  }
3795 
3796  // Emit the event on the text log port
3797 #if FW_ENABLE_TEXT_LOGGING
3798  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3799 #if FW_OBJECT_NAMES == 1
3800  const char* _formatString =
3801  "(%s) %s: File open error encountered while opening %s: %" PRIi32 "";
3802 #else
3803  const char* _formatString =
3804  "%s: File open error encountered while opening %s: %" PRIi32 "";
3805 #endif
3806 
3807  Fw::TextLogString _logString;
3808  _logString.format(
3809  _formatString,
3810 #if FW_OBJECT_NAMES == 1
3811  this->m_objName.toChar(),
3812 #endif
3813  "FileOpenError ",
3814  filePath.toChar(),
3815  errorCode
3816  );
3817 
3818  this->m_logTextOut_OutputPort[0].invoke(
3819  _id,
3820  _logTime,
3822  _logString
3823  );
3824  }
3825 #endif
3826  }
3827 
3830  const Fw::StringBase& filePath,
3831  I32 errorCode
3832  ) const
3833  {
3834  // Get the time
3835  Fw::Time _logTime;
3836  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3837  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3838  }
3839 
3840  FwEventIdType _id = static_cast<FwEventIdType>(0);
3841 
3842  _id = this->getIdBase() + EVENTID_FILEREADERROR;
3843 
3844  // Emit the event on the log port
3845  if (this->m_logOut_OutputPort[0].isConnected()) {
3846  Fw::LogBuffer _logBuff;
3848 
3849 #if FW_AMPCS_COMPATIBLE
3850  // Serialize the number of arguments
3851  _status = _logBuff.serialize(static_cast<U8>(2));
3852  FW_ASSERT(
3853  _status == Fw::FW_SERIALIZE_OK,
3854  static_cast<FwAssertArgType>(_status)
3855  );
3856 #endif
3857 
3858  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3859  FW_ASSERT(
3860  _status == Fw::FW_SERIALIZE_OK,
3861  static_cast<FwAssertArgType>(_status)
3862  );
3863 
3864 #if FW_AMPCS_COMPATIBLE
3865  // Serialize the argument size
3866  _status = _logBuff.serialize(
3867  static_cast<U8>(sizeof(I32))
3868  );
3869  FW_ASSERT(
3870  _status == Fw::FW_SERIALIZE_OK,
3871  static_cast<FwAssertArgType>(_status)
3872  );
3873 #endif
3874  _status = _logBuff.serialize(errorCode);
3875  FW_ASSERT(
3876  _status == Fw::FW_SERIALIZE_OK,
3877  static_cast<FwAssertArgType>(_status)
3878  );
3879 
3880  this->m_logOut_OutputPort[0].invoke(
3881  _id,
3882  _logTime,
3884  _logBuff
3885  );
3886  }
3887 
3888  // Emit the event on the text log port
3889 #if FW_ENABLE_TEXT_LOGGING
3890  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3891 #if FW_OBJECT_NAMES == 1
3892  const char* _formatString =
3893  "(%s) %s: File read error encountered while reading %s: %" PRIi32 "";
3894 #else
3895  const char* _formatString =
3896  "%s: File read error encountered while reading %s: %" PRIi32 "";
3897 #endif
3898 
3899  Fw::TextLogString _logString;
3900  _logString.format(
3901  _formatString,
3902 #if FW_OBJECT_NAMES == 1
3903  this->m_objName.toChar(),
3904 #endif
3905  "FileReadError ",
3906  filePath.toChar(),
3907  errorCode
3908  );
3909 
3910  this->m_logTextOut_OutputPort[0].invoke(
3911  _id,
3912  _logTime,
3914  _logString
3915  );
3916  }
3917 #endif
3918  }
3919 
3922  {
3923  // Get the time
3924  Fw::Time _logTime;
3925  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3926  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3927  }
3928 
3929  FwEventIdType _id = static_cast<FwEventIdType>(0);
3930 
3931  _id = this->getIdBase() + EVENTID_ENDOFFILEERROR;
3932 
3933  // Emit the event on the log port
3934  if (this->m_logOut_OutputPort[0].isConnected()) {
3935  Fw::LogBuffer _logBuff;
3937 
3938 #if FW_AMPCS_COMPATIBLE
3939  // Serialize the number of arguments
3940  _status = _logBuff.serialize(static_cast<U8>(1));
3941  FW_ASSERT(
3942  _status == Fw::FW_SERIALIZE_OK,
3943  static_cast<FwAssertArgType>(_status)
3944  );
3945 #endif
3946 
3947  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3948  FW_ASSERT(
3949  _status == Fw::FW_SERIALIZE_OK,
3950  static_cast<FwAssertArgType>(_status)
3951  );
3952 
3953  this->m_logOut_OutputPort[0].invoke(
3954  _id,
3955  _logTime,
3957  _logBuff
3958  );
3959  }
3960 
3961  // Emit the event on the text log port
3962 #if FW_ENABLE_TEXT_LOGGING
3963  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3964 #if FW_OBJECT_NAMES == 1
3965  const char* _formatString =
3966  "(%s) %s: End of file encountered unexpectedly while reading %s";
3967 #else
3968  const char* _formatString =
3969  "%s: End of file encountered unexpectedly while reading %s";
3970 #endif
3971 
3972  Fw::TextLogString _logString;
3973  _logString.format(
3974  _formatString,
3975 #if FW_OBJECT_NAMES == 1
3976  this->m_objName.toChar(),
3977 #endif
3978  "EndOfFileError ",
3979  filePath.toChar()
3980  );
3981 
3982  this->m_logTextOut_OutputPort[0].invoke(
3983  _id,
3984  _logTime,
3986  _logString
3987  );
3988  }
3989 #endif
3990  }
3991 
3994  const Fw::StringBase& filePath,
3995  I32 errorCode,
3996  U64 buffLeft,
3997  U64 buffLength
3998  ) const
3999  {
4000  // Get the time
4001  Fw::Time _logTime;
4002  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4003  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4004  }
4005 
4006  FwEventIdType _id = static_cast<FwEventIdType>(0);
4007 
4009 
4010  // Emit the event on the log port
4011  if (this->m_logOut_OutputPort[0].isConnected()) {
4012  Fw::LogBuffer _logBuff;
4014 
4015 #if FW_AMPCS_COMPATIBLE
4016  // Serialize the number of arguments
4017  _status = _logBuff.serialize(static_cast<U8>(4));
4018  FW_ASSERT(
4019  _status == Fw::FW_SERIALIZE_OK,
4020  static_cast<FwAssertArgType>(_status)
4021  );
4022 #endif
4023 
4024  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4025  FW_ASSERT(
4026  _status == Fw::FW_SERIALIZE_OK,
4027  static_cast<FwAssertArgType>(_status)
4028  );
4029 
4030 #if FW_AMPCS_COMPATIBLE
4031  // Serialize the argument size
4032  _status = _logBuff.serialize(
4033  static_cast<U8>(sizeof(I32))
4034  );
4035  FW_ASSERT(
4036  _status == Fw::FW_SERIALIZE_OK,
4037  static_cast<FwAssertArgType>(_status)
4038  );
4039 #endif
4040  _status = _logBuff.serialize(errorCode);
4041  FW_ASSERT(
4042  _status == Fw::FW_SERIALIZE_OK,
4043  static_cast<FwAssertArgType>(_status)
4044  );
4045 
4046 #if FW_AMPCS_COMPATIBLE
4047  // Serialize the argument size
4048  _status = _logBuff.serialize(
4049  static_cast<U8>(sizeof(U64))
4050  );
4051  FW_ASSERT(
4052  _status == Fw::FW_SERIALIZE_OK,
4053  static_cast<FwAssertArgType>(_status)
4054  );
4055 #endif
4056  _status = _logBuff.serialize(buffLeft);
4057  FW_ASSERT(
4058  _status == Fw::FW_SERIALIZE_OK,
4059  static_cast<FwAssertArgType>(_status)
4060  );
4061 
4062 #if FW_AMPCS_COMPATIBLE
4063  // Serialize the argument size
4064  _status = _logBuff.serialize(
4065  static_cast<U8>(sizeof(U64))
4066  );
4067  FW_ASSERT(
4068  _status == Fw::FW_SERIALIZE_OK,
4069  static_cast<FwAssertArgType>(_status)
4070  );
4071 #endif
4072  _status = _logBuff.serialize(buffLength);
4073  FW_ASSERT(
4074  _status == Fw::FW_SERIALIZE_OK,
4075  static_cast<FwAssertArgType>(_status)
4076  );
4077 
4078  this->m_logOut_OutputPort[0].invoke(
4079  _id,
4080  _logTime,
4082  _logBuff
4083  );
4084  }
4085 
4086  // Emit the event on the text log port
4087 #if FW_ENABLE_TEXT_LOGGING
4088  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4089 #if FW_OBJECT_NAMES == 1
4090  const char* _formatString =
4091  "(%s) %s: Deserialize error encountered while reading %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
4092 #else
4093  const char* _formatString =
4094  "%s: Deserialize error encountered while reading %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
4095 #endif
4096 
4097  Fw::TextLogString _logString;
4098  _logString.format(
4099  _formatString,
4100 #if FW_OBJECT_NAMES == 1
4101  this->m_objName.toChar(),
4102 #endif
4103  "FileReadDeserializeError ",
4104  filePath.toChar(),
4105  errorCode,
4106  buffLeft,
4107  buffLength
4108  );
4109 
4110  this->m_logTextOut_OutputPort[0].invoke(
4111  _id,
4112  _logTime,
4114  _logString
4115  );
4116  }
4117 #endif
4118  }
4119 
4122  U8 expected,
4123  U8 actual
4124  ) const
4125  {
4126  // Get the time
4127  Fw::Time _logTime;
4128  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4129  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4130  }
4131 
4132  FwEventIdType _id = static_cast<FwEventIdType>(0);
4133 
4134  _id = this->getIdBase() + EVENTID_WRONGSCHEMAVERSION;
4135 
4136  // Emit the event on the log port
4137  if (this->m_logOut_OutputPort[0].isConnected()) {
4138  Fw::LogBuffer _logBuff;
4140 
4141 #if FW_AMPCS_COMPATIBLE
4142  // Serialize the number of arguments
4143  _status = _logBuff.serialize(static_cast<U8>(2));
4144  FW_ASSERT(
4145  _status == Fw::FW_SERIALIZE_OK,
4146  static_cast<FwAssertArgType>(_status)
4147  );
4148 #endif
4149 
4150 #if FW_AMPCS_COMPATIBLE
4151  // Serialize the argument size
4152  _status = _logBuff.serialize(
4153  static_cast<U8>(sizeof(U8))
4154  );
4155  FW_ASSERT(
4156  _status == Fw::FW_SERIALIZE_OK,
4157  static_cast<FwAssertArgType>(_status)
4158  );
4159 #endif
4160  _status = _logBuff.serialize(expected);
4161  FW_ASSERT(
4162  _status == Fw::FW_SERIALIZE_OK,
4163  static_cast<FwAssertArgType>(_status)
4164  );
4165 
4166 #if FW_AMPCS_COMPATIBLE
4167  // Serialize the argument size
4168  _status = _logBuff.serialize(
4169  static_cast<U8>(sizeof(U8))
4170  );
4171  FW_ASSERT(
4172  _status == Fw::FW_SERIALIZE_OK,
4173  static_cast<FwAssertArgType>(_status)
4174  );
4175 #endif
4176  _status = _logBuff.serialize(actual);
4177  FW_ASSERT(
4178  _status == Fw::FW_SERIALIZE_OK,
4179  static_cast<FwAssertArgType>(_status)
4180  );
4181 
4182  this->m_logOut_OutputPort[0].invoke(
4183  _id,
4184  _logTime,
4186  _logBuff
4187  );
4188  }
4189 
4190  // Emit the event on the text log port
4191 #if FW_ENABLE_TEXT_LOGGING
4192  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4193 #if FW_OBJECT_NAMES == 1
4194  const char* _formatString =
4195  "(%s) %s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
4196 #else
4197  const char* _formatString =
4198  "%s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
4199 #endif
4200 
4201  Fw::TextLogString _logString;
4202  _logString.format(
4203  _formatString,
4204 #if FW_OBJECT_NAMES == 1
4205  this->m_objName.toChar(),
4206 #endif
4207  "WrongSchemaVersion ",
4208  expected,
4209  actual
4210  );
4211 
4212  this->m_logTextOut_OutputPort[0].invoke(
4213  _id,
4214  _logTime,
4216  _logString
4217  );
4218  }
4219 #endif
4220  }
4221 
4224  U32 expected,
4225  U32 actual
4226  ) const
4227  {
4228  // Get the time
4229  Fw::Time _logTime;
4230  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4231  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4232  }
4233 
4234  FwEventIdType _id = static_cast<FwEventIdType>(0);
4235 
4236  _id = this->getIdBase() + EVENTID_WRONGCRC;
4237 
4238  // Emit the event on the log port
4239  if (this->m_logOut_OutputPort[0].isConnected()) {
4240  Fw::LogBuffer _logBuff;
4242 
4243 #if FW_AMPCS_COMPATIBLE
4244  // Serialize the number of arguments
4245  _status = _logBuff.serialize(static_cast<U8>(2));
4246  FW_ASSERT(
4247  _status == Fw::FW_SERIALIZE_OK,
4248  static_cast<FwAssertArgType>(_status)
4249  );
4250 #endif
4251 
4252 #if FW_AMPCS_COMPATIBLE
4253  // Serialize the argument size
4254  _status = _logBuff.serialize(
4255  static_cast<U8>(sizeof(U32))
4256  );
4257  FW_ASSERT(
4258  _status == Fw::FW_SERIALIZE_OK,
4259  static_cast<FwAssertArgType>(_status)
4260  );
4261 #endif
4262  _status = _logBuff.serialize(expected);
4263  FW_ASSERT(
4264  _status == Fw::FW_SERIALIZE_OK,
4265  static_cast<FwAssertArgType>(_status)
4266  );
4267 
4268 #if FW_AMPCS_COMPATIBLE
4269  // Serialize the argument size
4270  _status = _logBuff.serialize(
4271  static_cast<U8>(sizeof(U32))
4272  );
4273  FW_ASSERT(
4274  _status == Fw::FW_SERIALIZE_OK,
4275  static_cast<FwAssertArgType>(_status)
4276  );
4277 #endif
4278  _status = _logBuff.serialize(actual);
4279  FW_ASSERT(
4280  _status == Fw::FW_SERIALIZE_OK,
4281  static_cast<FwAssertArgType>(_status)
4282  );
4283 
4284  this->m_logOut_OutputPort[0].invoke(
4285  _id,
4286  _logTime,
4288  _logBuff
4289  );
4290  }
4291 
4292  // Emit the event on the text log port
4293 #if FW_ENABLE_TEXT_LOGGING
4294  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4295 #if FW_OBJECT_NAMES == 1
4296  const char* _formatString =
4297  "(%s) %s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
4298 #else
4299  const char* _formatString =
4300  "%s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
4301 #endif
4302 
4303  Fw::TextLogString _logString;
4304  _logString.format(
4305  _formatString,
4306 #if FW_OBJECT_NAMES == 1
4307  this->m_objName.toChar(),
4308 #endif
4309  "WrongCRC ",
4310  expected,
4311  actual
4312  );
4313 
4314  this->m_logTextOut_OutputPort[0].invoke(
4315  _id,
4316  _logTime,
4318  _logString
4319  );
4320  }
4321 #endif
4322  }
4323 
4326  {
4327  // Get the time
4328  Fw::Time _logTime;
4329  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4330  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4331  }
4332 
4333  FwEventIdType _id = static_cast<FwEventIdType>(0);
4334 
4335  _id = this->getIdBase() + EVENTID_EXTRABYTESINSEQUENCE;
4336 
4337  // Emit the event on the log port
4338  if (this->m_logOut_OutputPort[0].isConnected()) {
4339  Fw::LogBuffer _logBuff;
4341 
4342 #if FW_AMPCS_COMPATIBLE
4343  // Serialize the number of arguments
4344  _status = _logBuff.serialize(static_cast<U8>(1));
4345  FW_ASSERT(
4346  _status == Fw::FW_SERIALIZE_OK,
4347  static_cast<FwAssertArgType>(_status)
4348  );
4349 #endif
4350 
4351 #if FW_AMPCS_COMPATIBLE
4352  // Serialize the argument size
4353  _status = _logBuff.serialize(
4354  static_cast<U8>(sizeof(U32))
4355  );
4356  FW_ASSERT(
4357  _status == Fw::FW_SERIALIZE_OK,
4358  static_cast<FwAssertArgType>(_status)
4359  );
4360 #endif
4361  _status = _logBuff.serialize(remaining);
4362  FW_ASSERT(
4363  _status == Fw::FW_SERIALIZE_OK,
4364  static_cast<FwAssertArgType>(_status)
4365  );
4366 
4367  this->m_logOut_OutputPort[0].invoke(
4368  _id,
4369  _logTime,
4371  _logBuff
4372  );
4373  }
4374 
4375  // Emit the event on the text log port
4376 #if FW_ENABLE_TEXT_LOGGING
4377  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4378 #if FW_OBJECT_NAMES == 1
4379  const char* _formatString =
4380  "(%s) %s: File had %" PRIu32 " extra bytes at the end";
4381 #else
4382  const char* _formatString =
4383  "%s: File had %" PRIu32 " extra bytes at the end";
4384 #endif
4385 
4386  Fw::TextLogString _logString;
4387  _logString.format(
4388  _formatString,
4389 #if FW_OBJECT_NAMES == 1
4390  this->m_objName.toChar(),
4391 #endif
4392  "ExtraBytesInSequence ",
4393  remaining
4394  );
4395 
4396  this->m_logTextOut_OutputPort[0].invoke(
4397  _id,
4398  _logTime,
4400  _logString
4401  );
4402  }
4403 #endif
4404  }
4405 
4408  U64 bufferSize,
4409  const Fw::StringBase& filePath
4410  ) const
4411  {
4412  // Get the time
4413  Fw::Time _logTime;
4414  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4415  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4416  }
4417 
4418  FwEventIdType _id = static_cast<FwEventIdType>(0);
4419 
4421 
4422  // Emit the event on the log port
4423  if (this->m_logOut_OutputPort[0].isConnected()) {
4424  Fw::LogBuffer _logBuff;
4426 
4427 #if FW_AMPCS_COMPATIBLE
4428  // Serialize the number of arguments
4429  _status = _logBuff.serialize(static_cast<U8>(2));
4430  FW_ASSERT(
4431  _status == Fw::FW_SERIALIZE_OK,
4432  static_cast<FwAssertArgType>(_status)
4433  );
4434 #endif
4435 
4436 #if FW_AMPCS_COMPATIBLE
4437  // Serialize the argument size
4438  _status = _logBuff.serialize(
4439  static_cast<U8>(sizeof(U64))
4440  );
4441  FW_ASSERT(
4442  _status == Fw::FW_SERIALIZE_OK,
4443  static_cast<FwAssertArgType>(_status)
4444  );
4445 #endif
4446  _status = _logBuff.serialize(bufferSize);
4447  FW_ASSERT(
4448  _status == Fw::FW_SERIALIZE_OK,
4449  static_cast<FwAssertArgType>(_status)
4450  );
4451 
4452  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4453  FW_ASSERT(
4454  _status == Fw::FW_SERIALIZE_OK,
4455  static_cast<FwAssertArgType>(_status)
4456  );
4457 
4458  this->m_logOut_OutputPort[0].invoke(
4459  _id,
4460  _logTime,
4462  _logBuff
4463  );
4464  }
4465 
4466  // Emit the event on the text log port
4467 #if FW_ENABLE_TEXT_LOGGING
4468  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4469 #if FW_OBJECT_NAMES == 1
4470  const char* _formatString =
4471  "(%s) %s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4472 #else
4473  const char* _formatString =
4474  "%s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4475 #endif
4476 
4477  Fw::TextLogString _logString;
4478  _logString.format(
4479  _formatString,
4480 #if FW_OBJECT_NAMES == 1
4481  this->m_objName.toChar(),
4482 #endif
4483  "InsufficientBufferSpace ",
4484  bufferSize,
4485  filePath.toChar()
4486  );
4487 
4488  this->m_logTextOut_OutputPort[0].invoke(
4489  _id,
4490  _logTime,
4492  _logString
4493  );
4494  }
4495 #endif
4496  }
4497 
4500  FwOpcodeType opCode,
4501  U32 stmtIdx,
4502  const Fw::StringBase& filePath,
4503  Fw::CmdResponse response
4504  ) const
4505  {
4506  // Get the time
4507  Fw::Time _logTime;
4508  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4509  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4510  }
4511 
4512  FwEventIdType _id = static_cast<FwEventIdType>(0);
4513 
4514  _id = this->getIdBase() + EVENTID_COMMANDFAILED;
4515 
4516  // Emit the event on the log port
4517  if (this->m_logOut_OutputPort[0].isConnected()) {
4518  Fw::LogBuffer _logBuff;
4520 
4521 #if FW_AMPCS_COMPATIBLE
4522  // Serialize the number of arguments
4523  _status = _logBuff.serialize(static_cast<U8>(4));
4524  FW_ASSERT(
4525  _status == Fw::FW_SERIALIZE_OK,
4526  static_cast<FwAssertArgType>(_status)
4527  );
4528 #endif
4529 
4530 #if FW_AMPCS_COMPATIBLE
4531  // Serialize the argument size
4532  _status = _logBuff.serialize(
4533  static_cast<U8>(sizeof(FwOpcodeType))
4534  );
4535  FW_ASSERT(
4536  _status == Fw::FW_SERIALIZE_OK,
4537  static_cast<FwAssertArgType>(_status)
4538  );
4539 #endif
4540  _status = _logBuff.serialize(opCode);
4541  FW_ASSERT(
4542  _status == Fw::FW_SERIALIZE_OK,
4543  static_cast<FwAssertArgType>(_status)
4544  );
4545 
4546 #if FW_AMPCS_COMPATIBLE
4547  // Serialize the argument size
4548  _status = _logBuff.serialize(
4549  static_cast<U8>(sizeof(U32))
4550  );
4551  FW_ASSERT(
4552  _status == Fw::FW_SERIALIZE_OK,
4553  static_cast<FwAssertArgType>(_status)
4554  );
4555 #endif
4556  _status = _logBuff.serialize(stmtIdx);
4557  FW_ASSERT(
4558  _status == Fw::FW_SERIALIZE_OK,
4559  static_cast<FwAssertArgType>(_status)
4560  );
4561 
4562  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4563  FW_ASSERT(
4564  _status == Fw::FW_SERIALIZE_OK,
4565  static_cast<FwAssertArgType>(_status)
4566  );
4567 
4568 #if FW_AMPCS_COMPATIBLE
4569  // Serialize the argument size
4570  _status = _logBuff.serialize(
4571  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4572  );
4573  FW_ASSERT(
4574  _status == Fw::FW_SERIALIZE_OK,
4575  static_cast<FwAssertArgType>(_status)
4576  );
4577 #endif
4578  _status = _logBuff.serialize(response);
4579  FW_ASSERT(
4580  _status == Fw::FW_SERIALIZE_OK,
4581  static_cast<FwAssertArgType>(_status)
4582  );
4583 
4584  this->m_logOut_OutputPort[0].invoke(
4585  _id,
4586  _logTime,
4588  _logBuff
4589  );
4590  }
4591 
4592  // Emit the event on the text log port
4593 #if FW_ENABLE_TEXT_LOGGING
4594  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4595 #if FW_OBJECT_NAMES == 1
4596  const char* _formatString =
4597  "(%s) %s: Failed to execute command opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4598 #else
4599  const char* _formatString =
4600  "%s: Failed to execute command opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4601 #endif
4602 
4603  Fw::String responseStr;
4604  response.toString(responseStr);
4605 
4606  Fw::TextLogString _logString;
4607  _logString.format(
4608  _formatString,
4609 #if FW_OBJECT_NAMES == 1
4610  this->m_objName.toChar(),
4611 #endif
4612  "CommandFailed ",
4613  opCode,
4614  stmtIdx,
4615  filePath.toChar(),
4616  responseStr.toChar()
4617  );
4618 
4619  this->m_logTextOut_OutputPort[0].invoke(
4620  _id,
4621  _logTime,
4623  _logString
4624  );
4625  }
4626 #endif
4627  }
4628 
4631  {
4632  // Get the time
4633  Fw::Time _logTime;
4634  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4635  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4636  }
4637 
4638  FwEventIdType _id = static_cast<FwEventIdType>(0);
4639 
4640  _id = this->getIdBase() + EVENTID_SEQUENCEDONE;
4641 
4642  // Emit the event on the log port
4643  if (this->m_logOut_OutputPort[0].isConnected()) {
4644  Fw::LogBuffer _logBuff;
4646 
4647 #if FW_AMPCS_COMPATIBLE
4648  // Serialize the number of arguments
4649  _status = _logBuff.serialize(static_cast<U8>(1));
4650  FW_ASSERT(
4651  _status == Fw::FW_SERIALIZE_OK,
4652  static_cast<FwAssertArgType>(_status)
4653  );
4654 #endif
4655 
4656  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4657  FW_ASSERT(
4658  _status == Fw::FW_SERIALIZE_OK,
4659  static_cast<FwAssertArgType>(_status)
4660  );
4661 
4662  this->m_logOut_OutputPort[0].invoke(
4663  _id,
4664  _logTime,
4666  _logBuff
4667  );
4668  }
4669 
4670  // Emit the event on the text log port
4671 #if FW_ENABLE_TEXT_LOGGING
4672  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4673 #if FW_OBJECT_NAMES == 1
4674  const char* _formatString =
4675  "(%s) %s: Completed sequence file %s";
4676 #else
4677  const char* _formatString =
4678  "%s: Completed sequence file %s";
4679 #endif
4680 
4681  Fw::TextLogString _logString;
4682  _logString.format(
4683  _formatString,
4684 #if FW_OBJECT_NAMES == 1
4685  this->m_objName.toChar(),
4686 #endif
4687  "SequenceDone ",
4688  filePath.toChar()
4689  );
4690 
4691  this->m_logTextOut_OutputPort[0].invoke(
4692  _id,
4693  _logTime,
4695  _logString
4696  );
4697  }
4698 #endif
4699  }
4700 
4703  {
4704  // Get the time
4705  Fw::Time _logTime;
4706  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4707  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4708  }
4709 
4710  FwEventIdType _id = static_cast<FwEventIdType>(0);
4711 
4712  _id = this->getIdBase() + EVENTID_SEQUENCECANCELLED;
4713 
4714  // Emit the event on the log port
4715  if (this->m_logOut_OutputPort[0].isConnected()) {
4716  Fw::LogBuffer _logBuff;
4718 
4719 #if FW_AMPCS_COMPATIBLE
4720  // Serialize the number of arguments
4721  _status = _logBuff.serialize(static_cast<U8>(1));
4722  FW_ASSERT(
4723  _status == Fw::FW_SERIALIZE_OK,
4724  static_cast<FwAssertArgType>(_status)
4725  );
4726 #endif
4727 
4728  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4729  FW_ASSERT(
4730  _status == Fw::FW_SERIALIZE_OK,
4731  static_cast<FwAssertArgType>(_status)
4732  );
4733 
4734  this->m_logOut_OutputPort[0].invoke(
4735  _id,
4736  _logTime,
4738  _logBuff
4739  );
4740  }
4741 
4742  // Emit the event on the text log port
4743 #if FW_ENABLE_TEXT_LOGGING
4744  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4745 #if FW_OBJECT_NAMES == 1
4746  const char* _formatString =
4747  "(%s) %s: Cancelled sequence file %s";
4748 #else
4749  const char* _formatString =
4750  "%s: Cancelled sequence file %s";
4751 #endif
4752 
4753  Fw::TextLogString _logString;
4754  _logString.format(
4755  _formatString,
4756 #if FW_OBJECT_NAMES == 1
4757  this->m_objName.toChar(),
4758 #endif
4759  "SequenceCancelled ",
4760  filePath.toChar()
4761  );
4762 
4763  this->m_logTextOut_OutputPort[0].invoke(
4764  _id,
4765  _logTime,
4767  _logString
4768  );
4769  }
4770 #endif
4771  }
4772 
4775  U8 opcode,
4776  U32 stmtIdx,
4777  const Fw::StringBase& filePath
4778  ) const
4779  {
4780  // Get the time
4781  Fw::Time _logTime;
4782  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4783  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4784  }
4785 
4786  FwEventIdType _id = static_cast<FwEventIdType>(0);
4787 
4789 
4790  // Emit the event on the log port
4791  if (this->m_logOut_OutputPort[0].isConnected()) {
4792  Fw::LogBuffer _logBuff;
4794 
4795 #if FW_AMPCS_COMPATIBLE
4796  // Serialize the number of arguments
4797  _status = _logBuff.serialize(static_cast<U8>(3));
4798  FW_ASSERT(
4799  _status == Fw::FW_SERIALIZE_OK,
4800  static_cast<FwAssertArgType>(_status)
4801  );
4802 #endif
4803 
4804 #if FW_AMPCS_COMPATIBLE
4805  // Serialize the argument size
4806  _status = _logBuff.serialize(
4807  static_cast<U8>(sizeof(U8))
4808  );
4809  FW_ASSERT(
4810  _status == Fw::FW_SERIALIZE_OK,
4811  static_cast<FwAssertArgType>(_status)
4812  );
4813 #endif
4814  _status = _logBuff.serialize(opcode);
4815  FW_ASSERT(
4816  _status == Fw::FW_SERIALIZE_OK,
4817  static_cast<FwAssertArgType>(_status)
4818  );
4819 
4820 #if FW_AMPCS_COMPATIBLE
4821  // Serialize the argument size
4822  _status = _logBuff.serialize(
4823  static_cast<U8>(sizeof(U32))
4824  );
4825  FW_ASSERT(
4826  _status == Fw::FW_SERIALIZE_OK,
4827  static_cast<FwAssertArgType>(_status)
4828  );
4829 #endif
4830  _status = _logBuff.serialize(stmtIdx);
4831  FW_ASSERT(
4832  _status == Fw::FW_SERIALIZE_OK,
4833  static_cast<FwAssertArgType>(_status)
4834  );
4835 
4836  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4837  FW_ASSERT(
4838  _status == Fw::FW_SERIALIZE_OK,
4839  static_cast<FwAssertArgType>(_status)
4840  );
4841 
4842  this->m_logOut_OutputPort[0].invoke(
4843  _id,
4844  _logTime,
4846  _logBuff
4847  );
4848  }
4849 
4850  // Emit the event on the text log port
4851 #if FW_ENABLE_TEXT_LOGGING
4852  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4853 #if FW_OBJECT_NAMES == 1
4854  const char* _formatString =
4855  "(%s) %s: Unknown sequencer directive id %" PRIu8 " at index %" PRIu32 " in file %s";
4856 #else
4857  const char* _formatString =
4858  "%s: Unknown sequencer directive id %" PRIu8 " at index %" PRIu32 " in file %s";
4859 #endif
4860 
4861  Fw::TextLogString _logString;
4862  _logString.format(
4863  _formatString,
4864 #if FW_OBJECT_NAMES == 1
4865  this->m_objName.toChar(),
4866 #endif
4867  "UnknownSequencerDirective ",
4868  opcode,
4869  stmtIdx,
4870  filePath.toChar()
4871  );
4872 
4873  this->m_logTextOut_OutputPort[0].invoke(
4874  _id,
4875  _logTime,
4877  _logString
4878  );
4879  }
4880 #endif
4881  }
4882 
4885  I32 state,
4886  FwOpcodeType opcode,
4887  Fw::CmdResponse response
4888  ) const
4889  {
4890  // Get the time
4891  Fw::Time _logTime;
4892  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4893  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4894  }
4895 
4896  FwEventIdType _id = static_cast<FwEventIdType>(0);
4897 
4899 
4900  // Emit the event on the log port
4901  if (this->m_logOut_OutputPort[0].isConnected()) {
4902  Fw::LogBuffer _logBuff;
4904 
4905 #if FW_AMPCS_COMPATIBLE
4906  // Serialize the number of arguments
4907  _status = _logBuff.serialize(static_cast<U8>(3));
4908  FW_ASSERT(
4909  _status == Fw::FW_SERIALIZE_OK,
4910  static_cast<FwAssertArgType>(_status)
4911  );
4912 #endif
4913 
4914 #if FW_AMPCS_COMPATIBLE
4915  // Serialize the argument size
4916  _status = _logBuff.serialize(
4917  static_cast<U8>(sizeof(I32))
4918  );
4919  FW_ASSERT(
4920  _status == Fw::FW_SERIALIZE_OK,
4921  static_cast<FwAssertArgType>(_status)
4922  );
4923 #endif
4924  _status = _logBuff.serialize(state);
4925  FW_ASSERT(
4926  _status == Fw::FW_SERIALIZE_OK,
4927  static_cast<FwAssertArgType>(_status)
4928  );
4929 
4930 #if FW_AMPCS_COMPATIBLE
4931  // Serialize the argument size
4932  _status = _logBuff.serialize(
4933  static_cast<U8>(sizeof(FwOpcodeType))
4934  );
4935  FW_ASSERT(
4936  _status == Fw::FW_SERIALIZE_OK,
4937  static_cast<FwAssertArgType>(_status)
4938  );
4939 #endif
4940  _status = _logBuff.serialize(opcode);
4941  FW_ASSERT(
4942  _status == Fw::FW_SERIALIZE_OK,
4943  static_cast<FwAssertArgType>(_status)
4944  );
4945 
4946 #if FW_AMPCS_COMPATIBLE
4947  // Serialize the argument size
4948  _status = _logBuff.serialize(
4949  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4950  );
4951  FW_ASSERT(
4952  _status == Fw::FW_SERIALIZE_OK,
4953  static_cast<FwAssertArgType>(_status)
4954  );
4955 #endif
4956  _status = _logBuff.serialize(response);
4957  FW_ASSERT(
4958  _status == Fw::FW_SERIALIZE_OK,
4959  static_cast<FwAssertArgType>(_status)
4960  );
4961 
4962  this->m_logOut_OutputPort[0].invoke(
4963  _id,
4964  _logTime,
4966  _logBuff
4967  );
4968  }
4969 
4970  // Emit the event on the text log port
4971 #if FW_ENABLE_TEXT_LOGGING
4972  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4973 #if FW_OBJECT_NAMES == 1
4974  const char* _formatString =
4975  "(%s) %s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
4976 #else
4977  const char* _formatString =
4978  "%s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
4979 #endif
4980 
4981  Fw::String responseStr;
4982  response.toString(responseStr);
4983 
4984  Fw::TextLogString _logString;
4985  _logString.format(
4986  _formatString,
4987 #if FW_OBJECT_NAMES == 1
4988  this->m_objName.toChar(),
4989 #endif
4990  "CmdResponseWhileNotRunningSequence ",
4991  state,
4992  opcode,
4993  responseStr.toChar()
4994  );
4995 
4996  this->m_logTextOut_OutputPort[0].invoke(
4997  _id,
4998  _logTime,
5000  _logString
5001  );
5002  }
5003 #endif
5004  }
5005 
5008  FwOpcodeType opcode,
5009  Fw::CmdResponse response,
5010  U16 oldSequenceIdx,
5011  U16 currentSequenceIdx
5012  ) const
5013  {
5014  // Get the time
5015  Fw::Time _logTime;
5016  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5017  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5018  }
5019 
5020  FwEventIdType _id = static_cast<FwEventIdType>(0);
5021 
5023 
5024  // Emit the event on the log port
5025  if (this->m_logOut_OutputPort[0].isConnected()) {
5026  Fw::LogBuffer _logBuff;
5028 
5029 #if FW_AMPCS_COMPATIBLE
5030  // Serialize the number of arguments
5031  _status = _logBuff.serialize(static_cast<U8>(4));
5032  FW_ASSERT(
5033  _status == Fw::FW_SERIALIZE_OK,
5034  static_cast<FwAssertArgType>(_status)
5035  );
5036 #endif
5037 
5038 #if FW_AMPCS_COMPATIBLE
5039  // Serialize the argument size
5040  _status = _logBuff.serialize(
5041  static_cast<U8>(sizeof(FwOpcodeType))
5042  );
5043  FW_ASSERT(
5044  _status == Fw::FW_SERIALIZE_OK,
5045  static_cast<FwAssertArgType>(_status)
5046  );
5047 #endif
5048  _status = _logBuff.serialize(opcode);
5049  FW_ASSERT(
5050  _status == Fw::FW_SERIALIZE_OK,
5051  static_cast<FwAssertArgType>(_status)
5052  );
5053 
5054 #if FW_AMPCS_COMPATIBLE
5055  // Serialize the argument size
5056  _status = _logBuff.serialize(
5057  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5058  );
5059  FW_ASSERT(
5060  _status == Fw::FW_SERIALIZE_OK,
5061  static_cast<FwAssertArgType>(_status)
5062  );
5063 #endif
5064  _status = _logBuff.serialize(response);
5065  FW_ASSERT(
5066  _status == Fw::FW_SERIALIZE_OK,
5067  static_cast<FwAssertArgType>(_status)
5068  );
5069 
5070 #if FW_AMPCS_COMPATIBLE
5071  // Serialize the argument size
5072  _status = _logBuff.serialize(
5073  static_cast<U8>(sizeof(U16))
5074  );
5075  FW_ASSERT(
5076  _status == Fw::FW_SERIALIZE_OK,
5077  static_cast<FwAssertArgType>(_status)
5078  );
5079 #endif
5080  _status = _logBuff.serialize(oldSequenceIdx);
5081  FW_ASSERT(
5082  _status == Fw::FW_SERIALIZE_OK,
5083  static_cast<FwAssertArgType>(_status)
5084  );
5085 
5086 #if FW_AMPCS_COMPATIBLE
5087  // Serialize the argument size
5088  _status = _logBuff.serialize(
5089  static_cast<U8>(sizeof(U16))
5090  );
5091  FW_ASSERT(
5092  _status == Fw::FW_SERIALIZE_OK,
5093  static_cast<FwAssertArgType>(_status)
5094  );
5095 #endif
5096  _status = _logBuff.serialize(currentSequenceIdx);
5097  FW_ASSERT(
5098  _status == Fw::FW_SERIALIZE_OK,
5099  static_cast<FwAssertArgType>(_status)
5100  );
5101 
5102  this->m_logOut_OutputPort[0].invoke(
5103  _id,
5104  _logTime,
5106  _logBuff
5107  );
5108  }
5109 
5110  // Emit the event on the text log port
5111 #if FW_ENABLE_TEXT_LOGGING
5112  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5113 #if FW_OBJECT_NAMES == 1
5114  const char* _formatString =
5115  "(%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 ")";
5116 #else
5117  const char* _formatString =
5118  "%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 ")";
5119 #endif
5120 
5121  Fw::String responseStr;
5122  response.toString(responseStr);
5123 
5124  Fw::TextLogString _logString;
5125  _logString.format(
5126  _formatString,
5127 #if FW_OBJECT_NAMES == 1
5128  this->m_objName.toChar(),
5129 #endif
5130  "CmdResponseFromOldSequence ",
5131  opcode,
5132  responseStr.toChar(),
5133  oldSequenceIdx,
5134  currentSequenceIdx
5135  );
5136 
5137  this->m_logTextOut_OutputPort[0].invoke(
5138  _id,
5139  _logTime,
5141  _logString
5142  );
5143  }
5144 #endif
5145  }
5146 
5149  FwOpcodeType opcode,
5150  Fw::CmdResponse response
5151  ) const
5152  {
5153  // Get the time
5154  Fw::Time _logTime;
5155  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5156  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5157  }
5158 
5159  FwEventIdType _id = static_cast<FwEventIdType>(0);
5160 
5162 
5163  // Emit the event on the log port
5164  if (this->m_logOut_OutputPort[0].isConnected()) {
5165  Fw::LogBuffer _logBuff;
5167 
5168 #if FW_AMPCS_COMPATIBLE
5169  // Serialize the number of arguments
5170  _status = _logBuff.serialize(static_cast<U8>(2));
5171  FW_ASSERT(
5172  _status == Fw::FW_SERIALIZE_OK,
5173  static_cast<FwAssertArgType>(_status)
5174  );
5175 #endif
5176 
5177 #if FW_AMPCS_COMPATIBLE
5178  // Serialize the argument size
5179  _status = _logBuff.serialize(
5180  static_cast<U8>(sizeof(FwOpcodeType))
5181  );
5182  FW_ASSERT(
5183  _status == Fw::FW_SERIALIZE_OK,
5184  static_cast<FwAssertArgType>(_status)
5185  );
5186 #endif
5187  _status = _logBuff.serialize(opcode);
5188  FW_ASSERT(
5189  _status == Fw::FW_SERIALIZE_OK,
5190  static_cast<FwAssertArgType>(_status)
5191  );
5192 
5193 #if FW_AMPCS_COMPATIBLE
5194  // Serialize the argument size
5195  _status = _logBuff.serialize(
5196  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5197  );
5198  FW_ASSERT(
5199  _status == Fw::FW_SERIALIZE_OK,
5200  static_cast<FwAssertArgType>(_status)
5201  );
5202 #endif
5203  _status = _logBuff.serialize(response);
5204  FW_ASSERT(
5205  _status == Fw::FW_SERIALIZE_OK,
5206  static_cast<FwAssertArgType>(_status)
5207  );
5208 
5209  this->m_logOut_OutputPort[0].invoke(
5210  _id,
5211  _logTime,
5213  _logBuff
5214  );
5215  }
5216 
5217  // Emit the event on the text log port
5218 #if FW_ENABLE_TEXT_LOGGING
5219  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5220 #if FW_OBJECT_NAMES == 1
5221  const char* _formatString =
5222  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
5223 #else
5224  const char* _formatString =
5225  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
5226 #endif
5227 
5228  Fw::String responseStr;
5229  response.toString(responseStr);
5230 
5231  Fw::TextLogString _logString;
5232  _logString.format(
5233  _formatString,
5234 #if FW_OBJECT_NAMES == 1
5235  this->m_objName.toChar(),
5236 #endif
5237  "CmdResponseWhileNotAwaiting ",
5238  opcode,
5239  responseStr.toChar()
5240  );
5241 
5242  this->m_logTextOut_OutputPort[0].invoke(
5243  _id,
5244  _logTime,
5246  _logString
5247  );
5248  }
5249 #endif
5250  }
5251 
5254  FwOpcodeType opcode,
5255  Fw::CmdResponse response,
5256  U8 expectedDirectiveOpcode
5257  ) const
5258  {
5259  // Get the time
5260  Fw::Time _logTime;
5261  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5262  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5263  }
5264 
5265  FwEventIdType _id = static_cast<FwEventIdType>(0);
5266 
5268 
5269  // Emit the event on the log port
5270  if (this->m_logOut_OutputPort[0].isConnected()) {
5271  Fw::LogBuffer _logBuff;
5273 
5274 #if FW_AMPCS_COMPATIBLE
5275  // Serialize the number of arguments
5276  _status = _logBuff.serialize(static_cast<U8>(3));
5277  FW_ASSERT(
5278  _status == Fw::FW_SERIALIZE_OK,
5279  static_cast<FwAssertArgType>(_status)
5280  );
5281 #endif
5282 
5283 #if FW_AMPCS_COMPATIBLE
5284  // Serialize the argument size
5285  _status = _logBuff.serialize(
5286  static_cast<U8>(sizeof(FwOpcodeType))
5287  );
5288  FW_ASSERT(
5289  _status == Fw::FW_SERIALIZE_OK,
5290  static_cast<FwAssertArgType>(_status)
5291  );
5292 #endif
5293  _status = _logBuff.serialize(opcode);
5294  FW_ASSERT(
5295  _status == Fw::FW_SERIALIZE_OK,
5296  static_cast<FwAssertArgType>(_status)
5297  );
5298 
5299 #if FW_AMPCS_COMPATIBLE
5300  // Serialize the argument size
5301  _status = _logBuff.serialize(
5302  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5303  );
5304  FW_ASSERT(
5305  _status == Fw::FW_SERIALIZE_OK,
5306  static_cast<FwAssertArgType>(_status)
5307  );
5308 #endif
5309  _status = _logBuff.serialize(response);
5310  FW_ASSERT(
5311  _status == Fw::FW_SERIALIZE_OK,
5312  static_cast<FwAssertArgType>(_status)
5313  );
5314 
5315 #if FW_AMPCS_COMPATIBLE
5316  // Serialize the argument size
5317  _status = _logBuff.serialize(
5318  static_cast<U8>(sizeof(U8))
5319  );
5320  FW_ASSERT(
5321  _status == Fw::FW_SERIALIZE_OK,
5322  static_cast<FwAssertArgType>(_status)
5323  );
5324 #endif
5325  _status = _logBuff.serialize(expectedDirectiveOpcode);
5326  FW_ASSERT(
5327  _status == Fw::FW_SERIALIZE_OK,
5328  static_cast<FwAssertArgType>(_status)
5329  );
5330 
5331  this->m_logOut_OutputPort[0].invoke(
5332  _id,
5333  _logTime,
5335  _logBuff
5336  );
5337  }
5338 
5339  // Emit the event on the text log port
5340 #if FW_ENABLE_TEXT_LOGGING
5341  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5342 #if FW_OBJECT_NAMES == 1
5343  const char* _formatString =
5344  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was awaiting directive opcode %" PRIu8 "";
5345 #else
5346  const char* _formatString =
5347  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was awaiting directive opcode %" PRIu8 "";
5348 #endif
5349 
5350  Fw::String responseStr;
5351  response.toString(responseStr);
5352 
5353  Fw::TextLogString _logString;
5354  _logString.format(
5355  _formatString,
5356 #if FW_OBJECT_NAMES == 1
5357  this->m_objName.toChar(),
5358 #endif
5359  "CmdResponseWhileAwaitingDirective ",
5360  opcode,
5361  responseStr.toChar(),
5362  expectedDirectiveOpcode
5363  );
5364 
5365  this->m_logTextOut_OutputPort[0].invoke(
5366  _id,
5367  _logTime,
5369  _logString
5370  );
5371  }
5372 #endif
5373  }
5374 
5377  FwOpcodeType opcode,
5378  Fw::CmdResponse response,
5379  FwOpcodeType expectedOpcode
5380  ) const
5381  {
5382  // Get the time
5383  Fw::Time _logTime;
5384  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5385  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5386  }
5387 
5388  FwEventIdType _id = static_cast<FwEventIdType>(0);
5389 
5390  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEOPCODE;
5391 
5392  // Emit the event on the log port
5393  if (this->m_logOut_OutputPort[0].isConnected()) {
5394  Fw::LogBuffer _logBuff;
5396 
5397 #if FW_AMPCS_COMPATIBLE
5398  // Serialize the number of arguments
5399  _status = _logBuff.serialize(static_cast<U8>(3));
5400  FW_ASSERT(
5401  _status == Fw::FW_SERIALIZE_OK,
5402  static_cast<FwAssertArgType>(_status)
5403  );
5404 #endif
5405 
5406 #if FW_AMPCS_COMPATIBLE
5407  // Serialize the argument size
5408  _status = _logBuff.serialize(
5409  static_cast<U8>(sizeof(FwOpcodeType))
5410  );
5411  FW_ASSERT(
5412  _status == Fw::FW_SERIALIZE_OK,
5413  static_cast<FwAssertArgType>(_status)
5414  );
5415 #endif
5416  _status = _logBuff.serialize(opcode);
5417  FW_ASSERT(
5418  _status == Fw::FW_SERIALIZE_OK,
5419  static_cast<FwAssertArgType>(_status)
5420  );
5421 
5422 #if FW_AMPCS_COMPATIBLE
5423  // Serialize the argument size
5424  _status = _logBuff.serialize(
5425  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5426  );
5427  FW_ASSERT(
5428  _status == Fw::FW_SERIALIZE_OK,
5429  static_cast<FwAssertArgType>(_status)
5430  );
5431 #endif
5432  _status = _logBuff.serialize(response);
5433  FW_ASSERT(
5434  _status == Fw::FW_SERIALIZE_OK,
5435  static_cast<FwAssertArgType>(_status)
5436  );
5437 
5438 #if FW_AMPCS_COMPATIBLE
5439  // Serialize the argument size
5440  _status = _logBuff.serialize(
5441  static_cast<U8>(sizeof(FwOpcodeType))
5442  );
5443  FW_ASSERT(
5444  _status == Fw::FW_SERIALIZE_OK,
5445  static_cast<FwAssertArgType>(_status)
5446  );
5447 #endif
5448  _status = _logBuff.serialize(expectedOpcode);
5449  FW_ASSERT(
5450  _status == Fw::FW_SERIALIZE_OK,
5451  static_cast<FwAssertArgType>(_status)
5452  );
5453 
5454  this->m_logOut_OutputPort[0].invoke(
5455  _id,
5456  _logTime,
5458  _logBuff
5459  );
5460  }
5461 
5462  // Emit the event on the text log port
5463 #if FW_ENABLE_TEXT_LOGGING
5464  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5465 #if FW_OBJECT_NAMES == 1
5466  const char* _formatString =
5467  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5468 #else
5469  const char* _formatString =
5470  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5471 #endif
5472 
5473  Fw::String responseStr;
5474  response.toString(responseStr);
5475 
5476  Fw::TextLogString _logString;
5477  _logString.format(
5478  _formatString,
5479 #if FW_OBJECT_NAMES == 1
5480  this->m_objName.toChar(),
5481 #endif
5482  "WrongCmdResponseOpcode ",
5483  opcode,
5484  responseStr.toChar(),
5485  expectedOpcode
5486  );
5487 
5488  this->m_logTextOut_OutputPort[0].invoke(
5489  _id,
5490  _logTime,
5492  _logString
5493  );
5494  }
5495 #endif
5496  }
5497 
5500  FwOpcodeType opcode,
5501  Fw::CmdResponse response,
5502  U16 actualCmdIdx,
5503  U16 expectedCmdIdx
5504  ) const
5505  {
5506  // Get the time
5507  Fw::Time _logTime;
5508  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5509  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5510  }
5511 
5512  FwEventIdType _id = static_cast<FwEventIdType>(0);
5513 
5514  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEINDEX;
5515 
5516  // Emit the event on the log port
5517  if (this->m_logOut_OutputPort[0].isConnected()) {
5518  Fw::LogBuffer _logBuff;
5520 
5521 #if FW_AMPCS_COMPATIBLE
5522  // Serialize the number of arguments
5523  _status = _logBuff.serialize(static_cast<U8>(4));
5524  FW_ASSERT(
5525  _status == Fw::FW_SERIALIZE_OK,
5526  static_cast<FwAssertArgType>(_status)
5527  );
5528 #endif
5529 
5530 #if FW_AMPCS_COMPATIBLE
5531  // Serialize the argument size
5532  _status = _logBuff.serialize(
5533  static_cast<U8>(sizeof(FwOpcodeType))
5534  );
5535  FW_ASSERT(
5536  _status == Fw::FW_SERIALIZE_OK,
5537  static_cast<FwAssertArgType>(_status)
5538  );
5539 #endif
5540  _status = _logBuff.serialize(opcode);
5541  FW_ASSERT(
5542  _status == Fw::FW_SERIALIZE_OK,
5543  static_cast<FwAssertArgType>(_status)
5544  );
5545 
5546 #if FW_AMPCS_COMPATIBLE
5547  // Serialize the argument size
5548  _status = _logBuff.serialize(
5549  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5550  );
5551  FW_ASSERT(
5552  _status == Fw::FW_SERIALIZE_OK,
5553  static_cast<FwAssertArgType>(_status)
5554  );
5555 #endif
5556  _status = _logBuff.serialize(response);
5557  FW_ASSERT(
5558  _status == Fw::FW_SERIALIZE_OK,
5559  static_cast<FwAssertArgType>(_status)
5560  );
5561 
5562 #if FW_AMPCS_COMPATIBLE
5563  // Serialize the argument size
5564  _status = _logBuff.serialize(
5565  static_cast<U8>(sizeof(U16))
5566  );
5567  FW_ASSERT(
5568  _status == Fw::FW_SERIALIZE_OK,
5569  static_cast<FwAssertArgType>(_status)
5570  );
5571 #endif
5572  _status = _logBuff.serialize(actualCmdIdx);
5573  FW_ASSERT(
5574  _status == Fw::FW_SERIALIZE_OK,
5575  static_cast<FwAssertArgType>(_status)
5576  );
5577 
5578 #if FW_AMPCS_COMPATIBLE
5579  // Serialize the argument size
5580  _status = _logBuff.serialize(
5581  static_cast<U8>(sizeof(U16))
5582  );
5583  FW_ASSERT(
5584  _status == Fw::FW_SERIALIZE_OK,
5585  static_cast<FwAssertArgType>(_status)
5586  );
5587 #endif
5588  _status = _logBuff.serialize(expectedCmdIdx);
5589  FW_ASSERT(
5590  _status == Fw::FW_SERIALIZE_OK,
5591  static_cast<FwAssertArgType>(_status)
5592  );
5593 
5594  this->m_logOut_OutputPort[0].invoke(
5595  _id,
5596  _logTime,
5598  _logBuff
5599  );
5600  }
5601 
5602  // Emit the event on the text log port
5603 #if FW_ENABLE_TEXT_LOGGING
5604  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5605 #if FW_OBJECT_NAMES == 1
5606  const char* _formatString =
5607  "(%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 ")";
5608 #else
5609  const char* _formatString =
5610  "%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 ")";
5611 #endif
5612 
5613  Fw::String responseStr;
5614  response.toString(responseStr);
5615 
5616  Fw::TextLogString _logString;
5617  _logString.format(
5618  _formatString,
5619 #if FW_OBJECT_NAMES == 1
5620  this->m_objName.toChar(),
5621 #endif
5622  "WrongCmdResponseIndex ",
5623  opcode,
5624  responseStr.toChar(),
5625  actualCmdIdx,
5626  expectedCmdIdx
5627  );
5628 
5629  this->m_logTextOut_OutputPort[0].invoke(
5630  _id,
5631  _logTime,
5633  _logString
5634  );
5635  }
5636 #endif
5637  }
5638 
5641  U8 opcode,
5642  U32 stmtIdx,
5643  I32 errorCode,
5644  U64 buffLeft,
5645  U64 buffLength
5646  ) const
5647  {
5648  // Get the time
5649  Fw::Time _logTime;
5650  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5651  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5652  }
5653 
5654  FwEventIdType _id = static_cast<FwEventIdType>(0);
5655 
5657 
5658  // Emit the event on the log port
5659  if (this->m_logOut_OutputPort[0].isConnected()) {
5660  Fw::LogBuffer _logBuff;
5662 
5663 #if FW_AMPCS_COMPATIBLE
5664  // Serialize the number of arguments
5665  _status = _logBuff.serialize(static_cast<U8>(5));
5666  FW_ASSERT(
5667  _status == Fw::FW_SERIALIZE_OK,
5668  static_cast<FwAssertArgType>(_status)
5669  );
5670 #endif
5671 
5672 #if FW_AMPCS_COMPATIBLE
5673  // Serialize the argument size
5674  _status = _logBuff.serialize(
5675  static_cast<U8>(sizeof(U8))
5676  );
5677  FW_ASSERT(
5678  _status == Fw::FW_SERIALIZE_OK,
5679  static_cast<FwAssertArgType>(_status)
5680  );
5681 #endif
5682  _status = _logBuff.serialize(opcode);
5683  FW_ASSERT(
5684  _status == Fw::FW_SERIALIZE_OK,
5685  static_cast<FwAssertArgType>(_status)
5686  );
5687 
5688 #if FW_AMPCS_COMPATIBLE
5689  // Serialize the argument size
5690  _status = _logBuff.serialize(
5691  static_cast<U8>(sizeof(U32))
5692  );
5693  FW_ASSERT(
5694  _status == Fw::FW_SERIALIZE_OK,
5695  static_cast<FwAssertArgType>(_status)
5696  );
5697 #endif
5698  _status = _logBuff.serialize(stmtIdx);
5699  FW_ASSERT(
5700  _status == Fw::FW_SERIALIZE_OK,
5701  static_cast<FwAssertArgType>(_status)
5702  );
5703 
5704 #if FW_AMPCS_COMPATIBLE
5705  // Serialize the argument size
5706  _status = _logBuff.serialize(
5707  static_cast<U8>(sizeof(I32))
5708  );
5709  FW_ASSERT(
5710  _status == Fw::FW_SERIALIZE_OK,
5711  static_cast<FwAssertArgType>(_status)
5712  );
5713 #endif
5714  _status = _logBuff.serialize(errorCode);
5715  FW_ASSERT(
5716  _status == Fw::FW_SERIALIZE_OK,
5717  static_cast<FwAssertArgType>(_status)
5718  );
5719 
5720 #if FW_AMPCS_COMPATIBLE
5721  // Serialize the argument size
5722  _status = _logBuff.serialize(
5723  static_cast<U8>(sizeof(U64))
5724  );
5725  FW_ASSERT(
5726  _status == Fw::FW_SERIALIZE_OK,
5727  static_cast<FwAssertArgType>(_status)
5728  );
5729 #endif
5730  _status = _logBuff.serialize(buffLeft);
5731  FW_ASSERT(
5732  _status == Fw::FW_SERIALIZE_OK,
5733  static_cast<FwAssertArgType>(_status)
5734  );
5735 
5736 #if FW_AMPCS_COMPATIBLE
5737  // Serialize the argument size
5738  _status = _logBuff.serialize(
5739  static_cast<U8>(sizeof(U64))
5740  );
5741  FW_ASSERT(
5742  _status == Fw::FW_SERIALIZE_OK,
5743  static_cast<FwAssertArgType>(_status)
5744  );
5745 #endif
5746  _status = _logBuff.serialize(buffLength);
5747  FW_ASSERT(
5748  _status == Fw::FW_SERIALIZE_OK,
5749  static_cast<FwAssertArgType>(_status)
5750  );
5751 
5752  this->m_logOut_OutputPort[0].invoke(
5753  _id,
5754  _logTime,
5756  _logBuff
5757  );
5758  }
5759 
5760  // Emit the event on the text log port
5761 #if FW_ENABLE_TEXT_LOGGING
5762  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5763 #if FW_OBJECT_NAMES == 1
5764  const char* _formatString =
5765  "(%s) %s: Deserialize error encountered while reading directive opcode %" PRIu8 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5766 #else
5767  const char* _formatString =
5768  "%s: Deserialize error encountered while reading directive opcode %" PRIu8 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5769 #endif
5770 
5771  Fw::TextLogString _logString;
5772  _logString.format(
5773  _formatString,
5774 #if FW_OBJECT_NAMES == 1
5775  this->m_objName.toChar(),
5776 #endif
5777  "DirectiveDeserializeError ",
5778  opcode,
5779  stmtIdx,
5780  errorCode,
5781  buffLeft,
5782  buffLength
5783  );
5784 
5785  this->m_logTextOut_OutputPort[0].invoke(
5786  _id,
5787  _logTime,
5789  _logString
5790  );
5791  }
5792 #endif
5793  }
5794 
5797  I32 internalTimeBase,
5798  I32 otherTimeBase
5799  ) const
5800  {
5801  // Get the time
5802  Fw::Time _logTime;
5803  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5804  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5805  }
5806 
5807  FwEventIdType _id = static_cast<FwEventIdType>(0);
5808 
5809  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMEBASE;
5810 
5811  // Emit the event on the log port
5812  if (this->m_logOut_OutputPort[0].isConnected()) {
5813  Fw::LogBuffer _logBuff;
5815 
5816 #if FW_AMPCS_COMPATIBLE
5817  // Serialize the number of arguments
5818  _status = _logBuff.serialize(static_cast<U8>(2));
5819  FW_ASSERT(
5820  _status == Fw::FW_SERIALIZE_OK,
5821  static_cast<FwAssertArgType>(_status)
5822  );
5823 #endif
5824 
5825 #if FW_AMPCS_COMPATIBLE
5826  // Serialize the argument size
5827  _status = _logBuff.serialize(
5828  static_cast<U8>(sizeof(I32))
5829  );
5830  FW_ASSERT(
5831  _status == Fw::FW_SERIALIZE_OK,
5832  static_cast<FwAssertArgType>(_status)
5833  );
5834 #endif
5835  _status = _logBuff.serialize(internalTimeBase);
5836  FW_ASSERT(
5837  _status == Fw::FW_SERIALIZE_OK,
5838  static_cast<FwAssertArgType>(_status)
5839  );
5840 
5841 #if FW_AMPCS_COMPATIBLE
5842  // Serialize the argument size
5843  _status = _logBuff.serialize(
5844  static_cast<U8>(sizeof(I32))
5845  );
5846  FW_ASSERT(
5847  _status == Fw::FW_SERIALIZE_OK,
5848  static_cast<FwAssertArgType>(_status)
5849  );
5850 #endif
5851  _status = _logBuff.serialize(otherTimeBase);
5852  FW_ASSERT(
5853  _status == Fw::FW_SERIALIZE_OK,
5854  static_cast<FwAssertArgType>(_status)
5855  );
5856 
5857  this->m_logOut_OutputPort[0].invoke(
5858  _id,
5859  _logTime,
5861  _logBuff
5862  );
5863  }
5864 
5865  // Emit the event on the text log port
5866 #if FW_ENABLE_TEXT_LOGGING
5867  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5868 #if FW_OBJECT_NAMES == 1
5869  const char* _formatString =
5870  "(%s) %s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5871 #else
5872  const char* _formatString =
5873  "%s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5874 #endif
5875 
5876  Fw::TextLogString _logString;
5877  _logString.format(
5878  _formatString,
5879 #if FW_OBJECT_NAMES == 1
5880  this->m_objName.toChar(),
5881 #endif
5882  "MismatchedTimeBase ",
5883  internalTimeBase,
5884  otherTimeBase
5885  );
5886 
5887  this->m_logTextOut_OutputPort[0].invoke(
5888  _id,
5889  _logTime,
5891  _logString
5892  );
5893  }
5894 #endif
5895  }
5896 
5899  I32 internalTimeContext,
5900  I32 otherTimeContext
5901  ) const
5902  {
5903  // Get the time
5904  Fw::Time _logTime;
5905  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5906  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5907  }
5908 
5909  FwEventIdType _id = static_cast<FwEventIdType>(0);
5910 
5911  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMECONTEXT;
5912 
5913  // Emit the event on the log port
5914  if (this->m_logOut_OutputPort[0].isConnected()) {
5915  Fw::LogBuffer _logBuff;
5917 
5918 #if FW_AMPCS_COMPATIBLE
5919  // Serialize the number of arguments
5920  _status = _logBuff.serialize(static_cast<U8>(2));
5921  FW_ASSERT(
5922  _status == Fw::FW_SERIALIZE_OK,
5923  static_cast<FwAssertArgType>(_status)
5924  );
5925 #endif
5926 
5927 #if FW_AMPCS_COMPATIBLE
5928  // Serialize the argument size
5929  _status = _logBuff.serialize(
5930  static_cast<U8>(sizeof(I32))
5931  );
5932  FW_ASSERT(
5933  _status == Fw::FW_SERIALIZE_OK,
5934  static_cast<FwAssertArgType>(_status)
5935  );
5936 #endif
5937  _status = _logBuff.serialize(internalTimeContext);
5938  FW_ASSERT(
5939  _status == Fw::FW_SERIALIZE_OK,
5940  static_cast<FwAssertArgType>(_status)
5941  );
5942 
5943 #if FW_AMPCS_COMPATIBLE
5944  // Serialize the argument size
5945  _status = _logBuff.serialize(
5946  static_cast<U8>(sizeof(I32))
5947  );
5948  FW_ASSERT(
5949  _status == Fw::FW_SERIALIZE_OK,
5950  static_cast<FwAssertArgType>(_status)
5951  );
5952 #endif
5953  _status = _logBuff.serialize(otherTimeContext);
5954  FW_ASSERT(
5955  _status == Fw::FW_SERIALIZE_OK,
5956  static_cast<FwAssertArgType>(_status)
5957  );
5958 
5959  this->m_logOut_OutputPort[0].invoke(
5960  _id,
5961  _logTime,
5963  _logBuff
5964  );
5965  }
5966 
5967  // Emit the event on the text log port
5968 #if FW_ENABLE_TEXT_LOGGING
5969  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5970 #if FW_OBJECT_NAMES == 1
5971  const char* _formatString =
5972  "(%s) %s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
5973 #else
5974  const char* _formatString =
5975  "%s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
5976 #endif
5977 
5978  Fw::TextLogString _logString;
5979  _logString.format(
5980  _formatString,
5981 #if FW_OBJECT_NAMES == 1
5982  this->m_objName.toChar(),
5983 #endif
5984  "MismatchedTimeContext ",
5985  internalTimeContext,
5986  otherTimeContext
5987  );
5988 
5989  this->m_logTextOut_OutputPort[0].invoke(
5990  _id,
5991  _logTime,
5993  _logString
5994  );
5995  }
5996 #endif
5997  }
5998 
6001  FwOpcodeType opCode,
6002  U32 stmtIdx,
6003  const Fw::StringBase& filePath
6004  ) const
6005  {
6006  // Get the time
6007  Fw::Time _logTime;
6008  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6009  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6010  }
6011 
6012  FwEventIdType _id = static_cast<FwEventIdType>(0);
6013 
6014  _id = this->getIdBase() + EVENTID_COMMANDTIMEDOUT;
6015 
6016  // Emit the event on the log port
6017  if (this->m_logOut_OutputPort[0].isConnected()) {
6018  Fw::LogBuffer _logBuff;
6020 
6021 #if FW_AMPCS_COMPATIBLE
6022  // Serialize the number of arguments
6023  _status = _logBuff.serialize(static_cast<U8>(3));
6024  FW_ASSERT(
6025  _status == Fw::FW_SERIALIZE_OK,
6026  static_cast<FwAssertArgType>(_status)
6027  );
6028 #endif
6029 
6030 #if FW_AMPCS_COMPATIBLE
6031  // Serialize the argument size
6032  _status = _logBuff.serialize(
6033  static_cast<U8>(sizeof(FwOpcodeType))
6034  );
6035  FW_ASSERT(
6036  _status == Fw::FW_SERIALIZE_OK,
6037  static_cast<FwAssertArgType>(_status)
6038  );
6039 #endif
6040  _status = _logBuff.serialize(opCode);
6041  FW_ASSERT(
6042  _status == Fw::FW_SERIALIZE_OK,
6043  static_cast<FwAssertArgType>(_status)
6044  );
6045 
6046 #if FW_AMPCS_COMPATIBLE
6047  // Serialize the argument size
6048  _status = _logBuff.serialize(
6049  static_cast<U8>(sizeof(U32))
6050  );
6051  FW_ASSERT(
6052  _status == Fw::FW_SERIALIZE_OK,
6053  static_cast<FwAssertArgType>(_status)
6054  );
6055 #endif
6056  _status = _logBuff.serialize(stmtIdx);
6057  FW_ASSERT(
6058  _status == Fw::FW_SERIALIZE_OK,
6059  static_cast<FwAssertArgType>(_status)
6060  );
6061 
6062  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
6063  FW_ASSERT(
6064  _status == Fw::FW_SERIALIZE_OK,
6065  static_cast<FwAssertArgType>(_status)
6066  );
6067 
6068  this->m_logOut_OutputPort[0].invoke(
6069  _id,
6070  _logTime,
6072  _logBuff
6073  );
6074  }
6075 
6076  // Emit the event on the text log port
6077 #if FW_ENABLE_TEXT_LOGGING
6078  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6079 #if FW_OBJECT_NAMES == 1
6080  const char* _formatString =
6081  "(%s) %s: A command opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6082 #else
6083  const char* _formatString =
6084  "%s: A command opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6085 #endif
6086 
6087  Fw::TextLogString _logString;
6088  _logString.format(
6089  _formatString,
6090 #if FW_OBJECT_NAMES == 1
6091  this->m_objName.toChar(),
6092 #endif
6093  "CommandTimedOut ",
6094  opCode,
6095  stmtIdx,
6096  filePath.toChar()
6097  );
6098 
6099  this->m_logTextOut_OutputPort[0].invoke(
6100  _id,
6101  _logTime,
6103  _logString
6104  );
6105  }
6106 #endif
6107  }
6108 
6111  U8 opCode,
6112  U32 stmtIdx,
6113  const Fw::StringBase& filePath
6114  ) const
6115  {
6116  // Get the time
6117  Fw::Time _logTime;
6118  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6119  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6120  }
6121 
6122  FwEventIdType _id = static_cast<FwEventIdType>(0);
6123 
6124  _id = this->getIdBase() + EVENTID_DIRECTIVETIMEDOUT;
6125 
6126  // Emit the event on the log port
6127  if (this->m_logOut_OutputPort[0].isConnected()) {
6128  Fw::LogBuffer _logBuff;
6130 
6131 #if FW_AMPCS_COMPATIBLE
6132  // Serialize the number of arguments
6133  _status = _logBuff.serialize(static_cast<U8>(3));
6134  FW_ASSERT(
6135  _status == Fw::FW_SERIALIZE_OK,
6136  static_cast<FwAssertArgType>(_status)
6137  );
6138 #endif
6139 
6140 #if FW_AMPCS_COMPATIBLE
6141  // Serialize the argument size
6142  _status = _logBuff.serialize(
6143  static_cast<U8>(sizeof(U8))
6144  );
6145  FW_ASSERT(
6146  _status == Fw::FW_SERIALIZE_OK,
6147  static_cast<FwAssertArgType>(_status)
6148  );
6149 #endif
6150  _status = _logBuff.serialize(opCode);
6151  FW_ASSERT(
6152  _status == Fw::FW_SERIALIZE_OK,
6153  static_cast<FwAssertArgType>(_status)
6154  );
6155 
6156 #if FW_AMPCS_COMPATIBLE
6157  // Serialize the argument size
6158  _status = _logBuff.serialize(
6159  static_cast<U8>(sizeof(U32))
6160  );
6161  FW_ASSERT(
6162  _status == Fw::FW_SERIALIZE_OK,
6163  static_cast<FwAssertArgType>(_status)
6164  );
6165 #endif
6166  _status = _logBuff.serialize(stmtIdx);
6167  FW_ASSERT(
6168  _status == Fw::FW_SERIALIZE_OK,
6169  static_cast<FwAssertArgType>(_status)
6170  );
6171 
6172  _status = filePath.serialize(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
6173  FW_ASSERT(
6174  _status == Fw::FW_SERIALIZE_OK,
6175  static_cast<FwAssertArgType>(_status)
6176  );
6177 
6178  this->m_logOut_OutputPort[0].invoke(
6179  _id,
6180  _logTime,
6182  _logBuff
6183  );
6184  }
6185 
6186  // Emit the event on the text log port
6187 #if FW_ENABLE_TEXT_LOGGING
6188  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6189 #if FW_OBJECT_NAMES == 1
6190  const char* _formatString =
6191  "(%s) %s: A directive opcode %" PRIu8 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6192 #else
6193  const char* _formatString =
6194  "%s: A directive opcode %" PRIu8 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6195 #endif
6196 
6197  Fw::TextLogString _logString;
6198  _logString.format(
6199  _formatString,
6200 #if FW_OBJECT_NAMES == 1
6201  this->m_objName.toChar(),
6202 #endif
6203  "DirectiveTimedOut ",
6204  opCode,
6205  stmtIdx,
6206  filePath.toChar()
6207  );
6208 
6209  this->m_logTextOut_OutputPort[0].invoke(
6210  _id,
6211  _logTime,
6213  _logString
6214  );
6215  }
6216 #endif
6217  }
6218 
6221  U8 count,
6222  U8 max
6223  ) const
6224  {
6225  // Get the time
6226  Fw::Time _logTime;
6227  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6228  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6229  }
6230 
6231  FwEventIdType _id = static_cast<FwEventIdType>(0);
6232 
6233  _id = this->getIdBase() + EVENTID_TOOMANYSEQUENCEARGS;
6234 
6235  // Emit the event on the log port
6236  if (this->m_logOut_OutputPort[0].isConnected()) {
6237  Fw::LogBuffer _logBuff;
6239 
6240 #if FW_AMPCS_COMPATIBLE
6241  // Serialize the number of arguments
6242  _status = _logBuff.serialize(static_cast<U8>(2));
6243  FW_ASSERT(
6244  _status == Fw::FW_SERIALIZE_OK,
6245  static_cast<FwAssertArgType>(_status)
6246  );
6247 #endif
6248 
6249 #if FW_AMPCS_COMPATIBLE
6250  // Serialize the argument size
6251  _status = _logBuff.serialize(
6252  static_cast<U8>(sizeof(U8))
6253  );
6254  FW_ASSERT(
6255  _status == Fw::FW_SERIALIZE_OK,
6256  static_cast<FwAssertArgType>(_status)
6257  );
6258 #endif
6259  _status = _logBuff.serialize(count);
6260  FW_ASSERT(
6261  _status == Fw::FW_SERIALIZE_OK,
6262  static_cast<FwAssertArgType>(_status)
6263  );
6264 
6265 #if FW_AMPCS_COMPATIBLE
6266  // Serialize the argument size
6267  _status = _logBuff.serialize(
6268  static_cast<U8>(sizeof(U8))
6269  );
6270  FW_ASSERT(
6271  _status == Fw::FW_SERIALIZE_OK,
6272  static_cast<FwAssertArgType>(_status)
6273  );
6274 #endif
6275  _status = _logBuff.serialize(max);
6276  FW_ASSERT(
6277  _status == Fw::FW_SERIALIZE_OK,
6278  static_cast<FwAssertArgType>(_status)
6279  );
6280 
6281  this->m_logOut_OutputPort[0].invoke(
6282  _id,
6283  _logTime,
6285  _logBuff
6286  );
6287  }
6288 
6289  // Emit the event on the text log port
6290 #if FW_ENABLE_TEXT_LOGGING
6291  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6292 #if FW_OBJECT_NAMES == 1
6293  const char* _formatString =
6294  "(%s) %s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
6295 #else
6296  const char* _formatString =
6297  "%s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
6298 #endif
6299 
6300  Fw::TextLogString _logString;
6301  _logString.format(
6302  _formatString,
6303 #if FW_OBJECT_NAMES == 1
6304  this->m_objName.toChar(),
6305 #endif
6306  "TooManySequenceArgs ",
6307  count,
6308  max
6309  );
6310 
6311  this->m_logTextOut_OutputPort[0].invoke(
6312  _id,
6313  _logTime,
6315  _logString
6316  );
6317  }
6318 #endif
6319  }
6320 
6323  U16 count,
6324  U16 max
6325  ) const
6326  {
6327  // Get the time
6328  Fw::Time _logTime;
6329  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6330  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6331  }
6332 
6333  FwEventIdType _id = static_cast<FwEventIdType>(0);
6334 
6336 
6337  // Emit the event on the log port
6338  if (this->m_logOut_OutputPort[0].isConnected()) {
6339  Fw::LogBuffer _logBuff;
6341 
6342 #if FW_AMPCS_COMPATIBLE
6343  // Serialize the number of arguments
6344  _status = _logBuff.serialize(static_cast<U8>(2));
6345  FW_ASSERT(
6346  _status == Fw::FW_SERIALIZE_OK,
6347  static_cast<FwAssertArgType>(_status)
6348  );
6349 #endif
6350 
6351 #if FW_AMPCS_COMPATIBLE
6352  // Serialize the argument size
6353  _status = _logBuff.serialize(
6354  static_cast<U8>(sizeof(U16))
6355  );
6356  FW_ASSERT(
6357  _status == Fw::FW_SERIALIZE_OK,
6358  static_cast<FwAssertArgType>(_status)
6359  );
6360 #endif
6361  _status = _logBuff.serialize(count);
6362  FW_ASSERT(
6363  _status == Fw::FW_SERIALIZE_OK,
6364  static_cast<FwAssertArgType>(_status)
6365  );
6366 
6367 #if FW_AMPCS_COMPATIBLE
6368  // Serialize the argument size
6369  _status = _logBuff.serialize(
6370  static_cast<U8>(sizeof(U16))
6371  );
6372  FW_ASSERT(
6373  _status == Fw::FW_SERIALIZE_OK,
6374  static_cast<FwAssertArgType>(_status)
6375  );
6376 #endif
6377  _status = _logBuff.serialize(max);
6378  FW_ASSERT(
6379  _status == Fw::FW_SERIALIZE_OK,
6380  static_cast<FwAssertArgType>(_status)
6381  );
6382 
6383  this->m_logOut_OutputPort[0].invoke(
6384  _id,
6385  _logTime,
6387  _logBuff
6388  );
6389  }
6390 
6391  // Emit the event on the text log port
6392 #if FW_ENABLE_TEXT_LOGGING
6393  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6394 #if FW_OBJECT_NAMES == 1
6395  const char* _formatString =
6396  "(%s) %s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
6397 #else
6398  const char* _formatString =
6399  "%s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
6400 #endif
6401 
6402  Fw::TextLogString _logString;
6403  _logString.format(
6404  _formatString,
6405 #if FW_OBJECT_NAMES == 1
6406  this->m_objName.toChar(),
6407 #endif
6408  "TooManySequenceStatements ",
6409  count,
6410  max
6411  );
6412 
6413  this->m_logTextOut_OutputPort[0].invoke(
6414  _id,
6415  _logTime,
6417  _logString
6418  );
6419  }
6420 #endif
6421  }
6422 
6425  U32 stmtIdx,
6426  bool breakOnce
6427  ) const
6428  {
6429  // Get the time
6430  Fw::Time _logTime;
6431  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6432  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6433  }
6434 
6435  FwEventIdType _id = static_cast<FwEventIdType>(0);
6436 
6437  _id = this->getIdBase() + EVENTID_DEBUGBROKEN;
6438 
6439  // Emit the event on the log port
6440  if (this->m_logOut_OutputPort[0].isConnected()) {
6441  Fw::LogBuffer _logBuff;
6443 
6444 #if FW_AMPCS_COMPATIBLE
6445  // Serialize the number of arguments
6446  _status = _logBuff.serialize(static_cast<U8>(2));
6447  FW_ASSERT(
6448  _status == Fw::FW_SERIALIZE_OK,
6449  static_cast<FwAssertArgType>(_status)
6450  );
6451 #endif
6452 
6453 #if FW_AMPCS_COMPATIBLE
6454  // Serialize the argument size
6455  _status = _logBuff.serialize(
6456  static_cast<U8>(sizeof(U32))
6457  );
6458  FW_ASSERT(
6459  _status == Fw::FW_SERIALIZE_OK,
6460  static_cast<FwAssertArgType>(_status)
6461  );
6462 #endif
6463  _status = _logBuff.serialize(stmtIdx);
6464  FW_ASSERT(
6465  _status == Fw::FW_SERIALIZE_OK,
6466  static_cast<FwAssertArgType>(_status)
6467  );
6468 
6469 #if FW_AMPCS_COMPATIBLE
6470  // Serialize the argument size
6471  _status = _logBuff.serialize(
6472  static_cast<U8>(sizeof(U8))
6473  );
6474  FW_ASSERT(
6475  _status == Fw::FW_SERIALIZE_OK,
6476  static_cast<FwAssertArgType>(_status)
6477  );
6478 #endif
6479  _status = _logBuff.serialize(breakOnce);
6480  FW_ASSERT(
6481  _status == Fw::FW_SERIALIZE_OK,
6482  static_cast<FwAssertArgType>(_status)
6483  );
6484 
6485  this->m_logOut_OutputPort[0].invoke(
6486  _id,
6487  _logTime,
6489  _logBuff
6490  );
6491  }
6492 
6493  // Emit the event on the text log port
6494 #if FW_ENABLE_TEXT_LOGGING
6495  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6496 #if FW_OBJECT_NAMES == 1
6497  const char* _formatString =
6498  "(%s) %s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6499 #else
6500  const char* _formatString =
6501  "%s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6502 #endif
6503 
6504  Fw::TextLogString _logString;
6505  _logString.format(
6506  _formatString,
6507 #if FW_OBJECT_NAMES == 1
6508  this->m_objName.toChar(),
6509 #endif
6510  "DebugBroken ",
6511  stmtIdx,
6512  breakOnce
6513  );
6514 
6515  this->m_logTextOut_OutputPort[0].invoke(
6516  _id,
6517  _logTime,
6519  _logString
6520  );
6521  }
6522 #endif
6523  }
6524 
6527  U32 breakpointIdx,
6528  bool breakOnce
6529  ) const
6530  {
6531  // Get the time
6532  Fw::Time _logTime;
6533  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6534  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6535  }
6536 
6537  FwEventIdType _id = static_cast<FwEventIdType>(0);
6538 
6539  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTSET;
6540 
6541  // Emit the event on the log port
6542  if (this->m_logOut_OutputPort[0].isConnected()) {
6543  Fw::LogBuffer _logBuff;
6545 
6546 #if FW_AMPCS_COMPATIBLE
6547  // Serialize the number of arguments
6548  _status = _logBuff.serialize(static_cast<U8>(2));
6549  FW_ASSERT(
6550  _status == Fw::FW_SERIALIZE_OK,
6551  static_cast<FwAssertArgType>(_status)
6552  );
6553 #endif
6554 
6555 #if FW_AMPCS_COMPATIBLE
6556  // Serialize the argument size
6557  _status = _logBuff.serialize(
6558  static_cast<U8>(sizeof(U32))
6559  );
6560  FW_ASSERT(
6561  _status == Fw::FW_SERIALIZE_OK,
6562  static_cast<FwAssertArgType>(_status)
6563  );
6564 #endif
6565  _status = _logBuff.serialize(breakpointIdx);
6566  FW_ASSERT(
6567  _status == Fw::FW_SERIALIZE_OK,
6568  static_cast<FwAssertArgType>(_status)
6569  );
6570 
6571 #if FW_AMPCS_COMPATIBLE
6572  // Serialize the argument size
6573  _status = _logBuff.serialize(
6574  static_cast<U8>(sizeof(U8))
6575  );
6576  FW_ASSERT(
6577  _status == Fw::FW_SERIALIZE_OK,
6578  static_cast<FwAssertArgType>(_status)
6579  );
6580 #endif
6581  _status = _logBuff.serialize(breakOnce);
6582  FW_ASSERT(
6583  _status == Fw::FW_SERIALIZE_OK,
6584  static_cast<FwAssertArgType>(_status)
6585  );
6586 
6587  this->m_logOut_OutputPort[0].invoke(
6588  _id,
6589  _logTime,
6591  _logBuff
6592  );
6593  }
6594 
6595  // Emit the event on the text log port
6596 #if FW_ENABLE_TEXT_LOGGING
6597  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6598 #if FW_OBJECT_NAMES == 1
6599  const char* _formatString =
6600  "(%s) %s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6601 #else
6602  const char* _formatString =
6603  "%s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6604 #endif
6605 
6606  Fw::TextLogString _logString;
6607  _logString.format(
6608  _formatString,
6609 #if FW_OBJECT_NAMES == 1
6610  this->m_objName.toChar(),
6611 #endif
6612  "DebugBreakpointSet ",
6613  breakpointIdx,
6614  breakOnce
6615  );
6616 
6617  this->m_logTextOut_OutputPort[0].invoke(
6618  _id,
6619  _logTime,
6621  _logString
6622  );
6623  }
6624 #endif
6625  }
6626 
6629  {
6630  // Get the time
6631  Fw::Time _logTime;
6632  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6633  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6634  }
6635 
6636  FwEventIdType _id = static_cast<FwEventIdType>(0);
6637 
6638  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTCLEARED;
6639 
6640  // Emit the event on the log port
6641  if (this->m_logOut_OutputPort[0].isConnected()) {
6642  Fw::LogBuffer _logBuff;
6643 
6644 #if FW_AMPCS_COMPATIBLE
6646  // Serialize the number of arguments
6647  _status = _logBuff.serialize(static_cast<U8>(0));
6648  FW_ASSERT(
6649  _status == Fw::FW_SERIALIZE_OK,
6650  static_cast<FwAssertArgType>(_status)
6651  );
6652 #endif
6653 
6654  this->m_logOut_OutputPort[0].invoke(
6655  _id,
6656  _logTime,
6658  _logBuff
6659  );
6660  }
6661 
6662  // Emit the event on the text log port
6663 #if FW_ENABLE_TEXT_LOGGING
6664  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6665 #if FW_OBJECT_NAMES == 1
6666  const char* _formatString =
6667  "(%s) %s: Debug breakpoint cleared";
6668 #else
6669  const char* _formatString =
6670  "%s: Debug breakpoint cleared";
6671 #endif
6672 
6673  Fw::TextLogString _logString;
6674  _logString.format(
6675  _formatString,
6676 #if FW_OBJECT_NAMES == 1
6677  this->m_objName.toChar(),
6678 #endif
6679  "DebugBreakpointCleared "
6680  );
6681 
6682  this->m_logTextOut_OutputPort[0].invoke(
6683  _id,
6684  _logTime,
6686  _logString
6687  );
6688  }
6689 #endif
6690  }
6691 
6692  // ----------------------------------------------------------------------
6693  // Telemetry write functions
6694  // ----------------------------------------------------------------------
6695 
6698  I32 arg,
6699  Fw::Time _tlmTime
6700  )
6701  {
6702  // Check to see if it is the first time
6703  if (not this->m_first_update_State) {
6704  // Check to see if value has changed. If not, don't write it.
6705  if (arg == this->m_last_State) {
6706  return;
6707  }
6708  else {
6709  this->m_last_State = arg;
6710  }
6711  }
6712  else {
6713  this->m_first_update_State = false;
6714  this->m_last_State = arg;
6715  }
6716 
6717  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6718  if (
6719  this->m_timeCaller_OutputPort[0].isConnected() &&
6720  (_tlmTime == Fw::ZERO_TIME)
6721  ) {
6722  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6723  }
6724 
6725  Fw::TlmBuffer _tlmBuff;
6726  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6727  FW_ASSERT(
6728  _stat == Fw::FW_SERIALIZE_OK,
6729  static_cast<FwAssertArgType>(_stat)
6730  );
6731 
6732  FwChanIdType _id;
6733 
6734  _id = this->getIdBase() + CHANNELID_STATE;
6735 
6736  this->m_tlmOut_OutputPort[0].invoke(
6737  _id,
6738  _tlmTime,
6739  _tlmBuff
6740  );
6741  }
6742  }
6743 
6746  U64 arg,
6747  Fw::Time _tlmTime
6748  )
6749  {
6750  // Check to see if it is the first time
6751  if (not this->m_first_update_SequencesSucceeded) {
6752  // Check to see if value has changed. If not, don't write it.
6753  if (arg == this->m_last_SequencesSucceeded) {
6754  return;
6755  }
6756  else {
6757  this->m_last_SequencesSucceeded = arg;
6758  }
6759  }
6760  else {
6761  this->m_first_update_SequencesSucceeded = false;
6762  this->m_last_SequencesSucceeded = arg;
6763  }
6764 
6765  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6766  if (
6767  this->m_timeCaller_OutputPort[0].isConnected() &&
6768  (_tlmTime == Fw::ZERO_TIME)
6769  ) {
6770  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6771  }
6772 
6773  Fw::TlmBuffer _tlmBuff;
6774  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6775  FW_ASSERT(
6776  _stat == Fw::FW_SERIALIZE_OK,
6777  static_cast<FwAssertArgType>(_stat)
6778  );
6779 
6780  FwChanIdType _id;
6781 
6782  _id = this->getIdBase() + CHANNELID_SEQUENCESSUCCEEDED;
6783 
6784  this->m_tlmOut_OutputPort[0].invoke(
6785  _id,
6786  _tlmTime,
6787  _tlmBuff
6788  );
6789  }
6790  }
6791 
6794  U64 arg,
6795  Fw::Time _tlmTime
6796  )
6797  {
6798  // Check to see if it is the first time
6799  if (not this->m_first_update_SequencesFailed) {
6800  // Check to see if value has changed. If not, don't write it.
6801  if (arg == this->m_last_SequencesFailed) {
6802  return;
6803  }
6804  else {
6805  this->m_last_SequencesFailed = arg;
6806  }
6807  }
6808  else {
6809  this->m_first_update_SequencesFailed = false;
6810  this->m_last_SequencesFailed = arg;
6811  }
6812 
6813  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6814  if (
6815  this->m_timeCaller_OutputPort[0].isConnected() &&
6816  (_tlmTime == Fw::ZERO_TIME)
6817  ) {
6818  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6819  }
6820 
6821  Fw::TlmBuffer _tlmBuff;
6822  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6823  FW_ASSERT(
6824  _stat == Fw::FW_SERIALIZE_OK,
6825  static_cast<FwAssertArgType>(_stat)
6826  );
6827 
6828  FwChanIdType _id;
6829 
6830  _id = this->getIdBase() + CHANNELID_SEQUENCESFAILED;
6831 
6832  this->m_tlmOut_OutputPort[0].invoke(
6833  _id,
6834  _tlmTime,
6835  _tlmBuff
6836  );
6837  }
6838  }
6839 
6842  U64 arg,
6843  Fw::Time _tlmTime
6844  )
6845  {
6846  // Check to see if it is the first time
6847  if (not this->m_first_update_SequencesCancelled) {
6848  // Check to see if value has changed. If not, don't write it.
6849  if (arg == this->m_last_SequencesCancelled) {
6850  return;
6851  }
6852  else {
6853  this->m_last_SequencesCancelled = arg;
6854  }
6855  }
6856  else {
6857  this->m_first_update_SequencesCancelled = false;
6858  this->m_last_SequencesCancelled = arg;
6859  }
6860 
6861  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6862  if (
6863  this->m_timeCaller_OutputPort[0].isConnected() &&
6864  (_tlmTime == Fw::ZERO_TIME)
6865  ) {
6866  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6867  }
6868 
6869  Fw::TlmBuffer _tlmBuff;
6870  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6871  FW_ASSERT(
6872  _stat == Fw::FW_SERIALIZE_OK,
6873  static_cast<FwAssertArgType>(_stat)
6874  );
6875 
6876  FwChanIdType _id;
6877 
6878  _id = this->getIdBase() + CHANNELID_SEQUENCESCANCELLED;
6879 
6880  this->m_tlmOut_OutputPort[0].invoke(
6881  _id,
6882  _tlmTime,
6883  _tlmBuff
6884  );
6885  }
6886  }
6887 
6890  U64 arg,
6891  Fw::Time _tlmTime
6892  )
6893  {
6894  // Check to see if it is the first time
6895  if (not this->m_first_update_StatementsDispatched) {
6896  // Check to see if value has changed. If not, don't write it.
6897  if (arg == this->m_last_StatementsDispatched) {
6898  return;
6899  }
6900  else {
6901  this->m_last_StatementsDispatched = arg;
6902  }
6903  }
6904  else {
6905  this->m_first_update_StatementsDispatched = false;
6906  this->m_last_StatementsDispatched = arg;
6907  }
6908 
6909  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6910  if (
6911  this->m_timeCaller_OutputPort[0].isConnected() &&
6912  (_tlmTime == Fw::ZERO_TIME)
6913  ) {
6914  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6915  }
6916 
6917  Fw::TlmBuffer _tlmBuff;
6918  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6919  FW_ASSERT(
6920  _stat == Fw::FW_SERIALIZE_OK,
6921  static_cast<FwAssertArgType>(_stat)
6922  );
6923 
6924  FwChanIdType _id;
6925 
6926  _id = this->getIdBase() + CHANNELID_STATEMENTSDISPATCHED;
6927 
6928  this->m_tlmOut_OutputPort[0].invoke(
6929  _id,
6930  _tlmTime,
6931  _tlmBuff
6932  );
6933  }
6934  }
6935 
6938  U64 arg,
6939  Fw::Time _tlmTime
6940  )
6941  {
6942  // Check to see if it is the first time
6943  if (not this->m_first_update_StatementsFailed) {
6944  // Check to see if value has changed. If not, don't write it.
6945  if (arg == this->m_last_StatementsFailed) {
6946  return;
6947  }
6948  else {
6949  this->m_last_StatementsFailed = arg;
6950  }
6951  }
6952  else {
6953  this->m_first_update_StatementsFailed = false;
6954  this->m_last_StatementsFailed = arg;
6955  }
6956 
6957  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6958  if (
6959  this->m_timeCaller_OutputPort[0].isConnected() &&
6960  (_tlmTime == Fw::ZERO_TIME)
6961  ) {
6962  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6963  }
6964 
6965  Fw::TlmBuffer _tlmBuff;
6966  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
6967  FW_ASSERT(
6968  _stat == Fw::FW_SERIALIZE_OK,
6969  static_cast<FwAssertArgType>(_stat)
6970  );
6971 
6972  FwChanIdType _id;
6973 
6974  _id = this->getIdBase() + CHANNELID_STATEMENTSFAILED;
6975 
6976  this->m_tlmOut_OutputPort[0].invoke(
6977  _id,
6978  _tlmTime,
6979  _tlmBuff
6980  );
6981  }
6982  }
6983 
6987  Fw::Time _tlmTime
6988  )
6989  {
6990  // Check to see if it is the first time
6991  if (not this->m_first_update_LastDirectiveError) {
6992  // Check to see if value has changed. If not, don't write it.
6993  if (arg == this->m_last_LastDirectiveError) {
6994  return;
6995  }
6996  else {
6997  this->m_last_LastDirectiveError = arg;
6998  }
6999  }
7000  else {
7001  this->m_first_update_LastDirectiveError = false;
7002  this->m_last_LastDirectiveError = arg;
7003  }
7004 
7005  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7006  if (
7007  this->m_timeCaller_OutputPort[0].isConnected() &&
7008  (_tlmTime == Fw::ZERO_TIME)
7009  ) {
7010  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7011  }
7012 
7013  Fw::TlmBuffer _tlmBuff;
7014  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
7015  FW_ASSERT(
7016  _stat == Fw::FW_SERIALIZE_OK,
7017  static_cast<FwAssertArgType>(_stat)
7018  );
7019 
7020  FwChanIdType _id;
7021 
7022  _id = this->getIdBase() + CHANNELID_LASTDIRECTIVEERROR;
7023 
7024  this->m_tlmOut_OutputPort[0].invoke(
7025  _id,
7026  _tlmTime,
7027  _tlmBuff
7028  );
7029  }
7030  }
7031 
7034  const Fw::StringBase& arg,
7035  Fw::Time _tlmTime
7036  )
7037  {
7038  // Check to see if it is the first time
7039  if (not this->m_first_update_SeqPath) {
7040  // Check to see if value has changed. If not, don't write it.
7041  if (arg == this->m_last_SeqPath) {
7042  return;
7043  }
7044  else {
7045  this->m_last_SeqPath = arg;
7046  }
7047  }
7048  else {
7049  this->m_first_update_SeqPath = false;
7050  this->m_last_SeqPath = arg;
7051  }
7052 
7053  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7054  if (
7055  this->m_timeCaller_OutputPort[0].isConnected() &&
7056  (_tlmTime == Fw::ZERO_TIME)
7057  ) {
7058  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7059  }
7060 
7061  Fw::TlmBuffer _tlmBuff;
7062  Fw::SerializeStatus _stat = arg.serialize(_tlmBuff, FW_MIN(FW_TLM_STRING_MAX_SIZE, 200));
7063  FW_ASSERT(
7064  _stat == Fw::FW_SERIALIZE_OK,
7065  static_cast<FwAssertArgType>(_stat)
7066  );
7067 
7068  FwChanIdType _id;
7069 
7070  _id = this->getIdBase() + CHANNELID_SEQPATH;
7071 
7072  this->m_tlmOut_OutputPort[0].invoke(
7073  _id,
7074  _tlmTime,
7075  _tlmBuff
7076  );
7077  }
7078  }
7079 
7082  U32 arg,
7083  Fw::Time _tlmTime
7084  )
7085  {
7086  // Check to see if it is the first time
7087  if (not this->m_first_update_DebugBreakpointIdx) {
7088  // Check to see if value has changed. If not, don't write it.
7089  if (arg == this->m_last_DebugBreakpointIdx) {
7090  return;
7091  }
7092  else {
7093  this->m_last_DebugBreakpointIdx = arg;
7094  }
7095  }
7096  else {
7097  this->m_first_update_DebugBreakpointIdx = false;
7098  this->m_last_DebugBreakpointIdx = arg;
7099  }
7100 
7101  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7102  if (
7103  this->m_timeCaller_OutputPort[0].isConnected() &&
7104  (_tlmTime == Fw::ZERO_TIME)
7105  ) {
7106  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7107  }
7108 
7109  Fw::TlmBuffer _tlmBuff;
7110  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
7111  FW_ASSERT(
7112  _stat == Fw::FW_SERIALIZE_OK,
7113  static_cast<FwAssertArgType>(_stat)
7114  );
7115 
7116  FwChanIdType _id;
7117 
7118  _id = this->getIdBase() + CHANNELID_DEBUGBREAKPOINTIDX;
7119 
7120  this->m_tlmOut_OutputPort[0].invoke(
7121  _id,
7122  _tlmTime,
7123  _tlmBuff
7124  );
7125  }
7126  }
7127 
7131  Fw::Time _tlmTime
7132  )
7133  {
7134  // Check to see if it is the first time
7135  if (not this->m_first_update_Debug) {
7136  // Check to see if value has changed. If not, don't write it.
7137  if (arg == this->m_last_Debug) {
7138  return;
7139  }
7140  else {
7141  this->m_last_Debug = arg;
7142  }
7143  }
7144  else {
7145  this->m_first_update_Debug = false;
7146  this->m_last_Debug = arg;
7147  }
7148 
7149  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7150  if (
7151  this->m_timeCaller_OutputPort[0].isConnected() &&
7152  (_tlmTime == Fw::ZERO_TIME)
7153  ) {
7154  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7155  }
7156 
7157  Fw::TlmBuffer _tlmBuff;
7158  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
7159  FW_ASSERT(
7160  _stat == Fw::FW_SERIALIZE_OK,
7161  static_cast<FwAssertArgType>(_stat)
7162  );
7163 
7164  FwChanIdType _id;
7165 
7166  _id = this->getIdBase() + CHANNELID_DEBUG;
7167 
7168  this->m_tlmOut_OutputPort[0].invoke(
7169  _id,
7170  _tlmTime,
7171  _tlmBuff
7172  );
7173  }
7174  }
7175 
7178  F32 arg,
7179  Fw::Time _tlmTime
7180  )
7181  {
7182  // Check to see if it is the first time
7183  if (not this->m_first_update_PRM_STATEMENT_TIMEOUT_SECS) {
7184  // Check to see if value has changed. If not, don't write it.
7185  if (arg == this->m_last_PRM_STATEMENT_TIMEOUT_SECS) {
7186  return;
7187  }
7188  else {
7189  this->m_last_PRM_STATEMENT_TIMEOUT_SECS = arg;
7190  }
7191  }
7192  else {
7193  this->m_first_update_PRM_STATEMENT_TIMEOUT_SECS = false;
7194  this->m_last_PRM_STATEMENT_TIMEOUT_SECS = arg;
7195  }
7196 
7197  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7198  if (
7199  this->m_timeCaller_OutputPort[0].isConnected() &&
7200  (_tlmTime == Fw::ZERO_TIME)
7201  ) {
7202  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7203  }
7204 
7205  Fw::TlmBuffer _tlmBuff;
7206  Fw::SerializeStatus _stat = _tlmBuff.serialize(arg);
7207  FW_ASSERT(
7208  _stat == Fw::FW_SERIALIZE_OK,
7209  static_cast<FwAssertArgType>(_stat)
7210  );
7211 
7212  FwChanIdType _id;
7213 
7215 
7216  this->m_tlmOut_OutputPort[0].invoke(
7217  _id,
7218  _tlmTime,
7219  _tlmBuff
7220  );
7221  }
7222  }
7223 
7224  // ----------------------------------------------------------------------
7225  // Parameter update hook
7226  // ----------------------------------------------------------------------
7227 
7230  {
7231  // Do nothing by default
7232  }
7233 
7236  {
7237  // Do nothing by default
7238  }
7239 
7240  // ----------------------------------------------------------------------
7241  // Parameter get functions
7242  // ----------------------------------------------------------------------
7243 
7246  {
7247  F32 _local{};
7248  this->m_paramLock.lock();
7249  valid = this->m_param_STATEMENT_TIMEOUT_SECS_valid;
7250  _local = this->m_STATEMENT_TIMEOUT_SECS;
7251  this->m_paramLock.unLock();
7252  return _local;
7253  }
7254 
7255  // ----------------------------------------------------------------------
7256  // Time
7257  // ----------------------------------------------------------------------
7258 
7260  getTime() const
7261  {
7262  if (this->m_timeCaller_OutputPort[0].isConnected()) {
7263  Fw::Time _time;
7264  this->m_timeCaller_OutputPort[0].invoke(_time);
7265  return _time;
7266  }
7267  else {
7268  return Fw::Time(TB_NONE, 0, 0);
7269  }
7270  }
7271 
7272  // ----------------------------------------------------------------------
7273  // Message dispatch functions
7274  // ----------------------------------------------------------------------
7275 
7276  Fw::QueuedComponentBase::MsgDispatchStatus FpySequencerComponentBase ::
7277  doDispatch()
7278  {
7279  ComponentIpcSerializableBuffer _msg;
7280  FwQueuePriorityType _priority = 0;
7281 
7282  Os::Queue::Status _msgStatus = this->m_queue.receive(
7283  _msg,
7285  _priority
7286  );
7287  FW_ASSERT(
7288  _msgStatus == Os::Queue::OP_OK,
7289  static_cast<FwAssertArgType>(_msgStatus)
7290  );
7291 
7292  // Reset to beginning of buffer
7293  _msg.resetDeser();
7294 
7295  FwEnumStoreType _desMsg = 0;
7296  Fw::SerializeStatus _deserStatus = _msg.deserialize(_desMsg);
7297  FW_ASSERT(
7298  _deserStatus == Fw::FW_SERIALIZE_OK,
7299  static_cast<FwAssertArgType>(_deserStatus)
7300  );
7301 
7302  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
7303 
7304  if (_msgType == FPYSEQUENCER_COMPONENT_EXIT) {
7305  return MSG_DISPATCH_EXIT;
7306  }
7307 
7308  FwIndexType portNum = 0;
7309  _deserStatus = _msg.deserialize(portNum);
7310  FW_ASSERT(
7311  _deserStatus == Fw::FW_SERIALIZE_OK,
7312  static_cast<FwAssertArgType>(_deserStatus)
7313  );
7314 
7315  switch (_msgType) {
7316  // Handle async input port checkTimers
7317  case CHECKTIMERS_SCHED: {
7318  // Deserialize argument context
7319  U32 context;
7320  _deserStatus = _msg.deserialize(context);
7321  FW_ASSERT(
7322  _deserStatus == Fw::FW_SERIALIZE_OK,
7323  static_cast<FwAssertArgType>(_deserStatus)
7324  );
7325  // Call handler function
7326  this->checkTimers_handler(
7327  portNum,
7328  context
7329  );
7330 
7331  break;
7332  }
7333 
7334  // Handle async input port cmdResponseIn
7335  case CMDRESPONSEIN_CMDRESPONSE: {
7336  // Deserialize argument opCode
7337  FwOpcodeType opCode;
7338  _deserStatus = _msg.deserialize(opCode);
7339  FW_ASSERT(
7340  _deserStatus == Fw::FW_SERIALIZE_OK,
7341  static_cast<FwAssertArgType>(_deserStatus)
7342  );
7343 
7344  // Deserialize argument cmdSeq
7345  U32 cmdSeq;
7346  _deserStatus = _msg.deserialize(cmdSeq);
7347  FW_ASSERT(
7348  _deserStatus == Fw::FW_SERIALIZE_OK,
7349  static_cast<FwAssertArgType>(_deserStatus)
7350  );
7351 
7352  // Deserialize argument response
7353  Fw::CmdResponse response;
7354  _deserStatus = _msg.deserialize(response);
7355  FW_ASSERT(
7356  _deserStatus == Fw::FW_SERIALIZE_OK,
7357  static_cast<FwAssertArgType>(_deserStatus)
7358  );
7359  // Call handler function
7360  this->cmdResponseIn_handler(
7361  portNum,
7362  opCode,
7363  cmdSeq,
7364  response
7365  );
7366 
7367  break;
7368  }
7369 
7370  // Handle async input port pingIn
7371  case PINGIN_PING: {
7372  // Deserialize argument key
7373  U32 key;
7374  _deserStatus = _msg.deserialize(key);
7375  FW_ASSERT(
7376  _deserStatus == Fw::FW_SERIALIZE_OK,
7377  static_cast<FwAssertArgType>(_deserStatus)
7378  );
7379  // Call handler function
7380  this->pingIn_handler(
7381  portNum,
7382  key
7383  );
7384 
7385  break;
7386  }
7387 
7388  // Handle async input port seqRunIn
7389  case SEQRUNIN_CMDSEQIN: {
7390  // Deserialize argument filename
7391  char __fprime_ac_filename_buffer[Fw::StringBase::BUFFER_SIZE(240)];
7392  Fw::ExternalString filename(__fprime_ac_filename_buffer, sizeof __fprime_ac_filename_buffer);
7393  _deserStatus = _msg.deserialize(filename);
7394  FW_ASSERT(
7395  _deserStatus == Fw::FW_SERIALIZE_OK,
7396  static_cast<FwAssertArgType>(_deserStatus)
7397  );
7398  // Call handler function
7399  this->seqRunIn_handler(
7400  portNum,
7401  filename
7402  );
7403 
7404  break;
7405  }
7406 
7407  // Handle async input port tlmWrite
7408  case TLMWRITE_SCHED: {
7409  // Deserialize argument context
7410  U32 context;
7411  _deserStatus = _msg.deserialize(context);
7412  FW_ASSERT(
7413  _deserStatus == Fw::FW_SERIALIZE_OK,
7414  static_cast<FwAssertArgType>(_deserStatus)
7415  );
7416  // Call handler function
7417  this->tlmWrite_handler(
7418  portNum,
7419  context
7420  );
7421 
7422  break;
7423  }
7424 
7425  // Handle command RUN
7426  case CMD_RUN: {
7427  // Deserialize opcode
7428  FwOpcodeType _opCode = 0;
7429  _deserStatus = _msg.deserialize(_opCode);
7430  FW_ASSERT (
7431  _deserStatus == Fw::FW_SERIALIZE_OK,
7432  static_cast<FwAssertArgType>(_deserStatus)
7433  );
7434 
7435  // Deserialize command sequence
7436  U32 _cmdSeq = 0;
7437  _deserStatus = _msg.deserialize(_cmdSeq);
7438  FW_ASSERT (
7439  _deserStatus == Fw::FW_SERIALIZE_OK,
7440  static_cast<FwAssertArgType>(_deserStatus)
7441  );
7442 
7443  // Deserialize command argument buffer
7444  Fw::CmdArgBuffer args;
7445  _deserStatus = _msg.deserialize(args);
7446  FW_ASSERT (
7447  _deserStatus == Fw::FW_SERIALIZE_OK,
7448  static_cast<FwAssertArgType>(_deserStatus)
7449  );
7450 
7451  // Reset buffer
7452  args.resetDeser();
7453 
7454  // Deserialize argument fileName
7455  Fw::CmdStringArg fileName;
7456  _deserStatus = args.deserialize(fileName);
7457  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7458  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7459  this->cmdResponse_out(
7460  _opCode,
7461  _cmdSeq,
7463  );
7464  }
7465  // Don't crash the task if bad arguments were passed from the ground
7466  break;
7467  }
7468 
7469  // Deserialize argument block
7471  _deserStatus = args.deserialize(block);
7472  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7473  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7474  this->cmdResponse_out(
7475  _opCode,
7476  _cmdSeq,
7478  );
7479  }
7480  // Don't crash the task if bad arguments were passed from the ground
7481  break;
7482  }
7483 
7484  // Make sure there was no data left over.
7485  // That means the argument buffer size was incorrect.
7486 #if FW_CMD_CHECK_RESIDUAL
7487  if (args.getBuffLeft() != 0) {
7488  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7489  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7490  }
7491  // Don't crash the task if bad arguments were passed from the ground
7492  break;
7493  }
7494 #endif
7495 
7496  // Call handler function
7497  this->RUN_cmdHandler(
7498  _opCode, _cmdSeq,
7499  fileName,
7500  block
7501  );
7502 
7503  break;
7504  }
7505 
7506  // Handle command VALIDATE
7507  case CMD_VALIDATE: {
7508  // Deserialize opcode
7509  FwOpcodeType _opCode = 0;
7510  _deserStatus = _msg.deserialize(_opCode);
7511  FW_ASSERT (
7512  _deserStatus == Fw::FW_SERIALIZE_OK,
7513  static_cast<FwAssertArgType>(_deserStatus)
7514  );
7515 
7516  // Deserialize command sequence
7517  U32 _cmdSeq = 0;
7518  _deserStatus = _msg.deserialize(_cmdSeq);
7519  FW_ASSERT (
7520  _deserStatus == Fw::FW_SERIALIZE_OK,
7521  static_cast<FwAssertArgType>(_deserStatus)
7522  );
7523 
7524  // Deserialize command argument buffer
7525  Fw::CmdArgBuffer args;
7526  _deserStatus = _msg.deserialize(args);
7527  FW_ASSERT (
7528  _deserStatus == Fw::FW_SERIALIZE_OK,
7529  static_cast<FwAssertArgType>(_deserStatus)
7530  );
7531 
7532  // Reset buffer
7533  args.resetDeser();
7534 
7535  // Deserialize argument fileName
7536  Fw::CmdStringArg fileName;
7537  _deserStatus = args.deserialize(fileName);
7538  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7539  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7540  this->cmdResponse_out(
7541  _opCode,
7542  _cmdSeq,
7544  );
7545  }
7546  // Don't crash the task if bad arguments were passed from the ground
7547  break;
7548  }
7549 
7550  // Make sure there was no data left over.
7551  // That means the argument buffer size was incorrect.
7552 #if FW_CMD_CHECK_RESIDUAL
7553  if (args.getBuffLeft() != 0) {
7554  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7555  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7556  }
7557  // Don't crash the task if bad arguments were passed from the ground
7558  break;
7559  }
7560 #endif
7561 
7562  // Call handler function
7563  this->VALIDATE_cmdHandler(
7564  _opCode, _cmdSeq,
7565  fileName
7566  );
7567 
7568  break;
7569  }
7570 
7571  // Handle command RUN_VALIDATED
7572  case CMD_RUN_VALIDATED: {
7573  // Deserialize opcode
7574  FwOpcodeType _opCode = 0;
7575  _deserStatus = _msg.deserialize(_opCode);
7576  FW_ASSERT (
7577  _deserStatus == Fw::FW_SERIALIZE_OK,
7578  static_cast<FwAssertArgType>(_deserStatus)
7579  );
7580 
7581  // Deserialize command sequence
7582  U32 _cmdSeq = 0;
7583  _deserStatus = _msg.deserialize(_cmdSeq);
7584  FW_ASSERT (
7585  _deserStatus == Fw::FW_SERIALIZE_OK,
7586  static_cast<FwAssertArgType>(_deserStatus)
7587  );
7588 
7589  // Deserialize command argument buffer
7590  Fw::CmdArgBuffer args;
7591  _deserStatus = _msg.deserialize(args);
7592  FW_ASSERT (
7593  _deserStatus == Fw::FW_SERIALIZE_OK,
7594  static_cast<FwAssertArgType>(_deserStatus)
7595  );
7596 
7597  // Reset buffer
7598  args.resetDeser();
7599 
7600  // Deserialize argument block
7602  _deserStatus = args.deserialize(block);
7603  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7604  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7605  this->cmdResponse_out(
7606  _opCode,
7607  _cmdSeq,
7609  );
7610  }
7611  // Don't crash the task if bad arguments were passed from the ground
7612  break;
7613  }
7614 
7615  // Make sure there was no data left over.
7616  // That means the argument buffer size was incorrect.
7617 #if FW_CMD_CHECK_RESIDUAL
7618  if (args.getBuffLeft() != 0) {
7619  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7620  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7621  }
7622  // Don't crash the task if bad arguments were passed from the ground
7623  break;
7624  }
7625 #endif
7626 
7627  // Call handler function
7629  _opCode, _cmdSeq,
7630  block
7631  );
7632 
7633  break;
7634  }
7635 
7636  // Handle command CANCEL
7637  case CMD_CANCEL: {
7638  // Deserialize opcode
7639  FwOpcodeType _opCode = 0;
7640  _deserStatus = _msg.deserialize(_opCode);
7641  FW_ASSERT (
7642  _deserStatus == Fw::FW_SERIALIZE_OK,
7643  static_cast<FwAssertArgType>(_deserStatus)
7644  );
7645 
7646  // Deserialize command sequence
7647  U32 _cmdSeq = 0;
7648  _deserStatus = _msg.deserialize(_cmdSeq);
7649  FW_ASSERT (
7650  _deserStatus == Fw::FW_SERIALIZE_OK,
7651  static_cast<FwAssertArgType>(_deserStatus)
7652  );
7653 
7654  // Deserialize command argument buffer
7655  Fw::CmdArgBuffer args;
7656  _deserStatus = _msg.deserialize(args);
7657  FW_ASSERT (
7658  _deserStatus == Fw::FW_SERIALIZE_OK,
7659  static_cast<FwAssertArgType>(_deserStatus)
7660  );
7661 
7662  // Reset buffer
7663  args.resetDeser();
7664 
7665  // Make sure there was no data left over.
7666  // That means the argument buffer size was incorrect.
7667 #if FW_CMD_CHECK_RESIDUAL
7668  if (args.getBuffLeft() != 0) {
7669  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7670  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7671  }
7672  // Don't crash the task if bad arguments were passed from the ground
7673  break;
7674  }
7675 #endif
7676 
7677  // Call handler function
7678  this->CANCEL_cmdHandler(_opCode, _cmdSeq);
7679 
7680  break;
7681  }
7682 
7683  // Handle command DEBUG_SET_BREAKPOINT
7684  case CMD_DEBUG_SET_BREAKPOINT: {
7685  // Deserialize opcode
7686  FwOpcodeType _opCode = 0;
7687  _deserStatus = _msg.deserialize(_opCode);
7688  FW_ASSERT (
7689  _deserStatus == Fw::FW_SERIALIZE_OK,
7690  static_cast<FwAssertArgType>(_deserStatus)
7691  );
7692 
7693  // Deserialize command sequence
7694  U32 _cmdSeq = 0;
7695  _deserStatus = _msg.deserialize(_cmdSeq);
7696  FW_ASSERT (
7697  _deserStatus == Fw::FW_SERIALIZE_OK,
7698  static_cast<FwAssertArgType>(_deserStatus)
7699  );
7700 
7701  // Deserialize command argument buffer
7702  Fw::CmdArgBuffer args;
7703  _deserStatus = _msg.deserialize(args);
7704  FW_ASSERT (
7705  _deserStatus == Fw::FW_SERIALIZE_OK,
7706  static_cast<FwAssertArgType>(_deserStatus)
7707  );
7708 
7709  // Reset buffer
7710  args.resetDeser();
7711 
7712  // Deserialize argument stmtIdx
7713  U32 stmtIdx;
7714  _deserStatus = args.deserialize(stmtIdx);
7715  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7716  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7717  this->cmdResponse_out(
7718  _opCode,
7719  _cmdSeq,
7721  );
7722  }
7723  // Don't crash the task if bad arguments were passed from the ground
7724  break;
7725  }
7726 
7727  // Deserialize argument breakOnce
7728  bool breakOnce;
7729  _deserStatus = args.deserialize(breakOnce);
7730  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7731  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7732  this->cmdResponse_out(
7733  _opCode,
7734  _cmdSeq,
7736  );
7737  }
7738  // Don't crash the task if bad arguments were passed from the ground
7739  break;
7740  }
7741 
7742  // Make sure there was no data left over.
7743  // That means the argument buffer size was incorrect.
7744 #if FW_CMD_CHECK_RESIDUAL
7745  if (args.getBuffLeft() != 0) {
7746  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7747  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7748  }
7749  // Don't crash the task if bad arguments were passed from the ground
7750  break;
7751  }
7752 #endif
7753 
7754  // Call handler function
7756  _opCode, _cmdSeq,
7757  stmtIdx,
7758  breakOnce
7759  );
7760 
7761  break;
7762  }
7763 
7764  // Handle command DEBUG_BREAK
7765  case CMD_DEBUG_BREAK: {
7766  // Deserialize opcode
7767  FwOpcodeType _opCode = 0;
7768  _deserStatus = _msg.deserialize(_opCode);
7769  FW_ASSERT (
7770  _deserStatus == Fw::FW_SERIALIZE_OK,
7771  static_cast<FwAssertArgType>(_deserStatus)
7772  );
7773 
7774  // Deserialize command sequence
7775  U32 _cmdSeq = 0;
7776  _deserStatus = _msg.deserialize(_cmdSeq);
7777  FW_ASSERT (
7778  _deserStatus == Fw::FW_SERIALIZE_OK,
7779  static_cast<FwAssertArgType>(_deserStatus)
7780  );
7781 
7782  // Deserialize command argument buffer
7783  Fw::CmdArgBuffer args;
7784  _deserStatus = _msg.deserialize(args);
7785  FW_ASSERT (
7786  _deserStatus == Fw::FW_SERIALIZE_OK,
7787  static_cast<FwAssertArgType>(_deserStatus)
7788  );
7789 
7790  // Reset buffer
7791  args.resetDeser();
7792 
7793  // Deserialize argument breakOnce
7794  bool breakOnce;
7795  _deserStatus = args.deserialize(breakOnce);
7796  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7797  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7798  this->cmdResponse_out(
7799  _opCode,
7800  _cmdSeq,
7802  );
7803  }
7804  // Don't crash the task if bad arguments were passed from the ground
7805  break;
7806  }
7807 
7808  // Make sure there was no data left over.
7809  // That means the argument buffer size was incorrect.
7810 #if FW_CMD_CHECK_RESIDUAL
7811  if (args.getBuffLeft() != 0) {
7812  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7813  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7814  }
7815  // Don't crash the task if bad arguments were passed from the ground
7816  break;
7817  }
7818 #endif
7819 
7820  // Call handler function
7821  this->DEBUG_BREAK_cmdHandler(
7822  _opCode, _cmdSeq,
7823  breakOnce
7824  );
7825 
7826  break;
7827  }
7828 
7829  // Handle command DEBUG_CONTINUE
7830  case CMD_DEBUG_CONTINUE: {
7831  // Deserialize opcode
7832  FwOpcodeType _opCode = 0;
7833  _deserStatus = _msg.deserialize(_opCode);
7834  FW_ASSERT (
7835  _deserStatus == Fw::FW_SERIALIZE_OK,
7836  static_cast<FwAssertArgType>(_deserStatus)
7837  );
7838 
7839  // Deserialize command sequence
7840  U32 _cmdSeq = 0;
7841  _deserStatus = _msg.deserialize(_cmdSeq);
7842  FW_ASSERT (
7843  _deserStatus == Fw::FW_SERIALIZE_OK,
7844  static_cast<FwAssertArgType>(_deserStatus)
7845  );
7846 
7847  // Deserialize command argument buffer
7848  Fw::CmdArgBuffer args;
7849  _deserStatus = _msg.deserialize(args);
7850  FW_ASSERT (
7851  _deserStatus == Fw::FW_SERIALIZE_OK,
7852  static_cast<FwAssertArgType>(_deserStatus)
7853  );
7854 
7855  // Reset buffer
7856  args.resetDeser();
7857 
7858  // Make sure there was no data left over.
7859  // That means the argument buffer size was incorrect.
7860 #if FW_CMD_CHECK_RESIDUAL
7861  if (args.getBuffLeft() != 0) {
7862  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7863  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7864  }
7865  // Don't crash the task if bad arguments were passed from the ground
7866  break;
7867  }
7868 #endif
7869 
7870  // Call handler function
7871  this->DEBUG_CONTINUE_cmdHandler(_opCode, _cmdSeq);
7872 
7873  break;
7874  }
7875 
7876  // Handle command DEBUG_CLEAR_BREAKPOINT
7877  case CMD_DEBUG_CLEAR_BREAKPOINT: {
7878  // Deserialize opcode
7879  FwOpcodeType _opCode = 0;
7880  _deserStatus = _msg.deserialize(_opCode);
7881  FW_ASSERT (
7882  _deserStatus == Fw::FW_SERIALIZE_OK,
7883  static_cast<FwAssertArgType>(_deserStatus)
7884  );
7885 
7886  // Deserialize command sequence
7887  U32 _cmdSeq = 0;
7888  _deserStatus = _msg.deserialize(_cmdSeq);
7889  FW_ASSERT (
7890  _deserStatus == Fw::FW_SERIALIZE_OK,
7891  static_cast<FwAssertArgType>(_deserStatus)
7892  );
7893 
7894  // Deserialize command argument buffer
7895  Fw::CmdArgBuffer args;
7896  _deserStatus = _msg.deserialize(args);
7897  FW_ASSERT (
7898  _deserStatus == Fw::FW_SERIALIZE_OK,
7899  static_cast<FwAssertArgType>(_deserStatus)
7900  );
7901 
7902  // Reset buffer
7903  args.resetDeser();
7904 
7905  // Make sure there was no data left over.
7906  // That means the argument buffer size was incorrect.
7907 #if FW_CMD_CHECK_RESIDUAL
7908  if (args.getBuffLeft() != 0) {
7909  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7910  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7911  }
7912  // Don't crash the task if bad arguments were passed from the ground
7913  break;
7914  }
7915 #endif
7916 
7917  // Call handler function
7918  this->DEBUG_CLEAR_BREAKPOINT_cmdHandler(_opCode, _cmdSeq);
7919 
7920  break;
7921  }
7922 
7923  // Handle internal interface directive_binaryRegOp
7924  case INT_IF_DIRECTIVE_BINARYREGOP: {
7926  _deserStatus = _msg.deserialize(directive);
7927 
7928  // Internal interface should always deserialize
7929  FW_ASSERT(
7930  Fw::FW_SERIALIZE_OK == _deserStatus,
7931  static_cast<FwAssertArgType>(_deserStatus)
7932  );
7933 
7934  // Make sure there was no data left over.
7935  // That means the buffer size was incorrect.
7936  FW_ASSERT(
7937  _msg.getBuffLeft() == 0,
7938  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7939  );
7940 
7941  // Call handler function
7943  directive
7944  );
7945 
7946  break;
7947  }
7948 
7949  // Handle internal interface directive_cmd
7950  case INT_IF_DIRECTIVE_CMD: {
7952  _deserStatus = _msg.deserialize(directive);
7953 
7954  // Internal interface should always deserialize
7955  FW_ASSERT(
7956  Fw::FW_SERIALIZE_OK == _deserStatus,
7957  static_cast<FwAssertArgType>(_deserStatus)
7958  );
7959 
7960  // Make sure there was no data left over.
7961  // That means the buffer size was incorrect.
7962  FW_ASSERT(
7963  _msg.getBuffLeft() == 0,
7964  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7965  );
7966 
7967  // Call handler function
7969  directive
7970  );
7971 
7972  break;
7973  }
7974 
7975  // Handle internal interface directive_deserSerReg
7976  case INT_IF_DIRECTIVE_DESERSERREG: {
7978  _deserStatus = _msg.deserialize(directive);
7979 
7980  // Internal interface should always deserialize
7981  FW_ASSERT(
7982  Fw::FW_SERIALIZE_OK == _deserStatus,
7983  static_cast<FwAssertArgType>(_deserStatus)
7984  );
7985 
7986  // Make sure there was no data left over.
7987  // That means the buffer size was incorrect.
7988  FW_ASSERT(
7989  _msg.getBuffLeft() == 0,
7990  static_cast<FwAssertArgType>(_msg.getBuffLeft())
7991  );
7992 
7993  // Call handler function
7995  directive
7996  );
7997 
7998  break;
7999  }
8000 
8001  // Handle internal interface directive_exit
8002  case INT_IF_DIRECTIVE_EXIT: {
8004  _deserStatus = _msg.deserialize(directive);
8005 
8006  // Internal interface should always deserialize
8007  FW_ASSERT(
8008  Fw::FW_SERIALIZE_OK == _deserStatus,
8009  static_cast<FwAssertArgType>(_deserStatus)
8010  );
8011 
8012  // Make sure there was no data left over.
8013  // That means the buffer size was incorrect.
8014  FW_ASSERT(
8015  _msg.getBuffLeft() == 0,
8016  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8017  );
8018 
8019  // Call handler function
8021  directive
8022  );
8023 
8024  break;
8025  }
8026 
8027  // Handle internal interface directive_getPrm
8028  case INT_IF_DIRECTIVE_GETPRM: {
8030  _deserStatus = _msg.deserialize(directive);
8031 
8032  // Internal interface should always deserialize
8033  FW_ASSERT(
8034  Fw::FW_SERIALIZE_OK == _deserStatus,
8035  static_cast<FwAssertArgType>(_deserStatus)
8036  );
8037 
8038  // Make sure there was no data left over.
8039  // That means the buffer size was incorrect.
8040  FW_ASSERT(
8041  _msg.getBuffLeft() == 0,
8042  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8043  );
8044 
8045  // Call handler function
8047  directive
8048  );
8049 
8050  break;
8051  }
8052 
8053  // Handle internal interface directive_getTlm
8054  case INT_IF_DIRECTIVE_GETTLM: {
8056  _deserStatus = _msg.deserialize(directive);
8057 
8058  // Internal interface should always deserialize
8059  FW_ASSERT(
8060  Fw::FW_SERIALIZE_OK == _deserStatus,
8061  static_cast<FwAssertArgType>(_deserStatus)
8062  );
8063 
8064  // Make sure there was no data left over.
8065  // That means the buffer size was incorrect.
8066  FW_ASSERT(
8067  _msg.getBuffLeft() == 0,
8068  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8069  );
8070 
8071  // Call handler function
8073  directive
8074  );
8075 
8076  break;
8077  }
8078 
8079  // Handle internal interface directive_goto
8080  case INT_IF_DIRECTIVE_GOTO: {
8082  _deserStatus = _msg.deserialize(directive);
8083 
8084  // Internal interface should always deserialize
8085  FW_ASSERT(
8086  Fw::FW_SERIALIZE_OK == _deserStatus,
8087  static_cast<FwAssertArgType>(_deserStatus)
8088  );
8089 
8090  // Make sure there was no data left over.
8091  // That means the buffer size was incorrect.
8092  FW_ASSERT(
8093  _msg.getBuffLeft() == 0,
8094  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8095  );
8096 
8097  // Call handler function
8099  directive
8100  );
8101 
8102  break;
8103  }
8104 
8105  // Handle internal interface directive_if
8106  case INT_IF_DIRECTIVE_IF: {
8108  _deserStatus = _msg.deserialize(directive);
8109 
8110  // Internal interface should always deserialize
8111  FW_ASSERT(
8112  Fw::FW_SERIALIZE_OK == _deserStatus,
8113  static_cast<FwAssertArgType>(_deserStatus)
8114  );
8115 
8116  // Make sure there was no data left over.
8117  // That means the buffer size was incorrect.
8118  FW_ASSERT(
8119  _msg.getBuffLeft() == 0,
8120  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8121  );
8122 
8123  // Call handler function
8125  directive
8126  );
8127 
8128  break;
8129  }
8130 
8131  // Handle internal interface directive_noOp
8132  case INT_IF_DIRECTIVE_NOOP: {
8134  _deserStatus = _msg.deserialize(directive);
8135 
8136  // Internal interface should always deserialize
8137  FW_ASSERT(
8138  Fw::FW_SERIALIZE_OK == _deserStatus,
8139  static_cast<FwAssertArgType>(_deserStatus)
8140  );
8141 
8142  // Make sure there was no data left over.
8143  // That means the buffer size was incorrect.
8144  FW_ASSERT(
8145  _msg.getBuffLeft() == 0,
8146  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8147  );
8148 
8149  // Call handler function
8151  directive
8152  );
8153 
8154  break;
8155  }
8156 
8157  // Handle internal interface directive_setReg
8158  case INT_IF_DIRECTIVE_SETREG: {
8160  _deserStatus = _msg.deserialize(directive);
8161 
8162  // Internal interface should always deserialize
8163  FW_ASSERT(
8164  Fw::FW_SERIALIZE_OK == _deserStatus,
8165  static_cast<FwAssertArgType>(_deserStatus)
8166  );
8167 
8168  // Make sure there was no data left over.
8169  // That means the buffer size was incorrect.
8170  FW_ASSERT(
8171  _msg.getBuffLeft() == 0,
8172  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8173  );
8174 
8175  // Call handler function
8177  directive
8178  );
8179 
8180  break;
8181  }
8182 
8183  // Handle internal interface directive_setSerReg
8184  case INT_IF_DIRECTIVE_SETSERREG: {
8186  _deserStatus = _msg.deserialize(directive);
8187 
8188  // Internal interface should always deserialize
8189  FW_ASSERT(
8190  Fw::FW_SERIALIZE_OK == _deserStatus,
8191  static_cast<FwAssertArgType>(_deserStatus)
8192  );
8193 
8194  // Make sure there was no data left over.
8195  // That means the buffer size was incorrect.
8196  FW_ASSERT(
8197  _msg.getBuffLeft() == 0,
8198  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8199  );
8200 
8201  // Call handler function
8203  directive
8204  );
8205 
8206  break;
8207  }
8208 
8209  // Handle internal interface directive_unaryRegOp
8210  case INT_IF_DIRECTIVE_UNARYREGOP: {
8212  _deserStatus = _msg.deserialize(directive);
8213 
8214  // Internal interface should always deserialize
8215  FW_ASSERT(
8216  Fw::FW_SERIALIZE_OK == _deserStatus,
8217  static_cast<FwAssertArgType>(_deserStatus)
8218  );
8219 
8220  // Make sure there was no data left over.
8221  // That means the buffer size was incorrect.
8222  FW_ASSERT(
8223  _msg.getBuffLeft() == 0,
8224  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8225  );
8226 
8227  // Call handler function
8229  directive
8230  );
8231 
8232  break;
8233  }
8234 
8235  // Handle internal interface directive_waitAbs
8236  case INT_IF_DIRECTIVE_WAITABS: {
8238  _deserStatus = _msg.deserialize(directive);
8239 
8240  // Internal interface should always deserialize
8241  FW_ASSERT(
8242  Fw::FW_SERIALIZE_OK == _deserStatus,
8243  static_cast<FwAssertArgType>(_deserStatus)
8244  );
8245 
8246  // Make sure there was no data left over.
8247  // That means the buffer size was incorrect.
8248  FW_ASSERT(
8249  _msg.getBuffLeft() == 0,
8250  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8251  );
8252 
8253  // Call handler function
8255  directive
8256  );
8257 
8258  break;
8259  }
8260 
8261  // Handle internal interface directive_waitRel
8262  case INT_IF_DIRECTIVE_WAITREL: {
8264  _deserStatus = _msg.deserialize(directive);
8265 
8266  // Internal interface should always deserialize
8267  FW_ASSERT(
8268  Fw::FW_SERIALIZE_OK == _deserStatus,
8269  static_cast<FwAssertArgType>(_deserStatus)
8270  );
8271 
8272  // Make sure there was no data left over.
8273  // That means the buffer size was incorrect.
8274  FW_ASSERT(
8275  _msg.getBuffLeft() == 0,
8276  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8277  );
8278 
8279  // Call handler function
8281  directive
8282  );
8283 
8284  break;
8285  }
8286 
8287 
8288  // Handle signals to internal state machines
8289  case INTERNAL_STATE_MACHINE_SIGNAL:
8290  this->smDispatch(_msg);
8291  break;
8292 
8293  default:
8294  return MSG_DISPATCH_ERROR;
8295  }
8296 
8297  return MSG_DISPATCH_OK;
8298  }
8299 
8300  // ----------------------------------------------------------------------
8301  // Calls for messages received on special input ports
8302  // ----------------------------------------------------------------------
8303 
8304  void FpySequencerComponentBase ::
8305  m_p_cmdIn_in(
8306  Fw::PassiveComponentBase* callComp,
8307  FwIndexType portNum,
8308  FwOpcodeType opCode,
8309  U32 cmdSeq,
8310  Fw::CmdArgBuffer& args
8311  )
8312  {
8313  FW_ASSERT(callComp);
8314  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8315 
8316  const U32 idBase = callComp->getIdBase();
8317  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
8318 
8319  // Select base class function based on opcode
8320  switch (opCode - idBase) {
8321  case OPCODE_RUN: {
8322  compPtr->RUN_cmdHandlerBase(
8323  opCode,
8324  cmdSeq,
8325  args
8326  );
8327  break;
8328  }
8329 
8330  case OPCODE_VALIDATE: {
8331  compPtr->VALIDATE_cmdHandlerBase(
8332  opCode,
8333  cmdSeq,
8334  args
8335  );
8336  break;
8337  }
8338 
8339  case OPCODE_RUN_VALIDATED: {
8340  compPtr->RUN_VALIDATED_cmdHandlerBase(
8341  opCode,
8342  cmdSeq,
8343  args
8344  );
8345  break;
8346  }
8347 
8348  case OPCODE_CANCEL: {
8349  compPtr->CANCEL_cmdHandlerBase(
8350  opCode,
8351  cmdSeq,
8352  args
8353  );
8354  break;
8355  }
8356 
8358  compPtr->DEBUG_SET_BREAKPOINT_cmdHandlerBase(
8359  opCode,
8360  cmdSeq,
8361  args
8362  );
8363  break;
8364  }
8365 
8366  case OPCODE_DEBUG_BREAK: {
8367  compPtr->DEBUG_BREAK_cmdHandlerBase(
8368  opCode,
8369  cmdSeq,
8370  args
8371  );
8372  break;
8373  }
8374 
8375  case OPCODE_DEBUG_CONTINUE: {
8376  compPtr->DEBUG_CONTINUE_cmdHandlerBase(
8377  opCode,
8378  cmdSeq,
8379  args
8380  );
8381  break;
8382  }
8383 
8385  compPtr->DEBUG_CLEAR_BREAKPOINT_cmdHandlerBase(
8386  opCode,
8387  cmdSeq,
8388  args
8389  );
8390  break;
8391  }
8392 
8394  Fw::CmdResponse _cstat = compPtr->paramSet_STATEMENT_TIMEOUT_SECS(args);
8395  compPtr->cmdResponse_out(
8396  opCode,
8397  cmdSeq,
8398  _cstat
8399  );
8400  break;
8401  }
8402 
8404  Fw::CmdResponse _cstat = compPtr->paramSave_STATEMENT_TIMEOUT_SECS();
8405  compPtr->cmdResponse_out(
8406  opCode,
8407  cmdSeq,
8408  _cstat
8409  );
8410  break;
8411  }
8412  }
8413  }
8414 
8415  // ----------------------------------------------------------------------
8416  // Calls for messages received on typed input ports
8417  // ----------------------------------------------------------------------
8418 
8419  void FpySequencerComponentBase ::
8420  m_p_checkTimers_in(
8421  Fw::PassiveComponentBase* callComp,
8422  FwIndexType portNum,
8423  U32 context
8424  )
8425  {
8426  FW_ASSERT(callComp);
8427  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8428  compPtr->checkTimers_handlerBase(
8429  portNum,
8430  context
8431  );
8432  }
8433 
8434  void FpySequencerComponentBase ::
8435  m_p_cmdResponseIn_in(
8436  Fw::PassiveComponentBase* callComp,
8437  FwIndexType portNum,
8438  FwOpcodeType opCode,
8439  U32 cmdSeq,
8440  const Fw::CmdResponse& response
8441  )
8442  {
8443  FW_ASSERT(callComp);
8444  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8445  compPtr->cmdResponseIn_handlerBase(
8446  portNum,
8447  opCode,
8448  cmdSeq,
8449  response
8450  );
8451  }
8452 
8453  void FpySequencerComponentBase ::
8454  m_p_pingIn_in(
8455  Fw::PassiveComponentBase* callComp,
8456  FwIndexType portNum,
8457  U32 key
8458  )
8459  {
8460  FW_ASSERT(callComp);
8461  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8462  compPtr->pingIn_handlerBase(
8463  portNum,
8464  key
8465  );
8466  }
8467 
8468  void FpySequencerComponentBase ::
8469  m_p_seqRunIn_in(
8470  Fw::PassiveComponentBase* callComp,
8471  FwIndexType portNum,
8472  const Fw::StringBase& filename
8473  )
8474  {
8475  FW_ASSERT(callComp);
8476  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8477  compPtr->seqRunIn_handlerBase(
8478  portNum,
8479  filename
8480  );
8481  }
8482 
8483  void FpySequencerComponentBase ::
8484  m_p_tlmWrite_in(
8485  Fw::PassiveComponentBase* callComp,
8486  FwIndexType portNum,
8487  U32 context
8488  )
8489  {
8490  FW_ASSERT(callComp);
8491  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8492  compPtr->tlmWrite_handlerBase(
8493  portNum,
8494  context
8495  );
8496  }
8497 
8498  // ----------------------------------------------------------------------
8499  // Send signal helper functions
8500  // ----------------------------------------------------------------------
8501 
8502  void FpySequencerComponentBase ::
8503  sendSignalStart(
8504  SmId smId,
8505  FwEnumStoreType signal,
8506  Fw::SerializeBufferBase& buffer
8507  )
8508  {
8510 
8511  // Serialize the message type
8512  status = buffer.serialize(static_cast<FwEnumStoreType>(INTERNAL_STATE_MACHINE_SIGNAL));
8513  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8514 
8515  // Serialize the port number
8516  status = buffer.serialize(static_cast<FwIndexType>(0));
8517  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8518 
8519  // Serialize the state machine ID
8520  status = buffer.serialize(static_cast<FwEnumStoreType>(smId));
8521  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8522 
8523  // Serialize the signal
8524  status = buffer.serialize(static_cast<FwEnumStoreType>(signal));
8525  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8526  }
8527 
8528  void FpySequencerComponentBase ::
8529  sequencer_sendSignalFinish(Fw::SerializeBufferBase& buffer)
8530  {
8531  // Send message
8533  Os::Queue::Status qStatus = this->m_queue.send(buffer, 9, _block);
8534 
8535  FW_ASSERT(
8536  qStatus == Os::Queue::OP_OK,
8537  static_cast<FwAssertArgType>(qStatus)
8538  );
8539  }
8540 
8541  // ----------------------------------------------------------------------
8542  // Helper functions for state machine dispatch
8543  // ----------------------------------------------------------------------
8544 
8545  void FpySequencerComponentBase ::
8546  smDispatch(Fw::SerializeBufferBase& buffer)
8547  {
8548  // Deserialize the state machine ID and signal
8549  FwEnumStoreType storedSmId;
8550  FwEnumStoreType storedSignal;
8551  FpySequencerComponentBase::deserializeSmIdAndSignal(buffer, storedSmId, storedSignal);
8552 
8553  // Select the target state machine instance
8554  const SmId smId = static_cast<SmId>(storedSmId);
8555  switch (smId) {
8556  case SmId::sequencer: {
8558  this->Svc_FpySequencer_SequencerStateMachine_smDispatch(buffer, this->m_stateMachine_sequencer, signal);
8559  break;
8560  }
8561  default:
8562  FW_ASSERT(0, static_cast<FwAssertArgType>(smId));
8563  break;
8564  }
8565  }
8566 
8567  void FpySequencerComponentBase ::
8568  deserializeSmIdAndSignal(
8569  Fw::SerializeBufferBase& buffer,
8570  FwEnumStoreType& smId,
8571  FwEnumStoreType& signal
8572  )
8573  {
8574  // Move deserialization beyond the message type and port number
8575  Fw::SerializeStatus status =
8576  buffer.moveDeserToOffset(ComponentIpcSerializableBuffer::DATA_OFFSET);
8577  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8578 
8579  // Deserialize the state machine ID
8580  status = buffer.deserialize(smId);
8581  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8582 
8583  // Deserialize the signal
8584  status = buffer.deserialize(signal);
8585  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8586  }
8587 
8588  void FpySequencerComponentBase ::
8589  Svc_FpySequencer_SequencerStateMachine_smDispatch(
8590  Fw::SerializeBufferBase& buffer,
8591  Svc_FpySequencer_SequencerStateMachine& sm,
8593  )
8594  {
8595  switch (signal) {
8597  // Deserialize the data
8599  const Fw::SerializeStatus status = buffer.deserialize(value);
8600  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8601  // Assert no data left in buffer
8602  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8603  // Call the sendSignal function for sm and cmd_VALIDATE
8604  sm.sendSignal_cmd_VALIDATE(value);
8605  break;
8606  }
8608  // Deserialize the data
8610  const Fw::SerializeStatus status = buffer.deserialize(value);
8611  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8612  // Assert no data left in buffer
8613  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8614  // Call the sendSignal function for sm and cmd_RUN
8615  sm.sendSignal_cmd_RUN(value);
8616  break;
8617  }
8619  // Deserialize the data
8621  const Fw::SerializeStatus status = buffer.deserialize(value);
8622  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8623  // Assert no data left in buffer
8624  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8625  // Call the sendSignal function for sm and cmd_RUN_VALIDATED
8626  sm.sendSignal_cmd_RUN_VALIDATED(value);
8627  break;
8628  }
8630  // Assert no data left in buffer
8631  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8632  // Call the sendSignal function for sm and cmd_CANCEL
8633  sm.sendSignal_cmd_CANCEL();
8634  break;
8635  }
8637  // Deserialize the data
8639  const Fw::SerializeStatus status = buffer.deserialize(value);
8640  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8641  // Assert no data left in buffer
8642  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8643  // Call the sendSignal function for sm and cmd_DEBUG_SET_BREAKPOINT
8644  sm.sendSignal_cmd_DEBUG_SET_BREAKPOINT(value);
8645  break;
8646  }
8648  // Assert no data left in buffer
8649  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8650  // Call the sendSignal function for sm and cmd_DEBUG_CLEAR_BREAKPOINT
8651  sm.sendSignal_cmd_DEBUG_CLEAR_BREAKPOINT();
8652  break;
8653  }
8655  // Assert no data left in buffer
8656  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8657  // Call the sendSignal function for sm and result_failure
8658  sm.sendSignal_result_failure();
8659  break;
8660  }
8662  // Assert no data left in buffer
8663  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8664  // Call the sendSignal function for sm and result_success
8665  sm.sendSignal_result_success();
8666  break;
8667  }
8669  // Assert no data left in buffer
8670  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8671  // Call the sendSignal function for sm and entered
8672  sm.sendSignal_entered();
8673  break;
8674  }
8676  // Assert no data left in buffer
8677  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8678  // Call the sendSignal function for sm and result_dispatchStatement_success
8679  sm.sendSignal_result_dispatchStatement_success();
8680  break;
8681  }
8683  // Assert no data left in buffer
8684  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8685  // Call the sendSignal function for sm and result_dispatchStatement_failure
8686  sm.sendSignal_result_dispatchStatement_failure();
8687  break;
8688  }
8690  // Assert no data left in buffer
8691  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8692  // Call the sendSignal function for sm and result_dispatchStatement_noMoreStatements
8693  sm.sendSignal_result_dispatchStatement_noMoreStatements();
8694  break;
8695  }
8697  // Assert no data left in buffer
8698  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8699  // Call the sendSignal function for sm and checkTimersIn
8700  sm.sendSignal_checkTimersIn();
8701  break;
8702  }
8704  // Assert no data left in buffer
8705  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8706  // Call the sendSignal function for sm and result_checkShouldWake_wakeup
8707  sm.sendSignal_result_checkShouldWake_wakeup();
8708  break;
8709  }
8711  // Assert no data left in buffer
8712  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8713  // Call the sendSignal function for sm and result_checkShouldWake_keepSleeping
8714  sm.sendSignal_result_checkShouldWake_keepSleeping();
8715  break;
8716  }
8718  // Assert no data left in buffer
8719  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8720  // Call the sendSignal function for sm and result_timeOpFailed
8721  sm.sendSignal_result_timeOpFailed();
8722  break;
8723  }
8725  // Assert no data left in buffer
8726  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8727  // Call the sendSignal function for sm and stmtResponse_beginSleep
8728  sm.sendSignal_stmtResponse_beginSleep();
8729  break;
8730  }
8732  // Assert no data left in buffer
8733  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8734  // Call the sendSignal function for sm and stmtResponse_success
8735  sm.sendSignal_stmtResponse_success();
8736  break;
8737  }
8739  // Assert no data left in buffer
8740  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8741  // Call the sendSignal function for sm and stmtResponse_failure
8742  sm.sendSignal_stmtResponse_failure();
8743  break;
8744  }
8746  // Assert no data left in buffer
8747  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8748  // Call the sendSignal function for sm and stmtResponse_unexpected
8749  sm.sendSignal_stmtResponse_unexpected();
8750  break;
8751  }
8753  // Assert no data left in buffer
8754  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8755  // Call the sendSignal function for sm and stmtResponse_keepWaiting
8756  sm.sendSignal_stmtResponse_keepWaiting();
8757  break;
8758  }
8760  // Assert no data left in buffer
8761  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8762  // Call the sendSignal function for sm and result_checkStatementTimeout_statementTimeout
8763  sm.sendSignal_result_checkStatementTimeout_statementTimeout();
8764  break;
8765  }
8767  // Assert no data left in buffer
8768  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8769  // Call the sendSignal function for sm and result_checkStatementTimeout_noTimeout
8770  sm.sendSignal_result_checkStatementTimeout_noTimeout();
8771  break;
8772  }
8774  // Assert no data left in buffer
8775  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8776  // Call the sendSignal function for sm and cmd_DEBUG_CONTINUE
8777  sm.sendSignal_cmd_DEBUG_CONTINUE();
8778  break;
8779  }
8781  // Deserialize the data
8783  const Fw::SerializeStatus status = buffer.deserialize(value);
8784  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8785  // Assert no data left in buffer
8786  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8787  // Call the sendSignal function for sm and cmd_DEBUG_BREAK
8788  sm.sendSignal_cmd_DEBUG_BREAK(value);
8789  break;
8790  }
8791  default:
8792  FW_ASSERT(0, static_cast<FwAssertArgType>(signal));
8793  break;
8794  }
8795  }
8796 
8797  // ----------------------------------------------------------------------
8798  // Parameter set functions
8799  // ----------------------------------------------------------------------
8800 
8801  Fw::CmdResponse FpySequencerComponentBase ::
8802  paramSet_STATEMENT_TIMEOUT_SECS(Fw::SerializeBufferBase& val)
8803  {
8804  F32 _localVal{};
8805  const Fw::SerializeStatus _stat = val.deserialize(_localVal);
8806  if (_stat != Fw::FW_SERIALIZE_OK) {
8808  }
8809 
8810  // Assign value only if successfully deserialized
8811  this->m_paramLock.lock();
8812  this->m_STATEMENT_TIMEOUT_SECS = _localVal;
8813  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::VALID;
8814  this->m_paramLock.unLock();
8815 
8816  // Call notifier
8818  return Fw::CmdResponse::OK;
8819  }
8820 
8821  // ----------------------------------------------------------------------
8822  // Parameter save functions
8823  // ----------------------------------------------------------------------
8824 
8825  Fw::CmdResponse FpySequencerComponentBase ::
8826  paramSave_STATEMENT_TIMEOUT_SECS()
8827  {
8828  Fw::ParamBuffer _saveBuff;
8829  FwPrmIdType _id;
8830  Fw::SerializeStatus _stat;
8831  if (this->m_prmSet_OutputPort[0].isConnected()) {
8832  this->m_paramLock.lock();
8833 
8834  _stat = _saveBuff.serialize(m_STATEMENT_TIMEOUT_SECS);
8835 
8836  this->m_paramLock.unLock();
8837  if (_stat != Fw::FW_SERIALIZE_OK) {
8839  }
8840 
8841  _id = static_cast<FwPrmIdType>(this->getIdBase() + PARAMID_STATEMENT_TIMEOUT_SECS);
8842 
8843  // Save the parameter
8844  this->m_prmSet_OutputPort[0].invoke(
8845  _id,
8846  _saveBuff
8847  );
8848 
8849  return Fw::CmdResponse::OK;
8850  }
8851 
8853  }
8854 
8855 }
bool isConnected_tlmOut_OutputPort(FwIndexType portNum)
called in DEBUG_CONTINUE cmd. only raised in RUNNING.DEBUG_BROKEN state
Serialization/Deserialization operation was successful.
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
The size of the serial representations of the port arguments.
Definition: PingPortAc.hpp:36
void directive_setSerReg_internalInterfaceInvoke(const Svc::FpySequencer_SetSerRegDirective &directive)
Internal interface base-class function for directive_setSerReg.
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
void set_seqStartOut_OutputPort(FwIndexType portNum, Svc::InputCmdSeqInPort *port)
Connect port to seqStartOut[portNum].
void log_WARNING_HI_DirectiveTimedOut(U8 opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event DirectiveTimedOut.
void init()
Initialization function.
Definition: ComPortAc.cpp:137
virtual void DEBUG_SET_BREAKPOINT_preMsgHook(FwOpcodeType opCode, U32 cmdSeq)
Pre-message hook for command DEBUG_SET_BREAKPOINT.
virtual void directive_exit_internalInterfaceHandler(const Svc::FpySequencer_ExitDirective &directive)=0
Internal interface handler for directive_exit.
Fw::InputCmdResponsePort * get_cmdResponseIn_InputPort(FwIndexType portNum)
FwIdType FwOpcodeType
The type of a command opcode.
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_InsufficientBufferSpace(U64 bufferSize, const Fw::StringBase &filePath) const
Log event InsufficientBufferSpace.
PlatformSizeType FwSizeType
FwIndexType getNum_cmdResponseOut_OutputPorts() const
The size of the serial representation.
Status receive(U8 *destination, FwSizeType capacity, BlockingType blockType, FwSizeType &actualSize, FwQueuePriorityType &priority) override
receive a message from the queue through delegate
Definition: Queue.cpp:63
I32 FwEnumStoreType
void directive_deserSerReg_internalInterfaceInvoke(const Svc::FpySequencer_DeserSerRegDirective &directive)
Internal interface base-class function for directive_deserSerReg.
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.
virtual void directive_unaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_UnaryRegOpDirective &directive)=0
Internal interface handler for directive_unaryRegOp.
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
called when statement successfully executed. only raised in the RUNNING.AWAITING_CMD_RESPONSE state ...
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
performs a unary reg operation on src reg, and stores in res reg
Fw::TlmValid getTlmChan_out(FwIndexType portNum, FwChanIdType id, Fw::Time &timeTag, Fw::TlmBuffer &val)
Invoke output port getTlmChan.
void init()
Initialization function.
void init()
Initialization function.
Definition: CmdPortAc.cpp:56
void RUN_cmdHandlerBase(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdArgBuffer &args)
void set_seqDoneOut_OutputPort(FwIndexType portNum, Fw::InputCmdResponsePort *port)
Connect port to seqDoneOut[portNum].
void sequencer_sendSignal_cmd_DEBUG_SET_BREAKPOINT(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_SET_BREAKPOINT to state machine sequencer.
FwIdType FwPrmIdType
The type of a parameter identifier.
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.
Loads, validates and runs a sequence.
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 log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
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.
The size of the serial representations of the port arguments.
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
bool isConnected_seqStartOut_OutputPort(FwIndexType portNum)
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 directive_cmd_internalInterfaceHandler(const Svc::FpySequencer_CmdDirective &directive)=0
Internal interface handler for directive_cmd.
void log_WARNING_HI_DirectiveDeserializeError(U8 opcode, U32 stmtIdx, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event DirectiveDeserializeError.
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 tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
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].
void seqStartOut_out(FwIndexType portNum, const Fw::StringBase &filename)
Invoke output port seqStartOut.
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_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void log_WARNING_HI_ExtraBytesInSequence(U32 remaining) const
Log event ExtraBytesInSequence.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
FwIdType FwEventIdType
The type of an event identifier.
void regCommands()
Register commands with the Command Dispatcher.
void directive_setReg_internalInterfaceInvoke(const Svc::FpySequencer_SetRegDirective &directive)
Internal interface base-class function for directive_setReg.
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.
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)
void directive_unaryRegOp_internalInterfaceInvoke(const Svc::FpySequencer_UnaryRegOpDirective &directive)
Internal interface base-class function for directive_unaryRegOp.
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
virtual void directive_deserSerReg_internalInterfaceHandler(const Svc::FpySequencer_DeserSerRegDirective &directive)=0
Internal interface handler for directive_deserSerReg.
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].
The size of the serial representations of the port arguments.
Definition: CmdPortAc.hpp:38
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.
FwIdType FwChanIdType
The type of a telemetry channel identifier.
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.
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
Status send(const U8 *buffer, FwSizeType size, FwQueuePriorityType priority, BlockingType blockType) override
send a message into the queue through delegate
Definition: Queue.cpp:46
FpySequencerComponentBase(const char *compName="")
Construct FpySequencerComponentBase object.
void init()
Initialization function.
virtual void directive_setSerReg_internalInterfaceHandler(const Svc::FpySequencer_SetSerRegDirective &directive)=0
Internal interface handler for directive_setSerReg.
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)
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)
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
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 set_cmdRegOut_OutputPort(FwIndexType portNum, Fw::InputCmdRegPort *port)
Connect port to cmdRegOut[portNum].
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void sequencer_sendSignal_stmtResponse_beginSleep()
Send signal stmtResponse_beginSleep to state machine sequencer.
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 log_WARNING_HI_CommandTimedOut(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event CommandTimedOut.
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.
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 invoke(const Fw::StringBase &filename) const
Invoke a port interface.
void tlmWrite_LastDirectiveError(const Svc::FpySequencer_DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
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 setPortNum(FwIndexType portNum)
bool isConnected_seqDoneOut_OutputPort(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
virtual void directive_binaryRegOp_internalInterfaceHandler(const Svc::FpySequencer_BinaryRegOpDirective &directive)=0
Internal interface handler for directive_binaryRegOp.
void log_WARNING_HI_TooManySequenceStatements(U16 count, U16 max) const
Log event TooManySequenceStatements.
message to exit active component task
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
void seqDoneOut_out(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response)
Invoke output port seqDoneOut.
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.
virtual void directive_setReg_internalInterfaceHandler(const Svc::FpySequencer_SetRegDirective &directive)=0
Internal interface handler for directive_setReg.
PlatformQueuePriorityType FwQueuePriorityType
The type of queue priorities used.
Command had execution error.
Important informational events.
Must be called after VALIDATE. Runs the sequence that was validated.
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 sequencer_sendSignal_stmtResponse_keepWaiting()
Send signal stmtResponse_keepWaiting to state machine sequencer.
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.
The size of the serial representations of the port arguments.
Definition: SchedPortAc.hpp:36
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.
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 statement unsuccessfully executed. only raised in the RUNNING.AWAITING_CMD_RESPONSE s...
performs a binary reg operation on the lhs and rhs regs, and stores the result in the third register ...
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
The size of the serial representations of the port arguments.
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.
void addCallPort(InputCmdSeqInPort *callPort)
Register an input port.
void log_WARNING_HI_UnknownSequencerDirective(U8 opcode, U32 stmtIdx, const Fw::StringBase &filePath) const
Log event UnknownSequencerDirective.
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.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
bool isConnected_cmdRegOut_OutputPort(FwIndexType portNum)
void directive_getPrm_internalInterfaceInvoke(const Svc::FpySequencer_GetPrmDirective &directive)
Internal interface base-class function for directive_getPrm.
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
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.
void directive_exit_internalInterfaceInvoke(const Svc::FpySequencer_ExitDirective &directive)
Internal interface base-class function for directive_exit.
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 directive_binaryRegOp_internalInterfaceInvoke(const Svc::FpySequencer_BinaryRegOpDirective &directive)
Internal interface base-class function for directive_binaryRegOp.
called when the statement is telling the sequencer to await a later stmt response ...
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
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 directive_cmd_internalInterfaceInvoke(const Svc::FpySequencer_CmdDirective &directive)
Internal interface base-class function for directive_cmd.
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