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.deserializeTo(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.serializeFrom(
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.serializeFrom(portNum);
1749  FW_ASSERT(
1750  _status == Fw::FW_SERIALIZE_OK,
1751  static_cast<FwAssertArgType>(_status)
1752  );
1753 
1754  // Serialize argument context
1755  _status = msg.serializeFrom(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.serializeFrom(
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.serializeFrom(portNum);
1806  FW_ASSERT(
1807  _status == Fw::FW_SERIALIZE_OK,
1808  static_cast<FwAssertArgType>(_status)
1809  );
1810 
1811  // Serialize argument opCode
1812  _status = msg.serializeFrom(opCode);
1813  FW_ASSERT(
1814  _status == Fw::FW_SERIALIZE_OK,
1815  static_cast<FwAssertArgType>(_status)
1816  );
1817 
1818  // Serialize argument cmdSeq
1819  _status = msg.serializeFrom(cmdSeq);
1820  FW_ASSERT(
1821  _status == Fw::FW_SERIALIZE_OK,
1822  static_cast<FwAssertArgType>(_status)
1823  );
1824 
1825  // Serialize argument response
1826  _status = msg.serializeFrom(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.serializeFrom(
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.serializeFrom(portNum);
1873  FW_ASSERT(
1874  _status == Fw::FW_SERIALIZE_OK,
1875  static_cast<FwAssertArgType>(_status)
1876  );
1877 
1878  // Serialize argument key
1879  _status = msg.serializeFrom(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.serializeFrom(
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.serializeFrom(portNum);
1926  FW_ASSERT(
1927  _status == Fw::FW_SERIALIZE_OK,
1928  static_cast<FwAssertArgType>(_status)
1929  );
1930 
1931  // Serialize argument filename
1932  _status = filename.serializeTo(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.serializeFrom(
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.serializeFrom(portNum);
1979  FW_ASSERT(
1980  _status == Fw::FW_SERIALIZE_OK,
1981  static_cast<FwAssertArgType>(_status)
1982  );
1983 
1984  // Serialize argument context
1985  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2211  FW_ASSERT (
2212  _status == Fw::FW_SERIALIZE_OK,
2213  static_cast<FwAssertArgType>(_status)
2214  );
2215 
2216  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2247  FW_ASSERT (
2248  _status == Fw::FW_SERIALIZE_OK,
2249  static_cast<FwAssertArgType>(_status)
2250  );
2251 
2252  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2283  FW_ASSERT (
2284  _status == Fw::FW_SERIALIZE_OK,
2285  static_cast<FwAssertArgType>(_status)
2286  );
2287 
2288  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2319  FW_ASSERT (
2320  _status == Fw::FW_SERIALIZE_OK,
2321  static_cast<FwAssertArgType>(_status)
2322  );
2323 
2324  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2355  FW_ASSERT (
2356  _status == Fw::FW_SERIALIZE_OK,
2357  static_cast<FwAssertArgType>(_status)
2358  );
2359 
2360  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2391  FW_ASSERT (
2392  _status == Fw::FW_SERIALIZE_OK,
2393  static_cast<FwAssertArgType>(_status)
2394  );
2395 
2396  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2427  FW_ASSERT (
2428  _status == Fw::FW_SERIALIZE_OK,
2429  static_cast<FwAssertArgType>(_status)
2430  );
2431 
2432  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2463  FW_ASSERT (
2464  _status == Fw::FW_SERIALIZE_OK,
2465  static_cast<FwAssertArgType>(_status)
2466  );
2467 
2468  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2499  FW_ASSERT (
2500  _status == Fw::FW_SERIALIZE_OK,
2501  static_cast<FwAssertArgType>(_status)
2502  );
2503 
2504  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2535  FW_ASSERT (
2536  _status == Fw::FW_SERIALIZE_OK,
2537  static_cast<FwAssertArgType>(_status)
2538  );
2539 
2540  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2571  FW_ASSERT (
2572  _status == Fw::FW_SERIALIZE_OK,
2573  static_cast<FwAssertArgType>(_status)
2574  );
2575 
2576  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2607  FW_ASSERT (
2608  _status == Fw::FW_SERIALIZE_OK,
2609  static_cast<FwAssertArgType>(_status)
2610  );
2611 
2612  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2643  FW_ASSERT (
2644  _status == Fw::FW_SERIALIZE_OK,
2645  static_cast<FwAssertArgType>(_status)
2646  );
2647 
2648  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(static_cast<FwIndexType>(0));
2679  FW_ASSERT (
2680  _status == Fw::FW_SERIALIZE_OK,
2681  static_cast<FwAssertArgType>(_status)
2682  );
2683 
2684  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(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.serializeFrom(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.serializeFrom(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.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3026  FW_ASSERT (
3027  _status == Fw::FW_SERIALIZE_OK,
3028  static_cast<FwAssertArgType>(_status)
3029  );
3030 
3031  _status = msg.serializeFrom(opCode);
3032  FW_ASSERT (
3033  _status == Fw::FW_SERIALIZE_OK,
3034  static_cast<FwAssertArgType>(_status)
3035  );
3036 
3037  _status = msg.serializeFrom(cmdSeq);
3038  FW_ASSERT (
3039  _status == Fw::FW_SERIALIZE_OK,
3040  static_cast<FwAssertArgType>(_status)
3041  );
3042 
3043  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3085  FW_ASSERT (
3086  _status == Fw::FW_SERIALIZE_OK,
3087  static_cast<FwAssertArgType>(_status)
3088  );
3089 
3090  _status = msg.serializeFrom(opCode);
3091  FW_ASSERT (
3092  _status == Fw::FW_SERIALIZE_OK,
3093  static_cast<FwAssertArgType>(_status)
3094  );
3095 
3096  _status = msg.serializeFrom(cmdSeq);
3097  FW_ASSERT (
3098  _status == Fw::FW_SERIALIZE_OK,
3099  static_cast<FwAssertArgType>(_status)
3100  );
3101 
3102  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3144  FW_ASSERT (
3145  _status == Fw::FW_SERIALIZE_OK,
3146  static_cast<FwAssertArgType>(_status)
3147  );
3148 
3149  _status = msg.serializeFrom(opCode);
3150  FW_ASSERT (
3151  _status == Fw::FW_SERIALIZE_OK,
3152  static_cast<FwAssertArgType>(_status)
3153  );
3154 
3155  _status = msg.serializeFrom(cmdSeq);
3156  FW_ASSERT (
3157  _status == Fw::FW_SERIALIZE_OK,
3158  static_cast<FwAssertArgType>(_status)
3159  );
3160 
3161  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3203  FW_ASSERT (
3204  _status == Fw::FW_SERIALIZE_OK,
3205  static_cast<FwAssertArgType>(_status)
3206  );
3207 
3208  _status = msg.serializeFrom(opCode);
3209  FW_ASSERT (
3210  _status == Fw::FW_SERIALIZE_OK,
3211  static_cast<FwAssertArgType>(_status)
3212  );
3213 
3214  _status = msg.serializeFrom(cmdSeq);
3215  FW_ASSERT (
3216  _status == Fw::FW_SERIALIZE_OK,
3217  static_cast<FwAssertArgType>(_status)
3218  );
3219 
3220  _status = msg.serializeFrom(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
3244  this->DEBUG_SET_BREAKPOINT_preMsgHook(opCode,cmdSeq);
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.serializeFrom(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.serializeFrom(port);
3262  FW_ASSERT (
3263  _status == Fw::FW_SERIALIZE_OK,
3264  static_cast<FwAssertArgType>(_status)
3265  );
3266 
3267  _status = msg.serializeFrom(opCode);
3268  FW_ASSERT (
3269  _status == Fw::FW_SERIALIZE_OK,
3270  static_cast<FwAssertArgType>(_status)
3271  );
3272 
3273  _status = msg.serializeFrom(cmdSeq);
3274  FW_ASSERT (
3275  _status == Fw::FW_SERIALIZE_OK,
3276  static_cast<FwAssertArgType>(_status)
3277  );
3278 
3279  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3321  FW_ASSERT (
3322  _status == Fw::FW_SERIALIZE_OK,
3323  static_cast<FwAssertArgType>(_status)
3324  );
3325 
3326  _status = msg.serializeFrom(opCode);
3327  FW_ASSERT (
3328  _status == Fw::FW_SERIALIZE_OK,
3329  static_cast<FwAssertArgType>(_status)
3330  );
3331 
3332  _status = msg.serializeFrom(cmdSeq);
3333  FW_ASSERT (
3334  _status == Fw::FW_SERIALIZE_OK,
3335  static_cast<FwAssertArgType>(_status)
3336  );
3337 
3338  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(port);
3380  FW_ASSERT (
3381  _status == Fw::FW_SERIALIZE_OK,
3382  static_cast<FwAssertArgType>(_status)
3383  );
3384 
3385  _status = msg.serializeFrom(opCode);
3386  FW_ASSERT (
3387  _status == Fw::FW_SERIALIZE_OK,
3388  static_cast<FwAssertArgType>(_status)
3389  );
3390 
3391  _status = msg.serializeFrom(cmdSeq);
3392  FW_ASSERT (
3393  _status == Fw::FW_SERIALIZE_OK,
3394  static_cast<FwAssertArgType>(_status)
3395  );
3396 
3397  _status = msg.serializeFrom(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
3421  this->DEBUG_CLEAR_BREAKPOINT_preMsgHook(opCode,cmdSeq);
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.serializeFrom(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.serializeFrom(port);
3439  FW_ASSERT (
3440  _status == Fw::FW_SERIALIZE_OK,
3441  static_cast<FwAssertArgType>(_status)
3442  );
3443 
3444  _status = msg.serializeFrom(opCode);
3445  FW_ASSERT (
3446  _status == Fw::FW_SERIALIZE_OK,
3447  static_cast<FwAssertArgType>(_status)
3448  );
3449 
3450  _status = msg.serializeFrom(cmdSeq);
3451  FW_ASSERT (
3452  _status == Fw::FW_SERIALIZE_OK,
3453  static_cast<FwAssertArgType>(_status)
3454  );
3455 
3456  _status = msg.serializeFrom(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.serializeFrom(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.serializeFrom(
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.serializeFrom(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 execute command in state %" PRIi32 "";
3629 #else
3630  const char* _formatString =
3631  "%s: Cannot execute 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.serializeFrom(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.serializeFrom(
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.serializeFrom(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.serializeFrom(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.serializeTo(_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.serializeFrom(
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.serializeFrom(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 
3831  const Fw::StringBase& filePath,
3832  I32 errorCode
3833  ) const
3834  {
3835  // Get the time
3836  Fw::Time _logTime;
3837  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3838  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3839  }
3840 
3841  FwEventIdType _id = static_cast<FwEventIdType>(0);
3842 
3843  _id = this->getIdBase() + EVENTID_FILEREADERROR;
3844 
3845  // Emit the event on the log port
3846  if (this->m_logOut_OutputPort[0].isConnected()) {
3847  Fw::LogBuffer _logBuff;
3849 
3850 #if FW_AMPCS_COMPATIBLE
3851  // Serialize the number of arguments
3852  _status = _logBuff.serializeFrom(static_cast<U8>(3));
3853  FW_ASSERT(
3854  _status == Fw::FW_SERIALIZE_OK,
3855  static_cast<FwAssertArgType>(_status)
3856  );
3857 #endif
3858 
3859 #if FW_AMPCS_COMPATIBLE
3860  // Serialize the argument size
3861  _status = _logBuff.serializeFrom(
3863  );
3864  FW_ASSERT(
3865  _status == Fw::FW_SERIALIZE_OK,
3866  static_cast<FwAssertArgType>(_status)
3867  );
3868 #endif
3869  _status = _logBuff.serializeFrom(readStage);
3870  FW_ASSERT(
3871  _status == Fw::FW_SERIALIZE_OK,
3872  static_cast<FwAssertArgType>(_status)
3873  );
3874 
3875  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3876  FW_ASSERT(
3877  _status == Fw::FW_SERIALIZE_OK,
3878  static_cast<FwAssertArgType>(_status)
3879  );
3880 
3881 #if FW_AMPCS_COMPATIBLE
3882  // Serialize the argument size
3883  _status = _logBuff.serializeFrom(
3884  static_cast<U8>(sizeof(I32))
3885  );
3886  FW_ASSERT(
3887  _status == Fw::FW_SERIALIZE_OK,
3888  static_cast<FwAssertArgType>(_status)
3889  );
3890 #endif
3891  _status = _logBuff.serializeFrom(errorCode);
3892  FW_ASSERT(
3893  _status == Fw::FW_SERIALIZE_OK,
3894  static_cast<FwAssertArgType>(_status)
3895  );
3896 
3897  this->m_logOut_OutputPort[0].invoke(
3898  _id,
3899  _logTime,
3901  _logBuff
3902  );
3903  }
3904 
3905  // Emit the event on the text log port
3906 #if FW_ENABLE_TEXT_LOGGING
3907  if (this->m_logTextOut_OutputPort[0].isConnected()) {
3908 #if FW_OBJECT_NAMES == 1
3909  const char* _formatString =
3910  "(%s) %s: File read error encountered while reading %s of file %s: %" PRIi32 "";
3911 #else
3912  const char* _formatString =
3913  "%s: File read error encountered while reading %s of file %s: %" PRIi32 "";
3914 #endif
3915 
3916  Fw::String readStageStr;
3917  readStage.toString(readStageStr);
3918 
3919  Fw::TextLogString _logString;
3920  _logString.format(
3921  _formatString,
3922 #if FW_OBJECT_NAMES == 1
3923  this->m_objName.toChar(),
3924 #endif
3925  "FileReadError ",
3926  readStageStr.toChar(),
3927  filePath.toChar(),
3928  errorCode
3929  );
3930 
3931  this->m_logTextOut_OutputPort[0].invoke(
3932  _id,
3933  _logTime,
3935  _logString
3936  );
3937  }
3938 #endif
3939  }
3940 
3944  const Fw::StringBase& filePath
3945  ) const
3946  {
3947  // Get the time
3948  Fw::Time _logTime;
3949  if (this->m_timeCaller_OutputPort[0].isConnected()) {
3950  this->m_timeCaller_OutputPort[0].invoke(_logTime);
3951  }
3952 
3953  FwEventIdType _id = static_cast<FwEventIdType>(0);
3954 
3955  _id = this->getIdBase() + EVENTID_ENDOFFILEERROR;
3956 
3957  // Emit the event on the log port
3958  if (this->m_logOut_OutputPort[0].isConnected()) {
3959  Fw::LogBuffer _logBuff;
3961 
3962 #if FW_AMPCS_COMPATIBLE
3963  // Serialize the number of arguments
3964  _status = _logBuff.serializeFrom(static_cast<U8>(2));
3965  FW_ASSERT(
3966  _status == Fw::FW_SERIALIZE_OK,
3967  static_cast<FwAssertArgType>(_status)
3968  );
3969 #endif
3970 
3971 #if FW_AMPCS_COMPATIBLE
3972  // Serialize the argument size
3973  _status = _logBuff.serializeFrom(
3975  );
3976  FW_ASSERT(
3977  _status == Fw::FW_SERIALIZE_OK,
3978  static_cast<FwAssertArgType>(_status)
3979  );
3980 #endif
3981  _status = _logBuff.serializeFrom(readStage);
3982  FW_ASSERT(
3983  _status == Fw::FW_SERIALIZE_OK,
3984  static_cast<FwAssertArgType>(_status)
3985  );
3986 
3987  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
3988  FW_ASSERT(
3989  _status == Fw::FW_SERIALIZE_OK,
3990  static_cast<FwAssertArgType>(_status)
3991  );
3992 
3993  this->m_logOut_OutputPort[0].invoke(
3994  _id,
3995  _logTime,
3997  _logBuff
3998  );
3999  }
4000 
4001  // Emit the event on the text log port
4002 #if FW_ENABLE_TEXT_LOGGING
4003  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4004 #if FW_OBJECT_NAMES == 1
4005  const char* _formatString =
4006  "(%s) %s: End of file encountered unexpectedly while reading %s of file %s";
4007 #else
4008  const char* _formatString =
4009  "%s: End of file encountered unexpectedly while reading %s of file %s";
4010 #endif
4011 
4012  Fw::String readStageStr;
4013  readStage.toString(readStageStr);
4014 
4015  Fw::TextLogString _logString;
4016  _logString.format(
4017  _formatString,
4018 #if FW_OBJECT_NAMES == 1
4019  this->m_objName.toChar(),
4020 #endif
4021  "EndOfFileError ",
4022  readStageStr.toChar(),
4023  filePath.toChar()
4024  );
4025 
4026  this->m_logTextOut_OutputPort[0].invoke(
4027  _id,
4028  _logTime,
4030  _logString
4031  );
4032  }
4033 #endif
4034  }
4035 
4039  const Fw::StringBase& filePath,
4040  I32 errorCode,
4041  U64 buffLeft,
4042  U64 buffLength
4043  ) const
4044  {
4045  // Get the time
4046  Fw::Time _logTime;
4047  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4048  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4049  }
4050 
4051  FwEventIdType _id = static_cast<FwEventIdType>(0);
4052 
4054 
4055  // Emit the event on the log port
4056  if (this->m_logOut_OutputPort[0].isConnected()) {
4057  Fw::LogBuffer _logBuff;
4059 
4060 #if FW_AMPCS_COMPATIBLE
4061  // Serialize the number of arguments
4062  _status = _logBuff.serializeFrom(static_cast<U8>(5));
4063  FW_ASSERT(
4064  _status == Fw::FW_SERIALIZE_OK,
4065  static_cast<FwAssertArgType>(_status)
4066  );
4067 #endif
4068 
4069 #if FW_AMPCS_COMPATIBLE
4070  // Serialize the argument size
4071  _status = _logBuff.serializeFrom(
4073  );
4074  FW_ASSERT(
4075  _status == Fw::FW_SERIALIZE_OK,
4076  static_cast<FwAssertArgType>(_status)
4077  );
4078 #endif
4079  _status = _logBuff.serializeFrom(readStage);
4080  FW_ASSERT(
4081  _status == Fw::FW_SERIALIZE_OK,
4082  static_cast<FwAssertArgType>(_status)
4083  );
4084 
4085  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4086  FW_ASSERT(
4087  _status == Fw::FW_SERIALIZE_OK,
4088  static_cast<FwAssertArgType>(_status)
4089  );
4090 
4091 #if FW_AMPCS_COMPATIBLE
4092  // Serialize the argument size
4093  _status = _logBuff.serializeFrom(
4094  static_cast<U8>(sizeof(I32))
4095  );
4096  FW_ASSERT(
4097  _status == Fw::FW_SERIALIZE_OK,
4098  static_cast<FwAssertArgType>(_status)
4099  );
4100 #endif
4101  _status = _logBuff.serializeFrom(errorCode);
4102  FW_ASSERT(
4103  _status == Fw::FW_SERIALIZE_OK,
4104  static_cast<FwAssertArgType>(_status)
4105  );
4106 
4107 #if FW_AMPCS_COMPATIBLE
4108  // Serialize the argument size
4109  _status = _logBuff.serializeFrom(
4110  static_cast<U8>(sizeof(U64))
4111  );
4112  FW_ASSERT(
4113  _status == Fw::FW_SERIALIZE_OK,
4114  static_cast<FwAssertArgType>(_status)
4115  );
4116 #endif
4117  _status = _logBuff.serializeFrom(buffLeft);
4118  FW_ASSERT(
4119  _status == Fw::FW_SERIALIZE_OK,
4120  static_cast<FwAssertArgType>(_status)
4121  );
4122 
4123 #if FW_AMPCS_COMPATIBLE
4124  // Serialize the argument size
4125  _status = _logBuff.serializeFrom(
4126  static_cast<U8>(sizeof(U64))
4127  );
4128  FW_ASSERT(
4129  _status == Fw::FW_SERIALIZE_OK,
4130  static_cast<FwAssertArgType>(_status)
4131  );
4132 #endif
4133  _status = _logBuff.serializeFrom(buffLength);
4134  FW_ASSERT(
4135  _status == Fw::FW_SERIALIZE_OK,
4136  static_cast<FwAssertArgType>(_status)
4137  );
4138 
4139  this->m_logOut_OutputPort[0].invoke(
4140  _id,
4141  _logTime,
4143  _logBuff
4144  );
4145  }
4146 
4147  // Emit the event on the text log port
4148 #if FW_ENABLE_TEXT_LOGGING
4149  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4150 #if FW_OBJECT_NAMES == 1
4151  const char* _formatString =
4152  "(%s) %s: Deserialize error encountered while reading %s of file %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
4153 #else
4154  const char* _formatString =
4155  "%s: Deserialize error encountered while reading %s of file %s: %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
4156 #endif
4157 
4158  Fw::String readStageStr;
4159  readStage.toString(readStageStr);
4160 
4161  Fw::TextLogString _logString;
4162  _logString.format(
4163  _formatString,
4164 #if FW_OBJECT_NAMES == 1
4165  this->m_objName.toChar(),
4166 #endif
4167  "FileReadDeserializeError ",
4168  readStageStr.toChar(),
4169  filePath.toChar(),
4170  errorCode,
4171  buffLeft,
4172  buffLength
4173  );
4174 
4175  this->m_logTextOut_OutputPort[0].invoke(
4176  _id,
4177  _logTime,
4179  _logString
4180  );
4181  }
4182 #endif
4183  }
4184 
4187  U8 expected,
4188  U8 actual
4189  ) const
4190  {
4191  // Get the time
4192  Fw::Time _logTime;
4193  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4194  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4195  }
4196 
4197  FwEventIdType _id = static_cast<FwEventIdType>(0);
4198 
4199  _id = this->getIdBase() + EVENTID_WRONGSCHEMAVERSION;
4200 
4201  // Emit the event on the log port
4202  if (this->m_logOut_OutputPort[0].isConnected()) {
4203  Fw::LogBuffer _logBuff;
4205 
4206 #if FW_AMPCS_COMPATIBLE
4207  // Serialize the number of arguments
4208  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4209  FW_ASSERT(
4210  _status == Fw::FW_SERIALIZE_OK,
4211  static_cast<FwAssertArgType>(_status)
4212  );
4213 #endif
4214 
4215 #if FW_AMPCS_COMPATIBLE
4216  // Serialize the argument size
4217  _status = _logBuff.serializeFrom(
4218  static_cast<U8>(sizeof(U8))
4219  );
4220  FW_ASSERT(
4221  _status == Fw::FW_SERIALIZE_OK,
4222  static_cast<FwAssertArgType>(_status)
4223  );
4224 #endif
4225  _status = _logBuff.serializeFrom(expected);
4226  FW_ASSERT(
4227  _status == Fw::FW_SERIALIZE_OK,
4228  static_cast<FwAssertArgType>(_status)
4229  );
4230 
4231 #if FW_AMPCS_COMPATIBLE
4232  // Serialize the argument size
4233  _status = _logBuff.serializeFrom(
4234  static_cast<U8>(sizeof(U8))
4235  );
4236  FW_ASSERT(
4237  _status == Fw::FW_SERIALIZE_OK,
4238  static_cast<FwAssertArgType>(_status)
4239  );
4240 #endif
4241  _status = _logBuff.serializeFrom(actual);
4242  FW_ASSERT(
4243  _status == Fw::FW_SERIALIZE_OK,
4244  static_cast<FwAssertArgType>(_status)
4245  );
4246 
4247  this->m_logOut_OutputPort[0].invoke(
4248  _id,
4249  _logTime,
4251  _logBuff
4252  );
4253  }
4254 
4255  // Emit the event on the text log port
4256 #if FW_ENABLE_TEXT_LOGGING
4257  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4258 #if FW_OBJECT_NAMES == 1
4259  const char* _formatString =
4260  "(%s) %s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
4261 #else
4262  const char* _formatString =
4263  "%s: Expected schema version %" PRIu8 ", found %" PRIu8 "";
4264 #endif
4265 
4266  Fw::TextLogString _logString;
4267  _logString.format(
4268  _formatString,
4269 #if FW_OBJECT_NAMES == 1
4270  this->m_objName.toChar(),
4271 #endif
4272  "WrongSchemaVersion ",
4273  expected,
4274  actual
4275  );
4276 
4277  this->m_logTextOut_OutputPort[0].invoke(
4278  _id,
4279  _logTime,
4281  _logString
4282  );
4283  }
4284 #endif
4285  }
4286 
4289  U32 expected,
4290  U32 actual
4291  ) const
4292  {
4293  // Get the time
4294  Fw::Time _logTime;
4295  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4296  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4297  }
4298 
4299  FwEventIdType _id = static_cast<FwEventIdType>(0);
4300 
4301  _id = this->getIdBase() + EVENTID_WRONGCRC;
4302 
4303  // Emit the event on the log port
4304  if (this->m_logOut_OutputPort[0].isConnected()) {
4305  Fw::LogBuffer _logBuff;
4307 
4308 #if FW_AMPCS_COMPATIBLE
4309  // Serialize the number of arguments
4310  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4311  FW_ASSERT(
4312  _status == Fw::FW_SERIALIZE_OK,
4313  static_cast<FwAssertArgType>(_status)
4314  );
4315 #endif
4316 
4317 #if FW_AMPCS_COMPATIBLE
4318  // Serialize the argument size
4319  _status = _logBuff.serializeFrom(
4320  static_cast<U8>(sizeof(U32))
4321  );
4322  FW_ASSERT(
4323  _status == Fw::FW_SERIALIZE_OK,
4324  static_cast<FwAssertArgType>(_status)
4325  );
4326 #endif
4327  _status = _logBuff.serializeFrom(expected);
4328  FW_ASSERT(
4329  _status == Fw::FW_SERIALIZE_OK,
4330  static_cast<FwAssertArgType>(_status)
4331  );
4332 
4333 #if FW_AMPCS_COMPATIBLE
4334  // Serialize the argument size
4335  _status = _logBuff.serializeFrom(
4336  static_cast<U8>(sizeof(U32))
4337  );
4338  FW_ASSERT(
4339  _status == Fw::FW_SERIALIZE_OK,
4340  static_cast<FwAssertArgType>(_status)
4341  );
4342 #endif
4343  _status = _logBuff.serializeFrom(actual);
4344  FW_ASSERT(
4345  _status == Fw::FW_SERIALIZE_OK,
4346  static_cast<FwAssertArgType>(_status)
4347  );
4348 
4349  this->m_logOut_OutputPort[0].invoke(
4350  _id,
4351  _logTime,
4353  _logBuff
4354  );
4355  }
4356 
4357  // Emit the event on the text log port
4358 #if FW_ENABLE_TEXT_LOGGING
4359  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4360 #if FW_OBJECT_NAMES == 1
4361  const char* _formatString =
4362  "(%s) %s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
4363 #else
4364  const char* _formatString =
4365  "%s: Expected CRC %" PRIu32 ", actual was %" PRIu32 "";
4366 #endif
4367 
4368  Fw::TextLogString _logString;
4369  _logString.format(
4370  _formatString,
4371 #if FW_OBJECT_NAMES == 1
4372  this->m_objName.toChar(),
4373 #endif
4374  "WrongCRC ",
4375  expected,
4376  actual
4377  );
4378 
4379  this->m_logTextOut_OutputPort[0].invoke(
4380  _id,
4381  _logTime,
4383  _logString
4384  );
4385  }
4386 #endif
4387  }
4388 
4391  {
4392  // Get the time
4393  Fw::Time _logTime;
4394  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4395  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4396  }
4397 
4398  FwEventIdType _id = static_cast<FwEventIdType>(0);
4399 
4400  _id = this->getIdBase() + EVENTID_EXTRABYTESINSEQUENCE;
4401 
4402  // Emit the event on the log port
4403  if (this->m_logOut_OutputPort[0].isConnected()) {
4404  Fw::LogBuffer _logBuff;
4406 
4407 #if FW_AMPCS_COMPATIBLE
4408  // Serialize the number of arguments
4409  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4410  FW_ASSERT(
4411  _status == Fw::FW_SERIALIZE_OK,
4412  static_cast<FwAssertArgType>(_status)
4413  );
4414 #endif
4415 
4416 #if FW_AMPCS_COMPATIBLE
4417  // Serialize the argument size
4418  _status = _logBuff.serializeFrom(
4419  static_cast<U8>(sizeof(U32))
4420  );
4421  FW_ASSERT(
4422  _status == Fw::FW_SERIALIZE_OK,
4423  static_cast<FwAssertArgType>(_status)
4424  );
4425 #endif
4426  _status = _logBuff.serializeFrom(remaining);
4427  FW_ASSERT(
4428  _status == Fw::FW_SERIALIZE_OK,
4429  static_cast<FwAssertArgType>(_status)
4430  );
4431 
4432  this->m_logOut_OutputPort[0].invoke(
4433  _id,
4434  _logTime,
4436  _logBuff
4437  );
4438  }
4439 
4440  // Emit the event on the text log port
4441 #if FW_ENABLE_TEXT_LOGGING
4442  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4443 #if FW_OBJECT_NAMES == 1
4444  const char* _formatString =
4445  "(%s) %s: File had %" PRIu32 " extra bytes at the end";
4446 #else
4447  const char* _formatString =
4448  "%s: File had %" PRIu32 " extra bytes at the end";
4449 #endif
4450 
4451  Fw::TextLogString _logString;
4452  _logString.format(
4453  _formatString,
4454 #if FW_OBJECT_NAMES == 1
4455  this->m_objName.toChar(),
4456 #endif
4457  "ExtraBytesInSequence ",
4458  remaining
4459  );
4460 
4461  this->m_logTextOut_OutputPort[0].invoke(
4462  _id,
4463  _logTime,
4465  _logString
4466  );
4467  }
4468 #endif
4469  }
4470 
4473  U64 bufferSize,
4474  const Fw::StringBase& filePath
4475  ) const
4476  {
4477  // Get the time
4478  Fw::Time _logTime;
4479  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4480  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4481  }
4482 
4483  FwEventIdType _id = static_cast<FwEventIdType>(0);
4484 
4486 
4487  // Emit the event on the log port
4488  if (this->m_logOut_OutputPort[0].isConnected()) {
4489  Fw::LogBuffer _logBuff;
4491 
4492 #if FW_AMPCS_COMPATIBLE
4493  // Serialize the number of arguments
4494  _status = _logBuff.serializeFrom(static_cast<U8>(2));
4495  FW_ASSERT(
4496  _status == Fw::FW_SERIALIZE_OK,
4497  static_cast<FwAssertArgType>(_status)
4498  );
4499 #endif
4500 
4501 #if FW_AMPCS_COMPATIBLE
4502  // Serialize the argument size
4503  _status = _logBuff.serializeFrom(
4504  static_cast<U8>(sizeof(U64))
4505  );
4506  FW_ASSERT(
4507  _status == Fw::FW_SERIALIZE_OK,
4508  static_cast<FwAssertArgType>(_status)
4509  );
4510 #endif
4511  _status = _logBuff.serializeFrom(bufferSize);
4512  FW_ASSERT(
4513  _status == Fw::FW_SERIALIZE_OK,
4514  static_cast<FwAssertArgType>(_status)
4515  );
4516 
4517  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4518  FW_ASSERT(
4519  _status == Fw::FW_SERIALIZE_OK,
4520  static_cast<FwAssertArgType>(_status)
4521  );
4522 
4523  this->m_logOut_OutputPort[0].invoke(
4524  _id,
4525  _logTime,
4527  _logBuff
4528  );
4529  }
4530 
4531  // Emit the event on the text log port
4532 #if FW_ENABLE_TEXT_LOGGING
4533  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4534 #if FW_OBJECT_NAMES == 1
4535  const char* _formatString =
4536  "(%s) %s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4537 #else
4538  const char* _formatString =
4539  "%s: Buffer capacity of %" PRIu64 " was not big enough for sequence %s";
4540 #endif
4541 
4542  Fw::TextLogString _logString;
4543  _logString.format(
4544  _formatString,
4545 #if FW_OBJECT_NAMES == 1
4546  this->m_objName.toChar(),
4547 #endif
4548  "InsufficientBufferSpace ",
4549  bufferSize,
4550  filePath.toChar()
4551  );
4552 
4553  this->m_logTextOut_OutputPort[0].invoke(
4554  _id,
4555  _logTime,
4557  _logString
4558  );
4559  }
4560 #endif
4561  }
4562 
4565  FwOpcodeType opCode,
4566  U32 stmtIdx,
4567  const Fw::StringBase& filePath,
4568  Fw::CmdResponse response
4569  ) const
4570  {
4571  // Get the time
4572  Fw::Time _logTime;
4573  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4574  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4575  }
4576 
4577  FwEventIdType _id = static_cast<FwEventIdType>(0);
4578 
4579  _id = this->getIdBase() + EVENTID_COMMANDFAILED;
4580 
4581  // Emit the event on the log port
4582  if (this->m_logOut_OutputPort[0].isConnected()) {
4583  Fw::LogBuffer _logBuff;
4585 
4586 #if FW_AMPCS_COMPATIBLE
4587  // Serialize the number of arguments
4588  _status = _logBuff.serializeFrom(static_cast<U8>(4));
4589  FW_ASSERT(
4590  _status == Fw::FW_SERIALIZE_OK,
4591  static_cast<FwAssertArgType>(_status)
4592  );
4593 #endif
4594 
4595 #if FW_AMPCS_COMPATIBLE
4596  // Serialize the argument size
4597  _status = _logBuff.serializeFrom(
4598  static_cast<U8>(sizeof(FwOpcodeType))
4599  );
4600  FW_ASSERT(
4601  _status == Fw::FW_SERIALIZE_OK,
4602  static_cast<FwAssertArgType>(_status)
4603  );
4604 #endif
4605  _status = _logBuff.serializeFrom(opCode);
4606  FW_ASSERT(
4607  _status == Fw::FW_SERIALIZE_OK,
4608  static_cast<FwAssertArgType>(_status)
4609  );
4610 
4611 #if FW_AMPCS_COMPATIBLE
4612  // Serialize the argument size
4613  _status = _logBuff.serializeFrom(
4614  static_cast<U8>(sizeof(U32))
4615  );
4616  FW_ASSERT(
4617  _status == Fw::FW_SERIALIZE_OK,
4618  static_cast<FwAssertArgType>(_status)
4619  );
4620 #endif
4621  _status = _logBuff.serializeFrom(stmtIdx);
4622  FW_ASSERT(
4623  _status == Fw::FW_SERIALIZE_OK,
4624  static_cast<FwAssertArgType>(_status)
4625  );
4626 
4627  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4628  FW_ASSERT(
4629  _status == Fw::FW_SERIALIZE_OK,
4630  static_cast<FwAssertArgType>(_status)
4631  );
4632 
4633 #if FW_AMPCS_COMPATIBLE
4634  // Serialize the argument size
4635  _status = _logBuff.serializeFrom(
4636  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
4637  );
4638  FW_ASSERT(
4639  _status == Fw::FW_SERIALIZE_OK,
4640  static_cast<FwAssertArgType>(_status)
4641  );
4642 #endif
4643  _status = _logBuff.serializeFrom(response);
4644  FW_ASSERT(
4645  _status == Fw::FW_SERIALIZE_OK,
4646  static_cast<FwAssertArgType>(_status)
4647  );
4648 
4649  this->m_logOut_OutputPort[0].invoke(
4650  _id,
4651  _logTime,
4653  _logBuff
4654  );
4655  }
4656 
4657  // Emit the event on the text log port
4658 #if FW_ENABLE_TEXT_LOGGING
4659  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4660 #if FW_OBJECT_NAMES == 1
4661  const char* _formatString =
4662  "(%s) %s: Failed to execute command opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4663 #else
4664  const char* _formatString =
4665  "%s: Failed to execute command opcode %" PRIu32 " index %" PRIu32 " in sequence file %s: response was %s";
4666 #endif
4667 
4668  Fw::String responseStr;
4669  response.toString(responseStr);
4670 
4671  Fw::TextLogString _logString;
4672  _logString.format(
4673  _formatString,
4674 #if FW_OBJECT_NAMES == 1
4675  this->m_objName.toChar(),
4676 #endif
4677  "CommandFailed ",
4678  opCode,
4679  stmtIdx,
4680  filePath.toChar(),
4681  responseStr.toChar()
4682  );
4683 
4684  this->m_logTextOut_OutputPort[0].invoke(
4685  _id,
4686  _logTime,
4688  _logString
4689  );
4690  }
4691 #endif
4692  }
4693 
4696  {
4697  // Get the time
4698  Fw::Time _logTime;
4699  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4700  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4701  }
4702 
4703  FwEventIdType _id = static_cast<FwEventIdType>(0);
4704 
4705  _id = this->getIdBase() + EVENTID_SEQUENCEDONE;
4706 
4707  // Emit the event on the log port
4708  if (this->m_logOut_OutputPort[0].isConnected()) {
4709  Fw::LogBuffer _logBuff;
4711 
4712 #if FW_AMPCS_COMPATIBLE
4713  // Serialize the number of arguments
4714  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4715  FW_ASSERT(
4716  _status == Fw::FW_SERIALIZE_OK,
4717  static_cast<FwAssertArgType>(_status)
4718  );
4719 #endif
4720 
4721  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4722  FW_ASSERT(
4723  _status == Fw::FW_SERIALIZE_OK,
4724  static_cast<FwAssertArgType>(_status)
4725  );
4726 
4727  this->m_logOut_OutputPort[0].invoke(
4728  _id,
4729  _logTime,
4731  _logBuff
4732  );
4733  }
4734 
4735  // Emit the event on the text log port
4736 #if FW_ENABLE_TEXT_LOGGING
4737  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4738 #if FW_OBJECT_NAMES == 1
4739  const char* _formatString =
4740  "(%s) %s: Completed sequence file %s";
4741 #else
4742  const char* _formatString =
4743  "%s: Completed sequence file %s";
4744 #endif
4745 
4746  Fw::TextLogString _logString;
4747  _logString.format(
4748  _formatString,
4749 #if FW_OBJECT_NAMES == 1
4750  this->m_objName.toChar(),
4751 #endif
4752  "SequenceDone ",
4753  filePath.toChar()
4754  );
4755 
4756  this->m_logTextOut_OutputPort[0].invoke(
4757  _id,
4758  _logTime,
4760  _logString
4761  );
4762  }
4763 #endif
4764  }
4765 
4768  {
4769  // Get the time
4770  Fw::Time _logTime;
4771  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4772  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4773  }
4774 
4775  FwEventIdType _id = static_cast<FwEventIdType>(0);
4776 
4777  _id = this->getIdBase() + EVENTID_SEQUENCECANCELLED;
4778 
4779  // Emit the event on the log port
4780  if (this->m_logOut_OutputPort[0].isConnected()) {
4781  Fw::LogBuffer _logBuff;
4783 
4784 #if FW_AMPCS_COMPATIBLE
4785  // Serialize the number of arguments
4786  _status = _logBuff.serializeFrom(static_cast<U8>(1));
4787  FW_ASSERT(
4788  _status == Fw::FW_SERIALIZE_OK,
4789  static_cast<FwAssertArgType>(_status)
4790  );
4791 #endif
4792 
4793  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4794  FW_ASSERT(
4795  _status == Fw::FW_SERIALIZE_OK,
4796  static_cast<FwAssertArgType>(_status)
4797  );
4798 
4799  this->m_logOut_OutputPort[0].invoke(
4800  _id,
4801  _logTime,
4803  _logBuff
4804  );
4805  }
4806 
4807  // Emit the event on the text log port
4808 #if FW_ENABLE_TEXT_LOGGING
4809  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4810 #if FW_OBJECT_NAMES == 1
4811  const char* _formatString =
4812  "(%s) %s: Cancelled sequence file %s";
4813 #else
4814  const char* _formatString =
4815  "%s: Cancelled sequence file %s";
4816 #endif
4817 
4818  Fw::TextLogString _logString;
4819  _logString.format(
4820  _formatString,
4821 #if FW_OBJECT_NAMES == 1
4822  this->m_objName.toChar(),
4823 #endif
4824  "SequenceCancelled ",
4825  filePath.toChar()
4826  );
4827 
4828  this->m_logTextOut_OutputPort[0].invoke(
4829  _id,
4830  _logTime,
4832  _logString
4833  );
4834  }
4835 #endif
4836  }
4837 
4840  U8 opcode,
4841  U32 stmtIdx,
4842  const Fw::StringBase& filePath
4843  ) const
4844  {
4845  // Get the time
4846  Fw::Time _logTime;
4847  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4848  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4849  }
4850 
4851  FwEventIdType _id = static_cast<FwEventIdType>(0);
4852 
4854 
4855  // Emit the event on the log port
4856  if (this->m_logOut_OutputPort[0].isConnected()) {
4857  Fw::LogBuffer _logBuff;
4859 
4860 #if FW_AMPCS_COMPATIBLE
4861  // Serialize the number of arguments
4862  _status = _logBuff.serializeFrom(static_cast<U8>(3));
4863  FW_ASSERT(
4864  _status == Fw::FW_SERIALIZE_OK,
4865  static_cast<FwAssertArgType>(_status)
4866  );
4867 #endif
4868 
4869 #if FW_AMPCS_COMPATIBLE
4870  // Serialize the argument size
4871  _status = _logBuff.serializeFrom(
4872  static_cast<U8>(sizeof(U8))
4873  );
4874  FW_ASSERT(
4875  _status == Fw::FW_SERIALIZE_OK,
4876  static_cast<FwAssertArgType>(_status)
4877  );
4878 #endif
4879  _status = _logBuff.serializeFrom(opcode);
4880  FW_ASSERT(
4881  _status == Fw::FW_SERIALIZE_OK,
4882  static_cast<FwAssertArgType>(_status)
4883  );
4884 
4885 #if FW_AMPCS_COMPATIBLE
4886  // Serialize the argument size
4887  _status = _logBuff.serializeFrom(
4888  static_cast<U8>(sizeof(U32))
4889  );
4890  FW_ASSERT(
4891  _status == Fw::FW_SERIALIZE_OK,
4892  static_cast<FwAssertArgType>(_status)
4893  );
4894 #endif
4895  _status = _logBuff.serializeFrom(stmtIdx);
4896  FW_ASSERT(
4897  _status == Fw::FW_SERIALIZE_OK,
4898  static_cast<FwAssertArgType>(_status)
4899  );
4900 
4901  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
4902  FW_ASSERT(
4903  _status == Fw::FW_SERIALIZE_OK,
4904  static_cast<FwAssertArgType>(_status)
4905  );
4906 
4907  this->m_logOut_OutputPort[0].invoke(
4908  _id,
4909  _logTime,
4911  _logBuff
4912  );
4913  }
4914 
4915  // Emit the event on the text log port
4916 #if FW_ENABLE_TEXT_LOGGING
4917  if (this->m_logTextOut_OutputPort[0].isConnected()) {
4918 #if FW_OBJECT_NAMES == 1
4919  const char* _formatString =
4920  "(%s) %s: Unknown sequencer directive id %" PRIu8 " at index %" PRIu32 " in file %s";
4921 #else
4922  const char* _formatString =
4923  "%s: Unknown sequencer directive id %" PRIu8 " at index %" PRIu32 " in file %s";
4924 #endif
4925 
4926  Fw::TextLogString _logString;
4927  _logString.format(
4928  _formatString,
4929 #if FW_OBJECT_NAMES == 1
4930  this->m_objName.toChar(),
4931 #endif
4932  "UnknownSequencerDirective ",
4933  opcode,
4934  stmtIdx,
4935  filePath.toChar()
4936  );
4937 
4938  this->m_logTextOut_OutputPort[0].invoke(
4939  _id,
4940  _logTime,
4942  _logString
4943  );
4944  }
4945 #endif
4946  }
4947 
4950  I32 state,
4951  FwOpcodeType opcode,
4952  Fw::CmdResponse response
4953  ) const
4954  {
4955  // Get the time
4956  Fw::Time _logTime;
4957  if (this->m_timeCaller_OutputPort[0].isConnected()) {
4958  this->m_timeCaller_OutputPort[0].invoke(_logTime);
4959  }
4960 
4961  FwEventIdType _id = static_cast<FwEventIdType>(0);
4962 
4964 
4965  // Emit the event on the log port
4966  if (this->m_logOut_OutputPort[0].isConnected()) {
4967  Fw::LogBuffer _logBuff;
4969 
4970 #if FW_AMPCS_COMPATIBLE
4971  // Serialize the number of arguments
4972  _status = _logBuff.serializeFrom(static_cast<U8>(3));
4973  FW_ASSERT(
4974  _status == Fw::FW_SERIALIZE_OK,
4975  static_cast<FwAssertArgType>(_status)
4976  );
4977 #endif
4978 
4979 #if FW_AMPCS_COMPATIBLE
4980  // Serialize the argument size
4981  _status = _logBuff.serializeFrom(
4982  static_cast<U8>(sizeof(I32))
4983  );
4984  FW_ASSERT(
4985  _status == Fw::FW_SERIALIZE_OK,
4986  static_cast<FwAssertArgType>(_status)
4987  );
4988 #endif
4989  _status = _logBuff.serializeFrom(state);
4990  FW_ASSERT(
4991  _status == Fw::FW_SERIALIZE_OK,
4992  static_cast<FwAssertArgType>(_status)
4993  );
4994 
4995 #if FW_AMPCS_COMPATIBLE
4996  // Serialize the argument size
4997  _status = _logBuff.serializeFrom(
4998  static_cast<U8>(sizeof(FwOpcodeType))
4999  );
5000  FW_ASSERT(
5001  _status == Fw::FW_SERIALIZE_OK,
5002  static_cast<FwAssertArgType>(_status)
5003  );
5004 #endif
5005  _status = _logBuff.serializeFrom(opcode);
5006  FW_ASSERT(
5007  _status == Fw::FW_SERIALIZE_OK,
5008  static_cast<FwAssertArgType>(_status)
5009  );
5010 
5011 #if FW_AMPCS_COMPATIBLE
5012  // Serialize the argument size
5013  _status = _logBuff.serializeFrom(
5014  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5015  );
5016  FW_ASSERT(
5017  _status == Fw::FW_SERIALIZE_OK,
5018  static_cast<FwAssertArgType>(_status)
5019  );
5020 #endif
5021  _status = _logBuff.serializeFrom(response);
5022  FW_ASSERT(
5023  _status == Fw::FW_SERIALIZE_OK,
5024  static_cast<FwAssertArgType>(_status)
5025  );
5026 
5027  this->m_logOut_OutputPort[0].invoke(
5028  _id,
5029  _logTime,
5031  _logBuff
5032  );
5033  }
5034 
5035  // Emit the event on the text log port
5036 #if FW_ENABLE_TEXT_LOGGING
5037  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5038 #if FW_OBJECT_NAMES == 1
5039  const char* _formatString =
5040  "(%s) %s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
5041 #else
5042  const char* _formatString =
5043  "%s: Received a command response while not running a sequence (was in state %" PRIi32 " opcode was %" PRIu32 " response code %s)";
5044 #endif
5045 
5046  Fw::String responseStr;
5047  response.toString(responseStr);
5048 
5049  Fw::TextLogString _logString;
5050  _logString.format(
5051  _formatString,
5052 #if FW_OBJECT_NAMES == 1
5053  this->m_objName.toChar(),
5054 #endif
5055  "CmdResponseWhileNotRunningSequence ",
5056  state,
5057  opcode,
5058  responseStr.toChar()
5059  );
5060 
5061  this->m_logTextOut_OutputPort[0].invoke(
5062  _id,
5063  _logTime,
5065  _logString
5066  );
5067  }
5068 #endif
5069  }
5070 
5073  FwOpcodeType opcode,
5074  Fw::CmdResponse response,
5075  U16 oldSequenceIdx,
5076  U16 currentSequenceIdx
5077  ) const
5078  {
5079  // Get the time
5080  Fw::Time _logTime;
5081  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5082  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5083  }
5084 
5085  FwEventIdType _id = static_cast<FwEventIdType>(0);
5086 
5088 
5089  // Emit the event on the log port
5090  if (this->m_logOut_OutputPort[0].isConnected()) {
5091  Fw::LogBuffer _logBuff;
5093 
5094 #if FW_AMPCS_COMPATIBLE
5095  // Serialize the number of arguments
5096  _status = _logBuff.serializeFrom(static_cast<U8>(4));
5097  FW_ASSERT(
5098  _status == Fw::FW_SERIALIZE_OK,
5099  static_cast<FwAssertArgType>(_status)
5100  );
5101 #endif
5102 
5103 #if FW_AMPCS_COMPATIBLE
5104  // Serialize the argument size
5105  _status = _logBuff.serializeFrom(
5106  static_cast<U8>(sizeof(FwOpcodeType))
5107  );
5108  FW_ASSERT(
5109  _status == Fw::FW_SERIALIZE_OK,
5110  static_cast<FwAssertArgType>(_status)
5111  );
5112 #endif
5113  _status = _logBuff.serializeFrom(opcode);
5114  FW_ASSERT(
5115  _status == Fw::FW_SERIALIZE_OK,
5116  static_cast<FwAssertArgType>(_status)
5117  );
5118 
5119 #if FW_AMPCS_COMPATIBLE
5120  // Serialize the argument size
5121  _status = _logBuff.serializeFrom(
5122  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5123  );
5124  FW_ASSERT(
5125  _status == Fw::FW_SERIALIZE_OK,
5126  static_cast<FwAssertArgType>(_status)
5127  );
5128 #endif
5129  _status = _logBuff.serializeFrom(response);
5130  FW_ASSERT(
5131  _status == Fw::FW_SERIALIZE_OK,
5132  static_cast<FwAssertArgType>(_status)
5133  );
5134 
5135 #if FW_AMPCS_COMPATIBLE
5136  // Serialize the argument size
5137  _status = _logBuff.serializeFrom(
5138  static_cast<U8>(sizeof(U16))
5139  );
5140  FW_ASSERT(
5141  _status == Fw::FW_SERIALIZE_OK,
5142  static_cast<FwAssertArgType>(_status)
5143  );
5144 #endif
5145  _status = _logBuff.serializeFrom(oldSequenceIdx);
5146  FW_ASSERT(
5147  _status == Fw::FW_SERIALIZE_OK,
5148  static_cast<FwAssertArgType>(_status)
5149  );
5150 
5151 #if FW_AMPCS_COMPATIBLE
5152  // Serialize the argument size
5153  _status = _logBuff.serializeFrom(
5154  static_cast<U8>(sizeof(U16))
5155  );
5156  FW_ASSERT(
5157  _status == Fw::FW_SERIALIZE_OK,
5158  static_cast<FwAssertArgType>(_status)
5159  );
5160 #endif
5161  _status = _logBuff.serializeFrom(currentSequenceIdx);
5162  FW_ASSERT(
5163  _status == Fw::FW_SERIALIZE_OK,
5164  static_cast<FwAssertArgType>(_status)
5165  );
5166 
5167  this->m_logOut_OutputPort[0].invoke(
5168  _id,
5169  _logTime,
5171  _logBuff
5172  );
5173  }
5174 
5175  // Emit the event on the text log port
5176 #if FW_ENABLE_TEXT_LOGGING
5177  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5178 #if FW_OBJECT_NAMES == 1
5179  const char* _formatString =
5180  "(%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 ")";
5181 #else
5182  const char* _formatString =
5183  "%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 ")";
5184 #endif
5185 
5186  Fw::String responseStr;
5187  response.toString(responseStr);
5188 
5189  Fw::TextLogString _logString;
5190  _logString.format(
5191  _formatString,
5192 #if FW_OBJECT_NAMES == 1
5193  this->m_objName.toChar(),
5194 #endif
5195  "CmdResponseFromOldSequence ",
5196  opcode,
5197  responseStr.toChar(),
5198  oldSequenceIdx,
5199  currentSequenceIdx
5200  );
5201 
5202  this->m_logTextOut_OutputPort[0].invoke(
5203  _id,
5204  _logTime,
5206  _logString
5207  );
5208  }
5209 #endif
5210  }
5211 
5214  FwOpcodeType opcode,
5215  Fw::CmdResponse response
5216  ) const
5217  {
5218  // Get the time
5219  Fw::Time _logTime;
5220  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5221  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5222  }
5223 
5224  FwEventIdType _id = static_cast<FwEventIdType>(0);
5225 
5227 
5228  // Emit the event on the log port
5229  if (this->m_logOut_OutputPort[0].isConnected()) {
5230  Fw::LogBuffer _logBuff;
5232 
5233 #if FW_AMPCS_COMPATIBLE
5234  // Serialize the number of arguments
5235  _status = _logBuff.serializeFrom(static_cast<U8>(2));
5236  FW_ASSERT(
5237  _status == Fw::FW_SERIALIZE_OK,
5238  static_cast<FwAssertArgType>(_status)
5239  );
5240 #endif
5241 
5242 #if FW_AMPCS_COMPATIBLE
5243  // Serialize the argument size
5244  _status = _logBuff.serializeFrom(
5245  static_cast<U8>(sizeof(FwOpcodeType))
5246  );
5247  FW_ASSERT(
5248  _status == Fw::FW_SERIALIZE_OK,
5249  static_cast<FwAssertArgType>(_status)
5250  );
5251 #endif
5252  _status = _logBuff.serializeFrom(opcode);
5253  FW_ASSERT(
5254  _status == Fw::FW_SERIALIZE_OK,
5255  static_cast<FwAssertArgType>(_status)
5256  );
5257 
5258 #if FW_AMPCS_COMPATIBLE
5259  // Serialize the argument size
5260  _status = _logBuff.serializeFrom(
5261  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5262  );
5263  FW_ASSERT(
5264  _status == Fw::FW_SERIALIZE_OK,
5265  static_cast<FwAssertArgType>(_status)
5266  );
5267 #endif
5268  _status = _logBuff.serializeFrom(response);
5269  FW_ASSERT(
5270  _status == Fw::FW_SERIALIZE_OK,
5271  static_cast<FwAssertArgType>(_status)
5272  );
5273 
5274  this->m_logOut_OutputPort[0].invoke(
5275  _id,
5276  _logTime,
5278  _logBuff
5279  );
5280  }
5281 
5282  // Emit the event on the text log port
5283 #if FW_ENABLE_TEXT_LOGGING
5284  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5285 #if FW_OBJECT_NAMES == 1
5286  const char* _formatString =
5287  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
5288 #else
5289  const char* _formatString =
5290  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was not awaiting a response";
5291 #endif
5292 
5293  Fw::String responseStr;
5294  response.toString(responseStr);
5295 
5296  Fw::TextLogString _logString;
5297  _logString.format(
5298  _formatString,
5299 #if FW_OBJECT_NAMES == 1
5300  this->m_objName.toChar(),
5301 #endif
5302  "CmdResponseWhileNotAwaiting ",
5303  opcode,
5304  responseStr.toChar()
5305  );
5306 
5307  this->m_logTextOut_OutputPort[0].invoke(
5308  _id,
5309  _logTime,
5311  _logString
5312  );
5313  }
5314 #endif
5315  }
5316 
5319  FwOpcodeType opcode,
5320  Fw::CmdResponse response,
5321  U8 expectedDirectiveOpcode
5322  ) const
5323  {
5324  // Get the time
5325  Fw::Time _logTime;
5326  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5327  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5328  }
5329 
5330  FwEventIdType _id = static_cast<FwEventIdType>(0);
5331 
5333 
5334  // Emit the event on the log port
5335  if (this->m_logOut_OutputPort[0].isConnected()) {
5336  Fw::LogBuffer _logBuff;
5338 
5339 #if FW_AMPCS_COMPATIBLE
5340  // Serialize the number of arguments
5341  _status = _logBuff.serializeFrom(static_cast<U8>(3));
5342  FW_ASSERT(
5343  _status == Fw::FW_SERIALIZE_OK,
5344  static_cast<FwAssertArgType>(_status)
5345  );
5346 #endif
5347 
5348 #if FW_AMPCS_COMPATIBLE
5349  // Serialize the argument size
5350  _status = _logBuff.serializeFrom(
5351  static_cast<U8>(sizeof(FwOpcodeType))
5352  );
5353  FW_ASSERT(
5354  _status == Fw::FW_SERIALIZE_OK,
5355  static_cast<FwAssertArgType>(_status)
5356  );
5357 #endif
5358  _status = _logBuff.serializeFrom(opcode);
5359  FW_ASSERT(
5360  _status == Fw::FW_SERIALIZE_OK,
5361  static_cast<FwAssertArgType>(_status)
5362  );
5363 
5364 #if FW_AMPCS_COMPATIBLE
5365  // Serialize the argument size
5366  _status = _logBuff.serializeFrom(
5367  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5368  );
5369  FW_ASSERT(
5370  _status == Fw::FW_SERIALIZE_OK,
5371  static_cast<FwAssertArgType>(_status)
5372  );
5373 #endif
5374  _status = _logBuff.serializeFrom(response);
5375  FW_ASSERT(
5376  _status == Fw::FW_SERIALIZE_OK,
5377  static_cast<FwAssertArgType>(_status)
5378  );
5379 
5380 #if FW_AMPCS_COMPATIBLE
5381  // Serialize the argument size
5382  _status = _logBuff.serializeFrom(
5383  static_cast<U8>(sizeof(U8))
5384  );
5385  FW_ASSERT(
5386  _status == Fw::FW_SERIALIZE_OK,
5387  static_cast<FwAssertArgType>(_status)
5388  );
5389 #endif
5390  _status = _logBuff.serializeFrom(expectedDirectiveOpcode);
5391  FW_ASSERT(
5392  _status == Fw::FW_SERIALIZE_OK,
5393  static_cast<FwAssertArgType>(_status)
5394  );
5395 
5396  this->m_logOut_OutputPort[0].invoke(
5397  _id,
5398  _logTime,
5400  _logBuff
5401  );
5402  }
5403 
5404  // Emit the event on the text log port
5405 #if FW_ENABLE_TEXT_LOGGING
5406  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5407 #if FW_OBJECT_NAMES == 1
5408  const char* _formatString =
5409  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was awaiting directive opcode %" PRIu8 "";
5410 #else
5411  const char* _formatString =
5412  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was awaiting directive opcode %" PRIu8 "";
5413 #endif
5414 
5415  Fw::String responseStr;
5416  response.toString(responseStr);
5417 
5418  Fw::TextLogString _logString;
5419  _logString.format(
5420  _formatString,
5421 #if FW_OBJECT_NAMES == 1
5422  this->m_objName.toChar(),
5423 #endif
5424  "CmdResponseWhileAwaitingDirective ",
5425  opcode,
5426  responseStr.toChar(),
5427  expectedDirectiveOpcode
5428  );
5429 
5430  this->m_logTextOut_OutputPort[0].invoke(
5431  _id,
5432  _logTime,
5434  _logString
5435  );
5436  }
5437 #endif
5438  }
5439 
5442  FwOpcodeType opcode,
5443  Fw::CmdResponse response,
5444  FwOpcodeType expectedOpcode
5445  ) const
5446  {
5447  // Get the time
5448  Fw::Time _logTime;
5449  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5450  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5451  }
5452 
5453  FwEventIdType _id = static_cast<FwEventIdType>(0);
5454 
5455  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEOPCODE;
5456 
5457  // Emit the event on the log port
5458  if (this->m_logOut_OutputPort[0].isConnected()) {
5459  Fw::LogBuffer _logBuff;
5461 
5462 #if FW_AMPCS_COMPATIBLE
5463  // Serialize the number of arguments
5464  _status = _logBuff.serializeFrom(static_cast<U8>(3));
5465  FW_ASSERT(
5466  _status == Fw::FW_SERIALIZE_OK,
5467  static_cast<FwAssertArgType>(_status)
5468  );
5469 #endif
5470 
5471 #if FW_AMPCS_COMPATIBLE
5472  // Serialize the argument size
5473  _status = _logBuff.serializeFrom(
5474  static_cast<U8>(sizeof(FwOpcodeType))
5475  );
5476  FW_ASSERT(
5477  _status == Fw::FW_SERIALIZE_OK,
5478  static_cast<FwAssertArgType>(_status)
5479  );
5480 #endif
5481  _status = _logBuff.serializeFrom(opcode);
5482  FW_ASSERT(
5483  _status == Fw::FW_SERIALIZE_OK,
5484  static_cast<FwAssertArgType>(_status)
5485  );
5486 
5487 #if FW_AMPCS_COMPATIBLE
5488  // Serialize the argument size
5489  _status = _logBuff.serializeFrom(
5490  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5491  );
5492  FW_ASSERT(
5493  _status == Fw::FW_SERIALIZE_OK,
5494  static_cast<FwAssertArgType>(_status)
5495  );
5496 #endif
5497  _status = _logBuff.serializeFrom(response);
5498  FW_ASSERT(
5499  _status == Fw::FW_SERIALIZE_OK,
5500  static_cast<FwAssertArgType>(_status)
5501  );
5502 
5503 #if FW_AMPCS_COMPATIBLE
5504  // Serialize the argument size
5505  _status = _logBuff.serializeFrom(
5506  static_cast<U8>(sizeof(FwOpcodeType))
5507  );
5508  FW_ASSERT(
5509  _status == Fw::FW_SERIALIZE_OK,
5510  static_cast<FwAssertArgType>(_status)
5511  );
5512 #endif
5513  _status = _logBuff.serializeFrom(expectedOpcode);
5514  FW_ASSERT(
5515  _status == Fw::FW_SERIALIZE_OK,
5516  static_cast<FwAssertArgType>(_status)
5517  );
5518 
5519  this->m_logOut_OutputPort[0].invoke(
5520  _id,
5521  _logTime,
5523  _logBuff
5524  );
5525  }
5526 
5527  // Emit the event on the text log port
5528 #if FW_ENABLE_TEXT_LOGGING
5529  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5530 #if FW_OBJECT_NAMES == 1
5531  const char* _formatString =
5532  "(%s) %s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5533 #else
5534  const char* _formatString =
5535  "%s: Received a response from cmd opcode %" PRIu32 " (response %s) from this sequence, but was expecting a response from command opcode %" PRIu32 "";
5536 #endif
5537 
5538  Fw::String responseStr;
5539  response.toString(responseStr);
5540 
5541  Fw::TextLogString _logString;
5542  _logString.format(
5543  _formatString,
5544 #if FW_OBJECT_NAMES == 1
5545  this->m_objName.toChar(),
5546 #endif
5547  "WrongCmdResponseOpcode ",
5548  opcode,
5549  responseStr.toChar(),
5550  expectedOpcode
5551  );
5552 
5553  this->m_logTextOut_OutputPort[0].invoke(
5554  _id,
5555  _logTime,
5557  _logString
5558  );
5559  }
5560 #endif
5561  }
5562 
5565  FwOpcodeType opcode,
5566  Fw::CmdResponse response,
5567  U16 actualCmdIdx,
5568  U16 expectedCmdIdx
5569  ) const
5570  {
5571  // Get the time
5572  Fw::Time _logTime;
5573  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5574  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5575  }
5576 
5577  FwEventIdType _id = static_cast<FwEventIdType>(0);
5578 
5579  _id = this->getIdBase() + EVENTID_WRONGCMDRESPONSEINDEX;
5580 
5581  // Emit the event on the log port
5582  if (this->m_logOut_OutputPort[0].isConnected()) {
5583  Fw::LogBuffer _logBuff;
5585 
5586 #if FW_AMPCS_COMPATIBLE
5587  // Serialize the number of arguments
5588  _status = _logBuff.serializeFrom(static_cast<U8>(4));
5589  FW_ASSERT(
5590  _status == Fw::FW_SERIALIZE_OK,
5591  static_cast<FwAssertArgType>(_status)
5592  );
5593 #endif
5594 
5595 #if FW_AMPCS_COMPATIBLE
5596  // Serialize the argument size
5597  _status = _logBuff.serializeFrom(
5598  static_cast<U8>(sizeof(FwOpcodeType))
5599  );
5600  FW_ASSERT(
5601  _status == Fw::FW_SERIALIZE_OK,
5602  static_cast<FwAssertArgType>(_status)
5603  );
5604 #endif
5605  _status = _logBuff.serializeFrom(opcode);
5606  FW_ASSERT(
5607  _status == Fw::FW_SERIALIZE_OK,
5608  static_cast<FwAssertArgType>(_status)
5609  );
5610 
5611 #if FW_AMPCS_COMPATIBLE
5612  // Serialize the argument size
5613  _status = _logBuff.serializeFrom(
5614  static_cast<U8>(Fw::CmdResponse::SERIALIZED_SIZE)
5615  );
5616  FW_ASSERT(
5617  _status == Fw::FW_SERIALIZE_OK,
5618  static_cast<FwAssertArgType>(_status)
5619  );
5620 #endif
5621  _status = _logBuff.serializeFrom(response);
5622  FW_ASSERT(
5623  _status == Fw::FW_SERIALIZE_OK,
5624  static_cast<FwAssertArgType>(_status)
5625  );
5626 
5627 #if FW_AMPCS_COMPATIBLE
5628  // Serialize the argument size
5629  _status = _logBuff.serializeFrom(
5630  static_cast<U8>(sizeof(U16))
5631  );
5632  FW_ASSERT(
5633  _status == Fw::FW_SERIALIZE_OK,
5634  static_cast<FwAssertArgType>(_status)
5635  );
5636 #endif
5637  _status = _logBuff.serializeFrom(actualCmdIdx);
5638  FW_ASSERT(
5639  _status == Fw::FW_SERIALIZE_OK,
5640  static_cast<FwAssertArgType>(_status)
5641  );
5642 
5643 #if FW_AMPCS_COMPATIBLE
5644  // Serialize the argument size
5645  _status = _logBuff.serializeFrom(
5646  static_cast<U8>(sizeof(U16))
5647  );
5648  FW_ASSERT(
5649  _status == Fw::FW_SERIALIZE_OK,
5650  static_cast<FwAssertArgType>(_status)
5651  );
5652 #endif
5653  _status = _logBuff.serializeFrom(expectedCmdIdx);
5654  FW_ASSERT(
5655  _status == Fw::FW_SERIALIZE_OK,
5656  static_cast<FwAssertArgType>(_status)
5657  );
5658 
5659  this->m_logOut_OutputPort[0].invoke(
5660  _id,
5661  _logTime,
5663  _logBuff
5664  );
5665  }
5666 
5667  // Emit the event on the text log port
5668 #if FW_ENABLE_TEXT_LOGGING
5669  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5670 #if FW_OBJECT_NAMES == 1
5671  const char* _formatString =
5672  "(%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 ")";
5673 #else
5674  const char* _formatString =
5675  "%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 ")";
5676 #endif
5677 
5678  Fw::String responseStr;
5679  response.toString(responseStr);
5680 
5681  Fw::TextLogString _logString;
5682  _logString.format(
5683  _formatString,
5684 #if FW_OBJECT_NAMES == 1
5685  this->m_objName.toChar(),
5686 #endif
5687  "WrongCmdResponseIndex ",
5688  opcode,
5689  responseStr.toChar(),
5690  actualCmdIdx,
5691  expectedCmdIdx
5692  );
5693 
5694  this->m_logTextOut_OutputPort[0].invoke(
5695  _id,
5696  _logTime,
5698  _logString
5699  );
5700  }
5701 #endif
5702  }
5703 
5706  U8 opcode,
5707  U32 stmtIdx,
5708  I32 errorCode,
5709  U64 buffLeft,
5710  U64 buffLength
5711  ) const
5712  {
5713  // Get the time
5714  Fw::Time _logTime;
5715  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5716  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5717  }
5718 
5719  FwEventIdType _id = static_cast<FwEventIdType>(0);
5720 
5722 
5723  // Emit the event on the log port
5724  if (this->m_logOut_OutputPort[0].isConnected()) {
5725  Fw::LogBuffer _logBuff;
5727 
5728 #if FW_AMPCS_COMPATIBLE
5729  // Serialize the number of arguments
5730  _status = _logBuff.serializeFrom(static_cast<U8>(5));
5731  FW_ASSERT(
5732  _status == Fw::FW_SERIALIZE_OK,
5733  static_cast<FwAssertArgType>(_status)
5734  );
5735 #endif
5736 
5737 #if FW_AMPCS_COMPATIBLE
5738  // Serialize the argument size
5739  _status = _logBuff.serializeFrom(
5740  static_cast<U8>(sizeof(U8))
5741  );
5742  FW_ASSERT(
5743  _status == Fw::FW_SERIALIZE_OK,
5744  static_cast<FwAssertArgType>(_status)
5745  );
5746 #endif
5747  _status = _logBuff.serializeFrom(opcode);
5748  FW_ASSERT(
5749  _status == Fw::FW_SERIALIZE_OK,
5750  static_cast<FwAssertArgType>(_status)
5751  );
5752 
5753 #if FW_AMPCS_COMPATIBLE
5754  // Serialize the argument size
5755  _status = _logBuff.serializeFrom(
5756  static_cast<U8>(sizeof(U32))
5757  );
5758  FW_ASSERT(
5759  _status == Fw::FW_SERIALIZE_OK,
5760  static_cast<FwAssertArgType>(_status)
5761  );
5762 #endif
5763  _status = _logBuff.serializeFrom(stmtIdx);
5764  FW_ASSERT(
5765  _status == Fw::FW_SERIALIZE_OK,
5766  static_cast<FwAssertArgType>(_status)
5767  );
5768 
5769 #if FW_AMPCS_COMPATIBLE
5770  // Serialize the argument size
5771  _status = _logBuff.serializeFrom(
5772  static_cast<U8>(sizeof(I32))
5773  );
5774  FW_ASSERT(
5775  _status == Fw::FW_SERIALIZE_OK,
5776  static_cast<FwAssertArgType>(_status)
5777  );
5778 #endif
5779  _status = _logBuff.serializeFrom(errorCode);
5780  FW_ASSERT(
5781  _status == Fw::FW_SERIALIZE_OK,
5782  static_cast<FwAssertArgType>(_status)
5783  );
5784 
5785 #if FW_AMPCS_COMPATIBLE
5786  // Serialize the argument size
5787  _status = _logBuff.serializeFrom(
5788  static_cast<U8>(sizeof(U64))
5789  );
5790  FW_ASSERT(
5791  _status == Fw::FW_SERIALIZE_OK,
5792  static_cast<FwAssertArgType>(_status)
5793  );
5794 #endif
5795  _status = _logBuff.serializeFrom(buffLeft);
5796  FW_ASSERT(
5797  _status == Fw::FW_SERIALIZE_OK,
5798  static_cast<FwAssertArgType>(_status)
5799  );
5800 
5801 #if FW_AMPCS_COMPATIBLE
5802  // Serialize the argument size
5803  _status = _logBuff.serializeFrom(
5804  static_cast<U8>(sizeof(U64))
5805  );
5806  FW_ASSERT(
5807  _status == Fw::FW_SERIALIZE_OK,
5808  static_cast<FwAssertArgType>(_status)
5809  );
5810 #endif
5811  _status = _logBuff.serializeFrom(buffLength);
5812  FW_ASSERT(
5813  _status == Fw::FW_SERIALIZE_OK,
5814  static_cast<FwAssertArgType>(_status)
5815  );
5816 
5817  this->m_logOut_OutputPort[0].invoke(
5818  _id,
5819  _logTime,
5821  _logBuff
5822  );
5823  }
5824 
5825  // Emit the event on the text log port
5826 #if FW_ENABLE_TEXT_LOGGING
5827  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5828 #if FW_OBJECT_NAMES == 1
5829  const char* _formatString =
5830  "(%s) %s: Deserialize error encountered while reading directive opcode %" PRIu8 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5831 #else
5832  const char* _formatString =
5833  "%s: Deserialize error encountered while reading directive opcode %" PRIu8 " at index %" PRIu32 ": %" PRIi32 " (%" PRIu64 " bytes left out of %" PRIu64 ")";
5834 #endif
5835 
5836  Fw::TextLogString _logString;
5837  _logString.format(
5838  _formatString,
5839 #if FW_OBJECT_NAMES == 1
5840  this->m_objName.toChar(),
5841 #endif
5842  "DirectiveDeserializeError ",
5843  opcode,
5844  stmtIdx,
5845  errorCode,
5846  buffLeft,
5847  buffLength
5848  );
5849 
5850  this->m_logTextOut_OutputPort[0].invoke(
5851  _id,
5852  _logTime,
5854  _logString
5855  );
5856  }
5857 #endif
5858  }
5859 
5862  I32 internalTimeBase,
5863  I32 otherTimeBase
5864  ) const
5865  {
5866  // Get the time
5867  Fw::Time _logTime;
5868  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5869  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5870  }
5871 
5872  FwEventIdType _id = static_cast<FwEventIdType>(0);
5873 
5874  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMEBASE;
5875 
5876  // Emit the event on the log port
5877  if (this->m_logOut_OutputPort[0].isConnected()) {
5878  Fw::LogBuffer _logBuff;
5880 
5881 #if FW_AMPCS_COMPATIBLE
5882  // Serialize the number of arguments
5883  _status = _logBuff.serializeFrom(static_cast<U8>(2));
5884  FW_ASSERT(
5885  _status == Fw::FW_SERIALIZE_OK,
5886  static_cast<FwAssertArgType>(_status)
5887  );
5888 #endif
5889 
5890 #if FW_AMPCS_COMPATIBLE
5891  // Serialize the argument size
5892  _status = _logBuff.serializeFrom(
5893  static_cast<U8>(sizeof(I32))
5894  );
5895  FW_ASSERT(
5896  _status == Fw::FW_SERIALIZE_OK,
5897  static_cast<FwAssertArgType>(_status)
5898  );
5899 #endif
5900  _status = _logBuff.serializeFrom(internalTimeBase);
5901  FW_ASSERT(
5902  _status == Fw::FW_SERIALIZE_OK,
5903  static_cast<FwAssertArgType>(_status)
5904  );
5905 
5906 #if FW_AMPCS_COMPATIBLE
5907  // Serialize the argument size
5908  _status = _logBuff.serializeFrom(
5909  static_cast<U8>(sizeof(I32))
5910  );
5911  FW_ASSERT(
5912  _status == Fw::FW_SERIALIZE_OK,
5913  static_cast<FwAssertArgType>(_status)
5914  );
5915 #endif
5916  _status = _logBuff.serializeFrom(otherTimeBase);
5917  FW_ASSERT(
5918  _status == Fw::FW_SERIALIZE_OK,
5919  static_cast<FwAssertArgType>(_status)
5920  );
5921 
5922  this->m_logOut_OutputPort[0].invoke(
5923  _id,
5924  _logTime,
5926  _logBuff
5927  );
5928  }
5929 
5930  // Emit the event on the text log port
5931 #if FW_ENABLE_TEXT_LOGGING
5932  if (this->m_logTextOut_OutputPort[0].isConnected()) {
5933 #if FW_OBJECT_NAMES == 1
5934  const char* _formatString =
5935  "(%s) %s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5936 #else
5937  const char* _formatString =
5938  "%s: getTime() time base was %" PRIi32 ", but tried to operate on it with time base %" PRIi32 "";
5939 #endif
5940 
5941  Fw::TextLogString _logString;
5942  _logString.format(
5943  _formatString,
5944 #if FW_OBJECT_NAMES == 1
5945  this->m_objName.toChar(),
5946 #endif
5947  "MismatchedTimeBase ",
5948  internalTimeBase,
5949  otherTimeBase
5950  );
5951 
5952  this->m_logTextOut_OutputPort[0].invoke(
5953  _id,
5954  _logTime,
5956  _logString
5957  );
5958  }
5959 #endif
5960  }
5961 
5964  I32 internalTimeContext,
5965  I32 otherTimeContext
5966  ) const
5967  {
5968  // Get the time
5969  Fw::Time _logTime;
5970  if (this->m_timeCaller_OutputPort[0].isConnected()) {
5971  this->m_timeCaller_OutputPort[0].invoke(_logTime);
5972  }
5973 
5974  FwEventIdType _id = static_cast<FwEventIdType>(0);
5975 
5976  _id = this->getIdBase() + EVENTID_MISMATCHEDTIMECONTEXT;
5977 
5978  // Emit the event on the log port
5979  if (this->m_logOut_OutputPort[0].isConnected()) {
5980  Fw::LogBuffer _logBuff;
5982 
5983 #if FW_AMPCS_COMPATIBLE
5984  // Serialize the number of arguments
5985  _status = _logBuff.serializeFrom(static_cast<U8>(2));
5986  FW_ASSERT(
5987  _status == Fw::FW_SERIALIZE_OK,
5988  static_cast<FwAssertArgType>(_status)
5989  );
5990 #endif
5991 
5992 #if FW_AMPCS_COMPATIBLE
5993  // Serialize the argument size
5994  _status = _logBuff.serializeFrom(
5995  static_cast<U8>(sizeof(I32))
5996  );
5997  FW_ASSERT(
5998  _status == Fw::FW_SERIALIZE_OK,
5999  static_cast<FwAssertArgType>(_status)
6000  );
6001 #endif
6002  _status = _logBuff.serializeFrom(internalTimeContext);
6003  FW_ASSERT(
6004  _status == Fw::FW_SERIALIZE_OK,
6005  static_cast<FwAssertArgType>(_status)
6006  );
6007 
6008 #if FW_AMPCS_COMPATIBLE
6009  // Serialize the argument size
6010  _status = _logBuff.serializeFrom(
6011  static_cast<U8>(sizeof(I32))
6012  );
6013  FW_ASSERT(
6014  _status == Fw::FW_SERIALIZE_OK,
6015  static_cast<FwAssertArgType>(_status)
6016  );
6017 #endif
6018  _status = _logBuff.serializeFrom(otherTimeContext);
6019  FW_ASSERT(
6020  _status == Fw::FW_SERIALIZE_OK,
6021  static_cast<FwAssertArgType>(_status)
6022  );
6023 
6024  this->m_logOut_OutputPort[0].invoke(
6025  _id,
6026  _logTime,
6028  _logBuff
6029  );
6030  }
6031 
6032  // Emit the event on the text log port
6033 #if FW_ENABLE_TEXT_LOGGING
6034  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6035 #if FW_OBJECT_NAMES == 1
6036  const char* _formatString =
6037  "(%s) %s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
6038 #else
6039  const char* _formatString =
6040  "%s: getTime() time context was %" PRIi32 ", but tried to operate on it with time context %" PRIi32 "";
6041 #endif
6042 
6043  Fw::TextLogString _logString;
6044  _logString.format(
6045  _formatString,
6046 #if FW_OBJECT_NAMES == 1
6047  this->m_objName.toChar(),
6048 #endif
6049  "MismatchedTimeContext ",
6050  internalTimeContext,
6051  otherTimeContext
6052  );
6053 
6054  this->m_logTextOut_OutputPort[0].invoke(
6055  _id,
6056  _logTime,
6058  _logString
6059  );
6060  }
6061 #endif
6062  }
6063 
6066  FwOpcodeType opCode,
6067  U32 stmtIdx,
6068  const Fw::StringBase& filePath
6069  ) const
6070  {
6071  // Get the time
6072  Fw::Time _logTime;
6073  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6074  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6075  }
6076 
6077  FwEventIdType _id = static_cast<FwEventIdType>(0);
6078 
6079  _id = this->getIdBase() + EVENTID_COMMANDTIMEDOUT;
6080 
6081  // Emit the event on the log port
6082  if (this->m_logOut_OutputPort[0].isConnected()) {
6083  Fw::LogBuffer _logBuff;
6085 
6086 #if FW_AMPCS_COMPATIBLE
6087  // Serialize the number of arguments
6088  _status = _logBuff.serializeFrom(static_cast<U8>(3));
6089  FW_ASSERT(
6090  _status == Fw::FW_SERIALIZE_OK,
6091  static_cast<FwAssertArgType>(_status)
6092  );
6093 #endif
6094 
6095 #if FW_AMPCS_COMPATIBLE
6096  // Serialize the argument size
6097  _status = _logBuff.serializeFrom(
6098  static_cast<U8>(sizeof(FwOpcodeType))
6099  );
6100  FW_ASSERT(
6101  _status == Fw::FW_SERIALIZE_OK,
6102  static_cast<FwAssertArgType>(_status)
6103  );
6104 #endif
6105  _status = _logBuff.serializeFrom(opCode);
6106  FW_ASSERT(
6107  _status == Fw::FW_SERIALIZE_OK,
6108  static_cast<FwAssertArgType>(_status)
6109  );
6110 
6111 #if FW_AMPCS_COMPATIBLE
6112  // Serialize the argument size
6113  _status = _logBuff.serializeFrom(
6114  static_cast<U8>(sizeof(U32))
6115  );
6116  FW_ASSERT(
6117  _status == Fw::FW_SERIALIZE_OK,
6118  static_cast<FwAssertArgType>(_status)
6119  );
6120 #endif
6121  _status = _logBuff.serializeFrom(stmtIdx);
6122  FW_ASSERT(
6123  _status == Fw::FW_SERIALIZE_OK,
6124  static_cast<FwAssertArgType>(_status)
6125  );
6126 
6127  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
6128  FW_ASSERT(
6129  _status == Fw::FW_SERIALIZE_OK,
6130  static_cast<FwAssertArgType>(_status)
6131  );
6132 
6133  this->m_logOut_OutputPort[0].invoke(
6134  _id,
6135  _logTime,
6137  _logBuff
6138  );
6139  }
6140 
6141  // Emit the event on the text log port
6142 #if FW_ENABLE_TEXT_LOGGING
6143  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6144 #if FW_OBJECT_NAMES == 1
6145  const char* _formatString =
6146  "(%s) %s: A command opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6147 #else
6148  const char* _formatString =
6149  "%s: A command opcode %" PRIu32 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6150 #endif
6151 
6152  Fw::TextLogString _logString;
6153  _logString.format(
6154  _formatString,
6155 #if FW_OBJECT_NAMES == 1
6156  this->m_objName.toChar(),
6157 #endif
6158  "CommandTimedOut ",
6159  opCode,
6160  stmtIdx,
6161  filePath.toChar()
6162  );
6163 
6164  this->m_logTextOut_OutputPort[0].invoke(
6165  _id,
6166  _logTime,
6168  _logString
6169  );
6170  }
6171 #endif
6172  }
6173 
6176  U8 opCode,
6177  U32 stmtIdx,
6178  const Fw::StringBase& filePath
6179  ) const
6180  {
6181  // Get the time
6182  Fw::Time _logTime;
6183  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6184  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6185  }
6186 
6187  FwEventIdType _id = static_cast<FwEventIdType>(0);
6188 
6189  _id = this->getIdBase() + EVENTID_DIRECTIVETIMEDOUT;
6190 
6191  // Emit the event on the log port
6192  if (this->m_logOut_OutputPort[0].isConnected()) {
6193  Fw::LogBuffer _logBuff;
6195 
6196 #if FW_AMPCS_COMPATIBLE
6197  // Serialize the number of arguments
6198  _status = _logBuff.serializeFrom(static_cast<U8>(3));
6199  FW_ASSERT(
6200  _status == Fw::FW_SERIALIZE_OK,
6201  static_cast<FwAssertArgType>(_status)
6202  );
6203 #endif
6204 
6205 #if FW_AMPCS_COMPATIBLE
6206  // Serialize the argument size
6207  _status = _logBuff.serializeFrom(
6208  static_cast<U8>(sizeof(U8))
6209  );
6210  FW_ASSERT(
6211  _status == Fw::FW_SERIALIZE_OK,
6212  static_cast<FwAssertArgType>(_status)
6213  );
6214 #endif
6215  _status = _logBuff.serializeFrom(opCode);
6216  FW_ASSERT(
6217  _status == Fw::FW_SERIALIZE_OK,
6218  static_cast<FwAssertArgType>(_status)
6219  );
6220 
6221 #if FW_AMPCS_COMPATIBLE
6222  // Serialize the argument size
6223  _status = _logBuff.serializeFrom(
6224  static_cast<U8>(sizeof(U32))
6225  );
6226  FW_ASSERT(
6227  _status == Fw::FW_SERIALIZE_OK,
6228  static_cast<FwAssertArgType>(_status)
6229  );
6230 #endif
6231  _status = _logBuff.serializeFrom(stmtIdx);
6232  FW_ASSERT(
6233  _status == Fw::FW_SERIALIZE_OK,
6234  static_cast<FwAssertArgType>(_status)
6235  );
6236 
6237  _status = filePath.serializeTo(_logBuff, FW_MIN(FW_LOG_STRING_MAX_SIZE, 80));
6238  FW_ASSERT(
6239  _status == Fw::FW_SERIALIZE_OK,
6240  static_cast<FwAssertArgType>(_status)
6241  );
6242 
6243  this->m_logOut_OutputPort[0].invoke(
6244  _id,
6245  _logTime,
6247  _logBuff
6248  );
6249  }
6250 
6251  // Emit the event on the text log port
6252 #if FW_ENABLE_TEXT_LOGGING
6253  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6254 #if FW_OBJECT_NAMES == 1
6255  const char* _formatString =
6256  "(%s) %s: A directive opcode %" PRIu8 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6257 #else
6258  const char* _formatString =
6259  "%s: A directive opcode %" PRIu8 " at index %" PRIu32 " timed out in sequence %s, causing the sequence to fail";
6260 #endif
6261 
6262  Fw::TextLogString _logString;
6263  _logString.format(
6264  _formatString,
6265 #if FW_OBJECT_NAMES == 1
6266  this->m_objName.toChar(),
6267 #endif
6268  "DirectiveTimedOut ",
6269  opCode,
6270  stmtIdx,
6271  filePath.toChar()
6272  );
6273 
6274  this->m_logTextOut_OutputPort[0].invoke(
6275  _id,
6276  _logTime,
6278  _logString
6279  );
6280  }
6281 #endif
6282  }
6283 
6286  U8 count,
6287  U8 max
6288  ) const
6289  {
6290  // Get the time
6291  Fw::Time _logTime;
6292  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6293  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6294  }
6295 
6296  FwEventIdType _id = static_cast<FwEventIdType>(0);
6297 
6298  _id = this->getIdBase() + EVENTID_TOOMANYSEQUENCEARGS;
6299 
6300  // Emit the event on the log port
6301  if (this->m_logOut_OutputPort[0].isConnected()) {
6302  Fw::LogBuffer _logBuff;
6304 
6305 #if FW_AMPCS_COMPATIBLE
6306  // Serialize the number of arguments
6307  _status = _logBuff.serializeFrom(static_cast<U8>(2));
6308  FW_ASSERT(
6309  _status == Fw::FW_SERIALIZE_OK,
6310  static_cast<FwAssertArgType>(_status)
6311  );
6312 #endif
6313 
6314 #if FW_AMPCS_COMPATIBLE
6315  // Serialize the argument size
6316  _status = _logBuff.serializeFrom(
6317  static_cast<U8>(sizeof(U8))
6318  );
6319  FW_ASSERT(
6320  _status == Fw::FW_SERIALIZE_OK,
6321  static_cast<FwAssertArgType>(_status)
6322  );
6323 #endif
6324  _status = _logBuff.serializeFrom(count);
6325  FW_ASSERT(
6326  _status == Fw::FW_SERIALIZE_OK,
6327  static_cast<FwAssertArgType>(_status)
6328  );
6329 
6330 #if FW_AMPCS_COMPATIBLE
6331  // Serialize the argument size
6332  _status = _logBuff.serializeFrom(
6333  static_cast<U8>(sizeof(U8))
6334  );
6335  FW_ASSERT(
6336  _status == Fw::FW_SERIALIZE_OK,
6337  static_cast<FwAssertArgType>(_status)
6338  );
6339 #endif
6340  _status = _logBuff.serializeFrom(max);
6341  FW_ASSERT(
6342  _status == Fw::FW_SERIALIZE_OK,
6343  static_cast<FwAssertArgType>(_status)
6344  );
6345 
6346  this->m_logOut_OutputPort[0].invoke(
6347  _id,
6348  _logTime,
6350  _logBuff
6351  );
6352  }
6353 
6354  // Emit the event on the text log port
6355 #if FW_ENABLE_TEXT_LOGGING
6356  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6357 #if FW_OBJECT_NAMES == 1
6358  const char* _formatString =
6359  "(%s) %s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
6360 #else
6361  const char* _formatString =
6362  "%s: A sequence specified it had %" PRIu8 " args but the max was %" PRIu8 "";
6363 #endif
6364 
6365  Fw::TextLogString _logString;
6366  _logString.format(
6367  _formatString,
6368 #if FW_OBJECT_NAMES == 1
6369  this->m_objName.toChar(),
6370 #endif
6371  "TooManySequenceArgs ",
6372  count,
6373  max
6374  );
6375 
6376  this->m_logTextOut_OutputPort[0].invoke(
6377  _id,
6378  _logTime,
6380  _logString
6381  );
6382  }
6383 #endif
6384  }
6385 
6388  U16 count,
6389  U16 max
6390  ) const
6391  {
6392  // Get the time
6393  Fw::Time _logTime;
6394  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6395  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6396  }
6397 
6398  FwEventIdType _id = static_cast<FwEventIdType>(0);
6399 
6401 
6402  // Emit the event on the log port
6403  if (this->m_logOut_OutputPort[0].isConnected()) {
6404  Fw::LogBuffer _logBuff;
6406 
6407 #if FW_AMPCS_COMPATIBLE
6408  // Serialize the number of arguments
6409  _status = _logBuff.serializeFrom(static_cast<U8>(2));
6410  FW_ASSERT(
6411  _status == Fw::FW_SERIALIZE_OK,
6412  static_cast<FwAssertArgType>(_status)
6413  );
6414 #endif
6415 
6416 #if FW_AMPCS_COMPATIBLE
6417  // Serialize the argument size
6418  _status = _logBuff.serializeFrom(
6419  static_cast<U8>(sizeof(U16))
6420  );
6421  FW_ASSERT(
6422  _status == Fw::FW_SERIALIZE_OK,
6423  static_cast<FwAssertArgType>(_status)
6424  );
6425 #endif
6426  _status = _logBuff.serializeFrom(count);
6427  FW_ASSERT(
6428  _status == Fw::FW_SERIALIZE_OK,
6429  static_cast<FwAssertArgType>(_status)
6430  );
6431 
6432 #if FW_AMPCS_COMPATIBLE
6433  // Serialize the argument size
6434  _status = _logBuff.serializeFrom(
6435  static_cast<U8>(sizeof(U16))
6436  );
6437  FW_ASSERT(
6438  _status == Fw::FW_SERIALIZE_OK,
6439  static_cast<FwAssertArgType>(_status)
6440  );
6441 #endif
6442  _status = _logBuff.serializeFrom(max);
6443  FW_ASSERT(
6444  _status == Fw::FW_SERIALIZE_OK,
6445  static_cast<FwAssertArgType>(_status)
6446  );
6447 
6448  this->m_logOut_OutputPort[0].invoke(
6449  _id,
6450  _logTime,
6452  _logBuff
6453  );
6454  }
6455 
6456  // Emit the event on the text log port
6457 #if FW_ENABLE_TEXT_LOGGING
6458  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6459 #if FW_OBJECT_NAMES == 1
6460  const char* _formatString =
6461  "(%s) %s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
6462 #else
6463  const char* _formatString =
6464  "%s: A sequence specified it had %" PRIu16 " statements but the max was %" PRIu16 "";
6465 #endif
6466 
6467  Fw::TextLogString _logString;
6468  _logString.format(
6469  _formatString,
6470 #if FW_OBJECT_NAMES == 1
6471  this->m_objName.toChar(),
6472 #endif
6473  "TooManySequenceStatements ",
6474  count,
6475  max
6476  );
6477 
6478  this->m_logTextOut_OutputPort[0].invoke(
6479  _id,
6480  _logTime,
6482  _logString
6483  );
6484  }
6485 #endif
6486  }
6487 
6490  U32 stmtIdx,
6491  bool breakOnce
6492  ) const
6493  {
6494  // Get the time
6495  Fw::Time _logTime;
6496  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6497  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6498  }
6499 
6500  FwEventIdType _id = static_cast<FwEventIdType>(0);
6501 
6502  _id = this->getIdBase() + EVENTID_DEBUGBROKEN;
6503 
6504  // Emit the event on the log port
6505  if (this->m_logOut_OutputPort[0].isConnected()) {
6506  Fw::LogBuffer _logBuff;
6508 
6509 #if FW_AMPCS_COMPATIBLE
6510  // Serialize the number of arguments
6511  _status = _logBuff.serializeFrom(static_cast<U8>(2));
6512  FW_ASSERT(
6513  _status == Fw::FW_SERIALIZE_OK,
6514  static_cast<FwAssertArgType>(_status)
6515  );
6516 #endif
6517 
6518 #if FW_AMPCS_COMPATIBLE
6519  // Serialize the argument size
6520  _status = _logBuff.serializeFrom(
6521  static_cast<U8>(sizeof(U32))
6522  );
6523  FW_ASSERT(
6524  _status == Fw::FW_SERIALIZE_OK,
6525  static_cast<FwAssertArgType>(_status)
6526  );
6527 #endif
6528  _status = _logBuff.serializeFrom(stmtIdx);
6529  FW_ASSERT(
6530  _status == Fw::FW_SERIALIZE_OK,
6531  static_cast<FwAssertArgType>(_status)
6532  );
6533 
6534 #if FW_AMPCS_COMPATIBLE
6535  // Serialize the argument size
6536  _status = _logBuff.serializeFrom(
6537  static_cast<U8>(sizeof(U8))
6538  );
6539  FW_ASSERT(
6540  _status == Fw::FW_SERIALIZE_OK,
6541  static_cast<FwAssertArgType>(_status)
6542  );
6543 #endif
6544  _status = _logBuff.serializeFrom(breakOnce);
6545  FW_ASSERT(
6546  _status == Fw::FW_SERIALIZE_OK,
6547  static_cast<FwAssertArgType>(_status)
6548  );
6549 
6550  this->m_logOut_OutputPort[0].invoke(
6551  _id,
6552  _logTime,
6554  _logBuff
6555  );
6556  }
6557 
6558  // Emit the event on the text log port
6559 #if FW_ENABLE_TEXT_LOGGING
6560  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6561 #if FW_OBJECT_NAMES == 1
6562  const char* _formatString =
6563  "(%s) %s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6564 #else
6565  const char* _formatString =
6566  "%s: Debug breakpoint reached before dispatching statement index %" PRIu32 ". Will break once: %d";
6567 #endif
6568 
6569  Fw::TextLogString _logString;
6570  _logString.format(
6571  _formatString,
6572 #if FW_OBJECT_NAMES == 1
6573  this->m_objName.toChar(),
6574 #endif
6575  "DebugBroken ",
6576  stmtIdx,
6577  breakOnce
6578  );
6579 
6580  this->m_logTextOut_OutputPort[0].invoke(
6581  _id,
6582  _logTime,
6584  _logString
6585  );
6586  }
6587 #endif
6588  }
6589 
6592  U32 breakpointIdx,
6593  bool breakOnce
6594  ) const
6595  {
6596  // Get the time
6597  Fw::Time _logTime;
6598  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6599  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6600  }
6601 
6602  FwEventIdType _id = static_cast<FwEventIdType>(0);
6603 
6604  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTSET;
6605 
6606  // Emit the event on the log port
6607  if (this->m_logOut_OutputPort[0].isConnected()) {
6608  Fw::LogBuffer _logBuff;
6610 
6611 #if FW_AMPCS_COMPATIBLE
6612  // Serialize the number of arguments
6613  _status = _logBuff.serializeFrom(static_cast<U8>(2));
6614  FW_ASSERT(
6615  _status == Fw::FW_SERIALIZE_OK,
6616  static_cast<FwAssertArgType>(_status)
6617  );
6618 #endif
6619 
6620 #if FW_AMPCS_COMPATIBLE
6621  // Serialize the argument size
6622  _status = _logBuff.serializeFrom(
6623  static_cast<U8>(sizeof(U32))
6624  );
6625  FW_ASSERT(
6626  _status == Fw::FW_SERIALIZE_OK,
6627  static_cast<FwAssertArgType>(_status)
6628  );
6629 #endif
6630  _status = _logBuff.serializeFrom(breakpointIdx);
6631  FW_ASSERT(
6632  _status == Fw::FW_SERIALIZE_OK,
6633  static_cast<FwAssertArgType>(_status)
6634  );
6635 
6636 #if FW_AMPCS_COMPATIBLE
6637  // Serialize the argument size
6638  _status = _logBuff.serializeFrom(
6639  static_cast<U8>(sizeof(U8))
6640  );
6641  FW_ASSERT(
6642  _status == Fw::FW_SERIALIZE_OK,
6643  static_cast<FwAssertArgType>(_status)
6644  );
6645 #endif
6646  _status = _logBuff.serializeFrom(breakOnce);
6647  FW_ASSERT(
6648  _status == Fw::FW_SERIALIZE_OK,
6649  static_cast<FwAssertArgType>(_status)
6650  );
6651 
6652  this->m_logOut_OutputPort[0].invoke(
6653  _id,
6654  _logTime,
6656  _logBuff
6657  );
6658  }
6659 
6660  // Emit the event on the text log port
6661 #if FW_ENABLE_TEXT_LOGGING
6662  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6663 #if FW_OBJECT_NAMES == 1
6664  const char* _formatString =
6665  "(%s) %s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6666 #else
6667  const char* _formatString =
6668  "%s: Debug breakpoint set before statement index %" PRIu32 ". Will break once: %d";
6669 #endif
6670 
6671  Fw::TextLogString _logString;
6672  _logString.format(
6673  _formatString,
6674 #if FW_OBJECT_NAMES == 1
6675  this->m_objName.toChar(),
6676 #endif
6677  "DebugBreakpointSet ",
6678  breakpointIdx,
6679  breakOnce
6680  );
6681 
6682  this->m_logTextOut_OutputPort[0].invoke(
6683  _id,
6684  _logTime,
6686  _logString
6687  );
6688  }
6689 #endif
6690  }
6691 
6694  {
6695  // Get the time
6696  Fw::Time _logTime;
6697  if (this->m_timeCaller_OutputPort[0].isConnected()) {
6698  this->m_timeCaller_OutputPort[0].invoke(_logTime);
6699  }
6700 
6701  FwEventIdType _id = static_cast<FwEventIdType>(0);
6702 
6703  _id = this->getIdBase() + EVENTID_DEBUGBREAKPOINTCLEARED;
6704 
6705  // Emit the event on the log port
6706  if (this->m_logOut_OutputPort[0].isConnected()) {
6707  Fw::LogBuffer _logBuff;
6708 
6709 #if FW_AMPCS_COMPATIBLE
6711  // Serialize the number of arguments
6712  _status = _logBuff.serializeFrom(static_cast<U8>(0));
6713  FW_ASSERT(
6714  _status == Fw::FW_SERIALIZE_OK,
6715  static_cast<FwAssertArgType>(_status)
6716  );
6717 #endif
6718 
6719  this->m_logOut_OutputPort[0].invoke(
6720  _id,
6721  _logTime,
6723  _logBuff
6724  );
6725  }
6726 
6727  // Emit the event on the text log port
6728 #if FW_ENABLE_TEXT_LOGGING
6729  if (this->m_logTextOut_OutputPort[0].isConnected()) {
6730 #if FW_OBJECT_NAMES == 1
6731  const char* _formatString =
6732  "(%s) %s: Debug breakpoint cleared";
6733 #else
6734  const char* _formatString =
6735  "%s: Debug breakpoint cleared";
6736 #endif
6737 
6738  Fw::TextLogString _logString;
6739  _logString.format(
6740  _formatString,
6741 #if FW_OBJECT_NAMES == 1
6742  this->m_objName.toChar(),
6743 #endif
6744  "DebugBreakpointCleared "
6745  );
6746 
6747  this->m_logTextOut_OutputPort[0].invoke(
6748  _id,
6749  _logTime,
6751  _logString
6752  );
6753  }
6754 #endif
6755  }
6756 
6757  // ----------------------------------------------------------------------
6758  // Telemetry write functions
6759  // ----------------------------------------------------------------------
6760 
6763  I32 arg,
6764  Fw::Time _tlmTime
6765  )
6766  {
6767  // Check to see if it is the first time
6768  if (not this->m_first_update_State) {
6769  // Check to see if value has changed. If not, don't write it.
6770  if (arg == this->m_last_State) {
6771  return;
6772  }
6773  else {
6774  this->m_last_State = arg;
6775  }
6776  }
6777  else {
6778  this->m_first_update_State = false;
6779  this->m_last_State = arg;
6780  }
6781 
6782  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6783  if (
6784  this->m_timeCaller_OutputPort[0].isConnected() &&
6785  (_tlmTime == Fw::ZERO_TIME)
6786  ) {
6787  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6788  }
6789 
6790  Fw::TlmBuffer _tlmBuff;
6791  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
6792  FW_ASSERT(
6793  _stat == Fw::FW_SERIALIZE_OK,
6794  static_cast<FwAssertArgType>(_stat)
6795  );
6796 
6797  FwChanIdType _id;
6798 
6799  _id = this->getIdBase() + CHANNELID_STATE;
6800 
6801  this->m_tlmOut_OutputPort[0].invoke(
6802  _id,
6803  _tlmTime,
6804  _tlmBuff
6805  );
6806  }
6807  }
6808 
6811  U64 arg,
6812  Fw::Time _tlmTime
6813  )
6814  {
6815  // Check to see if it is the first time
6816  if (not this->m_first_update_SequencesSucceeded) {
6817  // Check to see if value has changed. If not, don't write it.
6818  if (arg == this->m_last_SequencesSucceeded) {
6819  return;
6820  }
6821  else {
6822  this->m_last_SequencesSucceeded = arg;
6823  }
6824  }
6825  else {
6826  this->m_first_update_SequencesSucceeded = false;
6827  this->m_last_SequencesSucceeded = arg;
6828  }
6829 
6830  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6831  if (
6832  this->m_timeCaller_OutputPort[0].isConnected() &&
6833  (_tlmTime == Fw::ZERO_TIME)
6834  ) {
6835  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6836  }
6837 
6838  Fw::TlmBuffer _tlmBuff;
6839  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
6840  FW_ASSERT(
6841  _stat == Fw::FW_SERIALIZE_OK,
6842  static_cast<FwAssertArgType>(_stat)
6843  );
6844 
6845  FwChanIdType _id;
6846 
6847  _id = this->getIdBase() + CHANNELID_SEQUENCESSUCCEEDED;
6848 
6849  this->m_tlmOut_OutputPort[0].invoke(
6850  _id,
6851  _tlmTime,
6852  _tlmBuff
6853  );
6854  }
6855  }
6856 
6859  U64 arg,
6860  Fw::Time _tlmTime
6861  )
6862  {
6863  // Check to see if it is the first time
6864  if (not this->m_first_update_SequencesFailed) {
6865  // Check to see if value has changed. If not, don't write it.
6866  if (arg == this->m_last_SequencesFailed) {
6867  return;
6868  }
6869  else {
6870  this->m_last_SequencesFailed = arg;
6871  }
6872  }
6873  else {
6874  this->m_first_update_SequencesFailed = false;
6875  this->m_last_SequencesFailed = arg;
6876  }
6877 
6878  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6879  if (
6880  this->m_timeCaller_OutputPort[0].isConnected() &&
6881  (_tlmTime == Fw::ZERO_TIME)
6882  ) {
6883  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6884  }
6885 
6886  Fw::TlmBuffer _tlmBuff;
6887  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
6888  FW_ASSERT(
6889  _stat == Fw::FW_SERIALIZE_OK,
6890  static_cast<FwAssertArgType>(_stat)
6891  );
6892 
6893  FwChanIdType _id;
6894 
6895  _id = this->getIdBase() + CHANNELID_SEQUENCESFAILED;
6896 
6897  this->m_tlmOut_OutputPort[0].invoke(
6898  _id,
6899  _tlmTime,
6900  _tlmBuff
6901  );
6902  }
6903  }
6904 
6907  U64 arg,
6908  Fw::Time _tlmTime
6909  )
6910  {
6911  // Check to see if it is the first time
6912  if (not this->m_first_update_SequencesCancelled) {
6913  // Check to see if value has changed. If not, don't write it.
6914  if (arg == this->m_last_SequencesCancelled) {
6915  return;
6916  }
6917  else {
6918  this->m_last_SequencesCancelled = arg;
6919  }
6920  }
6921  else {
6922  this->m_first_update_SequencesCancelled = false;
6923  this->m_last_SequencesCancelled = arg;
6924  }
6925 
6926  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6927  if (
6928  this->m_timeCaller_OutputPort[0].isConnected() &&
6929  (_tlmTime == Fw::ZERO_TIME)
6930  ) {
6931  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6932  }
6933 
6934  Fw::TlmBuffer _tlmBuff;
6935  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
6936  FW_ASSERT(
6937  _stat == Fw::FW_SERIALIZE_OK,
6938  static_cast<FwAssertArgType>(_stat)
6939  );
6940 
6941  FwChanIdType _id;
6942 
6943  _id = this->getIdBase() + CHANNELID_SEQUENCESCANCELLED;
6944 
6945  this->m_tlmOut_OutputPort[0].invoke(
6946  _id,
6947  _tlmTime,
6948  _tlmBuff
6949  );
6950  }
6951  }
6952 
6955  U64 arg,
6956  Fw::Time _tlmTime
6957  )
6958  {
6959  // Check to see if it is the first time
6960  if (not this->m_first_update_StatementsDispatched) {
6961  // Check to see if value has changed. If not, don't write it.
6962  if (arg == this->m_last_StatementsDispatched) {
6963  return;
6964  }
6965  else {
6966  this->m_last_StatementsDispatched = arg;
6967  }
6968  }
6969  else {
6970  this->m_first_update_StatementsDispatched = false;
6971  this->m_last_StatementsDispatched = arg;
6972  }
6973 
6974  if (this->m_tlmOut_OutputPort[0].isConnected()) {
6975  if (
6976  this->m_timeCaller_OutputPort[0].isConnected() &&
6977  (_tlmTime == Fw::ZERO_TIME)
6978  ) {
6979  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
6980  }
6981 
6982  Fw::TlmBuffer _tlmBuff;
6983  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
6984  FW_ASSERT(
6985  _stat == Fw::FW_SERIALIZE_OK,
6986  static_cast<FwAssertArgType>(_stat)
6987  );
6988 
6989  FwChanIdType _id;
6990 
6991  _id = this->getIdBase() + CHANNELID_STATEMENTSDISPATCHED;
6992 
6993  this->m_tlmOut_OutputPort[0].invoke(
6994  _id,
6995  _tlmTime,
6996  _tlmBuff
6997  );
6998  }
6999  }
7000 
7003  U64 arg,
7004  Fw::Time _tlmTime
7005  )
7006  {
7007  // Check to see if it is the first time
7008  if (not this->m_first_update_StatementsFailed) {
7009  // Check to see if value has changed. If not, don't write it.
7010  if (arg == this->m_last_StatementsFailed) {
7011  return;
7012  }
7013  else {
7014  this->m_last_StatementsFailed = arg;
7015  }
7016  }
7017  else {
7018  this->m_first_update_StatementsFailed = false;
7019  this->m_last_StatementsFailed = arg;
7020  }
7021 
7022  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7023  if (
7024  this->m_timeCaller_OutputPort[0].isConnected() &&
7025  (_tlmTime == Fw::ZERO_TIME)
7026  ) {
7027  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7028  }
7029 
7030  Fw::TlmBuffer _tlmBuff;
7031  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
7032  FW_ASSERT(
7033  _stat == Fw::FW_SERIALIZE_OK,
7034  static_cast<FwAssertArgType>(_stat)
7035  );
7036 
7037  FwChanIdType _id;
7038 
7039  _id = this->getIdBase() + CHANNELID_STATEMENTSFAILED;
7040 
7041  this->m_tlmOut_OutputPort[0].invoke(
7042  _id,
7043  _tlmTime,
7044  _tlmBuff
7045  );
7046  }
7047  }
7048 
7052  Fw::Time _tlmTime
7053  )
7054  {
7055  // Check to see if it is the first time
7056  if (not this->m_first_update_LastDirectiveError) {
7057  // Check to see if value has changed. If not, don't write it.
7058  if (arg == this->m_last_LastDirectiveError) {
7059  return;
7060  }
7061  else {
7062  this->m_last_LastDirectiveError = arg;
7063  }
7064  }
7065  else {
7066  this->m_first_update_LastDirectiveError = false;
7067  this->m_last_LastDirectiveError = arg;
7068  }
7069 
7070  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7071  if (
7072  this->m_timeCaller_OutputPort[0].isConnected() &&
7073  (_tlmTime == Fw::ZERO_TIME)
7074  ) {
7075  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7076  }
7077 
7078  Fw::TlmBuffer _tlmBuff;
7079  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
7080  FW_ASSERT(
7081  _stat == Fw::FW_SERIALIZE_OK,
7082  static_cast<FwAssertArgType>(_stat)
7083  );
7084 
7085  FwChanIdType _id;
7086 
7087  _id = this->getIdBase() + CHANNELID_LASTDIRECTIVEERROR;
7088 
7089  this->m_tlmOut_OutputPort[0].invoke(
7090  _id,
7091  _tlmTime,
7092  _tlmBuff
7093  );
7094  }
7095  }
7096 
7099  const Fw::StringBase& arg,
7100  Fw::Time _tlmTime
7101  )
7102  {
7103  // Check to see if it is the first time
7104  if (not this->m_first_update_SeqPath) {
7105  // Check to see if value has changed. If not, don't write it.
7106  if (arg == this->m_last_SeqPath) {
7107  return;
7108  }
7109  else {
7110  this->m_last_SeqPath = arg;
7111  }
7112  }
7113  else {
7114  this->m_first_update_SeqPath = false;
7115  this->m_last_SeqPath = arg;
7116  }
7117 
7118  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7119  if (
7120  this->m_timeCaller_OutputPort[0].isConnected() &&
7121  (_tlmTime == Fw::ZERO_TIME)
7122  ) {
7123  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7124  }
7125 
7126  Fw::TlmBuffer _tlmBuff;
7127  Fw::SerializeStatus _stat = arg.serializeTo(_tlmBuff, FW_MIN(FW_TLM_STRING_MAX_SIZE, 200));
7128  FW_ASSERT(
7129  _stat == Fw::FW_SERIALIZE_OK,
7130  static_cast<FwAssertArgType>(_stat)
7131  );
7132 
7133  FwChanIdType _id;
7134 
7135  _id = this->getIdBase() + CHANNELID_SEQPATH;
7136 
7137  this->m_tlmOut_OutputPort[0].invoke(
7138  _id,
7139  _tlmTime,
7140  _tlmBuff
7141  );
7142  }
7143  }
7144 
7147  U32 arg,
7148  Fw::Time _tlmTime
7149  )
7150  {
7151  // Check to see if it is the first time
7152  if (not this->m_first_update_DebugBreakpointIdx) {
7153  // Check to see if value has changed. If not, don't write it.
7154  if (arg == this->m_last_DebugBreakpointIdx) {
7155  return;
7156  }
7157  else {
7158  this->m_last_DebugBreakpointIdx = arg;
7159  }
7160  }
7161  else {
7162  this->m_first_update_DebugBreakpointIdx = false;
7163  this->m_last_DebugBreakpointIdx = arg;
7164  }
7165 
7166  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7167  if (
7168  this->m_timeCaller_OutputPort[0].isConnected() &&
7169  (_tlmTime == Fw::ZERO_TIME)
7170  ) {
7171  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7172  }
7173 
7174  Fw::TlmBuffer _tlmBuff;
7175  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
7176  FW_ASSERT(
7177  _stat == Fw::FW_SERIALIZE_OK,
7178  static_cast<FwAssertArgType>(_stat)
7179  );
7180 
7181  FwChanIdType _id;
7182 
7183  _id = this->getIdBase() + CHANNELID_DEBUGBREAKPOINTIDX;
7184 
7185  this->m_tlmOut_OutputPort[0].invoke(
7186  _id,
7187  _tlmTime,
7188  _tlmBuff
7189  );
7190  }
7191  }
7192 
7196  Fw::Time _tlmTime
7197  )
7198  {
7199  // Check to see if it is the first time
7200  if (not this->m_first_update_Debug) {
7201  // Check to see if value has changed. If not, don't write it.
7202  if (arg == this->m_last_Debug) {
7203  return;
7204  }
7205  else {
7206  this->m_last_Debug = arg;
7207  }
7208  }
7209  else {
7210  this->m_first_update_Debug = false;
7211  this->m_last_Debug = arg;
7212  }
7213 
7214  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7215  if (
7216  this->m_timeCaller_OutputPort[0].isConnected() &&
7217  (_tlmTime == Fw::ZERO_TIME)
7218  ) {
7219  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7220  }
7221 
7222  Fw::TlmBuffer _tlmBuff;
7223  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
7224  FW_ASSERT(
7225  _stat == Fw::FW_SERIALIZE_OK,
7226  static_cast<FwAssertArgType>(_stat)
7227  );
7228 
7229  FwChanIdType _id;
7230 
7231  _id = this->getIdBase() + CHANNELID_DEBUG;
7232 
7233  this->m_tlmOut_OutputPort[0].invoke(
7234  _id,
7235  _tlmTime,
7236  _tlmBuff
7237  );
7238  }
7239  }
7240 
7243  F32 arg,
7244  Fw::Time _tlmTime
7245  )
7246  {
7247  // Check to see if it is the first time
7248  if (not this->m_first_update_PRM_STATEMENT_TIMEOUT_SECS) {
7249  // Check to see if value has changed. If not, don't write it.
7250  if (arg == this->m_last_PRM_STATEMENT_TIMEOUT_SECS) {
7251  return;
7252  }
7253  else {
7254  this->m_last_PRM_STATEMENT_TIMEOUT_SECS = arg;
7255  }
7256  }
7257  else {
7258  this->m_first_update_PRM_STATEMENT_TIMEOUT_SECS = false;
7259  this->m_last_PRM_STATEMENT_TIMEOUT_SECS = arg;
7260  }
7261 
7262  if (this->m_tlmOut_OutputPort[0].isConnected()) {
7263  if (
7264  this->m_timeCaller_OutputPort[0].isConnected() &&
7265  (_tlmTime == Fw::ZERO_TIME)
7266  ) {
7267  this->m_timeCaller_OutputPort[0].invoke(_tlmTime);
7268  }
7269 
7270  Fw::TlmBuffer _tlmBuff;
7271  Fw::SerializeStatus _stat = _tlmBuff.serializeFrom(arg);
7272  FW_ASSERT(
7273  _stat == Fw::FW_SERIALIZE_OK,
7274  static_cast<FwAssertArgType>(_stat)
7275  );
7276 
7277  FwChanIdType _id;
7278 
7280 
7281  this->m_tlmOut_OutputPort[0].invoke(
7282  _id,
7283  _tlmTime,
7284  _tlmBuff
7285  );
7286  }
7287  }
7288 
7289  // ----------------------------------------------------------------------
7290  // Parameter update hook
7291  // ----------------------------------------------------------------------
7292 
7295  {
7296  // Do nothing by default
7297  }
7298 
7301  {
7302  // Do nothing by default
7303  }
7304 
7305  // ----------------------------------------------------------------------
7306  // Parameter get functions
7307  // ----------------------------------------------------------------------
7308 
7311  {
7312  F32 _local{};
7313  this->m_paramLock.lock();
7314  valid = this->m_param_STATEMENT_TIMEOUT_SECS_valid;
7315  _local = this->m_STATEMENT_TIMEOUT_SECS;
7316  this->m_paramLock.unLock();
7317  return _local;
7318  }
7319 
7320  // ----------------------------------------------------------------------
7321  // Time
7322  // ----------------------------------------------------------------------
7323 
7325  getTime() const
7326  {
7327  if (this->m_timeCaller_OutputPort[0].isConnected()) {
7328  Fw::Time _time;
7329  this->m_timeCaller_OutputPort[0].invoke(_time);
7330  return _time;
7331  }
7332  else {
7333  return Fw::Time(TimeBase::TB_NONE, 0, 0);
7334  }
7335  }
7336 
7337  // ----------------------------------------------------------------------
7338  // Message dispatch functions
7339  // ----------------------------------------------------------------------
7340 
7341  Fw::QueuedComponentBase::MsgDispatchStatus FpySequencerComponentBase ::
7342  doDispatch()
7343  {
7344  ComponentIpcSerializableBuffer _msg;
7345  FwQueuePriorityType _priority = 0;
7346 
7347  Os::Queue::Status _msgStatus = this->m_queue.receive(
7348  _msg,
7350  _priority
7351  );
7352  FW_ASSERT(
7353  _msgStatus == Os::Queue::OP_OK,
7354  static_cast<FwAssertArgType>(_msgStatus)
7355  );
7356 
7357  // Reset to beginning of buffer
7358  _msg.resetDeser();
7359 
7360  FwEnumStoreType _desMsg = 0;
7361  Fw::SerializeStatus _deserStatus = _msg.deserializeTo(_desMsg);
7362  FW_ASSERT(
7363  _deserStatus == Fw::FW_SERIALIZE_OK,
7364  static_cast<FwAssertArgType>(_deserStatus)
7365  );
7366 
7367  MsgTypeEnum _msgType = static_cast<MsgTypeEnum>(_desMsg);
7368 
7369  if (_msgType == FPYSEQUENCER_COMPONENT_EXIT) {
7370  return MSG_DISPATCH_EXIT;
7371  }
7372 
7373  FwIndexType portNum = 0;
7374  _deserStatus = _msg.deserializeTo(portNum);
7375  FW_ASSERT(
7376  _deserStatus == Fw::FW_SERIALIZE_OK,
7377  static_cast<FwAssertArgType>(_deserStatus)
7378  );
7379 
7380  switch (_msgType) {
7381  // Handle async input port checkTimers
7382  case CHECKTIMERS_SCHED: {
7383  // Deserialize argument context
7384  U32 context;
7385  _deserStatus = _msg.deserializeTo(context);
7386  FW_ASSERT(
7387  _deserStatus == Fw::FW_SERIALIZE_OK,
7388  static_cast<FwAssertArgType>(_deserStatus)
7389  );
7390  // Call handler function
7391  this->checkTimers_handler(
7392  portNum,
7393  context
7394  );
7395 
7396  break;
7397  }
7398 
7399  // Handle async input port cmdResponseIn
7400  case CMDRESPONSEIN_CMDRESPONSE: {
7401  // Deserialize argument opCode
7402  FwOpcodeType opCode;
7403  _deserStatus = _msg.deserializeTo(opCode);
7404  FW_ASSERT(
7405  _deserStatus == Fw::FW_SERIALIZE_OK,
7406  static_cast<FwAssertArgType>(_deserStatus)
7407  );
7408 
7409  // Deserialize argument cmdSeq
7410  U32 cmdSeq;
7411  _deserStatus = _msg.deserializeTo(cmdSeq);
7412  FW_ASSERT(
7413  _deserStatus == Fw::FW_SERIALIZE_OK,
7414  static_cast<FwAssertArgType>(_deserStatus)
7415  );
7416 
7417  // Deserialize argument response
7418  Fw::CmdResponse response;
7419  _deserStatus = _msg.deserializeTo(response);
7420  FW_ASSERT(
7421  _deserStatus == Fw::FW_SERIALIZE_OK,
7422  static_cast<FwAssertArgType>(_deserStatus)
7423  );
7424  // Call handler function
7425  this->cmdResponseIn_handler(
7426  portNum,
7427  opCode,
7428  cmdSeq,
7429  response
7430  );
7431 
7432  break;
7433  }
7434 
7435  // Handle async input port pingIn
7436  case PINGIN_PING: {
7437  // Deserialize argument key
7438  U32 key;
7439  _deserStatus = _msg.deserializeTo(key);
7440  FW_ASSERT(
7441  _deserStatus == Fw::FW_SERIALIZE_OK,
7442  static_cast<FwAssertArgType>(_deserStatus)
7443  );
7444  // Call handler function
7445  this->pingIn_handler(
7446  portNum,
7447  key
7448  );
7449 
7450  break;
7451  }
7452 
7453  // Handle async input port seqRunIn
7454  case SEQRUNIN_CMDSEQIN: {
7455  // Deserialize argument filename
7456  char __fprime_ac_filename_buffer[Fw::StringBase::BUFFER_SIZE(240)];
7457  Fw::ExternalString filename(__fprime_ac_filename_buffer, sizeof __fprime_ac_filename_buffer);
7458  _deserStatus = _msg.deserializeTo(filename);
7459  FW_ASSERT(
7460  _deserStatus == Fw::FW_SERIALIZE_OK,
7461  static_cast<FwAssertArgType>(_deserStatus)
7462  );
7463  // Call handler function
7464  this->seqRunIn_handler(
7465  portNum,
7466  filename
7467  );
7468 
7469  break;
7470  }
7471 
7472  // Handle async input port tlmWrite
7473  case TLMWRITE_SCHED: {
7474  // Deserialize argument context
7475  U32 context;
7476  _deserStatus = _msg.deserializeTo(context);
7477  FW_ASSERT(
7478  _deserStatus == Fw::FW_SERIALIZE_OK,
7479  static_cast<FwAssertArgType>(_deserStatus)
7480  );
7481  // Call handler function
7482  this->tlmWrite_handler(
7483  portNum,
7484  context
7485  );
7486 
7487  break;
7488  }
7489 
7490  // Handle command RUN
7491  case CMD_RUN: {
7492  // Deserialize opcode
7493  FwOpcodeType _opCode = 0;
7494  _deserStatus = _msg.deserializeTo(_opCode);
7495  FW_ASSERT (
7496  _deserStatus == Fw::FW_SERIALIZE_OK,
7497  static_cast<FwAssertArgType>(_deserStatus)
7498  );
7499 
7500  // Deserialize command sequence
7501  U32 _cmdSeq = 0;
7502  _deserStatus = _msg.deserializeTo(_cmdSeq);
7503  FW_ASSERT (
7504  _deserStatus == Fw::FW_SERIALIZE_OK,
7505  static_cast<FwAssertArgType>(_deserStatus)
7506  );
7507 
7508  // Deserialize command argument buffer
7509  Fw::CmdArgBuffer args;
7510  _deserStatus = _msg.deserializeTo(args);
7511  FW_ASSERT (
7512  _deserStatus == Fw::FW_SERIALIZE_OK,
7513  static_cast<FwAssertArgType>(_deserStatus)
7514  );
7515 
7516  // Reset buffer
7517  args.resetDeser();
7518 
7519  // Deserialize argument fileName
7520  Fw::CmdStringArg fileName;
7521  _deserStatus = args.deserializeTo(fileName);
7522  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7523  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7524  this->cmdResponse_out(
7525  _opCode,
7526  _cmdSeq,
7528  );
7529  }
7530  // Don't crash the task if bad arguments were passed from the ground
7531  break;
7532  }
7533 
7534  // Deserialize argument block
7536  _deserStatus = args.deserializeTo(block);
7537  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7538  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7539  this->cmdResponse_out(
7540  _opCode,
7541  _cmdSeq,
7543  );
7544  }
7545  // Don't crash the task if bad arguments were passed from the ground
7546  break;
7547  }
7548 
7549  // Make sure there was no data left over.
7550  // That means the argument buffer size was incorrect.
7551 #if FW_CMD_CHECK_RESIDUAL
7552  if (args.getBuffLeft() != 0) {
7553  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7554  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7555  }
7556  // Don't crash the task if bad arguments were passed from the ground
7557  break;
7558  }
7559 #endif
7560 
7561  // Call handler function
7562  this->RUN_cmdHandler(
7563  _opCode, _cmdSeq,
7564  fileName,
7565  block
7566  );
7567 
7568  break;
7569  }
7570 
7571  // Handle command VALIDATE
7572  case CMD_VALIDATE: {
7573  // Deserialize opcode
7574  FwOpcodeType _opCode = 0;
7575  _deserStatus = _msg.deserializeTo(_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.deserializeTo(_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.deserializeTo(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 fileName
7601  Fw::CmdStringArg fileName;
7602  _deserStatus = args.deserializeTo(fileName);
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
7628  this->VALIDATE_cmdHandler(
7629  _opCode, _cmdSeq,
7630  fileName
7631  );
7632 
7633  break;
7634  }
7635 
7636  // Handle command RUN_VALIDATED
7637  case CMD_RUN_VALIDATED: {
7638  // Deserialize opcode
7639  FwOpcodeType _opCode = 0;
7640  _deserStatus = _msg.deserializeTo(_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.deserializeTo(_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.deserializeTo(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  // Deserialize argument block
7667  _deserStatus = args.deserializeTo(block);
7668  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7669  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7670  this->cmdResponse_out(
7671  _opCode,
7672  _cmdSeq,
7674  );
7675  }
7676  // Don't crash the task if bad arguments were passed from the ground
7677  break;
7678  }
7679 
7680  // Make sure there was no data left over.
7681  // That means the argument buffer size was incorrect.
7682 #if FW_CMD_CHECK_RESIDUAL
7683  if (args.getBuffLeft() != 0) {
7684  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7685  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7686  }
7687  // Don't crash the task if bad arguments were passed from the ground
7688  break;
7689  }
7690 #endif
7691 
7692  // Call handler function
7694  _opCode, _cmdSeq,
7695  block
7696  );
7697 
7698  break;
7699  }
7700 
7701  // Handle command CANCEL
7702  case CMD_CANCEL: {
7703  // Deserialize opcode
7704  FwOpcodeType _opCode = 0;
7705  _deserStatus = _msg.deserializeTo(_opCode);
7706  FW_ASSERT (
7707  _deserStatus == Fw::FW_SERIALIZE_OK,
7708  static_cast<FwAssertArgType>(_deserStatus)
7709  );
7710 
7711  // Deserialize command sequence
7712  U32 _cmdSeq = 0;
7713  _deserStatus = _msg.deserializeTo(_cmdSeq);
7714  FW_ASSERT (
7715  _deserStatus == Fw::FW_SERIALIZE_OK,
7716  static_cast<FwAssertArgType>(_deserStatus)
7717  );
7718 
7719  // Deserialize command argument buffer
7720  Fw::CmdArgBuffer args;
7721  _deserStatus = _msg.deserializeTo(args);
7722  FW_ASSERT (
7723  _deserStatus == Fw::FW_SERIALIZE_OK,
7724  static_cast<FwAssertArgType>(_deserStatus)
7725  );
7726 
7727  // Reset buffer
7728  args.resetDeser();
7729 
7730  // Make sure there was no data left over.
7731  // That means the argument buffer size was incorrect.
7732 #if FW_CMD_CHECK_RESIDUAL
7733  if (args.getBuffLeft() != 0) {
7734  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7735  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7736  }
7737  // Don't crash the task if bad arguments were passed from the ground
7738  break;
7739  }
7740 #endif
7741 
7742  // Call handler function
7743  this->CANCEL_cmdHandler(_opCode, _cmdSeq);
7744 
7745  break;
7746  }
7747 
7748  // Handle command DEBUG_SET_BREAKPOINT
7749  case CMD_DEBUG_SET_BREAKPOINT: {
7750  // Deserialize opcode
7751  FwOpcodeType _opCode = 0;
7752  _deserStatus = _msg.deserializeTo(_opCode);
7753  FW_ASSERT (
7754  _deserStatus == Fw::FW_SERIALIZE_OK,
7755  static_cast<FwAssertArgType>(_deserStatus)
7756  );
7757 
7758  // Deserialize command sequence
7759  U32 _cmdSeq = 0;
7760  _deserStatus = _msg.deserializeTo(_cmdSeq);
7761  FW_ASSERT (
7762  _deserStatus == Fw::FW_SERIALIZE_OK,
7763  static_cast<FwAssertArgType>(_deserStatus)
7764  );
7765 
7766  // Deserialize command argument buffer
7767  Fw::CmdArgBuffer args;
7768  _deserStatus = _msg.deserializeTo(args);
7769  FW_ASSERT (
7770  _deserStatus == Fw::FW_SERIALIZE_OK,
7771  static_cast<FwAssertArgType>(_deserStatus)
7772  );
7773 
7774  // Reset buffer
7775  args.resetDeser();
7776 
7777  // Deserialize argument stmtIdx
7778  U32 stmtIdx;
7779  _deserStatus = args.deserializeTo(stmtIdx);
7780  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7781  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7782  this->cmdResponse_out(
7783  _opCode,
7784  _cmdSeq,
7786  );
7787  }
7788  // Don't crash the task if bad arguments were passed from the ground
7789  break;
7790  }
7791 
7792  // Deserialize argument breakOnce
7793  bool breakOnce;
7794  _deserStatus = args.deserializeTo(breakOnce);
7795  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7796  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7797  this->cmdResponse_out(
7798  _opCode,
7799  _cmdSeq,
7801  );
7802  }
7803  // Don't crash the task if bad arguments were passed from the ground
7804  break;
7805  }
7806 
7807  // Make sure there was no data left over.
7808  // That means the argument buffer size was incorrect.
7809 #if FW_CMD_CHECK_RESIDUAL
7810  if (args.getBuffLeft() != 0) {
7811  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7812  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7813  }
7814  // Don't crash the task if bad arguments were passed from the ground
7815  break;
7816  }
7817 #endif
7818 
7819  // Call handler function
7821  _opCode, _cmdSeq,
7822  stmtIdx,
7823  breakOnce
7824  );
7825 
7826  break;
7827  }
7828 
7829  // Handle command DEBUG_BREAK
7830  case CMD_DEBUG_BREAK: {
7831  // Deserialize opcode
7832  FwOpcodeType _opCode = 0;
7833  _deserStatus = _msg.deserializeTo(_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.deserializeTo(_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.deserializeTo(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  // Deserialize argument breakOnce
7859  bool breakOnce;
7860  _deserStatus = args.deserializeTo(breakOnce);
7861  if (_deserStatus != Fw::FW_SERIALIZE_OK) {
7862  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7863  this->cmdResponse_out(
7864  _opCode,
7865  _cmdSeq,
7867  );
7868  }
7869  // Don't crash the task if bad arguments were passed from the ground
7870  break;
7871  }
7872 
7873  // Make sure there was no data left over.
7874  // That means the argument buffer size was incorrect.
7875 #if FW_CMD_CHECK_RESIDUAL
7876  if (args.getBuffLeft() != 0) {
7877  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7878  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7879  }
7880  // Don't crash the task if bad arguments were passed from the ground
7881  break;
7882  }
7883 #endif
7884 
7885  // Call handler function
7886  this->DEBUG_BREAK_cmdHandler(
7887  _opCode, _cmdSeq,
7888  breakOnce
7889  );
7890 
7891  break;
7892  }
7893 
7894  // Handle command DEBUG_CONTINUE
7895  case CMD_DEBUG_CONTINUE: {
7896  // Deserialize opcode
7897  FwOpcodeType _opCode = 0;
7898  _deserStatus = _msg.deserializeTo(_opCode);
7899  FW_ASSERT (
7900  _deserStatus == Fw::FW_SERIALIZE_OK,
7901  static_cast<FwAssertArgType>(_deserStatus)
7902  );
7903 
7904  // Deserialize command sequence
7905  U32 _cmdSeq = 0;
7906  _deserStatus = _msg.deserializeTo(_cmdSeq);
7907  FW_ASSERT (
7908  _deserStatus == Fw::FW_SERIALIZE_OK,
7909  static_cast<FwAssertArgType>(_deserStatus)
7910  );
7911 
7912  // Deserialize command argument buffer
7913  Fw::CmdArgBuffer args;
7914  _deserStatus = _msg.deserializeTo(args);
7915  FW_ASSERT (
7916  _deserStatus == Fw::FW_SERIALIZE_OK,
7917  static_cast<FwAssertArgType>(_deserStatus)
7918  );
7919 
7920  // Reset buffer
7921  args.resetDeser();
7922 
7923  // Make sure there was no data left over.
7924  // That means the argument buffer size was incorrect.
7925 #if FW_CMD_CHECK_RESIDUAL
7926  if (args.getBuffLeft() != 0) {
7927  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7928  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7929  }
7930  // Don't crash the task if bad arguments were passed from the ground
7931  break;
7932  }
7933 #endif
7934 
7935  // Call handler function
7936  this->DEBUG_CONTINUE_cmdHandler(_opCode, _cmdSeq);
7937 
7938  break;
7939  }
7940 
7941  // Handle command DEBUG_CLEAR_BREAKPOINT
7942  case CMD_DEBUG_CLEAR_BREAKPOINT: {
7943  // Deserialize opcode
7944  FwOpcodeType _opCode = 0;
7945  _deserStatus = _msg.deserializeTo(_opCode);
7946  FW_ASSERT (
7947  _deserStatus == Fw::FW_SERIALIZE_OK,
7948  static_cast<FwAssertArgType>(_deserStatus)
7949  );
7950 
7951  // Deserialize command sequence
7952  U32 _cmdSeq = 0;
7953  _deserStatus = _msg.deserializeTo(_cmdSeq);
7954  FW_ASSERT (
7955  _deserStatus == Fw::FW_SERIALIZE_OK,
7956  static_cast<FwAssertArgType>(_deserStatus)
7957  );
7958 
7959  // Deserialize command argument buffer
7960  Fw::CmdArgBuffer args;
7961  _deserStatus = _msg.deserializeTo(args);
7962  FW_ASSERT (
7963  _deserStatus == Fw::FW_SERIALIZE_OK,
7964  static_cast<FwAssertArgType>(_deserStatus)
7965  );
7966 
7967  // Reset buffer
7968  args.resetDeser();
7969 
7970  // Make sure there was no data left over.
7971  // That means the argument buffer size was incorrect.
7972 #if FW_CMD_CHECK_RESIDUAL
7973  if (args.getBuffLeft() != 0) {
7974  if (this->m_cmdResponseOut_OutputPort[0].isConnected()) {
7975  this->cmdResponse_out(_opCode, _cmdSeq, Fw::CmdResponse::FORMAT_ERROR);
7976  }
7977  // Don't crash the task if bad arguments were passed from the ground
7978  break;
7979  }
7980 #endif
7981 
7982  // Call handler function
7983  this->DEBUG_CLEAR_BREAKPOINT_cmdHandler(_opCode, _cmdSeq);
7984 
7985  break;
7986  }
7987 
7988  // Handle internal interface directive_binaryRegOp
7989  case INT_IF_DIRECTIVE_BINARYREGOP: {
7991  _deserStatus = _msg.deserializeTo(directive);
7992 
7993  // Internal interface should always deserialize
7994  FW_ASSERT(
7995  Fw::FW_SERIALIZE_OK == _deserStatus,
7996  static_cast<FwAssertArgType>(_deserStatus)
7997  );
7998 
7999  // Make sure there was no data left over.
8000  // That means the buffer size was incorrect.
8001  FW_ASSERT(
8002  _msg.getBuffLeft() == 0,
8003  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8004  );
8005 
8006  // Call handler function
8008  directive
8009  );
8010 
8011  break;
8012  }
8013 
8014  // Handle internal interface directive_cmd
8015  case INT_IF_DIRECTIVE_CMD: {
8017  _deserStatus = _msg.deserializeTo(directive);
8018 
8019  // Internal interface should always deserialize
8020  FW_ASSERT(
8021  Fw::FW_SERIALIZE_OK == _deserStatus,
8022  static_cast<FwAssertArgType>(_deserStatus)
8023  );
8024 
8025  // Make sure there was no data left over.
8026  // That means the buffer size was incorrect.
8027  FW_ASSERT(
8028  _msg.getBuffLeft() == 0,
8029  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8030  );
8031 
8032  // Call handler function
8034  directive
8035  );
8036 
8037  break;
8038  }
8039 
8040  // Handle internal interface directive_deserSerReg
8041  case INT_IF_DIRECTIVE_DESERSERREG: {
8043  _deserStatus = _msg.deserializeTo(directive);
8044 
8045  // Internal interface should always deserialize
8046  FW_ASSERT(
8047  Fw::FW_SERIALIZE_OK == _deserStatus,
8048  static_cast<FwAssertArgType>(_deserStatus)
8049  );
8050 
8051  // Make sure there was no data left over.
8052  // That means the buffer size was incorrect.
8053  FW_ASSERT(
8054  _msg.getBuffLeft() == 0,
8055  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8056  );
8057 
8058  // Call handler function
8060  directive
8061  );
8062 
8063  break;
8064  }
8065 
8066  // Handle internal interface directive_exit
8067  case INT_IF_DIRECTIVE_EXIT: {
8069  _deserStatus = _msg.deserializeTo(directive);
8070 
8071  // Internal interface should always deserialize
8072  FW_ASSERT(
8073  Fw::FW_SERIALIZE_OK == _deserStatus,
8074  static_cast<FwAssertArgType>(_deserStatus)
8075  );
8076 
8077  // Make sure there was no data left over.
8078  // That means the buffer size was incorrect.
8079  FW_ASSERT(
8080  _msg.getBuffLeft() == 0,
8081  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8082  );
8083 
8084  // Call handler function
8086  directive
8087  );
8088 
8089  break;
8090  }
8091 
8092  // Handle internal interface directive_getPrm
8093  case INT_IF_DIRECTIVE_GETPRM: {
8095  _deserStatus = _msg.deserializeTo(directive);
8096 
8097  // Internal interface should always deserialize
8098  FW_ASSERT(
8099  Fw::FW_SERIALIZE_OK == _deserStatus,
8100  static_cast<FwAssertArgType>(_deserStatus)
8101  );
8102 
8103  // Make sure there was no data left over.
8104  // That means the buffer size was incorrect.
8105  FW_ASSERT(
8106  _msg.getBuffLeft() == 0,
8107  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8108  );
8109 
8110  // Call handler function
8112  directive
8113  );
8114 
8115  break;
8116  }
8117 
8118  // Handle internal interface directive_getTlm
8119  case INT_IF_DIRECTIVE_GETTLM: {
8121  _deserStatus = _msg.deserializeTo(directive);
8122 
8123  // Internal interface should always deserialize
8124  FW_ASSERT(
8125  Fw::FW_SERIALIZE_OK == _deserStatus,
8126  static_cast<FwAssertArgType>(_deserStatus)
8127  );
8128 
8129  // Make sure there was no data left over.
8130  // That means the buffer size was incorrect.
8131  FW_ASSERT(
8132  _msg.getBuffLeft() == 0,
8133  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8134  );
8135 
8136  // Call handler function
8138  directive
8139  );
8140 
8141  break;
8142  }
8143 
8144  // Handle internal interface directive_goto
8145  case INT_IF_DIRECTIVE_GOTO: {
8147  _deserStatus = _msg.deserializeTo(directive);
8148 
8149  // Internal interface should always deserialize
8150  FW_ASSERT(
8151  Fw::FW_SERIALIZE_OK == _deserStatus,
8152  static_cast<FwAssertArgType>(_deserStatus)
8153  );
8154 
8155  // Make sure there was no data left over.
8156  // That means the buffer size was incorrect.
8157  FW_ASSERT(
8158  _msg.getBuffLeft() == 0,
8159  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8160  );
8161 
8162  // Call handler function
8164  directive
8165  );
8166 
8167  break;
8168  }
8169 
8170  // Handle internal interface directive_if
8171  case INT_IF_DIRECTIVE_IF: {
8173  _deserStatus = _msg.deserializeTo(directive);
8174 
8175  // Internal interface should always deserialize
8176  FW_ASSERT(
8177  Fw::FW_SERIALIZE_OK == _deserStatus,
8178  static_cast<FwAssertArgType>(_deserStatus)
8179  );
8180 
8181  // Make sure there was no data left over.
8182  // That means the buffer size was incorrect.
8183  FW_ASSERT(
8184  _msg.getBuffLeft() == 0,
8185  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8186  );
8187 
8188  // Call handler function
8190  directive
8191  );
8192 
8193  break;
8194  }
8195 
8196  // Handle internal interface directive_noOp
8197  case INT_IF_DIRECTIVE_NOOP: {
8199  _deserStatus = _msg.deserializeTo(directive);
8200 
8201  // Internal interface should always deserialize
8202  FW_ASSERT(
8203  Fw::FW_SERIALIZE_OK == _deserStatus,
8204  static_cast<FwAssertArgType>(_deserStatus)
8205  );
8206 
8207  // Make sure there was no data left over.
8208  // That means the buffer size was incorrect.
8209  FW_ASSERT(
8210  _msg.getBuffLeft() == 0,
8211  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8212  );
8213 
8214  // Call handler function
8216  directive
8217  );
8218 
8219  break;
8220  }
8221 
8222  // Handle internal interface directive_setReg
8223  case INT_IF_DIRECTIVE_SETREG: {
8225  _deserStatus = _msg.deserializeTo(directive);
8226 
8227  // Internal interface should always deserialize
8228  FW_ASSERT(
8229  Fw::FW_SERIALIZE_OK == _deserStatus,
8230  static_cast<FwAssertArgType>(_deserStatus)
8231  );
8232 
8233  // Make sure there was no data left over.
8234  // That means the buffer size was incorrect.
8235  FW_ASSERT(
8236  _msg.getBuffLeft() == 0,
8237  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8238  );
8239 
8240  // Call handler function
8242  directive
8243  );
8244 
8245  break;
8246  }
8247 
8248  // Handle internal interface directive_setSerReg
8249  case INT_IF_DIRECTIVE_SETSERREG: {
8251  _deserStatus = _msg.deserializeTo(directive);
8252 
8253  // Internal interface should always deserialize
8254  FW_ASSERT(
8255  Fw::FW_SERIALIZE_OK == _deserStatus,
8256  static_cast<FwAssertArgType>(_deserStatus)
8257  );
8258 
8259  // Make sure there was no data left over.
8260  // That means the buffer size was incorrect.
8261  FW_ASSERT(
8262  _msg.getBuffLeft() == 0,
8263  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8264  );
8265 
8266  // Call handler function
8268  directive
8269  );
8270 
8271  break;
8272  }
8273 
8274  // Handle internal interface directive_unaryRegOp
8275  case INT_IF_DIRECTIVE_UNARYREGOP: {
8277  _deserStatus = _msg.deserializeTo(directive);
8278 
8279  // Internal interface should always deserialize
8280  FW_ASSERT(
8281  Fw::FW_SERIALIZE_OK == _deserStatus,
8282  static_cast<FwAssertArgType>(_deserStatus)
8283  );
8284 
8285  // Make sure there was no data left over.
8286  // That means the buffer size was incorrect.
8287  FW_ASSERT(
8288  _msg.getBuffLeft() == 0,
8289  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8290  );
8291 
8292  // Call handler function
8294  directive
8295  );
8296 
8297  break;
8298  }
8299 
8300  // Handle internal interface directive_waitAbs
8301  case INT_IF_DIRECTIVE_WAITABS: {
8303  _deserStatus = _msg.deserializeTo(directive);
8304 
8305  // Internal interface should always deserialize
8306  FW_ASSERT(
8307  Fw::FW_SERIALIZE_OK == _deserStatus,
8308  static_cast<FwAssertArgType>(_deserStatus)
8309  );
8310 
8311  // Make sure there was no data left over.
8312  // That means the buffer size was incorrect.
8313  FW_ASSERT(
8314  _msg.getBuffLeft() == 0,
8315  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8316  );
8317 
8318  // Call handler function
8320  directive
8321  );
8322 
8323  break;
8324  }
8325 
8326  // Handle internal interface directive_waitRel
8327  case INT_IF_DIRECTIVE_WAITREL: {
8329  _deserStatus = _msg.deserializeTo(directive);
8330 
8331  // Internal interface should always deserialize
8332  FW_ASSERT(
8333  Fw::FW_SERIALIZE_OK == _deserStatus,
8334  static_cast<FwAssertArgType>(_deserStatus)
8335  );
8336 
8337  // Make sure there was no data left over.
8338  // That means the buffer size was incorrect.
8339  FW_ASSERT(
8340  _msg.getBuffLeft() == 0,
8341  static_cast<FwAssertArgType>(_msg.getBuffLeft())
8342  );
8343 
8344  // Call handler function
8346  directive
8347  );
8348 
8349  break;
8350  }
8351 
8352 
8353  // Handle signals to internal state machines
8354  case INTERNAL_STATE_MACHINE_SIGNAL:
8355  this->smDispatch(_msg);
8356  break;
8357 
8358  default:
8359  return MSG_DISPATCH_ERROR;
8360  }
8361 
8362  return MSG_DISPATCH_OK;
8363  }
8364 
8365  // ----------------------------------------------------------------------
8366  // Calls for messages received on special input ports
8367  // ----------------------------------------------------------------------
8368 
8369  void FpySequencerComponentBase ::
8370  m_p_cmdIn_in(
8371  Fw::PassiveComponentBase* callComp,
8372  FwIndexType portNum,
8373  FwOpcodeType opCode,
8374  U32 cmdSeq,
8375  Fw::CmdArgBuffer& args
8376  )
8377  {
8378  FW_ASSERT(callComp);
8379  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8380 
8381  const U32 idBase = callComp->getIdBase();
8382  FW_ASSERT(opCode >= idBase, static_cast<FwAssertArgType>(opCode), static_cast<FwAssertArgType>(idBase));
8383 
8384  // Select base class function based on opcode
8385  switch (opCode - idBase) {
8386  case OPCODE_RUN: {
8387  compPtr->RUN_cmdHandlerBase(
8388  opCode,
8389  cmdSeq,
8390  args
8391  );
8392  break;
8393  }
8394 
8395  case OPCODE_VALIDATE: {
8396  compPtr->VALIDATE_cmdHandlerBase(
8397  opCode,
8398  cmdSeq,
8399  args
8400  );
8401  break;
8402  }
8403 
8404  case OPCODE_RUN_VALIDATED: {
8405  compPtr->RUN_VALIDATED_cmdHandlerBase(
8406  opCode,
8407  cmdSeq,
8408  args
8409  );
8410  break;
8411  }
8412 
8413  case OPCODE_CANCEL: {
8414  compPtr->CANCEL_cmdHandlerBase(
8415  opCode,
8416  cmdSeq,
8417  args
8418  );
8419  break;
8420  }
8421 
8423  compPtr->DEBUG_SET_BREAKPOINT_cmdHandlerBase(
8424  opCode,
8425  cmdSeq,
8426  args
8427  );
8428  break;
8429  }
8430 
8431  case OPCODE_DEBUG_BREAK: {
8432  compPtr->DEBUG_BREAK_cmdHandlerBase(
8433  opCode,
8434  cmdSeq,
8435  args
8436  );
8437  break;
8438  }
8439 
8440  case OPCODE_DEBUG_CONTINUE: {
8441  compPtr->DEBUG_CONTINUE_cmdHandlerBase(
8442  opCode,
8443  cmdSeq,
8444  args
8445  );
8446  break;
8447  }
8448 
8450  compPtr->DEBUG_CLEAR_BREAKPOINT_cmdHandlerBase(
8451  opCode,
8452  cmdSeq,
8453  args
8454  );
8455  break;
8456  }
8457 
8459  Fw::CmdResponse _cstat = compPtr->paramSet_STATEMENT_TIMEOUT_SECS(args);
8460  compPtr->cmdResponse_out(
8461  opCode,
8462  cmdSeq,
8463  _cstat
8464  );
8465  break;
8466  }
8467 
8469  Fw::CmdResponse _cstat = compPtr->paramSave_STATEMENT_TIMEOUT_SECS();
8470  compPtr->cmdResponse_out(
8471  opCode,
8472  cmdSeq,
8473  _cstat
8474  );
8475  break;
8476  }
8477  }
8478  }
8479 
8480  // ----------------------------------------------------------------------
8481  // Calls for messages received on typed input ports
8482  // ----------------------------------------------------------------------
8483 
8484  void FpySequencerComponentBase ::
8485  m_p_checkTimers_in(
8486  Fw::PassiveComponentBase* callComp,
8487  FwIndexType portNum,
8488  U32 context
8489  )
8490  {
8491  FW_ASSERT(callComp);
8492  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8493  compPtr->checkTimers_handlerBase(
8494  portNum,
8495  context
8496  );
8497  }
8498 
8499  void FpySequencerComponentBase ::
8500  m_p_cmdResponseIn_in(
8501  Fw::PassiveComponentBase* callComp,
8502  FwIndexType portNum,
8503  FwOpcodeType opCode,
8504  U32 cmdSeq,
8505  const Fw::CmdResponse& response
8506  )
8507  {
8508  FW_ASSERT(callComp);
8509  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8510  compPtr->cmdResponseIn_handlerBase(
8511  portNum,
8512  opCode,
8513  cmdSeq,
8514  response
8515  );
8516  }
8517 
8518  void FpySequencerComponentBase ::
8519  m_p_pingIn_in(
8520  Fw::PassiveComponentBase* callComp,
8521  FwIndexType portNum,
8522  U32 key
8523  )
8524  {
8525  FW_ASSERT(callComp);
8526  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8527  compPtr->pingIn_handlerBase(
8528  portNum,
8529  key
8530  );
8531  }
8532 
8533  void FpySequencerComponentBase ::
8534  m_p_seqRunIn_in(
8535  Fw::PassiveComponentBase* callComp,
8536  FwIndexType portNum,
8537  const Fw::StringBase& filename
8538  )
8539  {
8540  FW_ASSERT(callComp);
8541  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8542  compPtr->seqRunIn_handlerBase(
8543  portNum,
8544  filename
8545  );
8546  }
8547 
8548  void FpySequencerComponentBase ::
8549  m_p_tlmWrite_in(
8550  Fw::PassiveComponentBase* callComp,
8551  FwIndexType portNum,
8552  U32 context
8553  )
8554  {
8555  FW_ASSERT(callComp);
8556  FpySequencerComponentBase* compPtr = static_cast<FpySequencerComponentBase*>(callComp);
8557  compPtr->tlmWrite_handlerBase(
8558  portNum,
8559  context
8560  );
8561  }
8562 
8563  // ----------------------------------------------------------------------
8564  // Send signal helper functions
8565  // ----------------------------------------------------------------------
8566 
8567  void FpySequencerComponentBase ::
8568  sendSignalStart(
8569  SmId smId,
8570  FwEnumStoreType signal,
8571  Fw::SerializeBufferBase& buffer
8572  )
8573  {
8575 
8576  // Serialize the message type
8577  status = buffer.serializeFrom(static_cast<FwEnumStoreType>(INTERNAL_STATE_MACHINE_SIGNAL));
8578  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8579 
8580  // Serialize the port number
8581  status = buffer.serializeFrom(static_cast<FwIndexType>(0));
8582  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8583 
8584  // Serialize the state machine ID
8585  status = buffer.serializeFrom(static_cast<FwEnumStoreType>(smId));
8586  FW_ASSERT (status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8587 
8588  // Serialize the signal
8589  status = buffer.serializeFrom(static_cast<FwEnumStoreType>(signal));
8590  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8591  }
8592 
8593  void FpySequencerComponentBase ::
8594  sequencer_sendSignalFinish(Fw::SerializeBufferBase& buffer)
8595  {
8596  // Send message
8598  Os::Queue::Status qStatus = this->m_queue.send(buffer, 9, _block);
8599 
8600  FW_ASSERT(
8601  qStatus == Os::Queue::OP_OK,
8602  static_cast<FwAssertArgType>(qStatus)
8603  );
8604  }
8605 
8606  // ----------------------------------------------------------------------
8607  // Helper functions for state machine dispatch
8608  // ----------------------------------------------------------------------
8609 
8610  void FpySequencerComponentBase ::
8611  smDispatch(Fw::SerializeBufferBase& buffer)
8612  {
8613  // Deserialize the state machine ID and signal
8614  FwEnumStoreType storedSmId;
8615  FwEnumStoreType storedSignal;
8616  FpySequencerComponentBase::deserializeSmIdAndSignal(buffer, storedSmId, storedSignal);
8617 
8618  // Select the target state machine instance
8619  const SmId smId = static_cast<SmId>(storedSmId);
8620  switch (smId) {
8621  case SmId::sequencer: {
8623  this->Svc_FpySequencer_SequencerStateMachine_smDispatch(buffer, this->m_stateMachine_sequencer, signal);
8624  break;
8625  }
8626  default:
8627  FW_ASSERT(0, static_cast<FwAssertArgType>(smId));
8628  break;
8629  }
8630  }
8631 
8632  void FpySequencerComponentBase ::
8633  deserializeSmIdAndSignal(
8634  Fw::SerializeBufferBase& buffer,
8635  FwEnumStoreType& smId,
8636  FwEnumStoreType& signal
8637  )
8638  {
8639  // Move deserialization beyond the message type and port number
8640  Fw::SerializeStatus status =
8641  buffer.moveDeserToOffset(ComponentIpcSerializableBuffer::DATA_OFFSET);
8642  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8643 
8644  // Deserialize the state machine ID
8645  status = buffer.deserializeTo(smId);
8646  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8647 
8648  // Deserialize the signal
8649  status = buffer.deserializeTo(signal);
8650  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8651  }
8652 
8653  void FpySequencerComponentBase ::
8654  Svc_FpySequencer_SequencerStateMachine_smDispatch(
8655  Fw::SerializeBufferBase& buffer,
8656  Svc_FpySequencer_SequencerStateMachine& sm,
8658  )
8659  {
8660  switch (signal) {
8662  // Deserialize the data
8664  const Fw::SerializeStatus status = buffer.deserializeTo(value);
8665  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8666  // Assert no data left in buffer
8667  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8668  // Call the sendSignal function for sm and cmd_VALIDATE
8669  sm.sendSignal_cmd_VALIDATE(value);
8670  break;
8671  }
8673  // Deserialize the data
8675  const Fw::SerializeStatus status = buffer.deserializeTo(value);
8676  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8677  // Assert no data left in buffer
8678  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8679  // Call the sendSignal function for sm and cmd_RUN
8680  sm.sendSignal_cmd_RUN(value);
8681  break;
8682  }
8684  // Deserialize the data
8686  const Fw::SerializeStatus status = buffer.deserializeTo(value);
8687  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8688  // Assert no data left in buffer
8689  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8690  // Call the sendSignal function for sm and cmd_RUN_VALIDATED
8691  sm.sendSignal_cmd_RUN_VALIDATED(value);
8692  break;
8693  }
8695  // Assert no data left in buffer
8696  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8697  // Call the sendSignal function for sm and cmd_CANCEL
8698  sm.sendSignal_cmd_CANCEL();
8699  break;
8700  }
8702  // Deserialize the data
8704  const Fw::SerializeStatus status = buffer.deserializeTo(value);
8705  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8706  // Assert no data left in buffer
8707  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8708  // Call the sendSignal function for sm and cmd_DEBUG_SET_BREAKPOINT
8709  sm.sendSignal_cmd_DEBUG_SET_BREAKPOINT(value);
8710  break;
8711  }
8713  // Assert no data left in buffer
8714  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8715  // Call the sendSignal function for sm and cmd_DEBUG_CLEAR_BREAKPOINT
8716  sm.sendSignal_cmd_DEBUG_CLEAR_BREAKPOINT();
8717  break;
8718  }
8720  // Assert no data left in buffer
8721  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8722  // Call the sendSignal function for sm and result_failure
8723  sm.sendSignal_result_failure();
8724  break;
8725  }
8727  // Assert no data left in buffer
8728  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8729  // Call the sendSignal function for sm and result_success
8730  sm.sendSignal_result_success();
8731  break;
8732  }
8734  // Assert no data left in buffer
8735  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8736  // Call the sendSignal function for sm and entered
8737  sm.sendSignal_entered();
8738  break;
8739  }
8741  // Assert no data left in buffer
8742  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8743  // Call the sendSignal function for sm and result_dispatchStatement_success
8744  sm.sendSignal_result_dispatchStatement_success();
8745  break;
8746  }
8748  // Assert no data left in buffer
8749  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8750  // Call the sendSignal function for sm and result_dispatchStatement_failure
8751  sm.sendSignal_result_dispatchStatement_failure();
8752  break;
8753  }
8755  // Assert no data left in buffer
8756  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8757  // Call the sendSignal function for sm and result_dispatchStatement_noMoreStatements
8758  sm.sendSignal_result_dispatchStatement_noMoreStatements();
8759  break;
8760  }
8762  // Assert no data left in buffer
8763  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8764  // Call the sendSignal function for sm and checkTimersIn
8765  sm.sendSignal_checkTimersIn();
8766  break;
8767  }
8769  // Assert no data left in buffer
8770  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8771  // Call the sendSignal function for sm and result_checkShouldWake_wakeup
8772  sm.sendSignal_result_checkShouldWake_wakeup();
8773  break;
8774  }
8776  // Assert no data left in buffer
8777  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8778  // Call the sendSignal function for sm and result_checkShouldWake_keepSleeping
8779  sm.sendSignal_result_checkShouldWake_keepSleeping();
8780  break;
8781  }
8783  // Assert no data left in buffer
8784  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8785  // Call the sendSignal function for sm and result_timeOpFailed
8786  sm.sendSignal_result_timeOpFailed();
8787  break;
8788  }
8790  // Assert no data left in buffer
8791  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8792  // Call the sendSignal function for sm and stmtResponse_beginSleep
8793  sm.sendSignal_stmtResponse_beginSleep();
8794  break;
8795  }
8797  // Assert no data left in buffer
8798  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8799  // Call the sendSignal function for sm and stmtResponse_success
8800  sm.sendSignal_stmtResponse_success();
8801  break;
8802  }
8804  // Assert no data left in buffer
8805  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8806  // Call the sendSignal function for sm and stmtResponse_failure
8807  sm.sendSignal_stmtResponse_failure();
8808  break;
8809  }
8811  // Assert no data left in buffer
8812  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8813  // Call the sendSignal function for sm and stmtResponse_unexpected
8814  sm.sendSignal_stmtResponse_unexpected();
8815  break;
8816  }
8818  // Assert no data left in buffer
8819  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8820  // Call the sendSignal function for sm and stmtResponse_keepWaiting
8821  sm.sendSignal_stmtResponse_keepWaiting();
8822  break;
8823  }
8825  // Assert no data left in buffer
8826  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8827  // Call the sendSignal function for sm and result_checkStatementTimeout_statementTimeout
8828  sm.sendSignal_result_checkStatementTimeout_statementTimeout();
8829  break;
8830  }
8832  // Assert no data left in buffer
8833  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8834  // Call the sendSignal function for sm and result_checkStatementTimeout_noTimeout
8835  sm.sendSignal_result_checkStatementTimeout_noTimeout();
8836  break;
8837  }
8839  // Assert no data left in buffer
8840  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8841  // Call the sendSignal function for sm and cmd_DEBUG_CONTINUE
8842  sm.sendSignal_cmd_DEBUG_CONTINUE();
8843  break;
8844  }
8846  // Deserialize the data
8848  const Fw::SerializeStatus status = buffer.deserializeTo(value);
8849  FW_ASSERT(status == Fw::FW_SERIALIZE_OK, static_cast<FwAssertArgType>(status));
8850  // Assert no data left in buffer
8851  FW_ASSERT(buffer.getBuffLeft() == 0, static_cast<FwAssertArgType>(buffer.getBuffLeft()));
8852  // Call the sendSignal function for sm and cmd_DEBUG_BREAK
8853  sm.sendSignal_cmd_DEBUG_BREAK(value);
8854  break;
8855  }
8856  default:
8857  FW_ASSERT(0, static_cast<FwAssertArgType>(signal));
8858  break;
8859  }
8860  }
8861 
8862  // ----------------------------------------------------------------------
8863  // Parameter set functions
8864  // ----------------------------------------------------------------------
8865 
8866  Fw::CmdResponse FpySequencerComponentBase ::
8867  paramSet_STATEMENT_TIMEOUT_SECS(Fw::SerializeBufferBase& val)
8868  {
8869  F32 _localVal{};
8870  const Fw::SerializeStatus _stat = val.deserializeTo(_localVal);
8871  if (_stat != Fw::FW_SERIALIZE_OK) {
8873  }
8874 
8875  // Assign value only if successfully deserialized
8876  this->m_paramLock.lock();
8877  this->m_STATEMENT_TIMEOUT_SECS = _localVal;
8878  this->m_param_STATEMENT_TIMEOUT_SECS_valid = Fw::ParamValid::VALID;
8879  this->m_paramLock.unLock();
8880 
8881  // Call notifier
8883  return Fw::CmdResponse::OK;
8884  }
8885 
8886  // ----------------------------------------------------------------------
8887  // Parameter save functions
8888  // ----------------------------------------------------------------------
8889 
8890  Fw::CmdResponse FpySequencerComponentBase ::
8891  paramSave_STATEMENT_TIMEOUT_SECS()
8892  {
8893  Fw::ParamBuffer _saveBuff;
8894  FwPrmIdType _id;
8895  Fw::SerializeStatus _stat;
8896  if (this->m_prmSet_OutputPort[0].isConnected()) {
8897  this->m_paramLock.lock();
8898 
8899  _stat = _saveBuff.serializeFrom(m_STATEMENT_TIMEOUT_SECS);
8900 
8901  this->m_paramLock.unLock();
8902  if (_stat != Fw::FW_SERIALIZE_OK) {
8904  }
8905 
8906  _id = static_cast<FwPrmIdType>(this->getIdBase() + PARAMID_STATEMENT_TIMEOUT_SECS);
8907 
8908  // Save the parameter
8909  this->m_prmSet_OutputPort[0].invoke(
8910  _id,
8911  _saveBuff
8912  );
8913 
8914  return Fw::CmdResponse::OK;
8915  }
8916 
8918  }
8919 
8920 }
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
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
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
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:207
called when statement successfully executed. only raised in the RUNNING.AWAITING_CMD_RESPONSE state ...
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:41
void addCallPort(InputPrmSetPort *callPort)
Register an input port.
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 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 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 log_WARNING_HI_FileReadError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileReadError.
No time base has been established (Required)
void set_logOut_OutputPort(FwIndexType portNum, Fw::InputLogPort *port)
Connect port to logOut[portNum].
void addCallPort(InputCmdRegPort *callPort)
Register an input port.
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
virtual void directive_waitAbs_internalInterfaceHandler(const Svc::FpySequencer_WaitAbsDirective &directive)=0
Internal interface handler for directive_waitAbs.
void init()
Initialization function.
virtual void RUN_VALIDATED_cmdHandler(FwOpcodeType opCode, U32 cmdSeq, Svc::FpySequencer_BlockState block)=0
bool isConnected_pingOut_OutputPort(FwIndexType portNum)
virtual void pingIn_preMsgHook(FwIndexType portNum, U32 key)
Pre-message hook for async input port pingIn.
Os::Queue m_queue
queue object for active component
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:24
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:83
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.
The size of the serial representations of the port arguments.
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)
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:41
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:92
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].
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 log_WARNING_HI_EndOfFileError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath) const
Log event EndOfFileError.
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:38
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)
The size of the serial representation.
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.
Loads, validates and runs a sequence.
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:53
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.
void sequencer_sendSignal_result_timeOpFailed()
Send signal result_timeOpFailed to state machine sequencer.
The size of the serial representations of the port arguments.
Definition: CmdPortAc.hpp:38
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].
SerializeStatus serializeTo(SerializeBufferBase &buffer) const override
serialize contents to buffer
Definition: StringBase.cpp:142
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.
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
The size of the serial representations of the port arguments.
Definition: PingPortAc.hpp:36
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.
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())
void sequencer_sendSignal_cmd_DEBUG_BREAK(const Svc::FpySequencer_DebugBreakpointArgs &value)
Send signal cmd_DEBUG_BREAK to state machine sequencer.
void log_WARNING_HI_FileReadDeserializeError(Svc::FpySequencer_FileReadStage readStage, const Fw::StringBase &filePath, I32 errorCode, U64 buffLeft, U64 buffLength) const
Log event FileReadDeserializeError.
bool isConnected_logOut_OutputPort(FwIndexType portNum)
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
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)
Must be called after VALIDATE. Runs the sequence that was validated.
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:90
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:56
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.
SerializeStatus serializeFrom(U8 val)
serialize 8-bit unsigned int
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.
message to exit active component task
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:222
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
The size of the serial representations of the port arguments.
Definition: SchedPortAc.hpp:36
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
SerializeStatus deserializeTo(U8 &val)
deserialize 8-bit unsigned int
#define U64(C)
Definition: sha.h:180