|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.nasa.arc.brahms.common.rt.BrahmsObjectCtx
gov.nasa.arc.brahms.common.rt.ConditionCtx
gov.nasa.arc.brahms.common.rt.DetectableCtx
gov.nasa.arc.brahms.vm.rt.VMDetectableCtx
public class VMDetectableCtx
The VMDetectableCtx defines the context for a fired detectable defining the detectable that was fired, in what frame or composite activity the detectable was fired, the fact or belief detected and the belief created by the detectable.
| Field Summary |
|---|
| Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
|---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, DETECTABLE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
| Constructor Summary | |
|---|---|
VMDetectableCtx(Detectable detectable)
Constructor, creates a new detectable context for the specified detectable. |
|
| Method Summary | |
|---|---|
void |
detect(long time)
Checks if any of the facts in the world's fact set can be matched with this detectable. |
void |
detect(long time,
VMFactCtx fact)
Checks if the specified fact can be matched with this detectable. |
boolean |
handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Process the specified discrete event. |
boolean |
handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt,
gov.nasa.arc.brahms.vm.events.IDiscreteEventHandlerFactory ehf)
Handles the specified discrete event by selecting the appropriate event handler from the specified event handler factory. |
int |
trigger(long time)
Checks if any of the beliefs in the belief set of the active instance checking the trigger can be matched with this detectable. |
int |
trigger(long time,
VMBeliefCtx belief)
Checks if the specified belief can be matched with the detectable. |
boolean |
triggerImpasseResolution(long time,
VMBeliefCtx belief)
Checks if the specified belief can be matched with the detectable. |
| Methods inherited from class gov.nasa.arc.brahms.common.rt.DetectableCtx |
|---|
addDetectableAction, getDetectableActions, getParent, removeDetectableAction, setParent, setParent, toString |
| Methods inherited from class gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx |
|---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setContextFor, setEndTime, setID, setStartTime |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
|---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
| Constructor Detail |
|---|
public VMDetectableCtx(Detectable detectable)
detectable - the fired detectable for which this context is the context| Method Detail |
|---|
public boolean handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt,
gov.nasa.arc.brahms.vm.events.IDiscreteEventHandlerFactory ehf)
handleDiscreteEvent in interface gov.nasa.arc.brahms.vm.events.IDiscreteEventDataevt - the DiscreteEvent to be handledehf - the EventHandlerFactory containing handlers from which this
DiscreteEventData selects the appropriate handler
public boolean handleDiscreteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
handleDiscreteEvent in interface gov.nasa.arc.brahms.vm.events.IDiscreteEventHandlerevt - the DiscreteEvent to be processed.
public void detect(long time)
throws VMException
time - the time at which the detection is performed
VMException - if an internal error occurs.
public void detect(long time,
VMFactCtx fact)
throws VMException
time - the time at which the detection is performedfact - the fact to be checked for detection.
VMException - if an internal error occurs.
public int trigger(long time)
throws VMException
time - the time at which the trigger is checked
VMException - if an internal error occurs.
public int trigger(long time,
VMBeliefCtx belief)
throws VMException
time - the time at which the trigger is checkedbelief - the belief to be checked against the trigger.
VMException - if an internal error occurs.IConstants.CONTINUE,
IConstants.ABORT,
IConstants.COMPLETE,
IConstants.IMPASSE,
IConstants.ENDACTIVITY
public boolean triggerImpasseResolution(long time,
VMBeliefCtx belief)
throws VMException
time - the time at which the trigger is checkedbelief - the belief to be checked against the trigger.
VMException - if an internal error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||