Public Member Functions | |
final void | addTemperatureChangeListener (TemperatureChangeListener l) |
native double | getAmbientTemperature () throws PhidgetException |
native double | getAmbientTemperatureMax () throws PhidgetException |
native double | getAmbientTemperatureMin () throws PhidgetException |
native double | getPotential (int index) throws PhidgetException |
native double | getPotentialMax (int index) throws PhidgetException |
native double | getPotentialMin (int index) throws PhidgetException |
native int | getSensorCount () throws PhidgetException |
native double | getTemperature (int index) throws PhidgetException |
native double | getTemperatureChangeTrigger (int index) throws PhidgetException |
native int | getTemperatureInputCount () throws PhidgetException |
native double | getTemperatureMax (int index) throws PhidgetException |
native double | getTemperatureMin (int index) throws PhidgetException |
native int | getThermocoupleType (int index) throws PhidgetException |
final void | removeTemperatureChangeListener (TemperatureChangeListener l) |
native void | setTemperatureChangeTrigger (int index, double newVal) throws PhidgetException |
native void | setThermocoupleType (int index, int type) throws PhidgetException |
TemperatureSensorPhidget () throws PhidgetException | |
Static Public Attributes | |
static final int | PHIDGET_TEMPERATURE_SENSOR_E_TYPE = 3 |
static final int | PHIDGET_TEMPERATURE_SENSOR_J_TYPE = 2 |
static final int | PHIDGET_TEMPERATURE_SENSOR_K_TYPE = 1 |
static final int | PHIDGET_TEMPERATURE_SENSOR_T_TYPE = 4 |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
native void | enableTemperatureChangeEvents (boolean b) |
void | fireTemperatureChange (TemperatureChangeEvent e) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
Private Attributes | |
long | nativeTemperatureChangeHandler = 0 |
LinkedList | temperatureChangeListeners = new LinkedList () |
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.
Definition at line 22 of file TemperatureSensorPhidget.java.
com.phidgets.TemperatureSensorPhidget.TemperatureSensorPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 24 of file TemperatureSensorPhidget.java.
final void com.phidgets.TemperatureSensorPhidget.addTemperatureChangeListener | ( | TemperatureChangeListener | l | ) | [inline] |
Adds a temperature change listener. The temperature change handler is a method that will be called when the temperature has changed by at least the Trigger that has been set.
There is no limit on the number of temperature change handlers that can be registered for a particular Phidget.
l | An implemetation of the TemperatureChangeListener interface |
Definition at line 190 of file TemperatureSensorPhidget.java.
static native long com.phidgets.TemperatureSensorPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.TemperatureSensorPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 178 of file TemperatureSensorPhidget.java.
native void com.phidgets.TemperatureSensorPhidget.enableTemperatureChangeEvents | ( | boolean | b | ) | [private] |
void com.phidgets.TemperatureSensorPhidget.fireTemperatureChange | ( | TemperatureChangeEvent | e | ) | [inline, private] |
Definition at line 204 of file TemperatureSensorPhidget.java.
native double com.phidgets.TemperatureSensorPhidget.getAmbientTemperature | ( | ) | throws PhidgetException |
Returns the temperature of the ambient sensor. This value is returned in degrees celcius but can easily be converted into other units. This value will always be between getAmbientTemperatureMin and getAmbientTemperatureMax. This is the temperature of the board at the thermocouple cold junction.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getAmbientTemperatureMax | ( | ) | throws PhidgetException |
Returns the maximum temperature that will be returned by the ambient sensor.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getAmbientTemperatureMin | ( | ) | throws PhidgetException |
Returns the minimum temperature that will be returned by the ambient sensor.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getPotential | ( | int | index | ) | throws PhidgetException |
Returns the potential of a thermocouple input. This value is returned in millivolts. This value will always be between getPotentialMin and getPotentialMax. This is very accurate, as it is a raw value from the A/D. This is the value that is internally used to calculate temperature in the library.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getPotentialMax | ( | int | index | ) | throws PhidgetException |
Returns the maximum potential that will be returned by a thermocouple input.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getPotentialMin | ( | int | index | ) | throws PhidgetException |
Returns the minimum potential that will be returned by a thermocouple input.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TemperatureSensorPhidget.getSensorCount | ( | ) | throws PhidgetException |
native double com.phidgets.TemperatureSensorPhidget.getTemperature | ( | int | index | ) | throws PhidgetException |
Returns the temperature of a thermocouple. This value is returned in degrees celcius but can easily be converted into other units. This value will always be between getTemperatureMin and getTemperatureMax. The accuracy depends on the thermocouple used. The board is calibrated during manufacture.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached, or if a thermocouple sensor is not plugged into the board. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getTemperatureChangeTrigger | ( | int | index | ) | throws PhidgetException |
Returns the change trigger for an input. This is the ammount by which the sensed temperature must change between TemperatureChangeEvents. By default this is set to 0.5.
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. |
native int com.phidgets.TemperatureSensorPhidget.getTemperatureInputCount | ( | ) | throws PhidgetException |
Returns the number of thermocouples.
native double com.phidgets.TemperatureSensorPhidget.getTemperatureMax | ( | int | index | ) | throws PhidgetException |
Returns the maximum temperature that will be returned by a thermocouple input. This value depends on the thermocouple type.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.TemperatureSensorPhidget.getTemperatureMin | ( | int | index | ) | throws PhidgetException |
Returns the minimum temperature that will be returned by a thermocouple input. This value depends on the thermocouple type.
index | Index of the thermocouple |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native int com.phidgets.TemperatureSensorPhidget.getThermocoupleType | ( | int | index | ) | throws PhidgetException |
Returns the thermocouple type for an input. The possible values for type are PHIDGET_TEMPERATURE_SENSOR_K_TYPE, PHIDGET_TEMPERATURE_SENSOR_J_TYPE, PHIDGET_TEMPERATURE_SENSOR_E_TYPE and PHIDGET_TEMPERATURE_SENSOR_T_TYPE
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. |
final void com.phidgets.TemperatureSensorPhidget.removeTemperatureChangeListener | ( | TemperatureChangeListener | l | ) | [inline] |
Definition at line 198 of file TemperatureSensorPhidget.java.
native void com.phidgets.TemperatureSensorPhidget.setTemperatureChangeTrigger | ( | int | index, |
double | newVal | ||
) | throws PhidgetException |
Sets the change trigger for an input. This is the ammount by which the sensed temperature must change between TemperatureChangeEvents. By default this is set to 0.5.
index | Input |
newVal | 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. |
native void com.phidgets.TemperatureSensorPhidget.setThermocoupleType | ( | int | index, |
int | type | ||
) | throws PhidgetException |
Sets the thermocouple type for an input. The Phidget Temperature Sensor board can be used with K, E, J and T-Type Thermocouples. Support for other thermocouple types, and voltage sources other then thermocouples in the valid range (between getPotentialMin and getPotentialMax) can be achieved using getPotential.
The possible values for type are PHIDGET_TEMPERATURE_SENSOR_K_TYPE, PHIDGET_TEMPERATURE_SENSOR_J_TYPE, PHIDGET_TEMPERATURE_SENSOR_E_TYPE and PHIDGET_TEMPERATURE_SENSOR_T_TYPE
By default, type is set to PHIDGET_TEMPERATURE_SENSOR_K_TYPE.
index | Input |
type | Thermocouple Type |
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. |
long com.phidgets.TemperatureSensorPhidget.nativeTemperatureChangeHandler = 0 [private] |
Definition at line 197 of file TemperatureSensorPhidget.java.
final int com.phidgets.TemperatureSensorPhidget.PHIDGET_TEMPERATURE_SENSOR_E_TYPE = 3 [static] |
E-Type Thermocouple. This is used with getThermocoupleType and setThermocoupleType
Definition at line 41 of file TemperatureSensorPhidget.java.
final int com.phidgets.TemperatureSensorPhidget.PHIDGET_TEMPERATURE_SENSOR_J_TYPE = 2 [static] |
J-Type Thermocouple. This is used with getThermocoupleType and setThermocoupleType
Definition at line 37 of file TemperatureSensorPhidget.java.
final int com.phidgets.TemperatureSensorPhidget.PHIDGET_TEMPERATURE_SENSOR_K_TYPE = 1 [static] |
K-Type Thermocouple. This is used with getThermocoupleType and setThermocoupleType
Definition at line 33 of file TemperatureSensorPhidget.java.
final int com.phidgets.TemperatureSensorPhidget.PHIDGET_TEMPERATURE_SENSOR_T_TYPE = 4 [static] |
T-Type Thermocouple. This is used with getThermocoupleType and setThermocoupleType
Definition at line 45 of file TemperatureSensorPhidget.java.
LinkedList com.phidgets.TemperatureSensorPhidget.temperatureChangeListeners = new LinkedList () [private] |
Definition at line 196 of file TemperatureSensorPhidget.java.