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 SolenoidBase

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

All Implemented Interfaces:
  IDevice, IDeviceController

Direct Known Subclasses:
  DoubleSolenoid, Solenoid

    public abstract class SolenoidBase

extends SensorBase
implements IDeviceController

SolenoidBase class is the common base class for the Solenoid and DoubleSolenoid classes.

Field Summary
`protected static Resource` | `m_allocated`
`protected int` | `m_moduleNumber`

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

Constructor Summary
`SolenoidBase(int moduleNumber)` Constructor.

Method Summary
`void` | `free()` Destructor.
`byte` | `getAll()` Read all 8 solenoids from the module used by this solenoid as a single byte
`static byte` | `getAllFromDefaultModule()` Read all 8 solenoids in the default solenoid module as a single byte
`static byte` | `getAllFromModule(int moduleNumber)` Read all 8 solenoids in the specified solenoid module as a single byte
`protected void` | `set(int value, int mask)` Set the value of a solenoid.

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`

Field Detail

### m_moduleNumber

    protected int m_moduleNumber

### m_allocated

    protected static Resource m_allocated

Constructor Detail

### SolenoidBase

    public SolenoidBase(int moduleNumber)

  Constructor.

  Parameters:
    `moduleNumber` - The number of the solenoid module to use.

Method Detail

### free

    public void free()

  Destructor.

  Overrides:
    `free` in class `SensorBase`

### set

    protected void set(int value,
                       int mask)

  Set the value of a solenoid.

  Parameters:
    `value` - The value you want to set on the module.
    `mask` - The channels you want to be affected.

### getAll

    public byte getAll()

  Read all 8 solenoids from the module used by this solenoid as a single byte

  Returns:
    The current value of all 8 solenoids on this module.

### getAllFromDefaultModule

    public static byte getAllFromDefaultModule()

  Read all 8 solenoids in the default solenoid module as a single byte

  Returns:
    The current value of all 8 solenoids on the default module.

### getAllFromModule

    public static byte getAllFromModule(int moduleNumber)

  Read all 8 solenoids in the specified solenoid module as a single byte

  Returns:
    The current value of all 8 solenoids on the specified module.

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
"