public class GeneralAuralProcessor extends java.lang.Object implements IRealObjectListener
IRealObject
with the IAuralPropertyHandler
properties.
It will then transform that aural into an IAfferentObject
for each of
the connected agents. Calls to update(double)
will remove any
IAfferentObject
that have exceeded their duration.GeneralAuralProcessor.IAuralMutator
via
add(org.commonreality.sensors.aural.GeneralAuralProcessor.IAuralMutator)
RealObjectManager
on an
executor other than the sensors IO executor (since it may have to block to
create new IAfferentObject
s)Modifier and Type | Class and Description |
---|---|
static interface |
GeneralAuralProcessor.IAuralMutator
interface used to dynamically configure aural percepts
|
Constructor and Description |
---|
GeneralAuralProcessor(ISensor sensor) |
Modifier and Type | Method and Description |
---|---|
void |
add(GeneralAuralProcessor.IAuralMutator mutator) |
protected void |
addAural(IRealObject auralObject) |
void |
objectsAdded(IObjectEvent<IRealObject,?> addEvent) |
void |
objectsRemoved(IObjectEvent<IRealObject,?> removeEvent)
this ignores the removal of the original
IRealObject that launched
the IAfferentObject percept of the sound, since the percept is
internal |
void |
objectsUpdated(IObjectEvent<IRealObject,?> updateEvent)
aural events don't change once they've been detected
|
protected void |
removeAural(IAfferentObject aural) |
double |
update(double currentTime)
update all
IAfferentObject s representing percepts of hearable
aural objects, removing any of those that have elapsed. |
public GeneralAuralProcessor(ISensor sensor)
public void add(GeneralAuralProcessor.IAuralMutator mutator)
public double update(double currentTime)
IAfferentObject
s representing percepts of hearable
aural objects, removing any of those that have elapsed.currentTime
- protected void addAural(IRealObject auralObject)
protected void removeAural(IAfferentObject aural)
public void objectsAdded(IObjectEvent<IRealObject,?> addEvent)
objectsAdded
in interface IObjectListener<IRealObject>
public void objectsRemoved(IObjectEvent<IRealObject,?> removeEvent)
IRealObject
that launched
the IAfferentObject
percept of the sound, since the percept is
internalobjectsRemoved
in interface IObjectListener<IRealObject>
public void objectsUpdated(IObjectEvent<IRealObject,?> updateEvent)
objectsUpdated
in interface IObjectListener<IRealObject>
updateEvent
- IObjectListener.objectsUpdated(org.commonreality.object.manager.event.IObjectEvent)