Class to control a simulated analog input.
More...
#include <wpi/simulation/AnalogInputSim.hpp>
Class to control a simulated analog input.
◆ AnalogInputSim() [1/2]
| wpi::sim::AnalogInputSim::AnalogInputSim |
( |
const AnalogInput & | analogInput | ) |
|
|
explicit |
◆ AnalogInputSim() [2/2]
| wpi::sim::AnalogInputSim::AnalogInputSim |
( |
int | channel | ) |
|
|
explicit |
Constructs from an analog input channel number.
- Parameters
-
◆ GetInitialized()
| bool wpi::sim::AnalogInputSim::GetInitialized |
( |
| ) |
const |
Check if this analog input has been initialized.
- Returns
- true if initialized
◆ GetVoltage()
| double wpi::sim::AnalogInputSim::GetVoltage |
( |
| ) |
const |
Get the voltage.
- Returns
- the voltage
◆ RegisterInitializedCallback()
Register a callback on whether the analog input is initialized.
- Parameters
-
| callback | the callback that will be called whenever the analog input is initialized |
| initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterVoltageCallback()
Register a callback on the voltage.
- Parameters
-
| callback | the callback that will be called whenever the voltage is changed |
| initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ ResetData()
| void wpi::sim::AnalogInputSim::ResetData |
( |
| ) |
|
Reset all simulation data for this object.
◆ SetInitialized()
| void wpi::sim::AnalogInputSim::SetInitialized |
( |
bool | initialized | ) |
|
Change whether this analog input has been initialized.
- Parameters
-
◆ SetVoltage()
| void wpi::sim::AnalogInputSim::SetVoltage |
( |
double | voltage | ) |
|
Change the voltage.
- Parameters
-
The documentation for this class was generated from the following file: