Class RootContext
java.lang.Object
edu.tufts.hrilab.action.execution.Context
edu.tufts.hrilab.action.execution.RootContext
-
Field Summary
Fields inherited from class edu.tufts.hrilab.action.execution.Context
caller, childContexts, cmd, constraints, endTime, maxTime, startTime, stateMachine
-
Constructor Summary
ConstructorsConstructorDescriptionRootContext
(ActionConstraints constraints, StateMachine sm) RootContext constructorRootContext
(ActionConstraints constraints, StateMachine sm, ExecutionType executionType) RootContext constructor -
Method Summary
Modifier and TypeMethodDescriptiondeep copy of the context, its status, and its childrencreateSimulationRoot
(StateMachine sm, ExecutionType executionType) RootContext for simulationsprotected Context
Get the next step (i.e., context) to be executed.void
prune
(long historyLength) Prune children that are terminated.void
setStatus
(ActionStatus eStatus, Justification justification) Set the ActionStatus and Justification for the status.Methods inherited from class edu.tufts.hrilab.action.execution.Context
acquireLocks, addEvent, addEvent, addEvent, causedFailure, copyInternal, createSimulatedEquivalent, doStep, getActor, getActualLogicalValue, getArgument, getArguments, getArgumentSilent, getArgumentType, getArgumentValue, getChildContexts, getCommand, getConstraints, getContextDescription, getContextDescription, getDuration, getElapsedTime, getEndTime, getEquivalentContext, getEvaluatedArgument, getExecType, getId, getJustification, getLocalArgument, getLogicalValue, getMaxTime, getNearestTerminatedAncestor, getNextStep, getParentContext, getRootContext, getSignatureInPredicateForm, getStartTime, getStateMachine, getStateUpdates, getStatus, hasNormCheckingAncestor, isAction, isApproved, isAsynchronous, isFailure, isSimulation, isSuccess, isTerminated, performAdditionalStatusUpdates, releaseLocks, resetConcreteContext, resetContext, resetCoreContext, setChildContexts, setConstraints, setEndTime, setExecType, setLogicalValue, setStartTime, setStartTime, setStateMachine, setStatus, setTimeout, setupNextStep, setupNextStep, startOverAllMonitor, toString, updatePerformanceModels, verifyEffects, verifyReturnValue, waitForTermination, waitForTermination
-
Constructor Details
-
RootContext
RootContext constructor- Parameters:
constraints
- root action constraints (applies to all child contexts)sm
- state machine for root context
-
RootContext
RootContext constructor- Parameters:
constraints
- root action constraints (applies to all child contexts)sm
- state machine for root context
-
-
Method Details
-
createSimulationRoot
RootContext for simulations- Parameters:
sm
- state machine for simulationexecutionType
- execution type for the new root (should be some simulation state)
-
getNextStepForType
Description copied from class:Context
Get the next step (i.e., context) to be executed. Returns null if there are no more steps. TODO: remove this method- Overrides:
getNextStepForType
in classContext
- Returns:
-
setStatus
Description copied from class:Context
Set the ActionStatus and Justification for the status. NOTE: Classes overriding this method must call super.setStatus(status, justification) inside their overriding method to actually set the status and justification. Using the convenience method setStatus(status) will cause an infinite loop, and also abandon the Justification. -
prune
public void prune(long historyLength) Prune children that are terminated. TODO: use historyLength- Parameters:
historyLength
- ms of history to keep
-
copy
Description copied from class:Context
deep copy of the context, its status, and its children
-