public abstract class I2cDeviceSynchDevice<DEVICE_CLIENT extends I2cDeviceSynchSimple> extends java.lang.Object implements HardwareDevice
I2cDeviceSynchDevice instances are I2c devices which are built on top of
I2cDeviceSynchSimple instances or subclasses thereof. The class provides common and
handy utility services for such devices.HardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
protected DEVICE_CLIENT |
deviceClient |
protected boolean |
deviceClientIsOwned |
protected boolean |
isInitialized |
| Modifier | Constructor and Description |
|---|---|
protected |
I2cDeviceSynchDevice(DEVICE_CLIENT deviceClient,
boolean deviceClientIsOwned) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes this device
|
protected void |
disengage() |
protected abstract boolean |
doInitialize()
Actually carries out the initialization of the instance.
|
protected void |
engage() |
java.lang.String |
getConnectionInfo()
Get connection information about this device in a human readable format
|
DEVICE_CLIENT |
getDeviceClient() |
int |
getVersion()
Version
|
boolean |
initialize() |
protected void |
initializeIfNecessary() |
void |
onModuleStateChange(RobotArmingStateNotifier module,
RobotArmingStateNotifier.ARMINGSTATE state) |
protected void |
registerArmingStateCallback(boolean doInitialCallback) |
void |
resetDeviceConfigurationForOpMode()
Resets the device's configuration to that which is expected at the beginning of an OpMode.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDeviceName, getManufacturerprotected DEVICE_CLIENT extends I2cDeviceSynchSimple deviceClient
protected boolean deviceClientIsOwned
protected boolean isInitialized
protected I2cDeviceSynchDevice(DEVICE_CLIENT deviceClient, boolean deviceClientIsOwned)
protected void registerArmingStateCallback(boolean doInitialCallback)
protected void engage()
protected void disengage()
public DEVICE_CLIENT getDeviceClient()
public void onModuleStateChange(RobotArmingStateNotifier module,
RobotArmingStateNotifier.ARMINGSTATE state)
protected void initializeIfNecessary()
public boolean initialize()
protected abstract boolean doInitialize()
public void resetDeviceConfigurationForOpMode()
HardwareDeviceresetDeviceConfigurationForOpMode in interface HardwareDevicepublic void close()
HardwareDeviceclose in interface HardwareDevicepublic int getVersion()
HardwareDevicegetVersion in interface HardwareDevicepublic java.lang.String getConnectionInfo()
HardwareDevicegetConnectionInfo in interface HardwareDevice