inpro.incremental.sink
Class TEDviewNotifier

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.sink.TEDviewNotifier
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable, FrameAware

public class TEDviewNotifier
extends IUModule
implements FrameAware

A notifier that outputs IU structures to TEDview Even though TedViewNotifier is an IU-sink (i.e., not a real processor), it is implemented as an IUModule, because IUModules already have the necessary TEDview communication code available.

Author:
timo

Nested Class Summary
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
(package private)  int currentFrame
           
static java.lang.String PROP_LOGICAL_TIME
          if set to true, TEDview event times will disregard any processing delays and use theoretical frame timings instead; if false, actual wall-clock time will be used for event times (default)
static java.lang.String PROP_TEDVIEW_ADDRESS
           
static java.lang.String PROP_TEDVIEW_PORT
           
private  TedAdapter tedAdapter
           
private  boolean useLogicalTime
           
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, logger, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
TEDviewNotifier()
           
 
Method Summary
 int getTime()
           
 void hypChange(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          this should receive a list of current IUs and a list of edit messages since the last call to hypChange
protected  void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          the method that IU modules must implement
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void setCurrentFrame(int frame)
           
 
Methods inherited from class inpro.incremental.IUModule
logToTedView
 
Methods inherited from class inpro.incremental.PushBuffer
reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_TEDVIEW_PORT

@S4Integer(defaultValue=2000)
public static final java.lang.String PROP_TEDVIEW_PORT
See Also:
Constant Field Values

PROP_TEDVIEW_ADDRESS

@S4String(defaultValue="localhost")
public static final java.lang.String PROP_TEDVIEW_ADDRESS
See Also:
Constant Field Values

PROP_LOGICAL_TIME

@S4Boolean(defaultValue=false)
public static final java.lang.String PROP_LOGICAL_TIME
if set to true, TEDview event times will disregard any processing delays and use theoretical frame timings instead; if false, actual wall-clock time will be used for event times (default)

See Also:
Constant Field Values

useLogicalTime

private boolean useLogicalTime

tedAdapter

private TedAdapter tedAdapter

currentFrame

int currentFrame
Constructor Detail

TEDviewNotifier

public TEDviewNotifier()
Method Detail

setCurrentFrame

public void setCurrentFrame(int frame)
Specified by:
setCurrentFrame in interface FrameAware

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class IUModule
Throws:
edu.cmu.sphinx.util.props.PropertyException

hypChange

public void hypChange(java.util.Collection<? extends IU> ius,
                      java.util.List<? extends EditMessage<? extends IU>> edits)
Description copied from class: PushBuffer
this should receive a list of current IUs and a list of edit messages since the last call to hypChange

Overrides:
hypChange in class IUModule
Parameters:
ius - while this is a (plain) collection, the collection's iterator() method must ensure a sensible ordering of the returned elements. For now we have only used Lists (which are ordered), but a Tree of IUs should also be possible and this should gracefully work together with processors that expect lists
edits - a list of edits since the last call to hypChange

getTime

public int getTime()
Overrides:
getTime in class IUModule

leftBufferUpdate

protected void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                                java.util.List<? extends EditMessage<? extends IU>> edits)
Description copied from class: IUModule
the method that IU modules must implement

Specified by:
leftBufferUpdate in class IUModule
Parameters:
ius - list of IUs that make up the current hypothesis
edits - a list of edits since the last call