@DigitalIoDeviceType @DeviceProperties(name="@string/configTypeDigitalDevice", xmlTag="DigitalDevice", builtIn=true) public class DigitalChannelImpl extends java.lang.Object implements DigitalChannel
DigitalChannel.ModeHardwareDevice.Manufacturer| Constructor and Description |
|---|
DigitalChannelImpl(DigitalChannelController controller,
int channel)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this device
|
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.
|
DigitalChannel.Mode |
getMode()
Get the channel mode
|
boolean |
getState()
Get the channel state
|
int |
getVersion()
Version
|
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
void |
setMode(DigitalChannel.Mode mode)
Set the channel mode
|
void |
setMode(DigitalChannelController.Mode mode)
Deprecated.
|
void |
setState(boolean state)
Set the channel state
|
public DigitalChannelImpl(DigitalChannelController controller, int channel)
controller - Digital channel controller this channel is attached tochannel - channel on the digital channel controllerpublic DigitalChannel.Mode getMode()
getMode in interface DigitalChannelDigitalChannel.setMode(Mode)public void setMode(DigitalChannel.Mode mode)
setMode in interface DigitalChannelmode - @Deprecated public void setMode(DigitalChannelController.Mode mode)
setMode in interface DigitalChannelpublic boolean getState()
getState in interface DigitalChannelpublic void setState(boolean state)
The behavior of this method is undefined for INPUT digital channels.
setState in interface DigitalChannelstate - public 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