WPILibC++ 2027.0.0-alpha-2
Loading...
Searching...
No Matches
frc::sim::RoboRioSim Class Reference

A utility class to control a simulated RoboRIO. More...

#include <frc/simulation/RoboRioSim.h>

Static Public Member Functions

static std::unique_ptr< CallbackStoreRegisterVInVoltageCallback (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< CallbackStoreRegisterUserVoltage3V3Callback (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< CallbackStoreRegisterUserCurrent3V3Callback (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< CallbackStoreRegisterUserActive3V3Callback (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< CallbackStoreRegisterUserFaults3V3Callback (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< CallbackStoreRegisterBrownoutVoltageCallback (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< CallbackStoreRegisterCPUTempCallback (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< CallbackStoreRegisterTeamNumberCallback (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 void ResetData ()
 Reset all simulation data.
 

Detailed Description

A utility class to control a simulated RoboRIO.

Member Function Documentation

◆ GetBrownoutVoltage()

static units::volt_t frc::sim::RoboRioSim::GetBrownoutVoltage ( )
static

Measure the brownout voltage.

Returns
the brownout voltage

◆ GetComments()

static std::string frc::sim::RoboRioSim::GetComments ( )
static

Get the comments.

Returns
The comments.

◆ GetCPUTemp()

static units::celsius_t frc::sim::RoboRioSim::GetCPUTemp ( )
static

Get the cpu temp.

Returns
the cpu temp.

◆ GetSerialNumber()

static std::string frc::sim::RoboRioSim::GetSerialNumber ( )
static

Get the serial number.

Returns
The serial number.

◆ GetTeamNumber()

static int32_t frc::sim::RoboRioSim::GetTeamNumber ( )
static

Get the team number.

Returns
the team number.

◆ GetUserActive3V3()

static bool frc::sim::RoboRioSim::GetUserActive3V3 ( )
static

Get the 3.3V rail active state.

Returns
true if the 3.3V rail is active

◆ GetUserCurrent3V3()

static units::ampere_t frc::sim::RoboRioSim::GetUserCurrent3V3 ( )
static

Measure the 3.3V rail current.

Returns
the 3.3V rail current

◆ GetUserFaults3V3()

static int frc::sim::RoboRioSim::GetUserFaults3V3 ( )
static

Get the 3.3V rail number of faults.

Returns
number of faults

◆ GetUserVoltage3V3()

static units::volt_t frc::sim::RoboRioSim::GetUserVoltage3V3 ( )
static

Measure the 3.3V rail voltage.

Returns
the 3.3V rail voltage

◆ GetVInVoltage()

static units::volt_t frc::sim::RoboRioSim::GetVInVoltage ( )
static

Measure the Vin voltage.

Returns
the Vin voltage

◆ RegisterBrownoutVoltageCallback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterBrownoutVoltageCallback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the brownout voltage changes.

Parameters
callbackthe callback
initialNotifywhether to call the callback with the initial state
Returns
the CallbackStore object associated with this callback

◆ RegisterCPUTempCallback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterCPUTempCallback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the cpu temp changes.

Parameters
callbackthe callback
initialNotifywhether to call the callback with the initial state
Returns
the CallbackStore object associated with this callback

◆ RegisterTeamNumberCallback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterTeamNumberCallback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the team number changes.

Parameters
callbackthe callback
initialNotifywhether to call the callback with the initial state
Returns
the CallbackStore object associated with this callback

◆ RegisterUserActive3V3Callback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterUserActive3V3Callback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the 3.3V rail active state changes.

Parameters
callbackthe callback
initialNotifywhether the callback should be called with the initial state
Returns
the CallbackStore object associated with this callback

◆ RegisterUserCurrent3V3Callback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterUserCurrent3V3Callback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the 3.3V rail current changes.

Parameters
callbackthe callback
initialNotifywhether the callback should be called with the initial value
Returns
the CallbackStore object associated with this callback

◆ RegisterUserFaults3V3Callback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterUserFaults3V3Callback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the 3.3V rail number of faults changes.

Parameters
callbackthe callback
initialNotifywhether the callback should be called with the initial value
Returns
the CallbackStore object associated with this callback

◆ RegisterUserVoltage3V3Callback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterUserVoltage3V3Callback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the 3.3V rail voltage changes.

Parameters
callbackthe callback
initialNotifywhether the callback should be called with the initial value
Returns
the CallbackStore object associated with this callback

◆ RegisterVInVoltageCallback()

static std::unique_ptr< CallbackStore > frc::sim::RoboRioSim::RegisterVInVoltageCallback ( NotifyCallback callback,
bool initialNotify )
staticnodiscard

Register a callback to be run whenever the Vin voltage changes.

Parameters
callbackthe callback
initialNotifywhether to call the callback with the initial state
Returns
the CallbackStore object associated with this callback

◆ ResetData()

static void frc::sim::RoboRioSim::ResetData ( )
static

Reset all simulation data.

◆ SetBrownoutVoltage()

static void frc::sim::RoboRioSim::SetBrownoutVoltage ( units::volt_t brownoutVoltage)
static

Define the brownout voltage.

Parameters
brownoutVoltagethe new voltage

◆ SetComments()

static void frc::sim::RoboRioSim::SetComments ( std::string_view comments)
static

Set the comments.

Parameters
commentsThe comments.

◆ SetCPUTemp()

static void frc::sim::RoboRioSim::SetCPUTemp ( units::celsius_t cpuTemp)
static

Define the cpu temp.

Parameters
cpuTempthe new cpu temp.

◆ SetSerialNumber()

static void frc::sim::RoboRioSim::SetSerialNumber ( std::string_view serialNumber)
static

Set the serial number.

Parameters
serialNumberThe serial number.

◆ SetTeamNumber()

static void frc::sim::RoboRioSim::SetTeamNumber ( int32_t teamNumber)
static

Set the team number.

Parameters
teamNumberthe new team number.

◆ SetUserActive3V3()

static void frc::sim::RoboRioSim::SetUserActive3V3 ( bool userActive3V3)
static

Set the 3.3V rail active state.

Parameters
userActive3V3true to make rail active

◆ SetUserCurrent3V3()

static void frc::sim::RoboRioSim::SetUserCurrent3V3 ( units::ampere_t userCurrent3V3)
static

Define the 3.3V rail current.

Parameters
userCurrent3V3the new current

◆ SetUserFaults3V3()

static void frc::sim::RoboRioSim::SetUserFaults3V3 ( int userFaults3V3)
static

Set the 3.3V rail number of faults.

Parameters
userFaults3V3number of faults

◆ SetUserVoltage3V3()

static void frc::sim::RoboRioSim::SetUserVoltage3V3 ( units::volt_t userVoltage3V3)
static

Define the 3.3V rail voltage.

Parameters
userVoltage3V3the new voltage

◆ SetVInVoltage()

static void frc::sim::RoboRioSim::SetVInVoltage ( units::volt_t vInVoltage)
static

Define the Vin voltage.

Parameters
vInVoltagethe new voltage

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