edu.wpi.first.wpilibj
Class Solenoid

java.lang.Object
  extended by edu.wpi.first.wpilibj.SensorBase
      extended by edu.wpi.first.wpilibj.SolenoidBase
          extended by edu.wpi.first.wpilibj.Solenoid
All Implemented Interfaces:
IDevice, IDeviceController, FrcBotSimComponent

public class Solenoid
extends SolenoidBase

Solenoid class for running high voltage Digital Output (9472 module). The Solenoid class is typically used for pneumatics solenoids, but could be used for any device within the current spec of the 9472 module.


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, n_simProperties
 
Constructor Summary
Solenoid(int channel)
          Constructor.
Solenoid(int moduleNumber, int channel)
          Constructor.
 
Method Summary
 void free()
          Destructor.
 boolean get()
          Read the current value of the solenoid.
 void set(boolean on)
          Set the value of a solenoid.
 
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, getSimProperties, setDefaultAnalogModule, setDefaultDigitalModule, setDefaultSolenoidModule
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Solenoid

public Solenoid(int channel)
Constructor.

Parameters:
channel - The channel on the module to control.

Solenoid

public Solenoid(int moduleNumber,
                int channel)
Constructor.

Parameters:
moduleNumber - The module number of the solenoid module to use.
channel - The channel on the module to control.
Method Detail

free

public void free()
Destructor.

Overrides:
free in class SolenoidBase

set

public void set(boolean on)
Set the value of a solenoid.

Parameters:
on - Turn the solenoid output off or on.

get

public boolean get()
Read the current value of the solenoid.

Returns:
The current value of the solenoid.