CTRE Phoenix 6 C++ 25.2.1
|
Class to control the state of a simulated hardware::CANrange. More...
#include <ctre/phoenix6/sim/CANrangeSimState.hpp>
Public Member Functions | |
CANrangeSimState (hardware::core::CoreCANrange const &device) | |
Creates an object to control the state of the given hardware::CANrange. | |
CANrangeSimState (CANrangeSimState const &)=delete | |
CANrangeSimState (CANrangeSimState &&)=default | |
CANrangeSimState & | operator= (CANrangeSimState const &)=delete |
CANrangeSimState & | operator= (CANrangeSimState &&)=default |
ctre::phoenix::StatusCode | SetSupplyVoltage (units::voltage::volt_t volts) |
Sets the simulated supply voltage of the CANrange. | |
ctre::phoenix::StatusCode | SetDistance (units::length::meter_t meters) |
Sets the simulated distance of the CANrange. | |
Class to control the state of a simulated hardware::CANrange.
ctre::phoenix6::sim::CANrangeSimState::CANrangeSimState | ( | hardware::core::CoreCANrange const & | device | ) |
Creates an object to control the state of the given hardware::CANrange.
Note the recommended method of accessing simulation features is to use hardware::CANrange::GetSimState.
device | Device to which this simulation state is attached |
|
delete |
|
default |
|
default |
|
delete |
ctre::phoenix::StatusCode ctre::phoenix6::sim::CANrangeSimState::SetDistance | ( | units::length::meter_t | meters | ) |
Sets the simulated distance of the CANrange.
meters | The distance in meters |
ctre::phoenix::StatusCode ctre::phoenix6::sim::CANrangeSimState::SetSupplyVoltage | ( | units::voltage::volt_t | volts | ) |
Sets the simulated supply voltage of the CANrange.
The minimum allowed supply voltage is 4 V - values below this will be promoted to 4 V.
volts | The supply voltage in Volts |