|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object javax.microedition.sensor.SensorManager
public class SensorManager
JSR256 SensorManager implementation for leJOS NXJ I2C sensors
Constructor Summary | |
---|---|
SensorManager()
|
Method Summary | |
---|---|
static void |
addSensorListener(SensorListener listener,
SensorInfo info)
Register a listener to monitor the change of availability of a specific sensor |
static void |
addSensorListener(SensorListener listener,
String quantity)
Register a listener to monitor the change of availability of a sensor for a specific quantity |
static NXTSensorInfo[] |
findQuantity(String quantity)
|
static SensorInfo[] |
findSensors(String url)
Find all available sensors that match a specific URL. |
static SensorInfo[] |
findSensors(String quantity,
String contextType)
Find all available sensors that match a specific quantity and/or context. |
static void |
removeSensorListener(SensorListener listener)
Remove the specified sensor listener |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SensorManager()
Method Detail |
---|
public static void addSensorListener(SensorListener listener, SensorInfo info)
listener
- the sensor listenerinfo
- a SensorListener object returned from findSensors or SensorConnection.getSensorInfopublic static void addSensorListener(SensorListener listener, String quantity)
listener
- the sensor listenerquantity
- the required quantitypublic static SensorInfo[] findSensors(String url)
url
- the specified URL
public static SensorInfo[] findSensors(String quantity, String contextType)
quantity
- the required quantity or null for anycontextType
- the required context type or null for any
public static void removeSensorListener(SensorListener listener)
listener
- the sensor listenerpublic static NXTSensorInfo[] findQuantity(String quantity)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |