edu.wpi.first.wpilibj
Class SolenoidBase

java.lang.Object
  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.SolenoidBase
All Implemented Interfaces:
IDevice, IDeviceController, FrcBotSimComponent
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, n_simProperties
 
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, getSimProperties, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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.