jhomenet.hw.sensor
Class LightSensor
java.lang.Object
Model
jhomenet.hw.HomenetHardware
jhomenet.hw.sensor.Sensor
jhomenet.hw.sensor.ValueSensor
jhomenet.hw.sensor.LightSensor
- All Implemented Interfaces:
- java.io.Serializable, Hardware
public class LightSensor
- extends ValueSensor
- implements java.io.Serializable
|
Constructor Summary |
LightSensor()
Constructor. |
LightSensor(java.lang.String hardwareID,
java.lang.String description)
Default constructor. |
| Methods inherited from class jhomenet.hw.sensor.Sensor |
capture, getCurrentAsString, getCurrentData, getMaxData, getMinData, getPollingType, getPollingTypeListModel, isFirstPoll, resetData, setCurrentData, setMaxData, setMinData, setPollingType, toString |
| Methods inherited from class jhomenet.hw.HomenetHardware |
equals, getConfiguration, getConfiguration, getDriverHardwareDescription, getDriverName, getErrorCount, getHardwareClassname, getHardwareDescription, getHardwareId, getSetupDescription, initializeHardware, isRegistered, setConfiguration, setConfiguration, setDriver, setHardwareId, setSetupDescription |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
MIN
public static final float MIN
- See Also:
- Constant Field Values
CUTOFF_LEVEL
public static final float CUTOFF_LEVEL
- See Also:
- Constant Field Values
MAX
public static final float MAX
- See Also:
- Constant Field Values
night_str
public static final java.lang.String night_str
- See Also:
- Constant Field Values
day_str
public static final java.lang.String day_str
- See Also:
- Constant Field Values
LightSensor
public LightSensor(java.lang.String hardwareID,
java.lang.String description)
- Default constructor.
- Parameters:
hardwareID - description -
LightSensor
public LightSensor()
- Constructor.
initializeHardwareDescription
protected void initializeHardwareDescription()
- Description copied from class:
HomenetHardware
- Set the hardware description.
- Specified by:
initializeHardwareDescription in class HomenetHardware
- See Also:
HomenetHardware.initializeHardwareDescription()
readSensor
public HardwareData readSensor()
throws SensorException
- Description copied from class:
Sensor
- Capture the sensor's data in the sensor's current unit (if
applicable).
- Specified by:
readSensor in class Sensor
- Returns:
- The sensor's data in the sensor's default data unit.
- Throws:
SensorException
readFromDriver
public double readFromDriver()
throws SensorException
- Description copied from class:
Sensor
- Read the raw value from the driver.
- Specified by:
readFromDriver in class Sensor
- Returns:
- The raw value read from the driver.
- Throws:
SensorException
Copyright © 2004-2005 David Irwin. All Rights Reserved.