|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.phidgets.Phidget
com.phidgets.TemperatureSensorPhidget
public final class TemperatureSensorPhidget
This class represents a Phidget temperature Sensor. All methods to read temperaure data from the sensor are implemented in this class.
The Temperature Phidget consists of a thermocouple interface, and a temperature sensing IC, which is used to measure the temperature of the thermocouple cold junction and calibrate the thermocouple sensed temperature.
Both the thermocouple and temperature IC temperatures can be read. Value are returned in degrees celcius.
Constructor Summary | |
---|---|
TemperatureSensorPhidget()
|
Method Summary | |
---|---|
void |
addTemperatureChangeListener(TemperatureChangeListener l)
Adds a temperature change listener. |
int |
getSensorCount()
Returns the number of temperature sensors. |
double |
getTemperature(int index)
Returns the temperature of a input. |
double |
getTemperatureChangeTrigger(int index)
Returns the change trigger for an input. |
void |
removeTemperatureChangeListener(TemperatureChangeListener l)
|
void |
setTemperatureChangeTrigger(int index,
double newVal)
Sets the change trigger for an input. |
Methods inherited from class com.phidgets.Phidget |
---|
addAttachListener, addDetachListener, addErrorListener, close, equals, getDeviceName, getDeviceType, getDeviceVersion, getLibraryVersion, getSerialNumber, getTag, isAttached, open, openAny, removeAttachListener, removeDetachListener, removeErrorListener, setTag, toString, waitForAttachment |
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public TemperatureSensorPhidget() throws PhidgetException
PhidgetException
Method Detail |
---|
public int getSensorCount() throws PhidgetException
PhidgetException
public double getTemperature(int index) throws PhidgetException
index
- Index of the temperature sensor - 0 in the IC, 1 is the thermocouple
PhidgetException
- If this Phidget is not opened and attached.
See open
for information on determining if a device is attached.public void setTemperatureChangeTrigger(int index, double newVal) throws PhidgetException
index
- InputnewVal
- Trigger
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public double getTemperatureChangeTrigger(int index) throws PhidgetException
index
- Input
PhidgetException
- If this Phidget is not opened and attached, or if the index is out of range.
See open
for information on determining if a device is attached.public final void addTemperatureChangeListener(TemperatureChangeListener l)
Trigger
that has been set.
There is no limit on the number of weight change handlers that can be registered for a particular Phidget.
l
- An implemetation of the TemperatureChangeListener
interfacepublic final void removeTemperatureChangeListener(TemperatureChangeListener l)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |