![]() |
WPILibC++ 2027.0.0-alpha-4
|
Top-level interface for opmode classes. More...
#include <wpi/opmode/OpMode.hpp>
Public Member Functions | |
| virtual | ~OpMode ()=default |
| The object is destroyed when the opmode is no longer selected on the DS or after OpModeRun() returns. | |
| virtual void | DisabledPeriodic () |
| This function is called periodically while the opmode is selected on the DS (robot is disabled). | |
| virtual void | OpModeRun (int64_t opModeId)=0 |
| This function is called when the opmode starts (robot is enabled). | |
| virtual void | OpModeStop ()=0 |
| This function is called asynchronously when the robot is disabled, to request the opmode return from OpModeRun(). | |
Top-level interface for opmode classes.
Users should generally extend one of the abstract implementations of this interface (e.g. PeriodicOpMode) rather than directly implementing this interface.
|
virtualdefault |
The object is destroyed when the opmode is no longer selected on the DS or after OpModeRun() returns.
|
inlinevirtual |
This function is called periodically while the opmode is selected on the DS (robot is disabled).
Code that should only run once when the opmode is selected should go in the opmode constructor.
Reimplemented in wpi::PeriodicOpMode.
|
pure virtual |
This function is called when the opmode starts (robot is enabled).
| opModeId | opmode unique ID |
Implemented in wpi::PeriodicOpMode.
|
pure virtual |
This function is called asynchronously when the robot is disabled, to request the opmode return from OpModeRun().
Implemented in wpi::PeriodicOpMode.