Package lejos.hardware.sensor
Class CodeTemplate
- java.lang.Object
-
- lejos.hardware.Device
-
- lejos.hardware.sensor.BaseSensor
-
- lejos.hardware.sensor.UARTSensor
-
- lejos.hardware.sensor.CodeTemplate
-
- All Implemented Interfaces:
java.io.Closeable,java.lang.AutoCloseable,SensorMode,SensorModes,SampleProvider
public class CodeTemplate extends UARTSensor
Sensor name
DescriptionThe code for this sensor has not been tested. Please report test results to the leJOS forum.
Supported modes Mode name Description unit(s) Getter Some getSomeMode()Sensor configuration
Description of default sensor configuration (when that matters). Description of available methods for configuration.See Sensor datasheet See Sensor Product page See The leJOS sensor framework See
leJOS conventions for SampleProviders- Author:
- Your name
-
-
Field Summary
-
Fields inherited from class lejos.hardware.sensor.UARTSensor
currentMode, port
-
Fields inherited from class lejos.hardware.sensor.BaseSensor
modes
-
-
Constructor Summary
Constructors Constructor Description CodeTemplate(Port port)Constructor using a unopened portCodeTemplate(UARTPort port)Constructor using a opened and configured port
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SampleProvidergetSomeMode()Sensor name, mode
Mode descriptionprotected voidinit()Configures the sensor for first use and registers the supported modes-
Methods inherited from class lejos.hardware.sensor.UARTSensor
switchMode
-
Methods inherited from class lejos.hardware.sensor.BaseSensor
fetchSample, getAvailableModes, getCurrentMode, getMode, getMode, getModeCount, getName, sampleSize, setCurrentMode, setCurrentMode, setModes
-
Methods inherited from class lejos.hardware.Device
close, releaseOnClose
-
-
-
-
Method Detail
-
init
protected void init()
Configures the sensor for first use and registers the supported modes
-
getSomeMode
public SampleProvider getSomeMode()
Sensor name, mode
Mode descriptionSize and content of the sample
The sample contains # elements. Each element gives Something (in some unit).Configuration
The sensor is configured for.... . Currently there are no configurable settings.- Returns:
- A sampleProvider
See
leJOS conventions for SampleProvidersSee Sensor datasheet
-
-