Class to control a simulated analog trigger.
More...
#include <frc/simulation/AnalogTriggerSim.h>
Class to control a simulated analog trigger.
◆ AnalogTriggerSim()
frc::sim::AnalogTriggerSim::AnalogTriggerSim |
( |
const AnalogTrigger & | analogTrigger | ) |
|
|
explicit |
◆ CreateForChannel()
static AnalogTriggerSim frc::sim::AnalogTriggerSim::CreateForChannel |
( |
int | channel | ) |
|
|
static |
Creates an AnalogTriggerSim for an analog input channel.
- Parameters
-
channel | analog input channel |
- Returns
- Simulated object
- Throws:
- std::out_of_range if no AnalogTrigger is configured for that channel
◆ CreateForIndex()
◆ GetInitialized()
bool frc::sim::AnalogTriggerSim::GetInitialized |
( |
| ) |
const |
Check if this analog trigger has been initialized.
- Returns
- true if initialized
◆ GetTriggerLowerBound()
double frc::sim::AnalogTriggerSim::GetTriggerLowerBound |
( |
| ) |
const |
Get the lower bound.
- Returns
- the lower bound
◆ GetTriggerUpperBound()
double frc::sim::AnalogTriggerSim::GetTriggerUpperBound |
( |
| ) |
const |
Get the upper bound.
- Returns
- the upper bound
◆ RegisterInitializedCallback()
std::unique_ptr< CallbackStore > frc::sim::AnalogTriggerSim::RegisterInitializedCallback |
( |
NotifyCallback | callback, |
|
|
bool | initialNotify ) |
|
nodiscard |
Register a callback on whether the analog trigger is initialized.
- Parameters
-
callback | the callback that will be called whenever the analog trigger is initialized |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterTriggerLowerBoundCallback()
std::unique_ptr< CallbackStore > frc::sim::AnalogTriggerSim::RegisterTriggerLowerBoundCallback |
( |
NotifyCallback | callback, |
|
|
bool | initialNotify ) |
|
nodiscard |
Register a callback on the lower bound.
- Parameters
-
callback | the callback that will be called whenever the lower bound is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ RegisterTriggerUpperBoundCallback()
std::unique_ptr< CallbackStore > frc::sim::AnalogTriggerSim::RegisterTriggerUpperBoundCallback |
( |
NotifyCallback | callback, |
|
|
bool | initialNotify ) |
|
nodiscard |
Register a callback on the upper bound.
- Parameters
-
callback | the callback that will be called whenever the upper bound is changed |
initialNotify | if true, the callback will be run on the initial value |
- Returns
- the CallbackStore object associated with this callback
◆ ResetData()
void frc::sim::AnalogTriggerSim::ResetData |
( |
| ) |
|
Reset all simulation data for this object.
◆ SetInitialized()
void frc::sim::AnalogTriggerSim::SetInitialized |
( |
bool | initialized | ) |
|
Change whether this analog trigger has been initialized.
- Parameters
-
◆ SetTriggerLowerBound()
void frc::sim::AnalogTriggerSim::SetTriggerLowerBound |
( |
double | triggerLowerBound | ) |
|
Change the lower bound.
- Parameters
-
triggerLowerBound | the new lower bound |
◆ SetTriggerUpperBound()
void frc::sim::AnalogTriggerSim::SetTriggerUpperBound |
( |
double | triggerUpperBound | ) |
|
Change the upper bound.
- Parameters
-
triggerUpperBound | the new upper bound |
The documentation for this class was generated from the following file: