public class LynxDigitalChannelController extends LynxController implements DigitalChannelController
LynxDigitalChannelController provides access to the digital IO pins on a Lynx module.| Modifier and Type | Class and Description |
|---|---|
protected class |
LynxDigitalChannelController.PinProperties |
LynxController.PretendLynxModuleDigitalChannelController.ModeHardwareDevice.ManufacturerHardwareDeviceHealth.HealthStatusRobotArmingStateNotifier.ARMINGSTATE, RobotArmingStateNotifier.Callback| Modifier and Type | Field and Description |
|---|---|
static int |
apiPinFirst |
static int |
apiPinLast |
protected LynxDigitalChannelController.PinProperties[] |
pins |
static java.lang.String |
TAG |
context, hardwareDeviceHealth, isEngaged, isHardwareInitialized, isHooked, registeredCallbackstag| Constructor and Description |
|---|
LynxDigitalChannelController(Context context,
LynxModule module) |
| Modifier and Type | Method and Description |
|---|---|
void |
forgetLastKnown() |
java.lang.String |
getDeviceName()
Returns a string suitable for display to the user as to the type of device.
|
DigitalChannel.Mode |
getDigitalChannelMode(int pin)
Get the mode of a digital channel
|
boolean |
getDigitalChannelState(int pin)
Get the state of a digital channel
If it's in OUTPUT mode, this will return the output bit.
|
SerialNumber |
getSerialNumber()
Returns the serial number of this USB module
|
protected java.lang.String |
getTag() |
void |
initializeHardware() |
void |
setDigitalChannelMode(int pin,
DigitalChannel.Mode mode)
Set the mode of a digital channel
|
void |
setDigitalChannelMode(int pin,
DigitalChannelController.Mode mode)
Deprecated.
|
void |
setDigitalChannelState(int pin,
boolean state)
Set the state of a digital channel
|
adjustHookingToMatchEngagement, close, disengage, doHook, doUnhook, engage, finishConstruction, floatHardware, getArmingState, getConnectionInfo, getHealthStatus, getHealthStatusOverride, getManufacturer, getModule, getVersion, hook, isArmed, isEngaged, moduleNowArmedOrPretending, moduleNowDisarmed, onModuleStateChange, registerCallback, resetDeviceConfigurationForOpMode, setHealthStatus, setHealthyIfArmed, unhook, unregisterCallbackhandleException, handleSpecificException, handleSpecificException, handleSpecificException, handleSpecificExceptionclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclose, getConnectionInfo, getManufacturer, getVersion, resetDeviceConfigurationForOpModepublic static final java.lang.String TAG
public static final int apiPinFirst
public static final int apiPinLast
protected final LynxDigitalChannelController.PinProperties[] pins
public LynxDigitalChannelController(Context context,
LynxModule module)
throws RobotCoreException,
java.lang.InterruptedException
RobotCoreExceptionjava.lang.InterruptedExceptionprotected java.lang.String getTag()
getTag in class LynxControllerpublic void initializeHardware()
initializeHardware in class LynxControllerpublic void forgetLastKnown()
forgetLastKnown in class LynxControllerpublic java.lang.String getDeviceName()
HardwareDevicegetDeviceName in interface HardwareDevicegetDeviceName in class LynxControllerpublic SerialNumber getSerialNumber()
RobotArmingStateNotifiergetSerialNumber in interface DigitalChannelControllergetSerialNumber in interface RobotArmingStateNotifiergetSerialNumber in class LynxControllerpublic DigitalChannel.Mode getDigitalChannelMode(int pin)
DigitalChannelControllergetDigitalChannelMode in interface DigitalChannelControllerpin - channelpublic void setDigitalChannelMode(int pin,
DigitalChannel.Mode mode)
DigitalChannelControllersetDigitalChannelMode in interface DigitalChannelControllerpin - channelmode - INPUT or OUTPUT@Deprecated
public void setDigitalChannelMode(int pin,
DigitalChannelController.Mode mode)
setDigitalChannelMode in interface DigitalChannelControllerpublic boolean getDigitalChannelState(int pin)
DigitalChannelControllergetDigitalChannelState in interface DigitalChannelControllerpin - channelpublic void setDigitalChannelState(int pin,
boolean state)
DigitalChannelControllerThe behavior of this method is undefined for digital channels in INPUT mode.
setDigitalChannelState in interface DigitalChannelControllerpin - channelstate - true to set; false to unset