public class LED extends java.lang.Object implements HardwareDevice, SwitchableLight
HardwareDevice.Manufacturer| Constructor and Description |
|---|
LED(DigitalChannelController controller,
int physicalPort)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this device
|
void |
enable(boolean set)
A method to turn on or turn off the LED
|
void |
enableLight(boolean enable)
Turns the light on or off.
|
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
HardwareDevice.Manufacturer |
getManufacturer()
Returns an indication of the manufacturer of this device.
|
int |
getVersion()
Version
|
boolean |
isLightOn()
Answers whether the light is on or off
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
public LED(DigitalChannelController controller, int physicalPort)
controller - Digital Channel Controller this LED is attached tophysicalPort - the physical port it's plugged into.public void enable(boolean set)
set - - true turns it on, false turns it off.public boolean isLightOn()
Lightpublic void enableLight(boolean enable)
SwitchableLightenableLight in interface SwitchableLightenable - if true, the light turns on; otherwise the light turns offpublic HardwareDevice.Manufacturer getManufacturer()
HardwareDevicegetManufacturer in interface HardwareDevicepublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic void close()
HardwareDeviceclose in interface HardwareDevice