![]() |
WPILibC++ 2025.3.1
|
A utility class to control a simulated RoboRIO. More...
#include <frc/simulation/RoboRioSim.h>
Static Public Member Functions | |
static std::unique_ptr< CallbackStore > | RegisterFPGAButtonCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run when the FPGA button state changes. | |
static bool | GetFPGAButton () |
Query the state of the FPGA button. | |
static void | SetFPGAButton (bool fPGAButton) |
Define the state of the FPGA button. | |
static std::unique_ptr< CallbackStore > | RegisterVInVoltageCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the Vin voltage changes. | |
static units::volt_t | GetVInVoltage () |
Measure the Vin voltage. | |
static void | SetVInVoltage (units::volt_t vInVoltage) |
Define the Vin voltage. | |
static std::unique_ptr< CallbackStore > | RegisterVInCurrentCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the Vin current changes. | |
static units::ampere_t | GetVInCurrent () |
Measure the Vin current. | |
static void | SetVInCurrent (units::ampere_t vInCurrent) |
Define the Vin current. | |
static std::unique_ptr< CallbackStore > | RegisterUserVoltage6VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 6V rail voltage changes. | |
static units::volt_t | GetUserVoltage6V () |
Measure the 6V rail voltage. | |
static void | SetUserVoltage6V (units::volt_t userVoltage6V) |
Define the 6V rail voltage. | |
static std::unique_ptr< CallbackStore > | RegisterUserCurrent6VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 6V rail current changes. | |
static units::ampere_t | GetUserCurrent6V () |
Measure the 6V rail current. | |
static void | SetUserCurrent6V (units::ampere_t userCurrent6V) |
Define the 6V rail current. | |
static std::unique_ptr< CallbackStore > | RegisterUserActive6VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 6V rail active state changes. | |
static bool | GetUserActive6V () |
Get the 6V rail active state. | |
static void | SetUserActive6V (bool userActive6V) |
Set the 6V rail active state. | |
static std::unique_ptr< CallbackStore > | RegisterUserVoltage5VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 5V rail voltage changes. | |
static units::volt_t | GetUserVoltage5V () |
Measure the 5V rail voltage. | |
static void | SetUserVoltage5V (units::volt_t userVoltage5V) |
Define the 5V rail voltage. | |
static std::unique_ptr< CallbackStore > | RegisterUserCurrent5VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 5V rail current changes. | |
static units::ampere_t | GetUserCurrent5V () |
Measure the 5V rail current. | |
static void | SetUserCurrent5V (units::ampere_t userCurrent5V) |
Define the 5V rail current. | |
static std::unique_ptr< CallbackStore > | RegisterUserActive5VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 5V rail active state changes. | |
static bool | GetUserActive5V () |
Get the 5V rail active state. | |
static void | SetUserActive5V (bool userActive5V) |
Set the 5V rail active state. | |
static std::unique_ptr< CallbackStore > | RegisterUserVoltage3V3Callback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 3.3V rail voltage changes. | |
static units::volt_t | GetUserVoltage3V3 () |
Measure the 3.3V rail voltage. | |
static void | SetUserVoltage3V3 (units::volt_t userVoltage3V3) |
Define the 3.3V rail voltage. | |
static std::unique_ptr< CallbackStore > | RegisterUserCurrent3V3Callback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 3.3V rail current changes. | |
static units::ampere_t | GetUserCurrent3V3 () |
Measure the 3.3V rail current. | |
static void | SetUserCurrent3V3 (units::ampere_t userCurrent3V3) |
Define the 3.3V rail current. | |
static std::unique_ptr< CallbackStore > | RegisterUserActive3V3Callback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 3.3V rail active state changes. | |
static bool | GetUserActive3V3 () |
Get the 3.3V rail active state. | |
static void | SetUserActive3V3 (bool userActive3V3) |
Set the 3.3V rail active state. | |
static std::unique_ptr< CallbackStore > | RegisterUserFaults6VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 6V rail number of faults changes. | |
static int | GetUserFaults6V () |
Get the 6V rail number of faults. | |
static void | SetUserFaults6V (int userFaults6V) |
Set the 6V rail number of faults. | |
static std::unique_ptr< CallbackStore > | RegisterUserFaults5VCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 5V rail number of faults changes. | |
static int | GetUserFaults5V () |
Get the 5V rail number of faults. | |
static void | SetUserFaults5V (int userFaults5V) |
Set the 5V rail number of faults. | |
static std::unique_ptr< CallbackStore > | RegisterUserFaults3V3Callback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the 3.3V rail number of faults changes. | |
static int | GetUserFaults3V3 () |
Get the 3.3V rail number of faults. | |
static void | SetUserFaults3V3 (int userFaults3V3) |
Set the 3.3V rail number of faults. | |
static std::unique_ptr< CallbackStore > | RegisterBrownoutVoltageCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the brownout voltage changes. | |
static units::volt_t | GetBrownoutVoltage () |
Measure the brownout voltage. | |
static void | SetBrownoutVoltage (units::volt_t brownoutVoltage) |
Define the brownout voltage. | |
static std::unique_ptr< CallbackStore > | RegisterCPUTempCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the cpu temp changes. | |
static units::celsius_t | GetCPUTemp () |
Get the cpu temp. | |
static void | SetCPUTemp (units::celsius_t cpuTemp) |
Define the cpu temp. | |
static std::unique_ptr< CallbackStore > | RegisterTeamNumberCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the team number changes. | |
static int32_t | GetTeamNumber () |
Get the team number. | |
static void | SetTeamNumber (int32_t teamNumber) |
Set the team number. | |
static std::string | GetSerialNumber () |
Get the serial number. | |
static void | SetSerialNumber (std::string_view serialNumber) |
Set the serial number. | |
static std::string | GetComments () |
Get the comments. | |
static void | SetComments (std::string_view comments) |
Set the comments. | |
static std::unique_ptr< CallbackStore > | RegisterRadioLEDStateCallback (NotifyCallback callback, bool initialNotify) |
Register a callback to be run whenever the Radio led state changes. | |
static RadioLEDState | GetRadioLEDState () |
Get the state of the radio led. | |
static void | SetRadioLEDState (RadioLEDState state) |
Set the state of the radio led. | |
static void | ResetData () |
Reset all simulation data. | |
A utility class to control a simulated RoboRIO.
|
static |
Measure the brownout voltage.
|
static |
Get the comments.
|
static |
Get the cpu temp.
|
static |
Query the state of the FPGA button.
|
static |
Get the state of the radio led.
|
static |
Get the serial number.
|
static |
Get the team number.
|
static |
Get the 3.3V rail active state.
|
static |
Get the 5V rail active state.
|
static |
Get the 6V rail active state.
|
static |
Measure the 3.3V rail current.
|
static |
Measure the 5V rail current.
|
static |
Measure the 6V rail current.
|
static |
Get the 3.3V rail number of faults.
|
static |
Get the 5V rail number of faults.
|
static |
Get the 6V rail number of faults.
|
static |
Measure the 3.3V rail voltage.
|
static |
Measure the 5V rail voltage.
|
static |
Measure the 6V rail voltage.
|
static |
Measure the Vin current.
|
static |
Measure the Vin voltage.
|
staticnodiscard |
Register a callback to be run whenever the brownout voltage changes.
callback | the callback |
initialNotify | whether to call the callback with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the cpu temp changes.
callback | the callback |
initialNotify | whether to call the callback with the initial state |
|
staticnodiscard |
Register a callback to be run when the FPGA button state changes.
callback | the callback |
initialNotify | whether to run the callback with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the Radio led state changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the team number changes.
callback | the callback |
initialNotify | whether to call the callback with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the 3.3V rail active state changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the 5V rail active state changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the 6V rail active state changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial state |
|
staticnodiscard |
Register a callback to be run whenever the 3.3V rail current changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 5V rail current changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 6V rail current changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 3.3V rail number of faults changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 5V rail number of faults changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 6V rail number of faults changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 3.3V rail voltage changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 5V rail voltage changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the 6V rail voltage changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the Vin current changes.
callback | the callback |
initialNotify | whether the callback should be called with the initial value |
|
staticnodiscard |
Register a callback to be run whenever the Vin voltage changes.
callback | the callback |
initialNotify | whether to call the callback with the initial state |
|
static |
Reset all simulation data.
|
static |
Define the brownout voltage.
brownoutVoltage | the new voltage |
|
static |
Set the comments.
comments | The comments. |
|
static |
Define the cpu temp.
cpuTemp | the new cpu temp. |
|
static |
Define the state of the FPGA button.
fPGAButton | the new state |
|
static |
Set the state of the radio led.
state | The state of the radio led. |
|
static |
Set the serial number.
serialNumber | The serial number. |
|
static |
Set the team number.
teamNumber | the new team number. |
|
static |
Set the 3.3V rail active state.
userActive3V3 | true to make rail active |
|
static |
Set the 5V rail active state.
userActive5V | true to make rail active |
|
static |
Set the 6V rail active state.
userActive6V | true to make rail active |
|
static |
Define the 3.3V rail current.
userCurrent3V3 | the new current |
|
static |
Define the 5V rail current.
userCurrent5V | the new current |
|
static |
Define the 6V rail current.
userCurrent6V | the new current |
|
static |
Set the 3.3V rail number of faults.
userFaults3V3 | number of faults |
|
static |
Set the 5V rail number of faults.
userFaults5V | number of faults |
|
static |
Set the 6V rail number of faults.
userFaults6V | number of faults |
|
static |
Define the 3.3V rail voltage.
userVoltage3V3 | the new voltage |
|
static |
Define the 5V rail voltage.
userVoltage5V | the new voltage |
|
static |
Define the 6V rail voltage.
userVoltage6V | the new voltage |
|
static |
Define the Vin current.
vInCurrent | the new current |
|
static |
Define the Vin voltage.
vInVoltage | the new voltage |