@ index
Definition base.h:690
Class to read quad encoders.
Definition Encoder.hpp:31
static EncoderSim CreateForChannel(int channel)
Creates an EncoderSim for a digital input channel.
double GetRate() const
Get the rate of the encoder.
double GetMaxPeriod() const
Get the max period of the encoder.
std::unique_ptr< CallbackStore > RegisterCountCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the count property of the encoder.
bool GetInitialized() const
Read the Initialized value of the encoder.
int GetSamplesToAverage() const
Get the samples-to-average value.
void SetReverseDirection(bool reverseDirection)
Set the reverse direction.
std::unique_ptr< CallbackStore > RegisterSamplesToAverageCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the samples-to-average value of this encoder.
std::unique_ptr< CallbackStore > RegisterReverseDirectionCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the reverse direction.
std::unique_ptr< CallbackStore > RegisterPeriodCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the period of the encoder.
void SetReset(bool reset)
Change the reset property of the encoder.
void SetMaxPeriod(double maxPeriod)
Change the max period of the encoder.
std::unique_ptr< CallbackStore > RegisterInitializedCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the Initialized property of the encoder.
void SetPeriod(double period)
Change the encoder period.
EncoderSim(const Encoder &encoder)
Constructs from an Encoder object.
void SetCount(int count)
Change the count of the encoder.
std::unique_ptr< CallbackStore > RegisterMaxPeriodCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be run whenever the max period of the encoder is changed.
void SetSamplesToAverage(int samplesToAverage)
Set the samples-to-average value.
int GetCount() const
Read the count of the encoder.
std::unique_ptr< CallbackStore > RegisterResetCallback(NotifyCallback callback, bool initialNotify)
Register a callback to be called whenever the encoder is reset.
bool GetReset() const
Check if the encoder has been reset.
double GetDistancePerPulse() const
Read the distance per pulse of the encoder.
bool GetDirection() const
Get the direction of the encoder.
void SetDistancePerPulse(double distancePerPulse)
Change the encoder distance per pulse.
static EncoderSim CreateForIndex(int index)
Creates an EncoderSim for a simulated index.
bool GetReverseDirection() const
Get the reverse direction of the encoder.
void SetInitialized(bool initialized)
Change the Initialized value of the encoder.
void ResetData()
Resets all simulation data for this encoder.
double GetPeriod() const
Read the period of the encoder.
std::unique_ptr< CallbackStore > RegisterDirectionCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the direction of the encoder.
std::unique_ptr< CallbackStore > RegisterDistancePerPulseCallback(NotifyCallback callback, bool initialNotify)
Register a callback on the distance per pulse value of this encoder.
void SetRate(double rate)
Change the rate of the encoder.
void SetDirection(bool direction)
Set the direction of the encoder.
double GetDistance() const
Read the distance of the encoder.
void SetDistance(double distance)
Change the encoder distance.
Definition CTREPCMSim.hpp:13
std::function< void(std::string_view, const HAL_Value *)> NotifyCallback
Definition CallbackStore.hpp:16
Definition CvSource.hpp:15