WPILibC++ 2027.0.0-alpha-4
Loading...
Searching...
No Matches
wpi::sim::RoboRioSim Class Reference

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

#include <wpi/simulation/RoboRioSim.hpp>

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 wpi::units::volt_t GetVInVoltage ()
 Measure the Vin voltage.
static void SetVInVoltage (wpi::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 wpi::units::volt_t GetUserVoltage3V3 ()
 Measure the 3.3V rail voltage.
static void SetUserVoltage3V3 (wpi::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 wpi::units::ampere_t GetUserCurrent3V3 ()
 Measure the 3.3V rail current.
static void SetUserCurrent3V3 (wpi::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 wpi::units::volt_t GetBrownoutVoltage ()
 Measure the brownout voltage.
static void SetBrownoutVoltage (wpi::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 wpi::units::celsius_t GetCPUTemp ()
 Get the cpu temp.
static void SetCPUTemp (wpi::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()

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

Measure the brownout voltage.

Returns
the brownout voltage

◆ GetComments()

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

Get the comments.

Returns
The comments.

◆ GetCPUTemp()

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

Get the cpu temp.

Returns
the cpu temp.

◆ GetSerialNumber()

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

Get the serial number.

Returns
The serial number.

◆ GetTeamNumber()

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

Get the team number.

Returns
the team number.

◆ GetUserActive3V3()

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

Get the 3.3V rail active state.

Returns
true if the 3.3V rail is active

◆ GetUserCurrent3V3()

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

Measure the 3.3V rail current.

Returns
the 3.3V rail current

◆ GetUserFaults3V3()

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

Get the 3.3V rail number of faults.

Returns
number of faults

◆ GetUserVoltage3V3()

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

Measure the 3.3V rail voltage.

Returns
the 3.3V rail voltage

◆ GetVInVoltage()

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

Measure the Vin voltage.

Returns
the Vin voltage

◆ RegisterBrownoutVoltageCallback()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

std::unique_ptr< CallbackStore > wpi::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()

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

Reset all simulation data.

◆ SetBrownoutVoltage()

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

Define the brownout voltage.

Parameters
brownoutVoltagethe new voltage

◆ SetComments()

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

Set the comments.

Parameters
commentsThe comments.

◆ SetCPUTemp()

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

Define the cpu temp.

Parameters
cpuTempthe new cpu temp.

◆ SetSerialNumber()

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

Set the serial number.

Parameters
serialNumberThe serial number.

◆ SetTeamNumber()

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

Set the team number.

Parameters
teamNumberthe new team number.

◆ SetUserActive3V3()

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

Set the 3.3V rail active state.

Parameters
userActive3V3true to make rail active

◆ SetUserCurrent3V3()

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

Define the 3.3V rail current.

Parameters
userCurrent3V3the new current

◆ SetUserFaults3V3()

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

Set the 3.3V rail number of faults.

Parameters
userFaults3V3number of faults

◆ SetUserVoltage3V3()

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

Define the 3.3V rail voltage.

Parameters
userVoltage3V3the new voltage

◆ SetVInVoltage()

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

Define the Vin voltage.

Parameters
vInVoltagethe new voltage

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