com.qualcomm.robotcore.hardware

## Class DigitalChannelImpl

- java.lang.Object
- - com.qualcomm.robotcore.hardware.DigitalChannelImpl

- All Implemented Interfaces:
    DigitalChannel, HardwareDevice

      public class DigitalChannelImpl
      extends java.lang.Object
      implements DigitalChannel

  Control a single digital channel

- - ### Nested Class Summary

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

      `DigitalChannel.Mode`

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

      `HardwareDevice.Manufacturer`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DigitalChannelImpl(DigitalChannelController controller, int channel)` Constructor

  - ### Method Summary

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

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

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

- - ### Constructor Detail

    - #### DigitalChannelImpl

          public DigitalChannelImpl(DigitalChannelController controller,
                                    int channel)

      Constructor
      Parameters:
        `controller` - Digital channel controller this channel is attached to
        `channel` - channel on the digital channel controller

  - ### Method Detail

    - #### getMode

          public DigitalChannel.Mode getMode()

      Get the channel mode
      Specified by:
        `getMode` in interface `DigitalChannel`
      Returns:
        channel mode
      See Also:
        `DigitalChannel.setMode(Mode)`

    - #### setMode

          public void setMode(DigitalChannel.Mode mode)

      Set the channel mode
      Specified by:
        `setMode` in interface `DigitalChannel`
      Parameters:
        `mode` -

    - #### setMode

          @Deprecated
          public void setMode(DigitalChannelController.Mode mode)

      Deprecated.
      Specified by:
        `setMode` in interface `DigitalChannel`

    - #### getState

          public boolean getState()

      Get the channel state
      Specified by:
        `getState` in interface `DigitalChannel`
      Returns:
        state

    - #### setState

          public void setState(boolean state)

      Set the channel state

      The behavior of this method is undefined for INPUT digital channels.

      Specified by:
        `setState` in interface `DigitalChannel`
      Parameters:
        `state` -

    - #### getManufacturer

          public HardwareDevice.Manufacturer getManufacturer()

      Description copied from interface: `HardwareDevice`
      Returns an indication of the manufacturer of this device.
      Specified by:
        `getManufacturer` in interface `HardwareDevice`
      Returns:
        the device's manufacturer

    - #### getDeviceName

          public java.lang.String getDeviceName()

      Description copied from interface: `HardwareDevice`
      Returns a string suitable for display to the user as to the type of device. Note that this is a device-type-specific name; it has nothing to do with the name by which a user might have configured the device in a robot configuration.
      Specified by:
        `getDeviceName` in interface `HardwareDevice`
      Returns:
        device manufacturer and name

    - #### getConnectionInfo

          public java.lang.String getConnectionInfo()

      Description copied from interface: `HardwareDevice`
      Get connection information about this device in a human readable format
      Specified by:
        `getConnectionInfo` in interface `HardwareDevice`
      Returns:
        connection info

    - #### getVersion

          public int getVersion()

      Description copied from interface: `HardwareDevice`
      Version
      Specified by:
        `getVersion` in interface `HardwareDevice`
      Returns:
        get the version of this device

    - #### resetDeviceConfigurationForOpMode

          public void resetDeviceConfigurationForOpMode()

      Description copied from interface: `HardwareDevice`
      Resets the device's configuration to that which is expected at the beginning of an OpMode. For example, motors will reset the their direction to 'forward'.
      Specified by:
        `resetDeviceConfigurationForOpMode` in interface `HardwareDevice`

    - #### close

          public void close()

      Description copied from interface: `HardwareDevice`
      Closes this device
      Specified by:
        `close` in interface `HardwareDevice`