FACT++  1.0
int StateMachineRateControl::Execute ( )
inlineprivatevirtual

Is called continously to execute actions in the current state.

This is what the state machine is doing in a certain state continously. In an idle state this might just be doing nothing.

In the tracking state of the drive system this might be sending new command values to the drive based on its current position.

The current state of the state machine can be accessed by GetCurrentState()

Returns
Usually it should just return the current state. However, sometimes execution might lead to a new state, e.g. when a hardware error is detected. In this case a new state can be returned to put the state machine into a different state. Note, that the function is responsible of doing all actions connected with the state change itself. If not overwritten it returns the current status.

Reimplemented from StateMachineImp.

Definition at line 723 of file ratecontrol.cc.

References RateScan::State::kConfiguring, Drive::State::kConnected, RateControl::State::kConnected, FTM::State::kConnected, RateControl::State::kDimNetworkNA, RateControl::State::kDisconnected, RateControl::State::kGlobalThresholdSet, RateControl::State::kInProgress, RateControl::State::kSettingGlobalThreshold, DimState::online(), and DimState::state().

724  {
725  if (!fDim.online())
727 
728  // All subsystems are not connected
731 
732  // Do not allow any action while a ratescan is configured or in progress
735 
736  switch (GetCurrentState())
737  {
740 
742 
743  // Wait for the trigger to get switched on before starting control loop
746 
748 
750 
751  // Go back to connected when the trigger has been switched off
754 
756  }
757 
759  }
int GetCurrentState() const
return the current state of the machine
const int32_t & state() const
Definition: DimState.h:80
DimDescribedState fDimDrive
Definition: ratecontrol.cc:60
DimDescribedState fDimFTM
Definition: ratecontrol.cc:57
bool online() const
Definition: DimState.h:82
DimDescribedState fDimRS
Definition: ratecontrol.cc:58

+ Here is the call graph for this function: