|
||||||||||
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.FrameStateCtx gov.nasa.arc.brahms.common.rt.UnavailableCtx
public class UnavailableCtx
The UnavailableCtx manages information about the unavailable state of a frame. The unavailable state is entered by a frame when the frame was available and one or more of its preconditions evaluated to false due to a change in the belief or fact set. This context maintains when the frame enters the unavailable state and when the frame leaves the unavailable state. This context also defines the contexts of the beliefs or facts (statement) that caused a precondition to evaluate to false.
FrameStateCtx
,
Serialized FormField Summary | |
---|---|
static byte |
DETECTABLE
Indicates as the cause for unavailability the end of a composite activity caused by a detectable (abort or complete) |
static byte |
RETRACTION
Indicates as the cause for unavailability a retracted statement |
Fields inherited from interface gov.nasa.arc.brahms.common.rt.IRuntimeConstants |
---|
ABORTED, ACTIVE, ACTIVITY, AVAILABLE, COMPLETED, CONSEQUENCE, ENDED, ENGINE, EXTERNAL_AGENT, FROM, IMPASSED, INITIAL, INTERRUPTED, JAVA_PROPERTY, sABORTED, sACTIVE, sAVAILABLE, sCOMPLETED, sENDED, sIMPASSED, sINTERRUPTED, sUNAVAILABLE, TO, TRANSFER, UNAVAILABLE |
Constructor Summary | |
---|---|
UnavailableCtx(IFrameCtx frame)
Constructor, creates a new UnavailableCtx for the specified frame |
Method Summary | |
---|---|
void |
addCausingStatement(StatementCtx statement)
Adds the specified statement (belief or fact) as a statement causing a precondition to evaluate to false. |
byte |
getCause()
Returns the cause of the unavailability, either RETRACTION when a statement was retracted causing the frame to become unavailable or DETECTABLE when a composite activity was aborted or completed by a detectable. |
DetectableCtx |
getCausingDetectable()
Returns the detectable causing the unavailability of the frame. |
java.util.Enumeration |
getCausingStatements()
Returns a list of all the statements (facts or beliefs) causing a precondition to evaluate to false. |
int |
getState()
Returns the state identifier |
java.lang.String |
getStateName()
Returns the name of the state |
void |
removeCausingStatement(StatementCtx statement)
Removes the specified statement (belief or fact) as a statement causing a precondition to evaluate to false. |
void |
setCause(byte cause)
Sets the cause of the unavailability, either RETRACTION when a statement was retracted causing the frame to become unavailable or DETECTABLE when a composite activity was aborted or completed by a detectable. |
void |
setCausingDetectable(DetectableCtx detectable)
Sets the detectable causing the unavailability of the frame. |
Methods inherited from class gov.nasa.arc.brahms.common.rt.FrameStateCtx |
---|
getFrame, getNextFrameState, getPreviousFrameState, setFrame, setNextFrameState, setPreviousFrameState |
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, toString, wait, wait, wait |
Field Detail |
---|
public static final byte RETRACTION
public static final byte DETECTABLE
Constructor Detail |
---|
public UnavailableCtx(IFrameCtx frame) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
frame
- the IFrameCtx that is set to unavailable
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if frame specified is nullMethod Detail |
---|
public int getState()
getState
in class FrameStateCtx
public java.lang.String getStateName()
getStateName
in class FrameStateCtx
public void setCause(byte cause) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
cause
- the cause for the unavailability
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if an invalid is cause is specifiedRETRACTION
,
DETECTABLE
public byte getCause() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
cause
- the cause for the unavailability
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no cause is specifiedRETRACTION
,
DETECTABLE
,
getCausingStatements()
,
getCausingDetectable()
public void addCausingStatement(StatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
statement
- the statement (BeliefCtx or FactCtx) to be added
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if statement is nullpublic void removeCausingStatement(StatementCtx statement) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
statement
- the statement to be removed
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if statement is null, no statements
are present, or the statements is not foundpublic java.util.Enumeration getCausingStatements() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if there are no statementspublic void setCausingDetectable(DetectableCtx detectable) throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
detectable
- the DetectableCtx for the detectable causing the unavailability
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no detectable is specified.public DetectableCtx getCausingDetectable() throws gov.nasa.arc.brahms.common.exceptions.BrahmsException
gov.nasa.arc.brahms.common.exceptions.BrahmsException
- if no detectable is specified.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |