|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object gov.nasa.arc.brahms.common.rt.BrahmsObjectCtx gov.nasa.arc.brahms.common.rt.ActivityCtx gov.nasa.arc.brahms.vm.rt.VMActivityCtx gov.nasa.arc.brahms.vm.rt.VMPrimitiveActivityCtx gov.nasa.arc.brahms.vm.rt.VMMoveActivityCtx
public class VMMoveActivityCtx
The VMMoveActivityCtx is a move activity context with extensions for use in the virtual machine that maintains the start and end times for an activity, the duration, priority, status, randomness, duration, resources, start location and destination location.
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 | |
---|---|
|
VMMoveActivityCtx(MoveActivity act)
Constructor, creates a new context for the specified VMMoveActivity. |
protected |
VMMoveActivityCtx(MoveActivity act,
java.lang.String id)
Constructor, creates a new context for the specified VMMoveActivity. |
Method Summary | |
---|---|
protected void |
enterDestinationLocation(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
The active instance enters the destination location. |
ParameterCtx |
getDestinationLocation()
Returns the destination location for the move. |
java.util.Enumeration |
getDetectArrivalInAreas()
Returns a list of all the areas (ParameterCtx) in which agents can detect the arrival of the moving agent. |
ParameterCtx |
getDetectArrivalInSubAreas()
Returns whether we need to include the sub areas when returning the list of areas in which agents can detect the arrival of the moving agent. |
java.util.Enumeration |
getDetectDepartureInAreas()
Returns a list of all the areas (ParameterCtx) in which agents can detect the departure of the moving agent. |
ParameterCtx |
getDetectDepartureInSubAreas()
Returns whether we need to include the sub areas when returning the list of areas in which agents can detect the departure of the moving agent. |
long |
getDuration()
Returns the calculated duration of the activity used by the VM |
ParameterCtx |
getStartLocation()
Returns the start location for the move, the start location of the active instance when starting the move. |
protected void |
leaveStartLocation(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
The active instance leaves the start location. |
protected void |
onContinue(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Continues the activity from an interrupt. |
protected void |
onEnd(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Ends the activity, handling any completion initializations and executing any actions that are to be executed at the end of the activity as specified for the activity. |
protected boolean |
onStart(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Starts the activity, handling any startup initialization and executing any actions that are to be executed at the start of the activity as specified for the activity. |
protected void |
sendAbortEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an abort event to the event notifier. |
protected void |
sendCompleteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a complete event to the event notifier. |
protected void |
sendContinueEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a continue event to the event notifier. |
protected void |
sendContinueFromImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a continue from impasse event to the event notifier. |
protected void |
sendEndEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an end event to the event notifier. |
protected void |
sendImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an impasse event to the event notifier. |
protected void |
sendInterruptEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends an interrupt event to the event notifier. |
protected void |
sendStartEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Sends a start event to the event notifier. |
Methods inherited from class gov.nasa.arc.brahms.vm.rt.VMPrimitiveActivityCtx |
---|
addResource, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, setElapsedTime |
Methods inherited from class gov.nasa.arc.brahms.vm.rt.VMActivityCtx |
---|
getDisplayText, getParameterCtx, getPriority, handleDiscreteEvent, handleDiscreteEvent, onAbort, onComplete, onContinueFromImpasse, onImpasse, onInterrupt, resolveParameters |
Methods inherited from class gov.nasa.arc.brahms.common.rt.ActivityCtx |
---|
getCompletionCause, getParentFrame, getPerformedBy, getReferencedBy, getState, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setPriority, setReferencedBy, setState, setState, setStatus, 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.IPrimitiveActivityCtx |
---|
addResource, getElapsedTime, getMaxDuration, getMinDuration, getRandom, getResourceCount, getResources, removeResource, setElapsedTime |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IActivityCtx |
---|
getCompletionCause, getDisplayText, getParentFrame, getPerformedBy, getPriority, getReferencedBy, getStatus, setCompletionCause, setDisplayText, setParentFrame, setPerformedBy, setReferencedBy, setStatus |
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 VMMoveActivityCtx(MoveActivity act)
act
- the VMMoveActivity for which to create a contextprotected VMMoveActivityCtx(MoveActivity act, java.lang.String id)
act
- the VMMoveActivity for which to create a contextid
- the unique identifier for the activity contextMethod Detail |
---|
public ParameterCtx getStartLocation() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getStartLocation
in interface IMoveActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no start location is specifiedpublic ParameterCtx getDestinationLocation() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
getDestinationLocation
in interface IMoveActivityCtx
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no destination location is specifiedpublic java.util.Enumeration getDetectDepartureInAreas() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no areaspublic ParameterCtx getDetectDepartureInSubAreas() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no detectDepartureInSubAreas indicator is specifiedpublic java.util.Enumeration getDetectArrivalInAreas() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no areaspublic ParameterCtx getDetectArrivalInSubAreas() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no detectArrivalInSubAreas indicator is specifiedpublic long getDuration()
getDuration
in interface IPrimitiveActivityCtx
getDuration
in class VMPrimitiveActivityCtx
protected void leaveStartLocation(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the event triggering the active instance to leave the locationprotected void enterDestinationLocation(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
evt
- the event triggering the active instance to enter the locationprotected boolean onStart(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
onStart
in class VMActivityCtx
evt
- the DiscreteEvent that initiated the start of the activity
protected void onEnd(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
onEnd
in class VMActivityCtx
evt
- the DiscreteEvent that initiated the end of the activityprotected void onContinue(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
onContinue
in class VMActivityCtx
evt
- the DiscreteEvent that initiated the continuationprotected void sendStartEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendStartEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendEndEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendEndEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendInterruptEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendInterruptEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendContinueEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendContinueEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendImpasseEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendContinueFromImpasseEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendContinueFromImpasseEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendCompleteEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendCompleteEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state changeprotected void sendAbortEvent(gov.nasa.arc.brahms.vm.events.DiscreteEvent evt)
Note that this method is created for the different implementations by the sub classes of VMActivityCtx.
sendAbortEvent
in class VMPrimitiveActivityCtx
evt
- the DiscreteEvent that triggered the state change
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |