hmi.elckerlyc.interrupt
Class InterruptPlayer

java.lang.Object
  extended by hmi.elckerlyc.interrupt.InterruptPlayer
All Implemented Interfaces:
PUExceptionCallback, Player

public class InterruptPlayer
extends Object
implements PUExceptionCallback, Player


Field Summary
private static org.slf4j.Logger logger
           
private  PlanPlayer planPlayer
           
private  ExceptionManager warningManager
           
 
Constructor Summary
InterruptPlayer()
           
 
Method Summary
 void addExceptionListener(BMLExceptionListener ws)
           
 void addPlanUnit(InterruptUnit iu)
           
 void clearAll(double time)
           
 Set<String> getBehaviours(String bmlId)
           
 double getEndTime(String behId, String bmlId)
           
 void interruptBehaviour(String behaviourId, String bmlId, double globalTime)
           
 void interruptBehaviourBlock(String bmlId, double time)
          Interrupts all behaviors in the block; that is: calls their stop and removes them from the plan
 void play(double time)
           
 void puException(PlanUnit pu, String message, double time)
           
 void removeAllExceptionListeners()
           
 void reset()
          Reset the player.
 void setBMLBlockState(String bmlId, PlanUnitState state)
           
 void setParameterValue(String behId, String bmlId, String paramId, float value)
           
 void setParameterValue(String behId, String bmlId, String paramId, String value)
           
 void shutdown()
          Clean up resources constructed with the planner (e.g. for native stuff, spawned threads, ...).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

planPlayer

private final PlanPlayer planPlayer

warningManager

private final ExceptionManager warningManager

logger

private static final org.slf4j.Logger logger
Constructor Detail

InterruptPlayer

public InterruptPlayer()
Method Detail

play

public void play(double time)

puException

public void puException(PlanUnit pu,
                        String message,
                        double time)
Specified by:
puException in interface PUExceptionCallback

addExceptionListener

public void addExceptionListener(BMLExceptionListener ws)
Specified by:
addExceptionListener in interface Player

removeAllExceptionListeners

public void removeAllExceptionListeners()
Specified by:
removeAllExceptionListeners in interface Player

clearAll

public void clearAll(double time)

interruptBehaviour

public void interruptBehaviour(String behaviourId,
                               String bmlId,
                               double globalTime)

addPlanUnit

public void addPlanUnit(InterruptUnit iu)

getBehaviours

public Set<String> getBehaviours(String bmlId)
Specified by:
getBehaviours in interface Player

getEndTime

public double getEndTime(String behId,
                         String bmlId)
Specified by:
getEndTime in interface Player

interruptBehaviourBlock

public void interruptBehaviourBlock(String bmlId,
                                    double time)
Description copied from interface: Player
Interrupts all behaviors in the block; that is: calls their stop and removes them from the plan

Specified by:
interruptBehaviourBlock in interface Player

reset

public void reset()
Description copied from interface: Player
Reset the player.

Specified by:
reset in interface Player

setBMLBlockState

public void setBMLBlockState(String bmlId,
                             PlanUnitState state)
Specified by:
setBMLBlockState in interface Player

setParameterValue

public void setParameterValue(String behId,
                              String bmlId,
                              String paramId,
                              float value)
Specified by:
setParameterValue in interface Player

setParameterValue

public void setParameterValue(String behId,
                              String bmlId,
                              String paramId,
                              String value)
Specified by:
setParameterValue in interface Player

shutdown

public void shutdown()
Description copied from interface: Player
Clean up resources constructed with the planner (e.g. for native stuff, spawned threads, ...). A planner should not be (re)used after shutting it down.

Specified by:
shutdown in interface Player