javax.microedition.sensor
Class NXTSensorInfo
java.lang.Object
javax.microedition.sensor.NXTSensorInfo
- All Implemented Interfaces:
- SensorInfo
- Direct Known Subclasses:
- HiTechnicColorSensorInfo, HiTechnicCompassSensorInfo, MindsensorsAccelerationSensorInfo, NXTADSensorInfo, UltrasonicSensorInfo
public abstract class NXTSensorInfo
- extends Object
- implements SensorInfo
Abstract class that provides default methods for leJOS NXT sensors
- Author:
- Lawrie Griffiths
Fields inherited from interface javax.microedition.sensor.SensorInfo |
CONN_EMBEDDED, CONN_REMOTE, CONN_SHORT_RANGE_WIRELESS, CONN_WIRED, CONTEXT_TYPE_AMBIENT, CONTEXT_TYPE_DEVICE, CONTEXT_TYPE_USER, PROP_LATITUDE, PROP_LOCATION, PROP_LONGITUDE, PROP_MAX_RATE, PROP_VENDOR, PROP_VERSION |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
infos
protected NXTChannelInfo[] infos
MAX_RATE
protected static final int MAX_RATE
- See Also:
- Constant Field Values
I2C_SENSOR
public static final int I2C_SENSOR
- See Also:
- Constant Field Values
AD_SENSOR
public static final int AD_SENSOR
- See Also:
- Constant Field Values
RCX_SENSOR
public static final int RCX_SENSOR
- See Also:
- Constant Field Values
NXTSensorInfo
public NXTSensorInfo()
getConnectionType
public int getConnectionType()
- Specified by:
getConnectionType
in interface SensorInfo
getContextType
public String getContextType()
- Specified by:
getContextType
in interface SensorInfo
getMaxBufferSize
public int getMaxBufferSize()
- Specified by:
getMaxBufferSize
in interface SensorInfo
isAvailabilityPushSupported
public boolean isAvailabilityPushSupported()
- Specified by:
isAvailabilityPushSupported
in interface SensorInfo
isAvailable
public boolean isAvailable()
- Specified by:
isAvailable
in interface SensorInfo
isConditionPushSupported
public boolean isConditionPushSupported()
- Specified by:
isConditionPushSupported
in interface SensorInfo
setVersion
public void setVersion(String version)
setVendor
public void setVendor(String vendor)
setType
public void setType(String type)
getType
public String getType()
getVendor
public String getVendor()
getVersion
public String getVersion()
getModel
public String getModel()
- Specified by:
getModel
in interface SensorInfo
getProperty
public Object getProperty(String name)
- Specified by:
getProperty
in interface SensorInfo
getPropertyNames
public String[] getPropertyNames()
- Specified by:
getPropertyNames
in interface SensorInfo
getDescription
public String getDescription()
- Specified by:
getDescription
in interface SensorInfo
setPortNumber
public void setPortNumber(int portNumber)
getUrl
public String getUrl()
- Specified by:
getUrl
in interface SensorInfo
getChannelInfos
public NXTChannelInfo[] getChannelInfos()
- Specified by:
getChannelInfos
in interface SensorInfo
getWiredType
public int getWiredType()
getMode
public int getMode()
getSensorType
public int getSensorType()
getModelNames
public String[] getModelNames()
- Return the names of all the models that implement this channel.
Null for A/D sensors.
- Returns:
- the model names