|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.mbs.services.device.abstractdriver.DeviceStateGraph
public class DeviceStateGraph
This class represents device state graph. Device state graph is loaded from XML file following the syntax described in stategraph.dtd.
Note: This class is not fully implemented yet!
| Constructor Summary | |
|---|---|
DeviceStateGraph(org.osgi.framework.BundleContext bc,
java.io.InputStream is)
|
|
| Method Summary | |
|---|---|
java.lang.String |
getCurrentState(AbstractDeviceModel model,
java.lang.String lastState)
Evaluate state conditions upon the given device model and return the id of the state which condition is satisfied. |
boolean |
isActionAllowed(java.lang.String currentState,
java.lang.String actionId)
Check if the given action id is in the list of allowed actions of the current state. |
boolean |
isModelInconsistent(java.lang.String currentState,
java.lang.String stateVarId)
Check if the given state variable id is in the list of possible state var events of the current state. |
static boolean |
isStateVariableIgnored(java.lang.String stateVarId)
|
void |
useTag(TagClass tag)
Invoked when a tag has been closed |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DeviceStateGraph(org.osgi.framework.BundleContext bc,
java.io.InputStream is)
throws java.io.IOException
java.io.IOException| Method Detail |
|---|
public void useTag(TagClass tag)
TagListener
useTag in interface TagListenertag - tag with its content and its subtagsTagListener.useTag(com.prosyst.util.xml.TagClass)
public java.lang.String getCurrentState(AbstractDeviceModel model,
java.lang.String lastState)
model - the device modellastState - the previous state, necessary to validate the transition.
The parameter may be null if the model is initialized.
public boolean isModelInconsistent(java.lang.String currentState,
java.lang.String stateVarId)
currentState - the id of the current statestateVarId - the id of the state variable
public static boolean isStateVariableIgnored(java.lang.String stateVarId)
public boolean isActionAllowed(java.lang.String currentState,
java.lang.String actionId)
currentState - the id of the current stateactionId - the id of the action
|
Framework Professional Edition Package |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||