Class to control a simulated analog output.
More...
#include <frc/simulation/AnalogOutputSim.h>
Class to control a simulated analog output.
◆ AnalogOutputSim() [1/2]
frc::sim::AnalogOutputSim::AnalogOutputSim |
( |
const AnalogOutput & |
analogOutput | ) |
|
|
explicit |
◆ AnalogOutputSim() [2/2]
frc::sim::AnalogOutputSim::AnalogOutputSim |
( |
int |
channel | ) |
|
|
explicit |
Constructs from an analog output channel number.
- Parameters
-
◆ GetInitialized()
bool frc::sim::AnalogOutputSim::GetInitialized |
( |
| ) |
const |
Check whether this analog output has been initialized.
- Returns
- true if initialized
◆ GetVoltage()
double frc::sim::AnalogOutputSim::GetVoltage |
( |
| ) |
const |
Read the analog output voltage.
- Returns
- the voltage on this analog output
◆ RegisterInitializedCallback()
std::unique_ptr< CallbackStore > frc::sim::AnalogOutputSim::RegisterInitializedCallback |
( |
NotifyCallback |
callback, |
|
|
bool |
initialNotify |
|
) |
| |
Register a callback to be run when this analog output is initialized.
- Parameters
-
callback | the callback |
initialNotify | whether to run the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterVoltageCallback()
Register a callback to be run whenever the voltage changes.
- Parameters
-
callback | the callback |
initialNotify | whether to call the callback with the initial state |
- Returns
- the CallbackStore object associated with this callback
◆ ResetData()
void frc::sim::AnalogOutputSim::ResetData |
( |
| ) |
|
Reset all simulation data on this object.
◆ SetInitialized()
void frc::sim::AnalogOutputSim::SetInitialized |
( |
bool |
initialized | ) |
|
Define whether this analog output has been initialized.
- Parameters
-
initialized | whether this object is initialized |
◆ SetVoltage()
void frc::sim::AnalogOutputSim::SetVoltage |
( |
double |
voltage | ) |
|
Set the analog output voltage.
- Parameters
-
voltage | the new voltage on this analog output |
The documentation for this class was generated from the following file: