public abstract class ISensorManager
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
ISensorManager.JavelinEventListener |
Modifier and Type | Field and Description |
---|---|
protected ISensorManager.JavelinEventListener |
listener |
Constructor and Description |
---|
ISensorManager() |
Modifier and Type | Method and Description |
---|---|
abstract boolean |
createBond()
Bonds the application to the javelin device.
|
abstract void |
disable()
Disconnects the javelin device.
|
abstract void |
enable()
Connects to the javelin device.
|
abstract void |
ledEnable(boolean enable)
LED on/off switch.
|
abstract void |
readRssi()
Reads the signal strength from the javelin device to the central device.
|
abstract void |
registerListener(ISensorManager.JavelinEventListener listener,
int sensorType)
Enable notifications from a sensor.
|
abstract boolean |
removeBond()
Removes the bond from the application to the javelin device.
|
abstract void |
setAccelerometerFullScaleRange(int range) |
abstract void |
setAcceleromGyroRate(int rate)
Sets the sampling rate of the accelerometer and gyroscope to the value closest to the given
parameter.
|
abstract void |
setAcceleromGyroSampleRateDivisor(int divisor)
Set the divisor used to divide the default sample rate up.
|
abstract void |
setAudioQuality(int quality) |
abstract void |
setGyroscopeFullScaleRange(int range) |
abstract void |
setLedBlinkNumber(int times)
Sets how many times the LED goes on and off for the specified number of times at the current
rate, pulsation type, and intensity.
|
abstract void |
setLedBlinkRate(int rate)
Sets the LED's blinking rate for the PULSE, TRIANGLE, and SAWTOOTH LED types.
|
abstract void |
setLedBlinkType(int blinkType)
Sets the kind of blinking type to enable when
ledEnable(true) is called |
abstract void |
setLedIntensity(int intensity)
Sets the LED intensity on a scale of 1 - 100, 100 being the strongest intensity.
|
void |
setListener(ISensorManager.JavelinEventListener listener)
Allows the android activity to receive sensor events.
|
abstract void |
setVibrationIntensity(int intensity) |
abstract void |
setVibrationRate(int rate)
Sets the vibration rate for the PULSE, TRIANGLE, and SAWTOOTH vibration types.
|
abstract void |
setVibrationRepeatNumber(int times)
Sets the number of times to vibrate if the SOLID, PULSE, TRIANGLE or SAWTOOTH vibration type is set.
|
abstract void |
setVibrationType(int type)
Sets the vibration type to use
|
abstract void |
unregisterAll()
Removes all listeners, stopping sensor updates.
|
abstract void |
unregisterListener(ISensorManager.JavelinEventListener listener,
int sensorType)
Disables notifications and data from a sensor for the given listener, if it is already subscribed.
|
abstract void |
vibrationEnable(boolean enable)
Vibrator on / off switch.
|
protected ISensorManager.JavelinEventListener listener
public void setListener(ISensorManager.JavelinEventListener listener)
listener
- the ISensorManager.JavelinEventListener
public abstract void enable() throws com.javelindevices.javelinsdk.SensorManagerException
com.javelindevices.javelinsdk.SensorManagerException
public abstract void disable()
public abstract void readRssi()
ISensorManager.JavelinEventListener
.public abstract void registerListener(ISensorManager.JavelinEventListener listener, int sensorType)
JavelinSensorManager
will remember all registered listenerssensorType
- The sensor to enable.public abstract void unregisterListener(ISensorManager.JavelinEventListener listener, int sensorType)
sensorType
- a type defined in ISensor
public abstract void unregisterAll()
public abstract boolean createBond()
public abstract boolean removeBond()
public abstract void ledEnable(boolean enable)
Must set setLedBlinkType(int blinkType)
before calling ledEnable(boolean)
enable
- booleanpublic abstract void setLedIntensity(int intensity)
intensity
- the intensity of the LED from 1 to 100 inclusive.public abstract void setLedBlinkType(int blinkType)
ledEnable(true)
is calledblinkType
- Integer constant describing the kind of blinking type to enable.
This can be any of the LED_TYPE contants from JavelinSettings
public abstract void setLedBlinkRate(int rate)
rate
- the blinking rate, in .1Hz values. A value of 10 will make the LED blink once per second.public abstract void setLedBlinkNumber(int times)
times
- how many times to blink the LED when calling the ledEnable
method. Allowed values are [1,255].public abstract void vibrationEnable(boolean enable)
Must set setVibrationType(int type)
before calling vibrationEnable(boolean)
enable
- booleanpublic abstract void setVibrationIntensity(int intensity)
intensity
- the intensity of vibration from 1 to 100 inclusive.public abstract void setVibrationType(int type)
type
- one of the VIB_TYPE constants in ISensor
public abstract void setVibrationRate(int rate)
rate
- an integer indicating the number of vibrations per 1/10th of a second (.1Hz).
A value of 10 will make it vibrate once per second.public abstract void setVibrationRepeatNumber(int times)
times
- the number of times to vibratepublic abstract void setAudioQuality(int quality)
public abstract void setAcceleromGyroRate(int rate)
rate
- the sampling rate to set the gyroscope and accelerometer to.public abstract void setAccelerometerFullScaleRange(int range)
public abstract void setGyroscopeFullScaleRange(int range)
public abstract void setAcceleromGyroSampleRateDivisor(int divisor)
divisor
-