RobotCore 1.0
WPILib port to raspberry Pi
Loading...
Searching...
No Matches
org.wpilib.command3.BindingScope Interface Reference
Inheritance diagram for org.wpilib.command3.BindingScope:
org.wpilib.command3.BindingScope.Global org.wpilib.command3.BindingScope.RobotModeScope org.wpilib.command3.BindingScope.AutonomousMode org.wpilib.command3.BindingScope.TeleopMode org.wpilib.command3.BindingScope.UtilityMode

Classes

class  Global
interface  RobotModeScope
class  AutonomousMode
class  TeleopMode
class  UtilityMode

Public Member Functions

boolean active ()
record ForCommand (Scheduler scheduler, Command command) implements BindingScope
record ForOpmode (long opmodeId) implements BindingScope

Static Public Member Functions

static BindingScope createNarrowestScope (Scheduler scheduler)

Detailed Description

A scope for when a binding is live. Bindings tied to a scope must be deleted when the scope becomes inactive.

Definition at line 14 of file BindingScope.java.

Member Function Documentation

◆ active()

boolean org.wpilib.command3.BindingScope.active ( )

Checks if the scope is active. Bindings for inactive scopes are removed from the scheduler.

Returns
True if the scope is still active, false if not.

Implemented in org.wpilib.command3.BindingScope.AutonomousMode, org.wpilib.command3.BindingScope.Global, org.wpilib.command3.BindingScope.TeleopMode, and org.wpilib.command3.BindingScope.UtilityMode.

◆ createNarrowestScope()

BindingScope org.wpilib.command3.BindingScope.createNarrowestScope ( Scheduler scheduler)
static

Creates the narrowest binding scope available based on the current state of the scheduler and selected opmode.

Parameters
schedulerThe scheduler to create the binding scope for.
Returns
The narrowest binding scope available.

Definition at line 29 of file BindingScope.java.

◆ ForCommand()

record org.wpilib.command3.BindingScope.ForCommand ( Scheduler scheduler,
Command command )

A binding scoped to the lifetime of a specific command. This should be used when a binding is created within a command, tying the lifetime of the binding to the declaring command.

Parameters
schedulerThe scheduler managing the command.
commandThe command being scoped to.

Definition at line 73 of file BindingScope.java.

◆ ForOpmode()

record org.wpilib.command3.BindingScope.ForOpmode ( long opmodeId)

A binding scoped to a running opmode.

Parameters
opmodeIdThe ID of the opmode that the binding is scoped to.

Definition at line 85 of file BindingScope.java.


The documentation for this interface was generated from the following file: