public class DefaultAuralSensor extends AbstractSensor
queueSound(IRealObject)
with the results from
newSound(String[], String, double, double)
or
newVocalization(String, double, double, IIdentifier)
. This will
create IRealObject
s representing the sounds, which will be detected
by the GeneralAuralProcessor
which transforms them into
IAfferentObject
s for each of the registered IAgent
s. Further
customization of the sounds can be done using
GeneralAuralProcessor.IAuralMutator
, which can be added to the sensor
with a prefixed classname property "IAuralMutator."IParticipant.State
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MUTATOR_PREFIX |
Constructor and Description |
---|
DefaultAuralSensor() |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.util.Map<java.lang.String,java.lang.String> options)
configure the participant.
|
java.lang.String |
getName() |
void |
initialize()
called in response to a command from Reality to get everything ready to
run.
|
IRealObject |
newSound(java.lang.String[] types,
java.lang.String content,
double onset,
double duration) |
IRealObject |
newVocalization(java.lang.String content,
double onset,
double duration,
IIdentifier agent) |
void |
queueSound(IRealObject aural) |
void |
resume()
resume a suspended participant and return state to started.
|
void |
shutdown()
shutdown the participant if it is stopped and disconnect
|
void |
start()
Start it up by queueing the
Runnable _cycle on the Executor |
agentAdded, agentRemoved, agentUpdated, connect, createAfferentObjectManager, createAgentObjectManager, createEfferentObjectManager, createRealObjectManager, createSensor, disconnect, getAddressingInformation, getAfferentObjectManager, getCredentials, getEfferentObjectManager, getInterfacedAgents, getRealObjectManager, isInterfacedAgent, setCredentials, setIdentifier, shouldInterface
addClientService, addServerService, checkState, clearObjectManagers, createEfferentCommandManager, createIOExecutorService, createIOHandler, createNotificationManager, createSensorObjectManager, disconnect, getAgentObjectManager, getCentralThreadFactory, getClock, getCommonRealityIdentifier, getEfferentCommandManager, getIdentifier, getIOExecutor, getIOHandler, getIOThreadFactory, getNotificationManager, getPeriodicExecutor, getSensorObjectManager, getServerAddressInformation, getState, reset, send, setClock, setCommonRealityIdentifier, shutdown, stateMatches, stop, suspend, waitForState, waitForState
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disconnect, getAgentObjectManager, getClock, getEfferentCommandManager, getNotificationManager, getSensorObjectManager, getState, reset, send, shutdown, stateMatches, stop, suspend, waitForState, waitForState
getIdentifier
public static final java.lang.String MUTATOR_PREFIX
public void configure(java.util.Map<java.lang.String,java.lang.String> options) throws java.lang.Exception
IParticipant
configure
in interface IParticipant
configure
in class AbstractParticipant
java.lang.Exception
public void initialize() throws java.lang.Exception
AbstractParticipant
initialize
in interface IParticipant
initialize
in class AbstractParticipant
java.lang.Exception
public void start() throws java.lang.Exception
Runnable
_cycle on the Executor
start
in interface IParticipant
start
in class AbstractParticipant
java.lang.Exception
AbstractParticipant.start()
public void shutdown() throws java.lang.Exception
IParticipant
shutdown
in interface IParticipant
shutdown
in class AbstractSensor
java.lang.Exception
public void resume() throws java.lang.Exception
IParticipant
resume
in interface IParticipant
resume
in class AbstractParticipant
java.lang.Exception
public java.lang.String getName()
getName
in class AbstractParticipant
public IRealObject newSound(java.lang.String[] types, java.lang.String content, double onset, double duration)
public IRealObject newVocalization(java.lang.String content, double onset, double duration, IIdentifier agent)
public void queueSound(IRealObject aural)