javax.microedition.sensor
Class NXTSensorInfo

java.lang.Object
  extended by 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

Field Summary
static int AD_SENSOR
           
static int I2C_SENSOR
           
protected  NXTChannelInfo[] infos
           
protected static int MAX_RATE
           
static int RCX_SENSOR
           
 
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
 
Constructor Summary
NXTSensorInfo()
           
 
Method Summary
 NXTChannelInfo[] getChannelInfos()
           
 int getConnectionType()
           
 String getContextType()
           
 String getDescription()
           
 int getMaxBufferSize()
           
 int getMode()
           
 String getModel()
           
 String[] getModelNames()
          Return the names of all the models that implement this channel.
 Object getProperty(String name)
           
 String[] getPropertyNames()
           
 int getSensorType()
           
 String getType()
           
 String getUrl()
           
 String getVendor()
           
 String getVersion()
           
 int getWiredType()
           
 boolean isAvailabilityPushSupported()
           
 boolean isAvailable()
           
 boolean isConditionPushSupported()
           
 void setPortNumber(int portNumber)
           
 void setType(String type)
           
 void setVendor(String vendor)
           
 void setVersion(String version)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.microedition.sensor.SensorInfo
getQuantity
 

Field Detail

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
Constructor Detail

NXTSensorInfo

public NXTSensorInfo()
Method Detail

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