Class SequenceStateMachine
java.lang.Object
org.scictrl.csshell.epics.server.application.AbstractApplication
org.scictrl.csshell.epics.server.application.automata.StateMachine
org.scictrl.csshell.epics.server.application.automata.SequenceStateMachine
- All Implemented Interfaces:
Application
,OnDemandValueProcessor.ValueProvider
This State Machine delegated too sequence of state machines..
- Author:
- igor@scictrl.com
-
Nested Class Summary
Nested classes/interfaces inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
StateMachine.State
-
Field Summary
Fields inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
ABORT, ACTIVATE, DESCRIPTION, DRYRUN, ENABLED, PREPARE, PROGRESS, STATE, STATE_STRING
Fields inherited from class org.scictrl.csshell.epics.server.application.AbstractApplication
database, DEFAULT_NAME_DELIMITER, dynamicRecordCreator, ERROR_SUM, LINK_ERROR, LINK_ERROR_STRING, links, log, name, NAME_DELIMITER, nameDelimiter, records
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
activate()
Application has now reference to Database.void
Configures the internals of this application, provides reference to configuration with root inside applications tag.static final SequenceStateMachine
newApplication
(String name, double timeout, String[] names) newApplication.void
setState.void
stateMachineAbort.void
stateMachineActivate
(boolean dryrun) Activates state machine.void
stateMachinePrepare.void
updateProgress.void
updateState.Methods inherited from class org.scictrl.csshell.epics.server.application.automata.StateMachine
getProgress, getState, getStatus, getTimeout, isAbortOnFail, isDryRun, isEnabled, isInitializationFailed, notifyRecordChange, notifyRecordWrite, setEnabled, setProgress, setStateInitializationFailed, setStatus, setTimeout
Methods inherited from class org.scictrl.csshell.epics.server.application.AbstractApplication
addRecord, addRecordOfCommandProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfMemoryValueProcessor, addRecordOfOnDemandProcessor, addRecordOfOnLinkValueProcessor, configure, connectLinks, createNewStore, fullRecordName, getLinks, getName, getNameDelimiter, getNotNull, getRecord, getRecordErrorSum, getRecordLinkError, getRecordNames, getRecords, getStore, getStore, getValue, initialize, isActivated, isDynamicRecordCreator, log4debug, log4error, log4error, log4info, notifyLinkChange, processLinkChange, pushDoneCommandProcessor, reconnectLinks, resetOnDemandProcessor, restore, store, toString, updateErrorSum, updateErrorSum, updateLinkError, updateLinkError
-
Constructor Details
-
SequenceStateMachine
public SequenceStateMachine()Constructor for SequenceStateMachine.
-
-
Method Details
-
newApplication
public static final SequenceStateMachine newApplication(String name, double timeout, String[] names) newApplication.
- Parameters:
name
- aString
objecttimeout
- a doublenames
- an array ofString
objects- Returns:
- a
SequenceStateMachine
object
-
configure
public void configure(String name, org.apache.commons.configuration.HierarchicalConfiguration config) Configures the internals of this application, provides reference to configuration with root inside applications tag. Server structure is not yet initialized, so does not have reference to Database, the Database reference will be available during activate call.- Specified by:
configure
in interfaceApplication
- Overrides:
configure
in classStateMachine
- Parameters:
name
- aString
objectconfig
- configuration with room inside application tag.
-
activate
public void activate()Application has now reference to Database. Application might want to connect to other records on this server or PVs on other servers. This can not be done until all records from configuration has been loaded. Call to this method signals application that records has been loaded and linking to other values can be commenced.- Specified by:
activate
in interfaceApplication
- Overrides:
activate
in classStateMachine
-
updateProgress
public void updateProgress()updateProgress.
-
updateState
public void updateState()updateState.
-
stateMachinePrepare
public void stateMachinePrepare()stateMachinePrepare.
- Overrides:
stateMachinePrepare
in classStateMachine
-
stateMachineActivate
public void stateMachineActivate(boolean dryrun) Activates state machine. If this state machine is in dry-run mode or dry-run parameter with
true
is called, then this step is activate in dry-run mode.- Overrides:
stateMachineActivate
in classStateMachine
- Parameters:
dryrun
- dry-run mode request
-
stateMachineAbort
public void stateMachineAbort()stateMachineAbort.
- Overrides:
stateMachineAbort
in classStateMachine
-
setState
setState.
- Overrides:
setState
in classStateMachine
- Parameters:
st
- aStateMachine.State
object
-