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 
8 #include <new>
9 
10 namespace Svc {
11 
12 // ----------------------------------------------------------------------
13 // Construction, initialization, and destruction
14 // ----------------------------------------------------------------------
15 
16 FpySequencer ::FpySequencer(const char* const compName)
17  : FpySequencerComponentBase(compName),
18  m_sequenceBuffer(),
19  m_allocatorId(0),
20  m_sequenceFilePath("<invalid_seq>"),
21  m_sequenceObj(),
22  m_computedCRC(0),
23  m_sequenceBlockState(),
24  m_savedOpCode(0),
25  m_savedCmdSeq(0),
26  m_goalState(),
27  m_sequencesStarted(0),
28  m_statementsDispatched(0),
29  m_runtime(),
30  m_breakpoint(),
31  m_tlm() {}
32 
34 
38 void FpySequencer::RUN_cmdHandler(FwOpcodeType opCode,
39  U32 cmdSeq,
40  const Fw::CmdStringArg& fileName,
42 ) {
43  // can only run a seq while in idle
45  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
47  return;
48  }
49 
50  if (block == FpySequencer_BlockState::BLOCK) {
51  // save the opCode and cmdSeq so we can respond later
52  this->m_savedOpCode = opCode;
53  this->m_savedCmdSeq = cmdSeq;
54  }
55 
56  this->sequencer_sendSignal_cmd_RUN(FpySequencer_SequenceExecutionArgs(fileName, block));
57 
58  // only respond if the user doesn't want us to block further execution
59  if (block == FpySequencer_BlockState::NO_BLOCK) {
60  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
61  }
62 }
63 
67 void FpySequencer::VALIDATE_cmdHandler(FwOpcodeType opCode,
68  U32 cmdSeq,
69  const Fw::CmdStringArg& fileName
70 ) {
71  // can only validate a seq while in idle
73  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
75  return;
76  }
77 
78  // validate always blocks until finished, so save opcode/cmdseq
79  // so we can respond once done
80  this->m_savedOpCode = opCode;
81  this->m_savedCmdSeq = cmdSeq;
82 
84  FpySequencer_SequenceExecutionArgs(fileName, FpySequencer_BlockState::BLOCK));
85 }
86 
90 void FpySequencer::RUN_VALIDATED_cmdHandler(
91  FwOpcodeType opCode,
92  U32 cmdSeq,
93  FpySequencer_BlockState block
94 ) {
95  // can only RUN_VALIDATED if we have validated and are awaiting this exact cmd
97  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
99  return;
100  }
101 
102  if (block == FpySequencer_BlockState::BLOCK) {
103  // save the opCode and cmdSeq so we can respond later
104  this->m_savedOpCode = opCode;
105  this->m_savedCmdSeq = cmdSeq;
106  }
107 
108  this->sequencer_sendSignal_cmd_RUN_VALIDATED(FpySequencer_SequenceExecutionArgs(this->m_sequenceFilePath, block));
109 
110  // only respond if the user doesn't want us to block further execution
111  if (block == FpySequencer_BlockState::NO_BLOCK) {
112  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
113  }
114 }
115 
119 void FpySequencer::CANCEL_cmdHandler(FwOpcodeType opCode,
120  U32 cmdSeq
121 ) {
122  // only state you can't cancel in is IDLE
123  if (sequencer_getState() == State::IDLE) {
124  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
125  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
126  return;
127  }
128 
130 
131  // cancel returns immediately and always succeeds
132  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
133 }
134 
141 void FpySequencer::SET_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
142  U32 cmdSeq,
143  U32 stmtIdx,
144  bool breakOnce
145 ) {
146  this->sequencer_sendSignal_cmd_SET_BREAKPOINT(FpySequencer_BreakpointArgs(true, breakOnce, stmtIdx));
147 
148  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
149 }
150 
156 void FpySequencer::BREAK_cmdHandler(FwOpcodeType opCode,
157  U32 cmdSeq
158 ) {
159  if (!this->isRunningState(this->sequencer_getState()) || this->sequencer_getState() == State::RUNNING_PAUSED) {
160  // can only break while running, and not paused
161  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
162  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
163  return;
164  }
166 
167  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
168 }
169 
174 void FpySequencer::CONTINUE_cmdHandler(FwOpcodeType opCode,
175  U32 cmdSeq
176 ) {
177  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
178  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
179  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
180  return;
181  }
182 
184 
185  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
186 }
187 
192 void FpySequencer::CLEAR_BREAKPOINT_cmdHandler(FwOpcodeType opCode,
193  U32 cmdSeq
194 ) {
197 
198  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
199 }
200 
206 void FpySequencer::STEP_cmdHandler(FwOpcodeType opCode,
207  U32 cmdSeq
208 ) {
209  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
210  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
211  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
212  return;
213  }
214 
216  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
217 }
218 
223 void FpySequencer::SET_FLAG_cmdHandler(FwOpcodeType opCode,
224  U32 cmdSeq,
225  Svc::Fpy::FlagId flag,
226  bool value) {
227  if (!this->isRunningState(this->sequencer_getState())) {
228  // can only set flag while running
229  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
230  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
231  return;
232  }
233 
234  // this is a sanity check, we shouldn't even get here if this isn't true
235  // because the enum should check for validity and raise a format err if not valid.
236  // actually what this really catches is an incorrect FLAG_COUNT value
237  FW_ASSERT(static_cast<I32>(flag.e) < Fpy::FLAG_COUNT, static_cast<FwAssertArgType>(flag.e));
238 
239  this->m_runtime.flags[flag.e] = value;
240 
241  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
242 }
243 
247 void FpySequencer::DUMP_STACK_TO_FILE_cmdHandler(FwOpcodeType opCode,
248  U32 cmdSeq,
249  const Fw::CmdStringArg& fileName
250 ) {
251  if (this->sequencer_getState() != State::RUNNING_PAUSED) {
252  this->log_WARNING_HI_InvalidCommand(static_cast<I32>(sequencer_getState()));
253  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
254  return;
255  }
256  Os::File sequenceFile;
257  Os::File::Status status = sequenceFile.open(fileName.toChar(), Os::File::OPEN_WRITE);
258 
259  if (status != Os::File::Status::OP_OK) {
260  this->log_WARNING_HI_FileOpenError(this->m_sequenceFilePath, static_cast<I32>(status));
261  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
262  return;
263  }
264 
265  FwSizeType writeSize = static_cast<FwSizeType>(this->m_runtime.stack.size);
266  status = sequenceFile.write(this->m_runtime.stack.bytes, writeSize);
267  if (status != Os::File::Status::OP_OK || writeSize != this->m_runtime.stack.size) {
268  this->log_WARNING_HI_FileWriteError(writeSize, fileName, static_cast<I32>(status));
269  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::EXECUTION_ERROR);
270  return;
271  }
272  this->cmdResponse_out(opCode, cmdSeq, Fw::CmdResponse::OK);
273  return;
274 }
277  U32 context
278 ) {
280 }
281 
283  U32 key
284 ) {
285  // send ping response
286  this->pingOut_out(0, key);
287 }
288 
291  FwOpcodeType opCode,
292  U32 cmdSeq,
293  const Fw::CmdResponse& response
294 ) {
295  // if we aren't in the RUNNING state:
296  if (!this->isRunningState(sequencer_getState())) {
297  // must be a coding error from an outside component (off nom), or due to CANCEL while running a command (nom).
298  // because we can't be sure that it wasn't a nominal sequence of events leading to this, don't fail the
299  // sequence, just report it
300  this->log_WARNING_LO_CmdResponseWhileNotRunningSequence(static_cast<I32>(this->sequencer_getState()), opCode,
301  response);
302  return;
303  }
304 
305  // okay, we're running a sequence. now let's use the cmdUid to check if the response was for a cmd
306  // from this sequence
307 
308  // the cmdSeq arg is confusingly not the cmdSeq in this case, according to the current implementation
309  // of the CmdDisp. instead, it is the context that we passed in when we originally sent the cmd out.
310  // this context is in turn the cmdUid that we calculated just before sending it. rename the variable for
311  // clarity's sake
312  U32 cmdUid = cmdSeq;
313 
314  // pull the sequence index (modulo 2^16) out of the cmdUid. see the comment in FpySequencer::dispatchCommand
315  // for info on the binary format of this cmdUid. as a reminder, this should be equal to the first 16 bits of
316  // the m_sequencesStarted variable
317  U16 sequenceIndex = static_cast<U16>((cmdUid & 0xFFFF0000) >> 16);
318  U16 currentSequenceIndex = static_cast<U16>(this->m_sequencesStarted & 0xFFFF);
319 
320  // if it was from a different sequence:
321  if (sequenceIndex != currentSequenceIndex) {
322  this->log_WARNING_LO_CmdResponseFromOldSequence(opCode, response, 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
331  this->log_WARNING_HI_CmdResponseWhileNotAwaiting(opCode, response);
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
349  this->log_WARNING_HI_WrongCmdResponseOpcode(opCode, response, this->m_runtime.currentCmdOpcode);
351  return;
352  }
353 
354  // okay, we were awaiting this opcode. but was it from this exact statement, or a different one with the same opcode
355  // in the same file?
356 
357  // pull the cmd index (modulo 2^16) out of cmdUid. this should be equal to the first 16 bits of the
358  // m_statementsDispatched variable
359  U16 cmdIndex = static_cast<U16>(cmdUid & 0xFFFF);
360  // check for coding errors. at this point in the function, we have definitely dispatched a stmt
361  FW_ASSERT(this->m_statementsDispatched > 0);
362  U16 currentCmdIndex = static_cast<U16>((this->m_statementsDispatched) & 0xFFFF);
363 
364  if (cmdIndex != currentCmdIndex) {
365  // we were not awaiting this exact statement, it was a different one with the same opcode. coding error
366  this->log_WARNING_HI_WrongCmdResponseIndex(opCode, response, cmdIndex, currentCmdIndex);
368  return;
369  }
370 
371  // okay, got the right cmd back. we have verified:
372  // 1) we are in the RUNNING state
373  // 2) the response is from this sequence
374  // 3) the response is from the correct opcode
375  // 4) the response is from the correct instance of that opcode in the sequence
376 
377  // if we aren't supposed to exit on fail, succeed unconditionally
378  if (!this->m_runtime.flags[Fpy::FlagId::EXIT_ON_CMD_FAIL]) {
380  } else if (response == Fw::CmdResponse::OK) {
381  // if we didn't fail, succeed!
383  } else {
384  // cmd failed and we want to exit. raise a statement failure
385  this->log_WARNING_HI_CommandFailed(opCode, this->currentStatementIdx(), this->m_sequenceFilePath, response);
387  }
388 
389  // push the cmd response to the stack so we can branch off of it
390  this->m_runtime.stack.push(static_cast<I32>(response.e));
391 }
392 
395  // can only run a seq while in idle
396  if (sequencer_getState() != State::IDLE) {
397  this->log_WARNING_HI_InvalidSeqRunCall(static_cast<I32>(sequencer_getState()));
398  return;
399  }
400 
401  // seqRunIn is never blocking
403 }
404 
407  U32 context
408 ) {
409  this->tlmWrite_State(static_cast<FwEnumStoreType>(this->sequencer_getState()));
410  this->tlmWrite_StatementsDispatched(this->m_statementsDispatched);
411  this->tlmWrite_StatementsFailed(this->m_tlm.statementsFailed);
412  this->tlmWrite_SequencesCancelled(this->m_tlm.sequencesCancelled);
413  this->tlmWrite_SequencesSucceeded(this->m_tlm.sequencesSucceeded);
414  this->tlmWrite_SequencesFailed(this->m_tlm.sequencesFailed);
415  this->tlmWrite_LastDirectiveError(this->m_tlm.lastDirectiveError);
416  this->tlmWrite_DirectiveErrorIndex(this->m_tlm.directiveErrorIndex);
417  this->tlmWrite_DirectiveErrorId(this->m_tlm.directiveErrorId);
418  this->tlmWrite_SeqPath(this->m_sequenceFilePath);
419 
420  this->tlmWrite_BreakpointIndex(this->m_breakpoint.breakpointIndex);
421  this->tlmWrite_BreakOnlyOnceOnBreakpoint(this->m_breakpoint.breakOnlyOnceOnBreakpoint);
422  this->tlmWrite_BreakBeforeNextLine(this->m_breakpoint.breakBeforeNextLine);
423  this->tlmWrite_BreakpointInUse(this->m_breakpoint.breakpointInUse);
424 
425  this->updateDebugTelemetryStruct();
426  this->tlmWrite_Debug_NextCmdOpcode(this->m_debug.nextCmdOpcode);
427  this->tlmWrite_Debug_NextStatementOpcode(this->m_debug.nextStatementOpcode);
428  this->tlmWrite_Debug_NextStatementReadSuccess(this->m_debug.nextStatementReadSuccess);
429  this->tlmWrite_Debug_ReachedEndOfFile(this->m_debug.reachedEndOfFile);
430  this->tlmWrite_Debug_StackSize(this->m_debug.stackSize);
431 }
432 
433 void FpySequencer::updateDebugTelemetryStruct() {
434  // only send debug tlm when we are paused
435  if (this->sequencer_getState() == State::RUNNING_PAUSED) {
436  if (this->m_runtime.nextStatementIndex >= this->m_sequenceObj.get_header().get_statementCount()) {
437  // reached end of file, turn on EOF flag and otherwise send some default tlm
438  this->m_debug.reachedEndOfFile = true;
439  this->m_debug.nextStatementReadSuccess = false;
440  this->m_debug.nextStatementOpcode = 0;
441  this->m_debug.nextCmdOpcode = 0;
442  this->m_debug.stackSize = this->m_runtime.stack.size;
443  return;
444  }
445 
446  const Fpy::Statement& nextStmt = this->m_sequenceObj.get_statements()[this->m_runtime.nextStatementIndex];
447  DirectiveUnion directiveUnion;
448  Fw::Success status = this->deserializeDirective(nextStmt, directiveUnion);
449 
450  if (status != Fw::Success::SUCCESS) {
451  this->m_debug.reachedEndOfFile = false;
452  this->m_debug.nextStatementReadSuccess = false;
453  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
454  this->m_debug.nextCmdOpcode = 0;
455  this->m_debug.stackSize = this->m_runtime.stack.size;
456  return;
457  }
458 
459  if (nextStmt.get_opCode() == Fpy::DirectiveId::CONST_CMD) {
460  // send opcode of the cmd to the ground
461  this->m_debug.reachedEndOfFile = false;
462  this->m_debug.nextStatementReadSuccess = true;
463  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
464  this->m_debug.nextCmdOpcode = directiveUnion.constCmd.get_opCode();
465  this->m_debug.stackSize = this->m_runtime.stack.size;
466  return;
467  }
468 
469  this->m_debug.reachedEndOfFile = false;
470  this->m_debug.nextStatementReadSuccess = true;
471  this->m_debug.nextStatementOpcode = nextStmt.get_opCode();
472  this->m_debug.nextCmdOpcode = 0;
473  this->m_debug.stackSize = this->m_runtime.stack.size;
474  return;
475  }
476  // send some default tlm when we aren't in debug break
477  this->m_debug.reachedEndOfFile = false;
478  this->m_debug.nextStatementReadSuccess = false;
479  this->m_debug.nextStatementOpcode = 0;
480  this->m_debug.nextCmdOpcode = 0;
481  this->m_debug.stackSize = 0;
482 }
483 
485  Fw::ParamValid valid;
486  // check for coding errors--all prms should have a default
487  this->paramGet_STATEMENT_TIMEOUT_SECS(valid);
489  static_cast<FwAssertArgType>(valid.e));
492  static_cast<FwAssertArgType>(valid.e));
493 }
494 
496  Fw::ParamValid valid;
497  switch (id) {
500  break;
501  }
504  break;
505  }
506  default: {
507  FW_ASSERT(0, static_cast<FwAssertArgType>(id)); // coding error, forgot to include in switch statement
508  }
509  }
510 }
511 
512 bool FpySequencer::isRunningState(State state) {
513  // TODO ask Rob if there's a better way to check if we're in a superstate. I don't want to have
514  // to update this every time I add a new substate to the RUNNING state.
515 
519 }
520 
521 } // namespace Svc
void tlmWrite_PRM_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(bool arg, Fw::Time _tlmTime=Fw::Time())
FwIdType FwOpcodeType
The type of a command opcode.
Operation succeeded.
Definition: Os.hpp:26
void tlmWrite_Debug_NextStatementOpcode(U8 arg, Fw::Time _tlmTime=Fw::Time())
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.
the default value of the EXIT_ON_CMD_FAIL sequence flag
FwIdType FwPrmIdType
The type of a parameter identifier.
Open file for writing.
Definition: File.hpp:33
void sequencer_sendSignal_stmtResponse_success()
Send signal stmtResponse_success to state machine sequencer.
void log_WARNING_LO_CmdResponseWhileNotRunningSequence(I32 state, FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotRunningSequence.
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.
Os::FileInterface::Status open(const char *path, Mode mode)
open file with supplied path and mode
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())
void seqRunIn_handler(FwIndexType portNum, const Fw::StringBase &filename) override
Handler for input port seqRunIn.
Svc_FpySequencer_SequencerStateMachine::State sequencer_getState() const
Get the state of state machine instance sequencer.
T e
The raw enum value.
void log_WARNING_HI_WrongCmdResponseOpcode(FwOpcodeType opcode, Fw::CmdResponse response, FwOpcodeType expectedOpcode) const
Log event WrongCmdResponseOpcode.
void tlmWrite_StatementsFailed(U64 arg, Fw::Time _tlmTime=Fw::Time())
void parametersLoaded() override
Called whenever parameters are loaded.
T e
The raw enum value.
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 sequencer_sendSignal_cmd_RUN_VALIDATED(const Svc::FpySequencer_SequenceExecutionArgs &value)
Send signal cmd_RUN_VALIDATED to state machine sequencer.
T e
The raw enum value.
void log_WARNING_LO_CmdResponseFromOldSequence(FwOpcodeType opcode, Fw::CmdResponse response, U16 oldSequenceIdx, U16 currentSequenceIdx) const
Log event CmdResponseFromOldSequence.
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())
sequencer is not taking any action, waiting for a time in the future to continue
void parameterUpdated(FwPrmIdType id) override
Called whenever a parameter is updated.
sequencer is ready to load, validate and run a sequence
void sequencer_sendSignal_stmtResponse_failure()
Send signal stmtResponse_failure to state machine sequencer.
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:187
void log_WARNING_HI_CommandFailed(FwOpcodeType opCode, U32 stmtIdx, const Fw::StringBase &filePath, Fw::CmdResponse response) const
Log event CommandFailed.
void log_WARNING_HI_InvalidSeqRunCall(I32 state) const
Log event InvalidSeqRunCall.
Command successfully executed.
if true, the sequence will exit with an error if a command fails
void log_WARNING_HI_FileOpenError(const Fw::StringBase &filePath, I32 errorCode) const
Log event FileOpenError.
Command had execution error.
void sequencer_sendSignal_cmd_CANCEL()
Send signal cmd_CANCEL to state machine sequencer.
const char * toChar() const
Convert to a C-style char*.
Definition: CmdString.hpp:50
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.
void pingOut_out(FwIndexType portNum, U32 key)
Invoke output port pingOut.
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
sequencer is stepping into a single statement and dispatching it
void sequencer_sendSignal_cmd_CLEAR_BREAKPOINT()
Send signal cmd_CLEAR_BREAKPOINT to state machine sequencer.
void tlmWrite_DirectiveErrorIndex(U64 arg, Fw::Time _tlmTime=Fw::Time())
RateGroupDivider component implementation.
void log_WARNING_HI_CmdResponseWhileNotAwaiting(FwOpcodeType opcode, Fw::CmdResponse response) const
Log event CmdResponseWhileNotAwaiting.
void log_WARNING_HI_CmdResponseWhileAwaitingDirective(FwOpcodeType opcode, Fw::CmdResponse response, U8 expectedDirectiveOpcode) const
Log event CmdResponseWhileAwaitingDirective.
Enum representing parameter validity.
void sequencer_sendSignal_cmd_CONTINUE()
Send signal cmd_CONTINUE to state machine sequencer.
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.
sequencer has validated the sequence and is waiting for a command to run it
void tlmWrite_BreakOnlyOnceOnBreakpoint(bool arg, Fw::Time _tlmTime=Fw::Time())
void log_WARNING_HI_WrongCmdResponseIndex(FwOpcodeType opcode, Fw::CmdResponse response, U16 actualCmdIdx, U16 expectedCmdIdx) const
Log event WrongCmdResponseIndex.
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.
bool paramGet_FLAG_DEFAULT_EXIT_ON_CMD_FAIL(Fw::ParamValid &valid)
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())