hmi.bml.bridge.emitters
Class BlinkEmitter

java.lang.Object
  extended by java.lang.Thread
      extended by hmi.bml.bridge.emitters.BlinkEmitter
All Implemented Interfaces:
Runnable

public class BlinkEmitter
extends Thread

Emits blink behaviors to a RealizerBridge with a certain probabilitydistribution. Distribution parameters can be modified on the fly; the emitter will immediately change the blinking behavior. Next blink bml block will always start after the previous blink block (append-after) -- even if it were acceidentally fired too early. basic implementation: wait time equally distributed over avg-range..avg+range better implementation: - better calculation of expected non-blink duration (see Weissenfeld Liu Ostermann Figure 2) - itti et al: model of blinkgenerator and blinksuppressor, also coupled to saccades (!) What this emitter does NOT do is couple blinks to, e.g., ongoing speech, emotions, external events, etc

Author:
Dennis Reidsma

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
private  double averagewaitingtime
           
private  int blinkcount
           
private  double currentwaitingtime
           
private  long lastblink
           
private  org.slf4j.Logger logger
           
private  boolean parameterschanged
           
private  double range
           
protected  RealizerBridge realizerBridge
          The realizerbridge
(package private)  boolean running
           
private  String scheduling
           
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
BlinkEmitter(RealizerBridge bridge)
           
 
Method Summary
 void basicMethodSetAvg(double w)
           
 void basicMethodSetRange(double r)
           
protected  void basicMethodSetWaitForNextBlink()
          Basic method: average waiting time; actual time distributed equally over avg-range..avg+range
protected  void emitBlink()
           
 void run()
           
protected  void setWaitForNextBlink()
           
 void stopRunning()
           
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

logger

private org.slf4j.Logger logger

realizerBridge

protected RealizerBridge realizerBridge
The realizerbridge


lastblink

private long lastblink

currentwaitingtime

private double currentwaitingtime

blinkcount

private int blinkcount

parameterschanged

private boolean parameterschanged

scheduling

private String scheduling

running

boolean running

averagewaitingtime

private double averagewaitingtime

range

private double range
Constructor Detail

BlinkEmitter

public BlinkEmitter(RealizerBridge bridge)
Method Detail

run

public void run()
Specified by:
run in interface Runnable
Overrides:
run in class Thread

stopRunning

public void stopRunning()

emitBlink

protected void emitBlink()

setWaitForNextBlink

protected void setWaitForNextBlink()

basicMethodSetWaitForNextBlink

protected void basicMethodSetWaitForNextBlink()
Basic method: average waiting time; actual time distributed equally over avg-range..avg+range


basicMethodSetAvg

public void basicMethodSetAvg(double w)

basicMethodSetRange

public void basicMethodSetRange(double r)