|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IFrameCtx
The IFrameCtx is an interface for frame contexts that maintain the general state information for a Brahms frame, workframe or thoughtframe. The frame context maintains the status of the frame, the state of the frame, the executing active instance, and the contexts of the variables in the frame, preconditions that evaluated to true making the frame available and consequences fired in the frame. A modeled Brahms frame can have multiple contexts due to the possible different bindings of its variables.
Method Summary | |
---|---|
void |
addBinding(VariableCtx var)
Adds the specified variable binding to this frame context. |
void |
addFiredConsequence(ConsequenceCtx consequence)
Adds the specified consequence as a fired consequence to the list of fired consequences. |
VariableCtx |
getBinding(Variable var)
Returns the binding for the specified variable. |
java.util.Enumeration |
getBindings()
Returns the frame context's variable bindings. |
java.util.ListIterator |
getFiredConsequences()
Returns the list of fired consequences. |
IActiveInstanceCtx |
getPerformedBy()
Returns the active instance executing the frame. |
ICompositeActivityCtx |
getPerformedIn()
If the frame is performed as part of a composite activity this method returns the context of the composite activity in which the frame is performed. |
int |
getPriority()
Returns the priority of the frame context. |
FrameStateCtx |
getState()
Returns the current state of the frame context. |
int |
getStatus()
Returns the frame's current status. |
long |
getTimeAvailable()
Returns the time the frame became available to work on. |
void |
removeBinding(VariableCtx var)
Removes the specified variable binding from this frame context. |
void |
removeFiredConsequence(ConsequenceCtx consequence)
Removes the specified consequence as a fired consequence from the list of fired consequences. |
void |
setPerformedBy(IActiveInstanceCtx ai)
Sets the active instance executing the frame. |
void |
setPerformedIn(ICompositeActivityCtx act)
If the frame is performed as part of a composite activity this method sets the context of the composite activity in which the frame is performed. |
void |
setPriority(int priority)
Sets the priority of the frame context. |
void |
setState(FrameStateCtx state)
Sets the current state of the frame context. |
void |
setState(FrameStateCtx state,
boolean maintainHistory)
Sets the current state of the frame context. |
void |
setStatus(int status)
Sets the frame's current status. |
void |
setTimeAvailable(long time)
Sets the time the frame became available to work on. |
Methods inherited from interface gov.nasa.arc.brahms.common.rt.IBrahmsObjectCtx |
---|
addNote, getContextFor, getEndTime, getID, getNote, getNotes, getStartTime, removeNote, setEndTime, setID, setStartTime |
Method Detail |
---|
void setPriority(int priority) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
priority
- the frame context's priority
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an invalid priority is specified (< 0)int getPriority() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no priority is setvoid setPerformedBy(IActiveInstanceCtx ai) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
ai
- the active instance executing the frame.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null active instance is specifiedIActiveInstanceCtx getPerformedBy() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no active instance is specifiedvoid setPerformedIn(ICompositeActivityCtx act) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
act
- the ICompositeActivityCtx of the composite activity in
which the frame is performed.
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null composite activity is specified.ICompositeActivityCtx getPerformedIn() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an internal error occurs.void setStatus(int status) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
status
- the status of the frame context
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if status is an invalid statusIRuntimeConstants.UNAVAILABLE
,
IRuntimeConstants.AVAILABLE
,
IRuntimeConstants.ACTIVE
,
IRuntimeConstants.INTERRUPTED
,
IRuntimeConstants.IMPASSED
,
IRuntimeConstants.ABORTED
,
IRuntimeConstants.COMPLETED
,
IRuntimeConstants.ENDED
int getStatus() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame context has no status or invalid statusIRuntimeConstants.UNAVAILABLE
,
IRuntimeConstants.AVAILABLE
,
IRuntimeConstants.ACTIVE
,
IRuntimeConstants.INTERRUPTED
,
IRuntimeConstants.IMPASSED
,
IRuntimeConstants.ABORTED
,
IRuntimeConstants.COMPLETED
,
IRuntimeConstants.ENDED
void setState(FrameStateCtx state)
state
- the FrameStateCtx with the state informationActiveCtx
,
AvailableCtx
,
UnavailableCtx
,
InterruptCtx
,
ImpasseCtx
,
CompleteCtx
void setState(FrameStateCtx state, boolean maintainHistory)
state
- the FrameStateCtx with the state informationmaintainHistory
- true if history must be maintained, false otherwiseActiveCtx
,
AvailableCtx
,
UnavailableCtx
,
InterruptCtx
,
ImpasseCtx
,
CompleteCtx
FrameStateCtx getState()
ActiveCtx
,
AvailableCtx
,
UnavailableCtx
,
InterruptCtx
,
ImpasseCtx
,
CompleteCtx
void setTimeAvailable(long time)
time
- the time the frame became available in simulation unitslong getTimeAvailable()
void addBinding(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
var
- the VariableCtx to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the specified variable is null.void removeBinding(VariableCtx var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
var
- the VariableCtx to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if a null variable is specified, no
bindings are present or the specified variable is
not presentVariableCtx getBinding(Variable var) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
var
- the variable for which the binding is requested
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no binding for the specified variable existsjava.util.Enumeration getBindings() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame context has no bindingsvoid addFiredConsequence(ConsequenceCtx consequence) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
consequence
- the ConsequenceCtx for the consequence fired in the frame
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the consequence is nullvoid removeFiredConsequence(ConsequenceCtx consequence) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
consequence
- the ConsequenceCtx for the consequence fired in the frame
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if the consequence is null or no fired consequences exist
or the specified consequence is not foundjava.util.ListIterator getFiredConsequences() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no fired consequences exist
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |