|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.AbstractPlanner
hmi.elckerlyc.speechengine.TextPlanner
public class TextPlanner
| Field Summary | |
|---|---|
private static org.slf4j.Logger |
logger
|
private VerbalPlayer |
player
|
private TextOutput |
textOutput
|
| Constructor Summary | |
|---|---|
TextPlanner(VerbalPlayer p,
TextOutput output)
|
|
| Method Summary | |
|---|---|
List<SyncAndTimePeg> |
addBehaviour(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs,
PlanUnit planElement)
Creates a SpeechUnit that satisfies sacs and adds it to the motion plan. |
void |
addExceptionListener(BMLExceptionListener war)
|
void |
clearAll(double time)
Removes all behaviors from the plan |
private TextSpeechUnit |
createSpeechUnit(BMLBlockPeg bbPeg,
Behaviour b)
|
Set<String> |
getInvalidBehaviours()
Checks if the behavior plan is still consistent (e.g. after modifying the timing of some TimePegs). |
Player |
getPlayer()
Returns the Player for this planner. useful for, e.g., resetting the player of any planner (see BMLRealizer.reset). |
List<Class<? extends Behaviour>> |
getSupportedBehaviours()
|
List<Class<? extends Behaviour>> |
getSupportedDescriptionExtensions()
|
String |
getType()
|
VerbalPlayer |
getVerbalPlayer()
Addition to getPlayer to save on class casting |
void |
interruptBehaviour(String behaviourId,
String BMLId,
double globalTime)
Interrupts the behavior, sending the appropiate feedback callbacks if the behavior was running, just removes it otherwise. |
private void |
linkSyncs(TextSpeechUnit su,
List<TimePegAndConstraint> sacs)
|
void |
removeAllExceptionListeners()
|
void |
removeBehaviour(String behaviourId,
String BMLId)
Removes behavior with behaviourId and bmlId from the plan Callback behavior is unspecified |
void |
reset()
Resets the player, that is: stops running behavior and returns the player to its startup state (default pose etc) This does not clear any behaviours from the plans. |
TextSpeechUnit |
resolveSynchs(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs)
Resolves TimePegs for behavior b, given some known time pegs and constraints |
void |
setParameterValue(String behId,
String bmlId,
String paramId,
float value)
|
void |
setParameterValue(String behId,
String bmlId,
String paramId,
String value)
|
void |
setTextOutput(TextOutput to)
|
| Methods inherited from class hmi.elckerlyc.AbstractPlanner |
|---|
addFeedbackListener, getBehaviours, getEndTime, getFeedbackListeners, interruptBehaviourBlock, removeAllFeedbackListeners, removeFeedbackListener, setBMLBlockState, shutdown |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface hmi.elckerlyc.Planner |
|---|
addFeedbackListener, getBehaviours, getEndTime, getFeedbackListeners, interruptBehaviourBlock, removeAllFeedbackListeners, removeFeedbackListener, setBMLBlockState, shutdown |
| Field Detail |
|---|
private static org.slf4j.Logger logger
private VerbalPlayer player
private TextOutput textOutput
| Constructor Detail |
|---|
public TextPlanner(VerbalPlayer p,
TextOutput output)
| Method Detail |
|---|
public String getType()
getType in interface SpeechPlannerpublic void setTextOutput(TextOutput to)
private TextSpeechUnit createSpeechUnit(BMLBlockPeg bbPeg,
Behaviour b)
public List<SyncAndTimePeg> addBehaviour(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs,
PlanUnit planElement)
throws BehaviourPlanningException
addBehaviour in interface PlannerplanElement - planElement obtained from resolveSynchs, null to create a new planElement
BehaviourPlanningException - if no behavior satisfying sac can be constructed
public TextSpeechUnit resolveSynchs(BMLBlockPeg bbPeg,
Behaviour b,
List<TimePegAndConstraint> sacs)
throws BehaviourPlanningException
Planner
resolveSynchs in interface Plannerb - the behaviorsacs - the provided time pegs and constraints, missing constraints are filled out by this method
BehaviourPlanningException - if no behavior satisfying sac can be constructedpublic Set<String> getInvalidBehaviours()
Planner
getInvalidBehaviours in interface Plannerpublic void clearAll(double time)
Planner
clearAll in interface Planner
private void linkSyncs(TextSpeechUnit su,
List<TimePegAndConstraint> sacs)
public void removeBehaviour(String behaviourId,
String BMLId)
Planner
removeBehaviour in interface Planner
public void interruptBehaviour(String behaviourId,
String BMLId,
double globalTime)
Planner
interruptBehaviour in interface Plannerpublic VerbalPlayer getVerbalPlayer()
getVerbalPlayer in interface SpeechPlannerpublic Player getPlayer()
Planner
getPlayer in interface Plannerpublic void addExceptionListener(BMLExceptionListener war)
addExceptionListener in interface Plannerpublic void removeAllExceptionListeners()
removeAllExceptionListeners in interface Plannerpublic List<Class<? extends Behaviour>> getSupportedBehaviours()
getSupportedBehaviours in interface Plannerpublic List<Class<? extends Behaviour>> getSupportedDescriptionExtensions()
getSupportedDescriptionExtensions in interface Plannerpublic void reset()
Planner
reset in interface Planner
public void setParameterValue(String behId,
String bmlId,
String paramId,
float value)
setParameterValue in interface Planner
public void setParameterValue(String behId,
String bmlId,
String paramId,
String value)
setParameterValue in interface Planner
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||