com.qualcomm.robotcore.hardware

## Interface DigitalChannel

- All Superinterfaces:
    HardwareDevice
  All Known Implementing Classes:
    DigitalChannelImpl

      public interface DigitalChannel
      extends HardwareDevice

  `DigitalChannel` is an interface by which digital channels can be controlled. Such channels have a boolean state, and are modal as to direction, being either input channels or output channels.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static class` | `DigitalChannel.Mode` Digital channel mode - input or output

    - ### 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` | `getMode()` Returns whether the channel is in input or output mode
    `boolean` | `getState()` Returns the current state of the channel
    `void` | `setMode(DigitalChannel.Mode mode)` Changes whether the channel is in input or output mode
    `void` | `setMode(DigitalChannelController.Mode mode)` Deprecated. use `setMode(Mode)` instead
    `void` | `setState(boolean state)` Sets the current state of the channel

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

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

- - ### Method Detail

    - #### getMode

          DigitalChannel.Mode getMode()

      Returns whether the channel is in input or output mode
      Returns:
        whether the channel is in input or output mode
      See Also:
        `setMode(Mode)`

    - #### setMode

          void setMode(DigitalChannel.Mode mode)

      Changes whether the channel is in input or output mode
      Parameters:
        `mode` - whether the channel is in input or output mode

    - #### getState

          boolean getState()

      Returns the current state of the channel
      Returns:
        the current state of the channel

    - #### setState

          void setState(boolean state)

      Sets the current state of the channel
      Parameters:
        `state` - the new state of the channel

    - #### setMode

          @Deprecated
          void setMode(DigitalChannelController.Mode mode)

      Deprecated. use `setMode(Mode)` instead