Package edu.wpi.first.wpilibj.simulation
Class DoubleSolenoidSim
java.lang.Object
edu.wpi.first.wpilibj.simulation.DoubleSolenoidSim
Class to control a simulated
DoubleSolenoid
.-
Constructor Summary
ConstructorDescriptionDoubleSolenoidSim
(int module, PneumaticsModuleType moduleType, int fwd, int rev) Constructs for a solenoid on a pneumatics module of the given type and ID.DoubleSolenoidSim
(PneumaticsModuleType moduleType, int fwd, int rev) Constructs for a solenoid on a pneumatics module of the given type and default ID.DoubleSolenoidSim
(PneumaticsBaseSim moduleSim, int fwd, int rev) Constructs for a solenoid on the given pneumatics module. -
Method Summary
Modifier and TypeMethodDescriptionget()
Check the value of the double solenoid output.Get the wrappedPneumaticsBaseSim
object.void
set
(DoubleSolenoid.Value value) Set the value of the double solenoid output.
-
Constructor Details
-
DoubleSolenoidSim
Constructs for a solenoid on the given pneumatics module.- Parameters:
moduleSim
- the PCM the solenoid is connected to.fwd
- the forward solenoid channel.rev
- the reverse solenoid channel.
-
DoubleSolenoidSim
Constructs for a solenoid on a pneumatics module of the given type and ID.- Parameters:
module
- the CAN ID of the pneumatics module the solenoid is connected to.moduleType
- the module type (PH or PCM)fwd
- the forward solenoid channel.rev
- the reverse solenoid channel.
-
DoubleSolenoidSim
Constructs for a solenoid on a pneumatics module of the given type and default ID.- Parameters:
moduleType
- the module type (PH or PCM)fwd
- the forward solenoid channel.rev
- the reverse solenoid channel.
-
-
Method Details
-
get
Check the value of the double solenoid output.- Returns:
- the output value of the double solenoid.
-
set
Set the value of the double solenoid output.- Parameters:
value
- The value to set (Off, Forward, Reverse)
-
getModuleSim
Get the wrappedPneumaticsBaseSim
object.- Returns:
- the wrapped
PneumaticsBaseSim
object.
-