edu.berkeley.guir.ptk.apps.pressure
Class PhidgetsPressureInput

java.lang.Object
  extended byedu.berkeley.guir.ptk.PTK
      extended byedu.berkeley.guir.ptk.input.InputSource
          extended byedu.berkeley.guir.ptk.input.PhidgetsInterfaceKitInput
              extended byedu.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 class edu.berkeley.guir.ptk.input.PhidgetsInterfaceKitInput
kit, KIT, manager, my_serial_num
 
Fields inherited from class edu.berkeley.guir.ptk.input.InputSource
history, mds, my_id, my_ip, time_between_events
 
Fields inherited from class edu.berkeley.guir.ptk.PTK
debug, MAX_DEBUG, MED_DEBUG, MIN_DEBUG, NO_DEBUG
 
Fields inherited from interface Phidgets._IPhidgetManagerEvents
event_package, id_1, id_2, id_3
 
Constructor Summary
PhidgetsPressureInput()
           
 
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.PhidgetsInterfaceKitInput
initManager, OnAttach, OnDetach, OnError
 
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 edu.berkeley.guir.ptk.PTK
getMAX, getMED, getMIN, getNO, printDebug, printDebug, printError
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

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.

Constructor Detail

PhidgetsPressureInput

public PhidgetsPressureInput()
Method Detail

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