org.tango.server.annotation
Annotation Type StateMachine


@Target(value={METHOD,FIELD})
@Retention(value=RUNTIME)
public @interface StateMachine

Manage the state machine of the device. Apply for command execution and attribute writing. See Init, Attribute and Command. WARNING: The StateMachine annotation for an attribute must be located at the as the Attribute annotation

 @Init
 @StateMachine(endState = DeviceState.ON)
 private void init(){..}
 
 @Attribute
 @StateMachine(deniedStates = { DeviceState.FAULT, DeviceState.UNKNOWN }, endState = DeviceState.DISABLE)
 private String attr;
 
 @Command
 @StateMachine(deniedStates = { DeviceState.FAULT, DeviceState.UNKNOWN }, endState = DeviceState.DISABLE)
 public double myCommand(int value){..}
 

Author:
ABEILLE

Optional Element Summary
 org.tango.DeviceState[] deniedStates
          The states that are not allowed.
 org.tango.DeviceState endState
          The device state after the method execution
 

endState

public abstract org.tango.DeviceState endState
The device state after the method execution

Returns:
the device state
Default:
org.tango.DeviceState.UNKNOWN

deniedStates

public abstract org.tango.DeviceState[] deniedStates
The states that are not allowed.

Returns:
the denied states
Default:
{}


Copyright © 2012-2016. All Rights Reserved.