Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## edu.wpi.first.wpilibj
Class DoubleSolenoid

    java.lang.Object
      edu.wpi.first.wpilibj.SensorBase
          edu.wpi.first.wpilibj.SolenoidBase
              edu.wpi.first.wpilibj.DoubleSolenoid

All Implemented Interfaces:
  LiveWindowSendable, IDevice, IDeviceController, Sendable

    public class DoubleSolenoid

extends SolenoidBase
implements LiveWindowSendable

DoubleSolenoid class for running 2 channels of high voltage Digital Output (9472 module). The DoubleSolenoid class is typically used for pneumatics solenoids that have two positions controlled by two separate channels.

Nested Class Summary
`static class` | `DoubleSolenoid.Value` Possible values for a DoubleSolenoid

Field Summary

Fields inherited from class edu.wpi.first.wpilibj.SolenoidBase
`m_allocated, m_moduleNumber`

Fields inherited from class edu.wpi.first.wpilibj.SensorBase
`kAnalogChannels, kAnalogModules, kDigitalChannels, kPwmChannels, kRelayChannels, kSolenoidChannels, kSolenoidModules, kSystemClockTicksPerMicrosecond`

Constructor Summary
`DoubleSolenoid(int forwardChannel, int reverseChannel)` Constructor.
`DoubleSolenoid(int moduleNumber, int forwardChannel, int reverseChannel)` Constructor.

Method Summary
`void` | `free()` Destructor.
`DoubleSolenoid.Value` | `get()` Read the current value of the solenoid.
`String` | `getSmartDashboardType()`
`ITable` | `getTable()`
`void` | `initTable(ITable subtable)` Initializes a table for this sendable object.
`void` | `set(DoubleSolenoid.Value value)` Set the value of a solenoid.
`void` | `startLiveWindowMode()` Start having this sendable object automatically respond to value changes reflect the value on the table.
`void` | `stopLiveWindowMode()` Stop having this sendable object automatically respond to value changes.
`void` | `updateTable()` Update the table for this sendable object with the latest values.

Methods inherited from class edu.wpi.first.wpilibj.SolenoidBase
`getAll, getAllFromDefaultModule, getAllFromModule, set`

Methods inherited from class edu.wpi.first.wpilibj.SensorBase
`checkAnalogChannel, checkAnalogModule, checkDigitalChannel, checkDigitalModule, checkPWMChannel, checkPWMModule, checkRelayChannel, checkRelayModule, checkSolenoidChannel, checkSolenoidModule, getDefaultAnalogModule, getDefaultDigitalModule, getDefaultSolenoidModule, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule`

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DoubleSolenoid

    public DoubleSolenoid(int forwardChannel,
                          int reverseChannel)

  Constructor.

  Parameters:
    `forwardChannel` - The forward channel on the module to control.
    `reverseChannel` - The reverse channel on the module to control.

### DoubleSolenoid

    public DoubleSolenoid(int moduleNumber,
                          int forwardChannel,
                          int reverseChannel)

  Constructor.

  Parameters:
    `moduleNumber` - The module number of the solenoid module to use.
    `forwardChannel` - The forward channel on the module to control.
    `reverseChannel` - The reverse channel on the module to control.

Method Detail

### free

    public void free()

  Destructor.

  Overrides:
    `free` in class `SolenoidBase`

### set

    public void set(DoubleSolenoid.Value value)

  Set the value of a solenoid.

  Parameters:
    `value` - Move the solenoid to forward, reverse, or don't move it.

### get

    public DoubleSolenoid.Value get()

  Read the current value of the solenoid.

  Returns:
    The current value of the solenoid.

### getSmartDashboardType

    public String getSmartDashboardType()

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

### initTable

    public void initTable(ITable subtable)

  Initializes a table for this sendable object.

  Specified by:
    `initTable` in interface `Sendable`
  Parameters:
    `subtable` - The table to put the values in.

### getTable

    public ITable getTable()

  Specified by:
    `getTable` in interface `Sendable`
  Returns:
    the table that is currently associated with the sendable

### updateTable

    public void updateTable()

  Update the table for this sendable object with the latest values.

  Specified by:
    `updateTable` in interface `LiveWindowSendable`

### startLiveWindowMode

    public void startLiveWindowMode()

  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()

  Stop having this sendable object automatically respond to value changes.

  Specified by:
    `stopLiveWindowMode` in interface `LiveWindowSendable`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| " 2013 FRC Java API "
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

"
For updated information see the Java FRC site
"