Package edu.wpi.first.wpilibj
Class PneumaticsControlModule
java.lang.Object
edu.wpi.first.wpilibj.PneumaticsControlModule
- All Implemented Interfaces:
PneumaticsBase,AutoCloseable
public class PneumaticsControlModule extends Object implements PneumaticsBase
Module class for controlling a Cross The Road Electronics Pneumatics Control Module.
-
Constructor Summary
Constructors Constructor Description PneumaticsControlModule()Constructs a PneumaticsControlModule with the default id (0).PneumaticsControlModule(int module)Constructs a PneumaticsControlModule. -
Method Summary
Modifier and Type Method Description intcheckAndReserveSolenoids(int mask)Check to see if the masked solenoids can be reserved, and if not reserve them.booleancheckSolenoidChannel(int channel)Check if a solenoid channel is valid.voidclearAllStickyFaults()voidclose()voiddisableCompressor()voidenableCompressorAnalog(double minPressure, double maxPressure)voidenableCompressorDigital()voidenableCompressorHybrid(double minPressure, double maxPressure)voidfireOneShot(int index)Fire a single solenoid shot.doublegetAnalogVoltage(int channel)booleangetCompressor()CompressorConfigTypegetCompressorConfigType()doublegetCompressorCurrent()booleangetCompressorCurrentTooHighFault()booleangetCompressorCurrentTooHighStickyFault()booleangetCompressorNotConnectedFault()booleangetCompressorNotConnectedStickyFault()booleangetCompressorShortedFault()booleangetCompressorShortedStickyFault()intgetModuleNumber()Get module number for this module.doublegetPressure(int channel)booleangetPressureSwitch()intgetSolenoidDisabledList()Get the disabled solenoids.intgetSolenoids()Gets solenoid values.booleangetSolenoidVoltageFault()booleangetSolenoidVoltageStickyFault()CompressormakeCompressor()DoubleSolenoidmakeDoubleSolenoid(int forwardChannel, int reverseChannel)SolenoidmakeSolenoid(int channel)booleanreserveCompressor()voidsetOneShotDuration(int index, int durMs)Set the duration for a single solenoid shot.voidsetSolenoids(int mask, int values)Sets solenoids on a pneumatics module.voidunreserveCompressor()voidunreserveSolenoids(int mask)Unreserve the masked solenoids.
-
Constructor Details
-
PneumaticsControlModule
public PneumaticsControlModule()Constructs a PneumaticsControlModule with the default id (0). -
PneumaticsControlModule
Constructs a PneumaticsControlModule.- Parameters:
module- module number to construct
-
-
Method Details
-
close
- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfacePneumaticsBase
-
getCompressor
- Specified by:
getCompressorin interfacePneumaticsBase
-
getPressureSwitch
- Specified by:
getPressureSwitchin interfacePneumaticsBase
-
getCompressorCurrent
- Specified by:
getCompressorCurrentin interfacePneumaticsBase
-
getCompressorCurrentTooHighFault
-
getCompressorCurrentTooHighStickyFault
-
getCompressorShortedFault
-
getCompressorShortedStickyFault
-
getCompressorNotConnectedFault
-
getCompressorNotConnectedStickyFault
-
setSolenoids
Description copied from interface:PneumaticsBaseSets solenoids on a pneumatics module.- Specified by:
setSolenoidsin interfacePneumaticsBase- Parameters:
mask- maskvalues- values
-
getSolenoids
Description copied from interface:PneumaticsBaseGets solenoid values.- Specified by:
getSolenoidsin interfacePneumaticsBase- Returns:
- values
-
getModuleNumber
Description copied from interface:PneumaticsBaseGet module number for this module.- Specified by:
getModuleNumberin interfacePneumaticsBase- Returns:
- module number
-
getSolenoidDisabledList
Description copied from interface:PneumaticsBaseGet the disabled solenoids.- Specified by:
getSolenoidDisabledListin interfacePneumaticsBase- Returns:
- disabled list
-
getSolenoidVoltageFault
-
getSolenoidVoltageStickyFault
-
clearAllStickyFaults
-
fireOneShot
Description copied from interface:PneumaticsBaseFire a single solenoid shot.- Specified by:
fireOneShotin interfacePneumaticsBase- Parameters:
index- solenoid index
-
setOneShotDuration
Description copied from interface:PneumaticsBaseSet the duration for a single solenoid shot.- Specified by:
setOneShotDurationin interfacePneumaticsBase- Parameters:
index- solenoid indexdurMs- shot duration
-
checkSolenoidChannel
Description copied from interface:PneumaticsBaseCheck if a solenoid channel is valid.- Specified by:
checkSolenoidChannelin interfacePneumaticsBase- Parameters:
channel- Channel to check- Returns:
- True if channel exists
-
checkAndReserveSolenoids
Description copied from interface:PneumaticsBaseCheck to see if the masked solenoids can be reserved, and if not reserve them.- Specified by:
checkAndReserveSolenoidsin interfacePneumaticsBase- Parameters:
mask- The solenoid mask to reserve- Returns:
- 0 if successful, mask of solenoids that couldn't be allocated otherwise
-
unreserveSolenoids
Description copied from interface:PneumaticsBaseUnreserve the masked solenoids.- Specified by:
unreserveSolenoidsin interfacePneumaticsBase- Parameters:
mask- The solenoid mask to unreserve
-
makeSolenoid
- Specified by:
makeSolenoidin interfacePneumaticsBase
-
makeDoubleSolenoid
- Specified by:
makeDoubleSolenoidin interfacePneumaticsBase
-
makeCompressor
- Specified by:
makeCompressorin interfacePneumaticsBase
-
reserveCompressor
- Specified by:
reserveCompressorin interfacePneumaticsBase
-
unreserveCompressor
- Specified by:
unreserveCompressorin interfacePneumaticsBase
-
disableCompressor
- Specified by:
disableCompressorin interfacePneumaticsBase
-
enableCompressorDigital
- Specified by:
enableCompressorDigitalin interfacePneumaticsBase
-
enableCompressorAnalog
- Specified by:
enableCompressorAnalogin interfacePneumaticsBase
-
enableCompressorHybrid
- Specified by:
enableCompressorHybridin interfacePneumaticsBase
-
getCompressorConfigType
- Specified by:
getCompressorConfigTypein interfacePneumaticsBase
-
getAnalogVoltage
- Specified by:
getAnalogVoltagein interfacePneumaticsBase
-
getPressure
- Specified by:
getPressurein interfacePneumaticsBase
-