Public Member Functions | |
final void | addPHChangeListener (PHChangeListener l) |
native double | getPH () throws PhidgetException |
native double | getPHChangeTrigger () throws PhidgetException |
native double | getPHMax () throws PhidgetException |
native double | getPHMin () throws PhidgetException |
native double | getPotential () throws PhidgetException |
native double | getPotentialMax () throws PhidgetException |
native double | getPotentialMin () throws PhidgetException |
PHSensorPhidget () throws PhidgetException | |
final void | removePHChangeListener (PHChangeListener l) |
native void | setPHChangeTrigger (double newVal) throws PhidgetException |
native void | setTemperature (double newVal) throws PhidgetException |
Private Member Functions | |
final void | enableDeviceSpecificEvents (boolean b) |
native void | enablePHChangeEvents (boolean b) |
void | firePHChange (PHChangeEvent e) |
Static Private Member Functions | |
static native long | create () throws PhidgetException |
Private Attributes | |
long | nativePHChangeHandler = 0 |
LinkedList | phChangeListeners = new LinkedList () |
This class represents a Phidget PH Sensor. All methods to read pH data from the PH Sensor are implemented in this class.
The Phidget PH Sensor provides one standard pH sensor input.
Definition at line 18 of file PHSensorPhidget.java.
com.phidgets.PHSensorPhidget.PHSensorPhidget | ( | ) | throws PhidgetException [inline] |
Definition at line 20 of file PHSensorPhidget.java.
final void com.phidgets.PHSensorPhidget.addPHChangeListener | ( | PHChangeListener | l | ) | [inline] |
Adds a pH change listener. The pH change handler is a method that will be called when the pH has changed by at least the Trigger that has been set.
There is no limit on the number of pH change handlers that can be registered for a particular Phidget.
l | An implemetation of the PHChangeListener interface |
Definition at line 113 of file PHSensorPhidget.java.
static native long com.phidgets.PHSensorPhidget.create | ( | ) | throws PhidgetException [static, private] |
final void com.phidgets.PHSensorPhidget.enableDeviceSpecificEvents | ( | boolean | b | ) | [inline, private] |
Reimplemented from com.phidgets.Phidget.
Definition at line 101 of file PHSensorPhidget.java.
native void com.phidgets.PHSensorPhidget.enablePHChangeEvents | ( | boolean | b | ) | [private] |
void com.phidgets.PHSensorPhidget.firePHChange | ( | PHChangeEvent | e | ) | [inline, private] |
Definition at line 127 of file PHSensorPhidget.java.
native double com.phidgets.PHSensorPhidget.getPH | ( | ) | throws PhidgetException |
Returns the measured pH. This value can range from between getPHMin and getPHMax, but some of this range is likely outside of the valid range of most pH sensors. For example, when there is no pH sensor attached, the board will often report an (invalid) pH of 15, which while technically within a valid pH range, is unlikely to be seen.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPHChangeTrigger | ( | ) | throws PhidgetException |
Returns the change trigger. This is how much the pH much change between successive PHChangeEvents. By default this value is set to 0.05
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPHMax | ( | ) | throws PhidgetException |
Returns the maximum pH that will be returned by the pH sensor input.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPHMin | ( | ) | throws PhidgetException |
Returns the minimum pH that will be returned by the pH sensor input.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPotential | ( | ) | throws PhidgetException |
Returns the Potential, in millivolts. This returns the actual voltage potential measured by the A/D. This value will always be between getPotentialMin and getPotentialMax. This is the value that is internally used to calculate pH in the library.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPotentialMax | ( | ) | throws PhidgetException |
Returns the maximum potential that will be returned by the pH sensor input.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native double com.phidgets.PHSensorPhidget.getPotentialMin | ( | ) | throws PhidgetException |
Returns the minimum potential that will be returned by the pH sensor input.
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
final void com.phidgets.PHSensorPhidget.removePHChangeListener | ( | PHChangeListener | l | ) | [inline] |
Definition at line 121 of file PHSensorPhidget.java.
native void com.phidgets.PHSensorPhidget.setPHChangeTrigger | ( | double | newVal | ) | throws PhidgetException |
Sets the change trigger. This is how much the pH much change between successive PHChangeEvents. By default this value is set to 0.05
newVal | Trigger |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
native void com.phidgets.PHSensorPhidget.setTemperature | ( | double | newVal | ) | throws PhidgetException |
Sets the probe temperature in degrees celcius. This value is used while calculating the pH. The default value in the libary is 20 degrees celcius. If the temperature of the liquid being measured is not 20 degrees, then it should be measued and set for maximum accuracy.
Note: All that this does is set a value in the library that is used for calculating ph. This does not set anything in the hardware itself.
newVal | temperature |
PhidgetException | If this Phidget is not opened and attached. See open for information on determining if a device is attached. |
long com.phidgets.PHSensorPhidget.nativePHChangeHandler = 0 [private] |
Definition at line 120 of file PHSensorPhidget.java.
LinkedList com.phidgets.PHSensorPhidget.phChangeListeners = new LinkedList () [private] |
Definition at line 119 of file PHSensorPhidget.java.