F´ Flight Software - C/C++ Documentation
A framework for building embedded system applications to NASA flight quality standards.
Svc::FpySequencer_SequencerStateMachineStateMachineBase Class Referenceabstract

#include <Svc/FpySequencer/FpySequencer_SequencerStateMachineStateMachineAc.hpp>

Inheritance diagram for Svc::FpySequencer_SequencerStateMachineStateMachineBase:
Svc::FpySequencerComponentBase::Svc_FpySequencer_SequencerStateMachine

Public Types

enum  State : FwEnumStoreType {
  State::__FPRIME_AC_UNINITIALIZED, State::AWAITING_CMD_RUN_VALIDATED, State::IDLE, State::RUNNING_AWAITING_STATEMENT_RESPONSE,
  State::RUNNING_DISPATCH_STATEMENT, State::RUNNING_SLEEPING, State::VALIDATING
}
 The state type. More...
 
enum  Signal : FwEnumStoreType {
  Signal::__FPRIME_AC_INITIAL_TRANSITION, Signal::checkTimersIn, Signal::cmd_CANCEL, Signal::cmd_RUN,
  Signal::cmd_RUN_VALIDATED, Signal::cmd_VALIDATE, Signal::entered, Signal::result_checkShouldWake_keepSleeping,
  Signal::result_checkShouldWake_wakeup, Signal::result_checkStatementTimeout_noTimeout, Signal::result_checkStatementTimeout_statementTimeout, Signal::result_dispatchStatement_failure,
  Signal::result_dispatchStatement_noMoreStatements, Signal::result_dispatchStatement_success, Signal::result_failure, Signal::result_success,
  Signal::result_timeOpFailed, Signal::stmtResponse_beginSleep, Signal::stmtResponse_failure, Signal::stmtResponse_success,
  Signal::stmtResponse_unexpected
}
 The signal type. More...
 

Public Member Functions

FpySequencer_SequencerStateMachineStateMachineBase::State getState () const
 Get the state. More...
 
void sendSignal_cmd_VALIDATE (const Svc::FpySequencer_SequenceExecutionArgs &value)
 called on VALIDATE cmd with the path of the sequence file to validate. only raised in IDLE state More...
 
void sendSignal_cmd_RUN (const Svc::FpySequencer_SequenceExecutionArgs &value)
 called on RUN cmd with the path of the sequence file to run. only raised in IDLE state More...
 
void sendSignal_cmd_RUN_VALIDATED (const Svc::FpySequencer_SequenceExecutionArgs &value)
 called on RUN_VALIDATED cmd. only raised in AWAITING_CMD_RUN_VALIDATED state More...
 
void sendSignal_cmd_CANCEL ()
 called on CANCEL cmd. raised in all states except IDLE More...
 
void sendSignal_result_failure ()
 generic failure of an action More...
 
void sendSignal_result_success ()
 generic success of an action More...
 
void sendSignal_entered ()
 generic entry of a state More...
 
void sendSignal_result_dispatchStatement_success ()
 called in dispatchStatement method when a statement was successfully dispatched More...
 
void sendSignal_result_dispatchStatement_failure ()
 called in dispatchStatement method when a statement was unable to be sent out More...
 
void sendSignal_result_dispatchStatement_noMoreStatements ()
 called in dispatchStatement method when there were no more statements in the sequence More...
 
void sendSignal_checkTimersIn ()
 raised whenever the checkTimers port is called More...
 
void sendSignal_result_checkShouldWake_wakeup ()
 raised when we are done sleeping More...
 
void sendSignal_result_checkShouldWake_keepSleeping ()
 raised when we should keep sleeping More...
 
void sendSignal_result_timeOpFailed ()
 
void sendSignal_stmtResponse_beginSleep ()
 a statement is telling the sequencer to go to sleep More...
 
void sendSignal_stmtResponse_success ()
 called when the expected statement response comes in, and it is OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state More...
 
void sendSignal_stmtResponse_failure ()
 called when the expected statement response comes in, and it is not OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state More...
 
void sendSignal_stmtResponse_unexpected ()
 called when an unexpected or incorrect statement response comes in. only raised in the RUNNING state More...
 
void sendSignal_result_checkStatementTimeout_statementTimeout ()
 raised when the statement times out, according to the timeout parameter More...
 
void sendSignal_result_checkStatementTimeout_noTimeout ()
 raised when the statement has not timed out yet More...
 

Protected Member Functions

 FpySequencer_SequencerStateMachineStateMachineBase ()
 Constructor. More...
 
virtual ~FpySequencer_SequencerStateMachineStateMachineBase ()
 Destructor. More...
 
void initBase (const FwEnumStoreType id)
 Initialize the state machine. More...
 
virtual void action_signalEntered (Signal signal)=0
 simply raises the "entered" signal More...
 
virtual void action_setSequenceFilePath (Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
 sets the current sequence file path member var More...
 
virtual void action_setSequenceBlockState (Signal signal, const Svc::FpySequencer_SequenceExecutionArgs &value)=0
 sets the block state of the sequence to be run More...
 
virtual void action_validate (Signal signal)=0
 performs all steps necessary for sequence validation, and raises a signal result_success or result_failure More...
 
virtual void action_report_seqSucceeded (Signal signal)=0
 reports that a sequence succeeded More...
 
virtual void action_report_seqCancelled (Signal signal)=0
 reports that a sequence was cancelled More...
 
virtual void action_setGoalState_RUNNING (Signal signal)=0
 sets the goal state to RUNNING More...
 
virtual void action_setGoalState_VALID (Signal signal)=0
 sets the goal state to VALID More...
 
virtual void action_setGoalState_IDLE (Signal signal)=0
 sets the goal state to IDLE More...
 
virtual void action_sendCmdResponse_OK (Signal signal)=0
 responds to the calling command with OK More...
 
virtual void action_sendCmdResponse_EXECUTION_ERROR (Signal signal)=0
 responds to the calling command with EXECUTION_ERROR More...
 
virtual void action_clearSequenceFile (Signal signal)=0
 clears all variables related to the loading/validating of the sequence file More...
 
virtual void action_checkShouldWake (Signal signal)=0
 checks if sequencer should wake from sleep More...
 
virtual void action_dispatchStatement (Signal signal)=0
 iterates to the next statement and dispatches it More...
 
virtual void action_resetRuntime (Signal signal)=0
 resets the sequence runtime More...
 
virtual void action_checkStatementTimeout (Signal signal)=0
 checks if the current statement has timed out More...
 
virtual void action_incrementSequenceCounter (Signal signal)=0
 increments the m_sequencesStarted counter More...
 
virtual bool guard_goalStateIs_RUNNING (Signal signal) const =0
 return true if the goal state is RUNNING More...
 

Protected Attributes

FwEnumStoreType m_id = 0
 The state machine ID. More...
 
State m_state = State::__FPRIME_AC_UNINITIALIZED
 The state. More...
 

Detailed Description

Member Enumeration Documentation

◆ Signal

The signal type.

Enumerator
__FPRIME_AC_INITIAL_TRANSITION 

The initial transition.

checkTimersIn 

raised whenever the checkTimers port is called

cmd_CANCEL 

called on CANCEL cmd. raised in all states except IDLE

cmd_RUN 

called on RUN cmd with the path of the sequence file to run. only raised in IDLE state

cmd_RUN_VALIDATED 

called on RUN_VALIDATED cmd. only raised in AWAITING_CMD_RUN_VALIDATED state

cmd_VALIDATE 

called on VALIDATE cmd with the path of the sequence file to validate. only raised in IDLE state

entered 

generic entry of a state

result_checkShouldWake_keepSleeping 

raised when we should keep sleeping

result_checkShouldWake_wakeup 

raised when we are done sleeping

result_checkStatementTimeout_noTimeout 

raised when the statement has not timed out yet

result_checkStatementTimeout_statementTimeout 

raised when the statement times out, according to the timeout parameter

result_dispatchStatement_failure 

called in dispatchStatement method when a statement was unable to be sent out

result_dispatchStatement_noMoreStatements 

called in dispatchStatement method when there were no more statements in the sequence

result_dispatchStatement_success 

called in dispatchStatement method when a statement was successfully dispatched

result_failure 

generic failure of an action

result_success 

generic success of an action

result_timeOpFailed 

raised when an operation could not be performed on a Fw::Time object due to a mismatched time base or context

stmtResponse_beginSleep 

a statement is telling the sequencer to go to sleep

stmtResponse_failure 

called when the expected statement response comes in, and it is not OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state

stmtResponse_success 

called when the expected statement response comes in, and it is OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state

stmtResponse_unexpected 

called when an unexpected or incorrect statement response comes in. only raised in the RUNNING state

Definition at line 43 of file FpySequencer_SequencerStateMachineStateMachineAc.hpp.

◆ State

The state type.

Enumerator
__FPRIME_AC_UNINITIALIZED 

The uninitialized state.

AWAITING_CMD_RUN_VALIDATED 

sequencer has validated the sequence and is waiting for a command to run it

IDLE 

sequencer is ready to load, validate and run a sequence

RUNNING_AWAITING_STATEMENT_RESPONSE 
RUNNING_DISPATCH_STATEMENT 

sequencer is stepping into a single statement and dispatching it

RUNNING_SLEEPING 

sequencer is not taking any action, waiting for a time in the future to continue

VALIDATING 

Definition at line 27 of file FpySequencer_SequencerStateMachineStateMachineAc.hpp.

Constructor & Destructor Documentation

◆ FpySequencer_SequencerStateMachineStateMachineBase()

Svc::FpySequencer_SequencerStateMachineStateMachineBase::FpySequencer_SequencerStateMachineStateMachineBase ( )
protected

Constructor.

Definition at line 17 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ ~FpySequencer_SequencerStateMachineStateMachineBase()

Svc::FpySequencer_SequencerStateMachineStateMachineBase::~FpySequencer_SequencerStateMachineStateMachineBase ( )
protectedvirtual

Destructor.

Definition at line 23 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

Member Function Documentation

◆ action_checkShouldWake()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_checkShouldWake ( Signal  signal)
protectedpure virtual

checks if sequencer should wake from sleep

Parameters
signalThe signal

◆ action_checkStatementTimeout()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_checkStatementTimeout ( Signal  signal)
protectedpure virtual

checks if the current statement has timed out

Parameters
signalThe signal

◆ action_clearSequenceFile()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_clearSequenceFile ( Signal  signal)
protectedpure virtual

clears all variables related to the loading/validating of the sequence file

Parameters
signalThe signal

◆ action_dispatchStatement()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_dispatchStatement ( Signal  signal)
protectedpure virtual

iterates to the next statement and dispatches it

Parameters
signalThe signal

◆ action_incrementSequenceCounter()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_incrementSequenceCounter ( Signal  signal)
protectedpure virtual

increments the m_sequencesStarted counter

Parameters
signalThe signal

◆ action_report_seqCancelled()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_report_seqCancelled ( Signal  signal)
protectedpure virtual

reports that a sequence was cancelled

Parameters
signalThe signal

◆ action_report_seqSucceeded()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_report_seqSucceeded ( Signal  signal)
protectedpure virtual

reports that a sequence succeeded

Parameters
signalThe signal

◆ action_resetRuntime()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_resetRuntime ( Signal  signal)
protectedpure virtual

resets the sequence runtime

Parameters
signalThe signal

◆ action_sendCmdResponse_EXECUTION_ERROR()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_sendCmdResponse_EXECUTION_ERROR ( Signal  signal)
protectedpure virtual

responds to the calling command with EXECUTION_ERROR

Parameters
signalThe signal

◆ action_sendCmdResponse_OK()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_sendCmdResponse_OK ( Signal  signal)
protectedpure virtual

responds to the calling command with OK

Parameters
signalThe signal

◆ action_setGoalState_IDLE()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_setGoalState_IDLE ( Signal  signal)
protectedpure virtual

sets the goal state to IDLE

Parameters
signalThe signal

◆ action_setGoalState_RUNNING()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_setGoalState_RUNNING ( Signal  signal)
protectedpure virtual

sets the goal state to RUNNING

Parameters
signalThe signal

◆ action_setGoalState_VALID()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_setGoalState_VALID ( Signal  signal)
protectedpure virtual

sets the goal state to VALID

Parameters
signalThe signal

◆ action_setSequenceBlockState()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_setSequenceBlockState ( Signal  signal,
const Svc::FpySequencer_SequenceExecutionArgs value 
)
protectedpure virtual

sets the block state of the sequence to be run

Parameters
signalThe signal
valueThe value

◆ action_setSequenceFilePath()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_setSequenceFilePath ( Signal  signal,
const Svc::FpySequencer_SequenceExecutionArgs value 
)
protectedpure virtual

sets the current sequence file path member var

Parameters
signalThe signal
valueThe value

◆ action_signalEntered()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_signalEntered ( Signal  signal)
protectedpure virtual

simply raises the "entered" signal

Parameters
signalThe signal

◆ action_validate()

virtual void Svc::FpySequencer_SequencerStateMachineStateMachineBase::action_validate ( Signal  signal)
protectedpure virtual

performs all steps necessary for sequence validation, and raises a signal result_success or result_failure

Parameters
signalThe signal

◆ getState()

FpySequencer_SequencerStateMachineStateMachineBase::State Svc::FpySequencer_SequencerStateMachineStateMachineBase::getState ( ) const

Get the state.

Definition at line 45 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ guard_goalStateIs_RUNNING()

virtual bool Svc::FpySequencer_SequencerStateMachineStateMachineBase::guard_goalStateIs_RUNNING ( Signal  signal) const
protectedpure virtual

return true if the goal state is RUNNING

Parameters
signalThe signal

◆ initBase()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::initBase ( const FwEnumStoreType  id)
protected

Initialize the state machine.

Parameters
idThe state machine ID

Definition at line 33 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_checkTimersIn()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_checkTimersIn ( )

raised whenever the checkTimers port is called

Definition at line 333 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_cmd_CANCEL()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_cmd_CANCEL ( )

called on CANCEL cmd. raised in all states except IDLE

Definition at line 136 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_cmd_RUN()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_cmd_RUN ( const Svc::FpySequencer_SequenceExecutionArgs value)

called on RUN cmd with the path of the sequence file to run. only raised in IDLE state

Parameters
valueThe value

Definition at line 82 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_cmd_RUN_VALIDATED()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_cmd_RUN_VALIDATED ( const Svc::FpySequencer_SequenceExecutionArgs value)

called on RUN_VALIDATED cmd. only raised in AWAITING_CMD_RUN_VALIDATED state

Parameters
valueThe value

Definition at line 110 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_cmd_VALIDATE()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_cmd_VALIDATE ( const Svc::FpySequencer_SequenceExecutionArgs value)

called on VALIDATE cmd with the path of the sequence file to validate. only raised in IDLE state

Parameters
valueThe value

Definition at line 55 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_entered()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_entered ( )

generic entry of a state

Definition at line 232 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_checkShouldWake_keepSleeping()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_checkShouldWake_keepSleeping ( )

raised when we should keep sleeping

Definition at line 383 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_checkShouldWake_wakeup()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_checkShouldWake_wakeup ( )

raised when we are done sleeping

Definition at line 359 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_checkStatementTimeout_noTimeout()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_checkStatementTimeout_noTimeout ( )

raised when the statement has not timed out yet

Definition at line 569 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_checkStatementTimeout_statementTimeout()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_checkStatementTimeout_statementTimeout ( )

raised when the statement times out, according to the timeout parameter

Definition at line 543 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_dispatchStatement_failure()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_dispatchStatement_failure ( )

called in dispatchStatement method when a statement was unable to be sent out

Definition at line 280 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_dispatchStatement_noMoreStatements()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_dispatchStatement_noMoreStatements ( )

called in dispatchStatement method when there were no more statements in the sequence

Definition at line 306 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_dispatchStatement_success()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_dispatchStatement_success ( )

called in dispatchStatement method when a statement was successfully dispatched

Definition at line 256 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_failure()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_failure ( )

generic failure of an action

Definition at line 182 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_success()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_success ( )

generic success of an action

Definition at line 208 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_result_timeOpFailed()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_result_timeOpFailed ( )

raised when an operation could not be performed on a Fw::Time object due to a mismatched time base or context

Definition at line 405 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_stmtResponse_beginSleep()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_stmtResponse_beginSleep ( )

a statement is telling the sequencer to go to sleep

Definition at line 435 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_stmtResponse_failure()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_stmtResponse_failure ( )

called when the expected statement response comes in, and it is not OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state

Definition at line 483 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_stmtResponse_success()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_stmtResponse_success ( )

called when the expected statement response comes in, and it is OK. only raised in the RUNNING.AWAITING_CMD_RESPONSE state

Definition at line 459 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

◆ sendSignal_stmtResponse_unexpected()

void Svc::FpySequencer_SequencerStateMachineStateMachineBase::sendSignal_stmtResponse_unexpected ( )

called when an unexpected or incorrect statement response comes in. only raised in the RUNNING state

Definition at line 509 of file FpySequencer_SequencerStateMachineStateMachineAc.cpp.

Member Data Documentation

◆ m_id

FwEnumStoreType Svc::FpySequencer_SequencerStateMachineStateMachineBase::m_id = 0
protected

The state machine ID.

Definition at line 351 of file FpySequencer_SequencerStateMachineStateMachineAc.hpp.

◆ m_state

State Svc::FpySequencer_SequencerStateMachineStateMachineBase::m_state = State::__FPRIME_AC_UNINITIALIZED
protected

The state.

Definition at line 354 of file FpySequencer_SequencerStateMachineStateMachineAc.hpp.


The documentation for this class was generated from the following files: