aboutsummaryrefslogtreecommitdiffstats
path: root/cphidgetphsensor.h
diff options
context:
space:
mode:
authorJonathan McCrohan <jmccrohan@gmail.com>2012-04-14 12:56:48 +0100
committerJonathan McCrohan <jmccrohan@gmail.com>2012-04-14 12:56:48 +0100
commit0b624384cd52be20e61284551d832b499d7b7707 (patch)
tree6f95a4bbef47abc9720b96c0722e8f632aef228a /cphidgetphsensor.h
downloadlibphidget21-0b624384cd52be20e61284551d832b499d7b7707.tar.gz
Imported Upstream version 2.1.8.20120216upstream/2.1.8.20120216
Diffstat (limited to 'cphidgetphsensor.h')
-rw-r--r--cphidgetphsensor.h99
1 files changed, 99 insertions, 0 deletions
diff --git a/cphidgetphsensor.h b/cphidgetphsensor.h
new file mode 100644
index 0000000..90d7a0a
--- /dev/null
+++ b/cphidgetphsensor.h
@@ -0,0 +1,99 @@
+#ifndef __CPHIDGETPHSENSOR
+#define __CPHIDGETPHSENSOR
+#include "cphidget.h"
+
+/** \defgroup phidph Phidget PH Sensor
+ * \ingroup phidgets
+ * Calls specific to the Phidget PH Sensor. See the product manual for more specific API details, supported functionality, units, etc.
+ * @{
+ */
+
+DPHANDLE(PHSensor)
+CHDRSTANDARD(PHSensor)
+
+/**
+ * Gets the sensed PH.
+ * @param phid An attached phidget ph sensor handle.
+ * @param ph The PH.
+ */
+CHDRGET(PHSensor,PH,double *ph)
+/**
+ * Gets the maximum PH that the sensor could report.
+ * @param phid An attached phidget ph sensor handle.
+ * @param max The maximum PH.
+ */
+CHDRGET(PHSensor,PHMax,double *max)
+/**
+ * Gets the minimum PH that the sensor could report.
+ * @param phid An attached phidget ph sensor handle.
+ * @param min The minimum PH.
+ */
+CHDRGET(PHSensor,PHMin,double *min)
+/**
+ * Set a PH change handler. This is called when the PH changes by more then the change trigger.
+ * @param phid An attached phidget ph sensor handle.
+ * @param fptr Callback function pointer.
+ * @param userPtr A pointer for use by the user - this value is passed back into the callback function.
+ */
+CHDREVENT(PHSensor,PHChange,double ph)
+/**
+ * Gets the PH change trigger.
+ * @param phid An attached phidget ph sensor handle.
+ * @param trigger The change trigger.
+ */
+CHDRGET(PHSensor,PHChangeTrigger,double *trigger)
+/**
+ * Sets the PH change trigger.
+ * @param phid An attached phidget ph sensor handle.
+ * @param trigger The change trigger.
+ */
+CHDRSET(PHSensor,PHChangeTrigger,double trigger)
+
+/**
+ * Gets the sensed potential.
+ * @param phid An attached phidget ph sensor handle.
+ * @param potential The potential.
+ */
+CHDRGET(PHSensor,Potential,double *potential)
+/**
+ * Gets the maximum potential that can be sensed.
+ * @param phid An attached phidget ph sensor handle.
+ * @param max The maximum potential.
+ */
+CHDRGET(PHSensor,PotentialMax,double *max)
+/**
+ * Gets the minimum potential that can be sensed.
+ * @param phid An attached phidget ph sensor handle.
+ * @param min The minimum potential.
+ */
+CHDRGET(PHSensor,PotentialMin,double *min)
+
+/**
+ * Sets the temperature to be used for PH calculations.
+ * @param phid An attached phidget ph sensor handle.
+ * @param temperature The temperature (degrees celcius). By default this is 20.
+ */
+CHDRSET(PHSensor,Temperature,double temperature)
+
+#ifndef EXTERNALPROTO
+struct _CPhidgetPHSensor {
+ CPhidget phid;
+
+ int (CCONV *fptrPHChange)(CPhidgetPHSensorHandle, void *, double);
+
+ void *fptrPHChangeptr;
+
+ double PH, Potential;
+ double PHLastTrigger;
+ double PHChangeTrigger;
+
+ double Temperature;
+
+ double phMax, phMin;
+ double potentialMax, potentialMin;
+} typedef CPhidgetPHSensorInfo;
+#endif
+
+/** @} */
+
+#endif