SolenoidSim

class wpilib.simulation.SolenoidSim(*args, **kwargs)

Bases: pybind11_object

Overloaded function.

  1. __init__(self: wpilib.simulation._simulation.SolenoidSim, module_sim: wpilib.simulation._simulation.PneumaticsBaseSim, channel: typing.SupportsInt | typing.SupportsIndex) -> None

  2. __init__(self: wpilib.simulation._simulation.SolenoidSim, module: typing.SupportsInt | typing.SupportsIndex, type: wpilib._wpilib.PneumaticsModuleType, channel: typing.SupportsInt | typing.SupportsIndex) -> None

  3. __init__(self: wpilib.simulation._simulation.SolenoidSim, type: wpilib._wpilib.PneumaticsModuleType, channel: typing.SupportsInt | typing.SupportsIndex) -> None

get_module_sim() wpilib.simulation._simulation.PneumaticsBaseSim
get_output() bool
register_output_callback(callback: collections.abc.Callable[[str, hal._wpi_hal.Value], None], initial_notify: bool) wpilib.simulation._simulation.CallbackStore

Register a callback to be run when the output of this solenoid has changed.

Parameters:
  • callback – the callback

  • initial_notify – whether to run the callback with the initial state

Returns:

the CallbackStore object associated with this callback. Save a reference to this object; it being deconstructed cancels the callback.

set_output(output: bool) None