edu.berkeley.guir.ptk.apps.pressure
Class PhidgetsPressureInput
java.lang.Object
edu.berkeley.guir.ptk.PTK
edu.berkeley.guir.ptk.input.InputSource
edu.berkeley.guir.ptk.input.PhidgetsInterfaceKitInput
edu.berkeley.guir.ptk.apps.pressure.PhidgetsPressureInput
- All Implemented Interfaces:
- Phidgets._IPhidgetManagerEvents, java.util.EventListener, java.lang.Runnable
- public class PhidgetsPressureInput
- extends PhidgetsInterfaceKitInput
- Author:
- tmatthew
|
Field Summary |
static int |
FIRST
|
static java.lang.String |
MY_ID
|
static java.lang.String |
MY_IP
|
int |
no_pressure
Any pressure at or below this number will be considered "no pressure
present," and a false DataSwitch will be added to new events. |
static int |
SERIAL
|
| Fields inherited from interface Phidgets._IPhidgetManagerEvents |
event_package, id_1, id_2, id_3 |
|
Method Summary |
void |
initialize()
This method is called after the Phidget with the correct serial number is
attached; put initialization code for the Phidget here. |
static void |
main(java.lang.String[] args)
|
Events |
newInput()
Gets input from the data source and fills a Template with it. |
| Methods inherited from class edu.berkeley.guir.ptk.input.InputSource |
addMetadata, addMetadataItem, addMyMetadataToEvent, dispatchEvent, finalize, getAbstractThenSendInputEvent, getMetadata, getMetadataItemsAsArray, getThenSendInputEvent, register, run, setMetadata, setTimeBetweenEvents, startInput |
| Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MY_ID
public static final java.lang.String MY_ID
- See Also:
- Constant Field Values
SERIAL
public static final int SERIAL
- See Also:
- Constant Field Values
MY_IP
public static final java.lang.String MY_IP
- See Also:
- Constant Field Values
FIRST
public static final int FIRST
- See Also:
- Constant Field Values
no_pressure
public int no_pressure
- Any pressure at or below this number will be considered "no pressure
present," and a false DataSwitch will be added to new events. The
normalized sensor value will still be added to the event as is.
PhidgetsPressureInput
public PhidgetsPressureInput()
main
public static void main(java.lang.String[] args)
newInput
public Events newInput()
- Description copied from class:
InputSource
- Gets input from the data source and fills a Template with it.
When template as full as the application developer wants,
return it. The input data source could be a sensor, Web page, etc.
This class must be implemented by any (non-abstract) subclass.
- Specified by:
newInput in class InputSource
initialize
public void initialize()
- Description copied from class:
PhidgetsInterfaceKitInput
- This method is called after the Phidget with the correct serial number is
attached; put initialization code for the Phidget here.
- Specified by:
initialize in class PhidgetsInterfaceKitInput