Class to read a duty cycle PWM input.
Definition: DutyCycle.h:31
Class to control a simulated duty cycle digital input.
Definition: DutyCycleSim.h:20
int GetFrequency() const
Measure the frequency.
void SetInitialized(bool initialized)
Define whether this duty cycle input has been initialized.
void SetFrequency(int frequency)
Change the duty cycle frequency.
std::unique_ptr< CallbackStore > RegisterFrequencyCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the frequency changes.
double GetOutput() const
Measure the output from this duty cycle port.
std::unique_ptr< CallbackStore > RegisterOutputCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the output changes.
void ResetData()
Reset all simulation data for the duty cycle output.
DutyCycleSim(const DutyCycle &dutyCycle)
Constructs from a DutyCycle object.
void SetOutput(double output)
Change the duty cycle output.
static DutyCycleSim CreateForIndex(int index)
Creates a DutyCycleSim for a simulated index.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run when this duty cycle input is initialized.
static DutyCycleSim CreateForChannel(int channel)
Creates a DutyCycleSim for a digital input channel.
bool GetInitialized() const
Check whether this duty cycle input has been initialized.
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition: CallbackStore.h:14
Definition: AprilTagPoseEstimator.h:15