F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
FpySequencer.cpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title FpySequencer.cpp
3 // \author zimri.leisher
4 // \brief cpp file for FpySequencer component implementation class
5 // ======================================================================
6 
7 #include <Fw/Prm/ParamValid.hpp>
9 #include <config/CommandDispatcherImplCfg.hpp>
10 #include <new>
11 
12 namespace Svc {
13 
14 // ----------------------------------------------------------------------
15 // Construction, initialization, and destruction
16 // ----------------------------------------------------------------------
17 
18 FpySequencer ::FpySequencer(const char* const compName)
19  : FpySequencerComponentBase(compName),
20  m_sequenceBuffer(),
21  m_allocatorId(0),
22  m_sequenceFilePath("<invalid_seq>"),
23  m_sequenceObj(),
24  m_computedCRC(),
25  m_totalExpectedArgSize(0),
26  m_sequenceBlockState(),
27  m_savedOpCode(0),
28  m_savedCmdSeq(0),
29  m_sequenceArgs(0, 0),
30  m_goalState(),
31  m_sequencesStarted(0),
32  m_statementsDispatched(0),
33  m_runtime(),
34  m_breakpoint(),
35  m_debug(),
36  m_tlm() {}
37 
39 
43 void FpySequencer::RUN_cmdHandler(FwOpcodeType opCode,
44  U32 cmdSeq,
45  const Fw::CmdStringArg& fileName,
46  const BlockState& block
47 ) {
48  // Empty args and delegate to RUN_ARGS handler
49  this->RUN_ARGS_cmdHandler(opCode, cmdSeq, fileName, block, Svc::SeqArgs{0, 0});
50 }
51 
52 void FpySequencer ::RUN_ARGS_cmdHandler(FwOpcodeType opCode,
53  U32 cmdSeq,
54  const Fw::CmdStringArg& fileName,
55  const Svc::BlockState& block,
56  const Svc::SeqArgs& args
57 ) {
58  // can only run a seq while in idle
60  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
62  return;
63  }
64 
65  if (block == BlockState::BLOCK) {
66  // save the opCode and cmdSeq so we can respond later
67  this->m_savedOpCode = opCode;
68  this->m_savedCmdSeq = cmdSeq;
69  }
70 
71  // Store args for pushArgsToStack action
72  this->sequencer_sendSignal_cmd_RUN(FpySequencer_SequenceExecutionArgs(fileName, block, args));
73 
74  // only respond if the user doesn't want us to block further execution
75  if (block == BlockState::NO_BLOCK) {
76  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
77  }
78 }
79 
83 void FpySequencer::VALIDATE_cmdHandler(FwOpcodeType opCode,
84  U32 cmdSeq,
85  const Fw::CmdStringArg& fileName
86 ) {
87  this->VALIDATE_ARGS_cmdHandler(opCode, cmdSeq, fileName, Svc::SeqArgs{0, 0});
88 }
89 
93 void FpySequencer ::VALIDATE_ARGS_cmdHandler(FwOpcodeType opCode,
94  U32 cmdSeq,
95  const Fw::CmdStringArg& fileName,
96  const Svc::SeqArgs& buffer) {
97  // can only validate a seq while in idle
99  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
100  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
101  return;
102  }
103 
104  // validate always blocks until finished, so save opcode/cmdseq
105  // so we can respond once done
106  this->m_savedOpCode = opCode;
107  this->m_savedCmdSeq = cmdSeq;
108 
109  // VALIDATE_ARGS receives args via command interface
110  // Store args for pushArgsToStack action when RUN_VALIDATED is called
111  this->sequencer_sendSignal_cmd_VALIDATE(FpySequencer_SequenceExecutionArgs(fileName, BlockState::BLOCK, buffer));
112 }
113 
114 void FpySequencer::RUN_VALIDATED_cmdHandler(FwOpcodeType opCode,
115  U32 cmdSeq,
116  const BlockState& block
117 ) {
118  // can only RUN_VALIDATED if we have validated and are awaiting this exact cmd
120  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
121  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
122  return;
123  }
124 
125  if (block == BlockState::BLOCK) {
126  // save the opCode and cmdSeq so we can respond later
127  this->m_savedOpCode = opCode;
128  this->m_savedCmdSeq = cmdSeq;
129  }
130 
132  FpySequencer_SequenceExecutionArgs(this->m_sequenceFilePath, block, this->m_sequenceArgs));
133 
134  // only respond if the user doesn't want us to block further execution
135  if (block == BlockState::NO_BLOCK) {
136  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
137  }
138 }
139 
143 void FpySequencer::CANCEL_cmdHandler(FwOpcodeType opCode,
144  U32 cmdSeq
145 ) {
146  // only state you can't cancel in is IDLE
147  if (sequencer_getState() == State::IDLE) {
148  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
149  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
150  return;
151  }
152 
154 
155  // cancel returns immediately and always succeeds
156  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
157 }
158 
165 void FpySequencer::SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
166  U32 cmdSeq,
167  U32 stmtIdx,
168  bool breakOnce
169 ) {
170  this->sequencer_sendSignal_cmd_SET_BREAKPOINT(FpySequencer_BreakpointArgs(true, breakOnce, stmtIdx));
171 
172  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
173 }
174 
180 void FpySequencer::BREAK_cmdHandler(FwOpcodeType opCode,
181  U32 cmdSeq
182 ) {
183  if (!this->isRunningState(this->sequencer_getState()) || this->sequencer_getState() == State::RUNNING_PAUSED) {
184  // can only break while running, and not paused
185  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
186  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
187  return;
188  }
190 
191  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
192 }
193 
198 void FpySequencer::CONTINUE_cmdHandler(FwOpcodeType opCode,
199  U32 cmdSeq
200 ) {
201  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
202  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
203  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
204  return;
205  }
206 
208 
209  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
210 }
211 
216 void FpySequencer::CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
217  U32 cmdSeq
218 ) {
221 
222  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
223 }
224 
230 void FpySequencer::STEP_cmdHandler(FwOpcodeType opCode,
231  U32 cmdSeq
232 ) {
233  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
234  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
235  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
236  return;
237  }
238 
240  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
241 }
242 
246 void FpySequencer::DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode,
247  U32 cmdSeq,
248  const Fw::CmdStringArg& fileName
249 ) {
250  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
251  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
252  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
253  return;
254  }
255  Os::File sequenceFile;
256  Os::File::Status status = sequenceFile.open(fileName.toChar(), Os::File::OPEN_WRITE);
257 
258  if (status != Os::File::Status::OP_OK) {
259  this->log_WARNING_HI_FileOpenError(fileName, static_cast<I32>(status));
260  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
261  return;
262  }
263 
264  FwSizeType writeSize = static_cast<FwSizeType>(this->m_runtime.stack.size);
265  status = sequenceFile.write(this->m_runtime.stack.bytes, writeSize);
266  if (status != Os::File::Status::OP_OK || writeSize != this->m_runtime.stack.size) {
267  this->log_WARNING_HI_FileWriteError(writeSize, fileName, static_cast<I32>(status));
268  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
269  return;
270  }
271  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
272  return;
273 }
276  U32 context
277 ) {
279 }
280 
282  U32 key
283 ) {
284  // send ping response
285  this->pingOut_out(0, key);
286 }
287 
290  FwOpcodeType opCode,
291  U32 cmdSeq,
292  const Fw::CmdResponse& response
293 ) {
294  // if we aren't in the RUNNING state:
295  if (!this->isRunningState(sequencer_getState())) {
296  // must be a coding error from an outside component (off nom), or due to CANCEL while running a command (nom).
297  // because we can't be sure that it wasn't a nominal sequence of events leading to this, don't fail the
298  // sequence, just report it
300  CmdDispatcherCfg::getEventOpcode(opCode), response);
301  return;
302  }
303 
304  // okay, we're running a sequence. now let's use the cmdUid to check if the response was for a cmd
305  // from this sequence
306 
307  // the cmdSeq arg is confusingly not the cmdSeq in this case, according to the current implementation
308  // of the CmdDisp. instead, it is the context that we passed in when we originally sent the cmd out.
309  // this context is in turn the cmdUid that we calculated just before sending it. rename the variable for
310  // clarity's sake
311  U32 cmdUid = cmdSeq;
312 
313  // pull the sequence index (modulo 2^16) out of the cmdUid. see the comment in FpySequencer::dispatchCommand
314  // for info on the binary format of this cmdUid. as a reminder, this should be equal to the first 16 bits of
315  // the m_sequencesStarted variable
316  U16 sequenceIndex = static_cast<U16>((cmdUid & 0xFFFF0000) >> 16);
317  U16 currentSequenceIndex = static_cast<U16>(this->m_sequencesStarted & 0xFFFF);
318 
319  // if it was from a different sequence:
320  if (sequenceIndex != currentSequenceIndex) {
322  sequenceIndex, currentSequenceIndex);
323  return;
324  }
325 
326  // okay, it was from this sequence. now if anything's wrong from this point on we should fail the sequence
327 
328  // first, make sure we're actually awaiting a statement response
330  // okay, crap. something from this sequence responded, and we weren't awaiting anything. end it all
333  return;
334  }
335 
336  if (this->m_runtime.currentStatementOpcode != Fpy::DirectiveId::CONST_CMD &&
337  this->m_runtime.currentStatementOpcode != Fpy::DirectiveId::STACK_CMD) {
338  // we were not awaiting a cmd response, we were waiting for a directive
340  this->m_runtime.currentStatementOpcode);
342  return;
343  }
344 
345  // okay, we were awaiting a cmd response. were we awaiting this opcode?
346  if (opCode != this->m_runtime.currentCmdOpcode) {
347  // we were not awaiting this opcode. coding error, likely on the part of the responding component or cmd
348  // dispatcher
350  CmdDispatcherCfg::getEventOpcode(this->m_runtime.currentCmdOpcode));
352  return;
353  }
354 
355  // okay, we were awaiting this opcode. but was it from this exact statement, or a different one with the same opcode
356  // in the same file?
357 
358  // pull the cmd index (modulo 2^16) out of cmdUid. this should be equal to the first 16 bits of the
359  // m_statementsDispatched variable
360  U16 cmdIndex = static_cast<U16>(cmdUid & 0xFFFF);
361  // check for coding errors. at this point in the function, we have definitely dispatched a stmt
362  FW_ASSERT(this->m_statementsDispatched > 0);
363  U16 currentCmdIndex = static_cast<U16>((this->m_statementsDispatched) & 0xFFFF);
364 
365  if (cmdIndex != currentCmdIndex) {
366  // we were not awaiting this exact statement, it was a different one with the same opcode. coding error
368  currentCmdIndex);
370  return;
371  }
372 
373  // okay, got the right cmd back. we have verified:
374  // 1) we are in the RUNNING state
375  // 2) the response is from this sequence
376  // 3) the response is from the correct opcode
377  // 4) the response is from the correct instance of that opcode in the sequence
378 
379  // always succeed; the cmd response value is pushed to the stack so the sequence
380  // can branch on it if desired
382 
383  // push the cmd response to the stack so we can branch off of it
384  // the constCmd/stackCmd directive handlers guarantee there is room for this push
385  this->m_runtime.stack.push(static_cast<Fw::CmdResponse::SerialType>(response.e));
386 }
387 
389  // only state you can't cancel in is IDLE
390  if (sequencer_getState() == State::IDLE) {
391  this->log_WARNING_HI_InvalidSeqCancelCall(static_cast<I32>(sequencer_getState()));
392  return;
393  }
395 }
396 
398 void FpySequencer::seqRunIn_handler(FwIndexType portNum, const Fw::StringBase& filename, const Svc::SeqArgs& args) {
399  // can only run a seq while in idle
400  if (sequencer_getState() != State::IDLE) {
401  this->log_WARNING_HI_InvalidSeqRunCall(static_cast<I32>(sequencer_getState()));
402  return;
403  }
404 
405  // seqRunIn is never blocking - store args for pushArgsToStack action
406  // Args must be serialized in F' big-endian format by the caller before being sent
408 }
409 
412  U32 context
413 ) {
414  this->tlmWrite_State(static_cast<FwEnumStoreType>(this->sequencer_getState()));
415  this->tlmWrite_StatementsDispatched(this->m_statementsDispatched);
416  this->tlmWrite_StatementsFailed(this->m_tlm.statementsFailed);
417  this->tlmWrite_SequencesCancelled(this->m_tlm.sequencesCancelled);
418  this->tlmWrite_SequencesSucceeded(this->m_tlm.sequencesSucceeded);
419  this->tlmWrite_SequencesFailed(this->m_tlm.sequencesFailed);
420  this->tlmWrite_LastDirectiveError(this->m_tlm.lastDirectiveError);
421  this->tlmWrite_DirectiveErrorIndex(this->m_tlm.directiveErrorIndex);
422  this->tlmWrite_DirectiveErrorId(this->m_tlm.directiveErrorId);
423  this->tlmWrite_SeqPath(this->m_sequenceFilePath);
424 
425  this->tlmWrite_BreakpointIndex(this->m_breakpoint.breakpointIndex);
426  this->tlmWrite_BreakOnlyOnceOnBreakpoint(this->m_breakpoint.breakOnlyOnceOnBreakpoint);
427  this->tlmWrite_BreakBeforeNextLine(this->m_breakpoint.breakBeforeNextLine);
428  this->tlmWrite_BreakpointInUse(this->m_breakpoint.breakpointInUse);
429 
430  this->updateDebugTelemetryStruct();
431  this->tlmWrite_Debug_NextCmdOpcode(this->m_debug.nextCmdOpcode);
432  this->tlmWrite_Debug_NextStatementOpcode(this->m_debug.nextStatementOpcode);
433  this->tlmWrite_Debug_NextStatementReadSuccess(this->m_debug.nextStatementReadSuccess);
434  this->tlmWrite_Debug_NextStatementIndex(this->m_debug.nextStatementIndex);
435  this->tlmWrite_Debug_ReachedEndOfFile(this->m_debug.reachedEndOfFile);
436  this->tlmWrite_Debug_StackSize(this->m_debug.stackSize);
437 }
438 
439 void FpySequencer::updateDebugTelemetryStruct() {
440  // only send debug tlm when we are paused
441  if (this->sequencer_getState() == State::RUNNING_PAUSED) {
442  if (this->m_runtime.nextStatementIndex >= this->m_sequenceObj.get_header().get_statementCount()) {
443  // reached end of file, turn on EOF flag and otherwise send some default tlm
444  this->m_debug.reachedEndOfFile = true;
445  this->m_debug.nextStatementReadSuccess = false;
446  this->m_debug.nextStatementOpcode = 0;
447  this->m_debug.nextCmdOpcode = 0;
448  this->m_debug.nextStatementIndex = this->m_runtime.nextStatementIndex;
449  this->m_debug.stackSize = this->m_runtime.stack.size;
450  return;
451  }
452 
453  FW_ASSERT(this->m_runtime.nextStatementIndex < Fpy::MAX_SEQUENCE_STATEMENT_COUNT,
454  static_cast<FwAssertArgType>(this->m_runtime.nextStatementIndex));
455  const Fpy::Statement& nextStmt = this->m_sequenceObj.get_statements()[this->m_runtime.nextStatementIndex];
456  DirectiveUnion directiveUnion;
457  Fw::Success status = this->deserializeDirective(nextStmt, directiveUnion);
458 
459  if (status != Fw::Success::SUCCESS) {
460  this->m_debug.reachedEndOfFile = false;
461  this->m_debug.nextStatementReadSuccess = false;
462  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
463  this->m_debug.nextCmdOpcode = 0;
464  this->m_debug.nextStatementIndex = this->m_runtime.nextStatementIndex;
465  this->m_debug.stackSize = this->m_runtime.stack.size;
466  return;
467  }
468 
469  if (nextStmt.get_opCode() == Fpy::DirectiveId::CONST_CMD) {
470  // send opcode of the cmd to the ground
471  this->m_debug.reachedEndOfFile = false;
472  this->m_debug.nextStatementReadSuccess = true;
473  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
474  this->m_debug.nextCmdOpcode = directiveUnion.constCmd.get_opCode();
475  this->m_debug.nextStatementIndex = this->m_runtime.nextStatementIndex;
476  this->m_debug.stackSize = this->m_runtime.stack.size;
477  return;
478  }
479 
480  this->m_debug.reachedEndOfFile = false;
481  this->m_debug.nextStatementReadSuccess = true;
482  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
483  this->m_debug.nextCmdOpcode = 0;
484  this->m_debug.nextStatementIndex = this->m_runtime.nextStatementIndex;
485  this->m_debug.stackSize = this->m_runtime.stack.size;
486  return;
487  }
488  // send some default tlm when we aren't in debug break
489  this->m_debug.reachedEndOfFile = false;
490  this->m_debug.nextStatementReadSuccess = false;
491  this->m_debug.nextStatementOpcode = 0;
492  this->m_debug.nextCmdOpcode = 0;
493  this->m_debug.nextStatementIndex = 0;
494  this->m_debug.stackSize = 0;
495 }
496 
500 }
501 
503  Fw::ParamValid valid;
504  switch (id) {
507  break;
508  }
509  case PARAMID_SEQ_BASE_DIR: {
511  break;
512  }
513  default: {
514  FW_ASSERT(false, static_cast<FwAssertArgType>(id)); // coding error, forgot to include in switch statement
515  }
516  }
517 
518  FW_ASSERT(FW_PARAM_OK(valid), static_cast<FwAssertArgType>(valid.e));
519 }
520 
521 bool FpySequencer::isRunningState(State state) {
522  // TODO ask Rob if there's a better way to check if we're in a superstate. I don't want to have
523  // to update this every time I add a new substate to the RUNNING state.
524 
526  state == State::RUNNING_PAUSED || state == State::RUNNING_SLEEPING;
527 }
528 
529 } // namespace Svc
constexpr FwOpcodeType getEventOpcode(const FwOpcodeType opcode)
void pingOut_out(FwIndexType portNum, U32 key) const
Invoke output port pingOut.
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:27
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
#define FW_PARAM_OK(paramValid)
Definition: ParamValid.hpp:22
Representing success.
PlatformSizeType FwSizeType
void sequencer_sendSignal_cmd_STEP()
Send signal cmd_STEP to state machine sequencer.
void sequencer_sendSignal_cmd_SET_BREAKPOINT(const Svc::FpySequencer_BreakpointArgs &value)
Send signal cmd_SET_BREAKPOINT to state machine sequencer.
void tlmWrite_Debug_ReachedEndOfFile(bool arg, Fw::Time _tlmTime=Fw::Time())
void pingIn_handler(FwIndexType portNum, U32 key) override
Handler for input port pingIn.
FwIdType FwPrmIdType
The type of a parameter identifier.
sequencer is not taking any action, waiting for a time in the future to continue
enum T e
The raw enum value.
Open file for writing.
Definition: File.hpp:35
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
void tlmWrite_Debug_StackSize(Svc::Fpy::StackSizeType arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_cmd_VALIDATE(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_VALIDATE to state machine sequencer.
Enum representing a command response.
void tlmWrite_State(FwEnumStoreType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesSucceeded(U64 arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_stmtResponse_unexpected()
Send signal stmtResponse_unexpected to state machine sequencer.
void sequencer_sendSignal_cmd_BREAK()
Send signal cmd_BREAK to state machine sequencer.
void tlmWrite_PRM_STATEMENT_TIMEOUT_SECS(F32 arg, Fw::Time _tlmTime=Fw::Time())
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, const Fw::CmdResponse &response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
Os::FileInterface::Status open(const char *path, Mode mode)
open file with supplied path and mode
Definition: File.cpp:50
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void parametersLoaded() override
Called whenever parameters are loaded.
sequencer has validated the sequence and is waiting for a command to run it
F32 paramGet_STATEMENT_TIMEOUT_SECS(Fw::ParamValid &valid)
void cmdResponse_out(FwOpcodeType opCode, U32 cmdSeq, Fw::CmdResponse response)
Emit command response.
void tlmWrite_handler(FwIndexType portNum, U32 context) override
Handler for input port tlmWrite.
void tlmWrite_DirectiveErrorId(const Svc::Fpy::DirectiveId &arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_Debug_NextCmdOpcode(FwOpcodeType arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_PRM_SEQ_BASE_DIR(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
void sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
Sequencer blocking state.
void sequencer_sendSignal_checkTimersIn()
Send signal checkTimersIn to state machine sequencer.
void tlmWrite_StatementsDispatched(U64 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_LastDirectiveError(const Svc::Fpy::DirectiveErrorCode &arg, Fw::Time _tlmTime=Fw::Time())
void parameterUpdated(FwPrmIdType id) override
Called whenever a parameter is updated.
Type_of_statements & get_statements()
Get member statements.
Status write(const U8 *buffer, FwSizeType &size)
write data to this file from the supplied buffer bounded by size
Definition: File.cpp:213
void tlmWrite_Debug_NextStatementIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, const Fw::CmdResponse &response) const
Log event CmdResponseWhileNotAwaiting.
const char * toChar() const
Convert to a C-style char*.
enum T e
The raw enum value.
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
Command successfully executed.
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
void seqCancelIn_handler(FwIndexType portNum) override
Command had execution error.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
void log_WARNING_HI_InvalidCommand(I32 state) const
Log event InvalidCommand.
void tlmWrite_BreakBeforeNextLine(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_ACTIVITY_HI_BreakpointCleared() const
Log event BreakpointCleared.
void cmdResponseIn_handler(FwIndexType portNum, FwOpcodeType opCode, U32 cmdSeq, const Fw::CmdResponse &response) override
Handler for input port cmdResponseIn.
Fw::ParamString paramGet_SEQ_BASE_DIR(Fw::ParamValid &valid)
void tlmWrite_SequencesFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void checkTimers_handler(FwIndexType portNum, U32 context) override
Handler for input port checkTimers.
void tlmWrite_SeqPath(const Fw::StringBase &arg, Fw::Time _tlmTime=Fw::Time())
PlatformIndexType FwIndexType
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, const Fw::CmdResponse &response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
void log_WARNING_HI_InvalidSeqCancelCall(I32 state) const
Log event InvalidSeqCancelCall.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
Enum representing parameter validity.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename, const Svc::SeqArgs &args) override
Handler for input port seqRunIn.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, const Fw::CmdResponse &response) const
Log event CmdResponseWhileNotRunningSequence.
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, const Fw::CmdResponse &response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
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 log_WARNING_HI_FileWriteError(FwSizeType writeSize, const Fw::StringBase &filePath, I32 errorCode) const
Log event FileWriteError.
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, const Fw::CmdResponse &response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_SequencesCancelled(U64 arg, Fw::Time _tlmTime=Fw::Time())
#define FW_ASSERT(...)
Definition: Assert.hpp:14
void tlmWrite_BreakpointInUse(bool arg, Fw::Time _tlmTime=Fw::Time())
Success/Failure.
FpySequencer(const char *const compName)
void tlmWrite_BreakpointIndex(U32 arg, Fw::Time _tlmTime=Fw::Time())
void tlmWrite_Debug_NextStatementReadSuccess(bool arg, Fw::Time _tlmTime=Fw::Time())