public abstract class I2cDeviceSynchDeviceWithParameters<DEVICE_CLIENT extends I2cDeviceSynchSimple,PARAMETERS> extends I2cDeviceSynchDevice<DEVICE_CLIENT>
I2cDeviceSynchDeviceWithParameters adds to I2cDeviceSynchDevice support for
sensors that can be publicly initialized with parameter block of a particular type.HardwareDevice.Manufacturer| Modifier and Type | Field and Description |
|---|---|
protected PARAMETERS |
parameters |
deviceClient, deviceClientIsOwned, isInitialized| Modifier | Constructor and Description |
|---|---|
protected |
I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT deviceClient,
boolean isOwned,
PARAMETERS parameters) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
doInitialize()
Actually carries out the initialization of the instance.
|
PARAMETERS |
getParameters()
Returns the parameter block currently in use for this sensor
|
boolean |
initialize(PARAMETERS parameters)
Allows for external initialization with non-default parameters
|
protected abstract boolean |
internalInitialize(PARAMETERS parameters)
Actually attempts to carry out initialization with the indicated parameter block.
|
close, disengage, engage, getConnectionInfo, getDeviceClient, getVersion, initialize, initializeIfNecessary, onModuleStateChange, registerArmingStateCallback, resetDeviceConfigurationForOpModeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetDeviceName, getManufacturerprotected PARAMETERS parameters
protected I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT deviceClient, boolean isOwned, PARAMETERS parameters)
public PARAMETERS getParameters()
protected boolean doInitialize()
I2cDeviceSynchDevicedoInitialize in class I2cDeviceSynchDevice<DEVICE_CLIENT extends I2cDeviceSynchSimple>public boolean initialize(PARAMETERS parameters)
parameters - the parameters with which the sensor should be initializedprotected abstract boolean internalInitialize(PARAMETERS parameters)
parameters
member variable.parameters - the parameter block with which to initialize