cat.sensor.core
Class LeafSensor

java.lang.Object
  extended bycat.sensor.core.Sensor
      extended bycat.sensor.core.LeafSensor

public class LeafSensor
extends Sensor

LeafSensor is a Sensor which is a leaf on the heirarchy of Sensors. It does not listen to any other sensors. It only gets data directly from real physical sensors (or simulated ones).


Field Summary
 
Fields inherited from class cat.sensor.core.Sensor
remote, sensorID, sensorType
 
Constructor Summary
LeafSensor(java.lang.String id)
          This constructor initializes the Sensor object by setting the id.
 
Method Summary
 void newRawData(Value newValue)
          This method is how the LeafSensor gets data from the real sensor.
 void setStatus(int status)
          This method sets the status of the sensor.
 
Methods inherited from class cat.sensor.core.Sensor
addSensorListener, countSensorListeners, deleteSensorListener, deleteSensorListeners, getID, getSensorType, isRemote, notifySensorListeners, setID, setRemote, setSensorType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LeafSensor

public LeafSensor(java.lang.String id)
This constructor initializes the Sensor object by setting the id.

Parameters:
id - The sensor's unique id.
Method Detail

newRawData

public void newRawData(Value newValue)
This method is how the LeafSensor gets data from the real sensor.

Parameters:
newValue - The sensor's data.

setStatus

public void setStatus(int status)
This method sets the status of the sensor.

Parameters:
status - The sensor's status.