WPILibC++ 2024.3.2
|
Interface for counting the number of ticks on a digital input channel. More...
#include <frc/CounterBase.h>
Public Types | |
enum | EncodingType { k1X , k2X , k4X } |
Public Member Functions | |
CounterBase ()=default | |
virtual | ~CounterBase ()=default |
CounterBase (CounterBase &&)=default | |
CounterBase & | operator= (CounterBase &&)=default |
virtual int | Get () const =0 |
virtual void | Reset ()=0 |
virtual units::second_t | GetPeriod () const =0 |
virtual void | SetMaxPeriod (units::second_t maxPeriod)=0 |
virtual bool | GetStopped () const =0 |
virtual bool | GetDirection () const =0 |
Interface for counting the number of ticks on a digital input channel.
Encoders, Gear tooth sensors, and counters should all subclass this so it can be used to build more advanced classes for control and driving.
All counters will immediately start counting - Reset() them if you need them to be zeroed before use.
|
default |
|
virtualdefault |
|
default |
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.
|
default |
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.
|
pure virtual |
Implemented in frc::Counter, and frc::Encoder.