edu.wpi.first.wpilibj

## Class AnalogOutput

- java.lang.Object
- - edu.wpi.first.wpilibj.SensorBase
  - - edu.wpi.first.wpilibj.AnalogOutput

- All Implemented Interfaces:
    LiveWindowSendable, Sendable

      public class AnalogOutput
      extends SensorBase
      implements LiveWindowSendable

  Analog output class.

- - ### Field Summary

    - ### Fields inherited from class edu.wpi.first.wpilibj.SensorBase

      `kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPCMModules, kPDPChannels, kPDPModules, kPwmChannels, kRelayChannels, kSolenoidChannels, kSystemClockTicksPerMicrosecond`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnalogOutput(int channel)` Construct an analog output on a specified MXP channel.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `free()` Channel destructor.
    `int` | `getChannel()` Get the channel of this AnalogOutput.
    `java.lang.String` | `getSmartDashboardType()` The string representation of the named data type that will be used by the smart dashboard for this `Sendable`.
    `double` | `getVoltage()`
    `void` | `initTable(NetworkTable subtable)` Initializes a table for this `Sendable` object.
    `void` | `setVoltage(double voltage)`
    `void` | `startLiveWindowMode()` Analog Channels don't have to do anything special when entering the LiveWindow.
    `void` | `stopLiveWindowMode()` Analog Channels don't have to do anything special when exiting the LiveWindow.
    `void` | `updateTable()` Update the table for this sendable object with the latest values.

    - ### Methods inherited from class edu.wpi.first.wpilibj.SensorBase

      `checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule`

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

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

- - ### Constructor Detail

    - #### AnalogOutput

          public AnalogOutput(int channel)

      Construct an analog output on a specified MXP channel.
      Parameters:
        `channel` - The channel number to represent.

  - ### Method Detail

    - #### free

          public void free()

      Channel destructor.
      Overrides:
        `free` in class `SensorBase`

    - #### getChannel

          public int getChannel()

      Get the channel of this AnalogOutput.

    - #### setVoltage

          public void setVoltage(double voltage)

    - #### getVoltage

          public double getVoltage()

    - #### getSmartDashboardType

          public java.lang.String getSmartDashboardType()

      Description copied from interface: `Sendable`
      The string representation of the named data type that will be used by the smart dashboard for this `Sendable`.
      Specified by:
        `getSmartDashboardType` in interface `Sendable`
      Returns:
        The type of this `Sendable`.

    - #### initTable

          public void initTable(NetworkTable subtable)

      Description copied from interface: `Sendable`
      Initializes a table for this `Sendable` object.
      Specified by:
        `initTable` in interface `Sendable`
      Parameters:
        `subtable` - The table to put the values in.

    - #### updateTable

          public void updateTable()

      Description copied from interface: `LiveWindowSendable`
      Update the table for this sendable object with the latest values.
      Specified by:
        `updateTable` in interface `LiveWindowSendable`

    - #### startLiveWindowMode

          public void startLiveWindowMode()

      Analog Channels don't have to do anything special when entering the LiveWindow. Start having this sendable object automatically respond to value changes reflect the value on the table.
      Specified by:
        `startLiveWindowMode` in interface `LiveWindowSendable`

    - #### stopLiveWindowMode

          public void stopLiveWindowMode()

      Analog Channels don't have to do anything special when exiting the LiveWindow. Stop having this sendable object automatically respond to value changes.
      Specified by:
        `stopLiveWindowMode` in interface `LiveWindowSendable`