public class DoubleSolenoid extends SolenoidBase implements LiveWindowSendable
The DoubleSolenoid class is typically used for pneumatics solenoids that have two positions controlled by two separate channels.
Modifier and Type | Class and Description |
---|---|
static class |
DoubleSolenoid.Value
Possible values for a DoubleSolenoid.
|
m_moduleNumber
kAnalogInputChannels, kAnalogOutputChannels, kDigitalChannels, kPCMModules, kPDPChannels, kPDPModules, kPwmChannels, kRelayChannels, kSolenoidChannels, kSystemClockTicksPerMicrosecond
Constructor and Description |
---|
DoubleSolenoid(int forwardChannel,
int reverseChannel)
Constructor.
|
DoubleSolenoid(int moduleNumber,
int forwardChannel,
int reverseChannel)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
free()
Destructor.
|
DoubleSolenoid.Value |
get()
Read the current value of the solenoid.
|
java.lang.String |
getSmartDashboardType()
The string representation of the named data type that will be used by the smart dashboard for
this
Sendable . |
ITable |
getTable()
The table that is associated with this
Sendable . |
void |
initTable(ITable subtable)
Initializes a table for this
Sendable object. |
boolean |
isFwdSolenoidBlackListed()
Check if the forward solenoid is blacklisted.
|
boolean |
isRevSolenoidBlackListed()
Check if the reverse solenoid is blacklisted.
|
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.
|
clearAllPCMStickyFaults, getAll, getPCMSolenoidBlackList, getPCMSolenoidVoltageFault, getPCMSolenoidVoltageStickyFault
checkAnalogInputChannel, checkAnalogOutputChannel, checkDigitalChannel, checkPDPChannel, checkPDPModule, checkPWMChannel, checkRelayChannel, checkSolenoidChannel, checkSolenoidModule, getDefaultSolenoidModule, setDefaultSolenoidModule
public DoubleSolenoid(int forwardChannel, int reverseChannel)
forwardChannel
- The forward channel number on the PCM (0..7).reverseChannel
- The reverse channel number on the PCM (0..7).public DoubleSolenoid(int moduleNumber, int forwardChannel, int reverseChannel)
moduleNumber
- The module number of the solenoid module to use.forwardChannel
- The forward channel on the module to control (0..7).reverseChannel
- The reverse channel on the module to control (0..7).public void free()
free
in class SensorBase
public void set(DoubleSolenoid.Value value)
value
- The value to set (Off, Forward, Reverse)public DoubleSolenoid.Value get()
public boolean isFwdSolenoidBlackListed()
SolenoidBase.clearAllPCMStickyFaults()
public boolean isRevSolenoidBlackListed()
SolenoidBase.clearAllPCMStickyFaults()
public java.lang.String getSmartDashboardType()
Sendable
Sendable
.getSmartDashboardType
in interface Sendable
Sendable
.public void initTable(ITable subtable)
Sendable
Sendable
object.public ITable getTable()
Sendable
Sendable
.public void updateTable()
LiveWindowSendable
updateTable
in interface LiveWindowSendable
public void startLiveWindowMode()
LiveWindowSendable
startLiveWindowMode
in interface LiveWindowSendable
public void stopLiveWindowMode()
LiveWindowSendable
stopLiveWindowMode
in interface LiveWindowSendable