com.qualcomm.robotcore.hardware

## Interface DigitalChannelController

- All Superinterfaces:
    HardwareDevice
  All Known Subinterfaces:
    DeviceInterfaceModule

      public interface DigitalChannelController
      extends HardwareDevice

  Interface for working with Digital Channel Controllers

  Different digital channel controllers will implement this interface.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `DigitalChannelController.Mode` Deprecated. use `DigitalChannel.Mode` instead

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

      `HardwareDevice.Manufacturer`

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Deprecated Methods
    Modifier and Type | Method and Description
    --- | ---
    `DigitalChannel.Mode` | `getDigitalChannelMode(int channel)` Get the mode of a digital channel
    `boolean` | `getDigitalChannelState(int channel)` Get the state of a digital channel If it's in OUTPUT mode, this will return the output bit.
    `SerialNumber` | `getSerialNumber()` Serial Number
    `void` | `setDigitalChannelMode(int channel, DigitalChannel.Mode mode)` Set the mode of a digital channel
    `void` | `setDigitalChannelMode(int channel, DigitalChannelController.Mode mode)` Deprecated. use `setDigitalChannelMode(int, DigitalChannel.Mode)` instead
    `void` | `setDigitalChannelState(int channel, boolean state)` Set the state of a digital channel

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

      `close, getConnectionInfo, getDeviceName, getManufacturer, getVersion, resetDeviceConfigurationForOpMode`

- - ### Method Detail

    - #### getSerialNumber

          SerialNumber getSerialNumber()

      Serial Number
      Returns:
        return the USB serial number of this device

    - #### getDigitalChannelMode

          DigitalChannel.Mode getDigitalChannelMode(int channel)

      Get the mode of a digital channel
      Parameters:
        `channel` - channel
      Returns:
        INPUT or OUTPUT

    - #### setDigitalChannelMode

          void setDigitalChannelMode(int channel,
                                     DigitalChannel.Mode mode)

      Set the mode of a digital channel
      Parameters:
        `channel` - channel
        `mode` - INPUT or OUTPUT

    - #### setDigitalChannelMode

          @Deprecated
          void setDigitalChannelMode(int channel,
                                                 DigitalChannelController.Mode mode)

      Deprecated. use `setDigitalChannelMode(int, DigitalChannel.Mode)` instead

    - #### getDigitalChannelState

          boolean getDigitalChannelState(int channel)

      Get the state of a digital channel If it's in OUTPUT mode, this will return the output bit. If the channel is in INPUT mode, this will return the input bit.
      Parameters:
        `channel` - channel
      Returns:
        true if set; otherwise false

    - #### setDigitalChannelState

          void setDigitalChannelState(int channel,
                                      boolean state)

      Set the state of a digital channel

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

      Parameters:
        `channel` - channel
        `state` - true to set; false to unset