de.jaetzold.art
Interface SensorPort
- All Superinterfaces:
- Port
- All Known Subinterfaces:
- ActuatorPort
- All Known Implementing Classes:
- BaseSensorPort
- public interface SensorPort
- extends Port
A SensorPort is a Port which delivers SensorPeers for Sensors.
getPeerFor
public SensorPeer getPeerFor(Sensor sensor)
- Returns a SensorPeer which can be used by the given Sensor.
There should never be the need in calling this method from somewhere outside of a Sensor-implementation.
- See Also:
connectWith(Sensor)
,
RawSensor.connectWith(SensorPort)
connectWith
public void connectWith(Sensor sensor)
- Connects the given Sensor to this port.
This gives the Sensor its Peer.
If the Sensor does not allow this connection an Exception is thrown.
This could be the case if the Sensor is already connected to a different Port, does'nt allow multiple connections and doesn't allow automatic disconnection.
- See Also:
Sensor.connectWith(Port)
disconnect
public void disconnect(Sensor sensor)
- Disconnects the given Sensor from this port.
This removes the peer associated with this Port for the Sensor.
If the Sensor is not connected or the Sensor or the Port doesn't allow disconnection an Exception is thrown.
- See Also:
Sensor.disconnect()