org.commonreality.sensors.base
Class BaseSensor
java.lang.Object
org.commonreality.participant.impl.AbstractParticipant
org.commonreality.sensors.AbstractSensor
org.commonreality.sensors.base.BaseSensor
- All Implemented Interfaces:
- org.commonreality.identifier.IIdentifiable, org.commonreality.participant.IParticipant, org.commonreality.sensors.ISensor
public abstract class BaseSensor
- extends org.commonreality.sensors.AbstractSensor
skeletal sensor that utilizes a PerceptManager to create and process
percepts based on some other listening mechanism. It is up to the implementor
to provide a subclass of PerceptManager to this sensor and some
mechanism to call PerceptManager.markAsDirty(Object) for the relevant
objects that need to be perceived.
Extenders must implement processPercepts() which should in turn call
PerceptManager.processDirtyObjects()
- Author:
- developer
| Nested classes/interfaces inherited from interface org.commonreality.participant.IParticipant |
org.commonreality.participant.IParticipant.State |
|
Method Summary |
void |
add(java.util.Collection<org.commonreality.object.IMutableObject> objects)
all percepts must be for the same agent |
void |
add(org.commonreality.object.IMutableObject object)
|
void |
execute(java.lang.Runnable runner)
execute some code on the main thread of the sensor |
java.lang.String |
getName()
|
void |
initialize()
|
void |
remove(java.util.Collection<org.commonreality.object.ISensoryObject> objects)
|
void |
remove(org.commonreality.object.ISensoryObject object)
|
void |
removeIdentifiers(java.util.Collection<org.commonreality.object.identifier.ISensoryIdentifier> objectIdentifiers)
|
void |
shutdown()
|
void |
start()
|
void |
update(java.util.Collection<org.commonreality.object.delta.IObjectDelta> deltas)
|
void |
update(org.commonreality.object.delta.IObjectDelta delta)
|
| Methods inherited from class org.commonreality.sensors.AbstractSensor |
connect, disconnect, getAddressingInformation, getAfferentObjectManager, getCredentials, getEfferentObjectManager, getInterfacedAgents, getRealObjectManager, setCredentials, setIdentifier |
| Methods inherited from class org.commonreality.participant.impl.AbstractParticipant |
addClientService, addServerService, configure, getAgentObjectManager, getClock, getCommonRealityIdentifier, getEfferentCommandManager, getIdentifier, getPeriodicExecutor, getSensorObjectManager, getState, reset, resume, send, setCommonRealityIdentifier, stateMatches, stop, suspend, waitForState, waitForState |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.commonreality.participant.IParticipant |
configure, getAgentObjectManager, getClock, getEfferentCommandManager, getSensorObjectManager, getState, reset, resume, send, stateMatches, stop, suspend, waitForState, waitForState |
| Methods inherited from interface org.commonreality.identifier.IIdentifiable |
getIdentifier |
BaseSensor
public BaseSensor()
getName
public java.lang.String getName()
- Specified by:
getName in class org.commonreality.participant.impl.AbstractParticipant
- See Also:
AbstractParticipant.getName()
initialize
public void initialize()
throws java.lang.Exception
- Specified by:
initialize in interface org.commonreality.participant.IParticipant- Overrides:
initialize in class org.commonreality.participant.impl.AbstractParticipant
- Throws:
java.lang.Exception
shutdown
public void shutdown()
throws java.lang.Exception
- Specified by:
shutdown in interface org.commonreality.participant.IParticipant- Overrides:
shutdown in class org.commonreality.sensors.AbstractSensor
- Throws:
java.lang.Exception
start
public void start()
throws java.lang.Exception
- Specified by:
start in interface org.commonreality.participant.IParticipant- Overrides:
start in class org.commonreality.participant.impl.AbstractParticipant
- Throws:
java.lang.Exception
add
public void add(org.commonreality.object.IMutableObject object)
add
public void add(java.util.Collection<org.commonreality.object.IMutableObject> objects)
- all percepts must be for the same agent
- Parameters:
objects -
remove
public void remove(org.commonreality.object.ISensoryObject object)
remove
public void remove(java.util.Collection<org.commonreality.object.ISensoryObject> objects)
removeIdentifiers
public void removeIdentifiers(java.util.Collection<org.commonreality.object.identifier.ISensoryIdentifier> objectIdentifiers)
update
public void update(org.commonreality.object.delta.IObjectDelta delta)
update
public void update(java.util.Collection<org.commonreality.object.delta.IObjectDelta> deltas)
execute
public void execute(java.lang.Runnable runner)
- execute some code on the main thread of the sensor
- Parameters:
runner -