java.lang.Objectjava.lang.Thread
Phidgets.Phidget
Phidgets.PhidgetAccelerometer
Field Summary |
Fields inherited from class Phidgets.Phidget |
attached, deviceType, deviceVersion, events, handler, IPAddr, password, Port, serialNumber, ServerID |
Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
PhidgetAccelerometer()
Create a new uninitialized PhidgetAccelerometer |
Method Summary | |
void |
add_IPhidgetAccelerometerEventsListener(_IPhidgetAccelerometerEvents l)
Sets up the event handlers |
double |
GetAcceleration(int Index)
Gets the acceleration of a particular axis |
double |
GetAccelerationChangeTrigger(int Index)
Gets the change trigger for an Axis |
int |
GetNumAxis()
Gets the number of accelerometer axes |
protected void |
gotData(java.lang.String[] dataArray)
|
protected void |
init(java.lang.String[] dataArray)
|
int |
OpenRemote(int serverSerial,
int port,
int serialNumber,
java.lang.String pass)
Open the device when it is on the local network. |
int |
OpenRemoteIP(java.lang.String ip,
int port,
int serialNumber,
java.lang.String pass)
Open the device when it is on a remote network. |
void |
remove_IPhidgetAccelerometerEventsListener()
Removes the events handlers |
void |
SetAccelerationChangeTrigger(int Index,
double newVal)
Sets the change trigger for an Axis. |
Methods inherited from class Phidgets.Phidget |
Close, equals, getBoolean, GetDeviceType, GetDeviceVersion, GetIsAttached, GetSerialNumber, GetServerAddress, GetServerID, GetServerPort, OpenRemote, OpenRemoteIP, run, setDeviceType, setDeviceVersion, setSerialNumber |
Methods inherited from class java.lang.Thread |
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getContextClassLoader, getName, getPriority, getThreadGroup, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setName, setPriority, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public PhidgetAccelerometer()
Method Detail |
public int OpenRemote(int serverSerial, int port, int serialNumber, java.lang.String pass)
serverSerial
- Serial number of the server, or -1 for any serialport
- Server portserialNumber
- Serial number of the device or -1 for any serialpass
- Server password
public int OpenRemoteIP(java.lang.String ip, int port, int serialNumber, java.lang.String pass)
ip
- IP address or hostname of the serverport
- Server portserialNumber
- Serial number of the device or -1 for any serialpass
- Server password
public int GetNumAxis()
public double GetAcceleration(int Index)
Index
- Axis
public double GetAccelerationChangeTrigger(int Index)
Index
- Axis
public void SetAccelerationChangeTrigger(int Index, double newVal)
Index
- AxisnewVal
- Change trigerpublic void add_IPhidgetAccelerometerEventsListener(_IPhidgetAccelerometerEvents l)
l
- An object implementing the _IPhidgetAccelerometerEvents interfacepublic void remove_IPhidgetAccelerometerEventsListener()
protected void init(java.lang.String[] dataArray)
init
in class Phidget
protected void gotData(java.lang.String[] dataArray)
gotData
in class Phidget