com.qualcomm.robotcore.hardware

## Class I2cDeviceSynchDeviceWithParameters<DEVICE_CLIENT extends I2cDeviceSynchSimple,PARAMETERS>

- java.lang.Object
- - com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice<DEVICE_CLIENT>
  - - com.qualcomm.robotcore.hardware.I2cDeviceSynchDeviceWithParameters<DEVICE_CLIENT,PARAMETERS>

- All Implemented Interfaces:
    HardwareDevice

      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.

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `HardwareDevice.Manufacturer`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected PARAMETERS` | `parameters`

    - ### Fields inherited from class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice

      `deviceClient, deviceClientIsOwned, isInitialized`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT deviceClient, boolean isOwned, PARAMETERS parameters)`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Concrete Methods
    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.

    - ### Methods inherited from class com.qualcomm.robotcore.hardware.I2cDeviceSynchDevice

      `close, disengage, engage, getConnectionInfo, getDeviceClient, getVersion, initialize, initializeIfNecessary, onModuleStateChange, registerArmingStateCallback, resetDeviceConfigurationForOpMode`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

    - ### Methods inherited from interface com.qualcomm.robotcore.hardware.HardwareDevice

      `getDeviceName, getManufacturer`

- - ### Field Detail

    - #### parameters

          protected PARAMETERS parameters

  - ### Constructor Detail

    - #### I2cDeviceSynchDeviceWithParameters

          protected I2cDeviceSynchDeviceWithParameters(DEVICE_CLIENT deviceClient,
                                                       boolean isOwned,
                                                       PARAMETERS parameters)

  - ### Method Detail

    - #### getParameters

          public PARAMETERS getParameters()

      Returns the parameter block currently in use for this sensor
      Returns:
        the parameter block currently in use for this sensor

    - #### doInitialize

          protected boolean doInitialize()

      Description copied from class: `I2cDeviceSynchDevice`
      Actually carries out the initialization of the instance.
      Specified by:
        `doInitialize` in class `I2cDeviceSynchDevice<DEVICE_CLIENT extends I2cDeviceSynchSimple>`
      Returns:
        Whether the initialization was successful or not

    - #### initialize

          public boolean initialize(PARAMETERS parameters)

      Allows for external initialization with non-default parameters
      Parameters:
        `parameters` - the parameters with which the sensor should be initialized
      Returns:
        whether the initialization was successful or not.

    - #### internalInitialize

          protected abstract boolean internalInitialize(PARAMETERS parameters)

      Actually attempts to carry out initialization with the indicated parameter block. If successful, said parameter block should be stored in the `parameters` member variable.
      Parameters:
        `parameters` - the parameter block with which to initialize
      Returns:
        whether initialization was successful or not