|
| GearTooth (int channel, bool directionSensitive=false) |
| Construct a GearTooth sensor given a channel. More...
|
|
| GearTooth (DigitalSource *source, bool directionSensitive=false) |
| Construct a GearTooth sensor given a digital input. More...
|
|
| GearTooth (std::shared_ptr< DigitalSource > source, bool directionSensitive=false) |
| Construct a GearTooth sensor given a digital input. More...
|
|
void | EnableDirectionSensing (bool directionSensitive) |
| Common code called by the constructors.
|
|
std::string | GetSmartDashboardType () const override |
|
| Counter (Mode mode=kTwoPulse) |
| Create an instance of a counter where no sources are selected. More...
|
|
| Counter (int channel) |
| Create an instance of a Counter object. More...
|
|
| Counter (DigitalSource *source) |
| Create an instance of a counter from a Digital Source (such as a Digital Input). More...
|
|
| Counter (std::shared_ptr< DigitalSource > source) |
| Create an instance of a counter from a Digital Source (such as a Digital Input). More...
|
|
| Counter (AnalogTrigger *trigger) |
| Create an instance of a Counter object. More...
|
|
| Counter (const AnalogTrigger &trigger) |
| Create an instance of a Counter object. More...
|
|
| Counter (EncodingType encodingType, DigitalSource *upSource, DigitalSource *downSource, bool inverted) |
| Create an instance of a Counter object. More...
|
|
| Counter (EncodingType encodingType, std::shared_ptr< DigitalSource > upSource, std::shared_ptr< DigitalSource > downSource, bool inverted) |
| Create an instance of a Counter object. More...
|
|
virtual | ~Counter () |
| Delete the Counter object.
|
|
void | SetUpSource (int channel) |
| Set the upsource for the counter as a digital input channel. More...
|
|
void | SetUpSource (AnalogTrigger *analogTrigger, AnalogTriggerType triggerType) |
| Set the up counting source to be an analog trigger. More...
|
|
void | SetUpSource (std::shared_ptr< AnalogTrigger > analogTrigger, AnalogTriggerType triggerType) |
| Set the up counting source to be an analog trigger. More...
|
|
void | SetUpSource (DigitalSource *source) |
|
void | SetUpSource (std::shared_ptr< DigitalSource > source) |
| Set the source object that causes the counter to count up. More...
|
|
void | SetUpSource (DigitalSource &source) |
| Set the source object that causes the counter to count up. More...
|
|
void | SetUpSourceEdge (bool risingEdge, bool fallingEdge) |
| Set the edge sensitivity on an up counting source. More...
|
|
void | ClearUpSource () |
| Disable the up counting source to the counter.
|
|
void | SetDownSource (int channel) |
| Set the down counting source to be a digital input channel. More...
|
|
void | SetDownSource (AnalogTrigger *analogTrigger, AnalogTriggerType triggerType) |
| Set the down counting source to be an analog trigger. More...
|
|
void | SetDownSource (std::shared_ptr< AnalogTrigger > analogTrigger, AnalogTriggerType triggerType) |
| Set the down counting source to be an analog trigger. More...
|
|
void | SetDownSource (DigitalSource *source) |
|
void | SetDownSource (std::shared_ptr< DigitalSource > source) |
| Set the source object that causes the counter to count down. More...
|
|
void | SetDownSource (DigitalSource &source) |
| Set the source object that causes the counter to count down. More...
|
|
void | SetDownSourceEdge (bool risingEdge, bool fallingEdge) |
| Set the edge sensitivity on a down counting source. More...
|
|
void | ClearDownSource () |
| Disable the down counting source to the counter.
|
|
void | SetUpDownCounterMode () |
| Set standard up / down counting mode on this counter. More...
|
|
void | SetExternalDirectionMode () |
| Set external direction mode on this counter. More...
|
|
void | SetSemiPeriodMode (bool highSemiPeriod) |
| Set Semi-period mode on this counter. More...
|
|
void | SetPulseLengthMode (double threshold) |
| Configure the counter to count in up or down based on the length of the input pulse. More...
|
|
void | SetReverseDirection (bool reverseDirection) |
| Set the Counter to return reversed sensing on the direction. More...
|
|
int | Get () const override |
| Read the current counter value. More...
|
|
void | Reset () override |
| Reset the Counter to zero. More...
|
|
double | GetPeriod () const override |
| Get the Period of the most recent count. More...
|
|
void | SetMaxPeriod (double maxPeriod) override |
| Set the maximum period where the device is still considered "moving". More...
|
|
void | SetUpdateWhenEmpty (bool enabled) |
| Select whether you want to continue updating the event timer output when there are no samples captured. More...
|
|
bool | GetStopped () const override |
| Determine if the clock is stopped. More...
|
|
bool | GetDirection () const override |
| The last direction the counter value changed. More...
|
|
void | SetSamplesToAverage (int samplesToAverage) |
| Set the Samples to Average which specifies the number of samples of the timer to average when calculating the period. More...
|
|
int | GetSamplesToAverage () const |
| Get the Samples to Average which specifies the number of samples of the timer to average when calculating the period. More...
|
|
int | GetFPGAIndex () const |
|
void | UpdateTable () override |
| Update the table for this sendable object with the latest values.
|
|
void | StartLiveWindowMode () override |
| Start having this sendable object automatically respond to value changes reflect the value on the table.
|
|
void | StopLiveWindowMode () override |
| Stop having this sendable object automatically respond to value changes.
|
|
std::string | GetSmartDashboardType () const override |
|
void | InitTable (std::shared_ptr< ITable > subTable) override |
| Initializes a table for this sendable object. More...
|
|
std::shared_ptr< ITable > | GetTable () const override |
|
| SensorBase (const SensorBase &)=delete |
|
SensorBase & | operator= (const SensorBase &)=delete |
|
| ErrorBase (const ErrorBase &)=delete |
|
ErrorBase & | operator= (const ErrorBase &)=delete |
|
virtual Error & | GetError () |
| Retrieve the current error. More...
|
|
virtual const Error & | GetError () const |
|
virtual void | SetErrnoError (llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set error information associated with a C library call that set an error to the "errno" global variable. More...
|
|
virtual void | SetImaqError (int success, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated from the nivision Imaq API. More...
|
|
virtual void | SetError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetErrorRange (Error::Code code, int32_t minRange, int32_t maxRange, int32_t requestedValue, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | SetWPIError (llvm::StringRef errorMessage, Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) const |
| Set the current error information associated with this sensor. More...
|
|
virtual void | CloneError (const ErrorBase &rhs) const |
|
virtual void | ClearError () const |
| Clear the current error information associated with this sensor.
|
|
virtual bool | StatusIsFatal () const |
| Check if the current error code represents a fatal error. More...
|
|
|
enum | Mode { kTwoPulse = 0,
kSemiperiod = 1,
kPulseLength = 2,
kExternalDirection = 3
} |
|
enum | EncodingType { k1X,
k2X,
k4X
} |
|
static int | GetDefaultSolenoidModule () |
|
static bool | CheckSolenoidModule (int moduleNumber) |
| Check that the solenoid module number is valid. More...
|
|
static bool | CheckDigitalChannel (int channel) |
| Check that the digital channel number is valid. More...
|
|
static bool | CheckRelayChannel (int channel) |
| Check that the relay channel number is valid. More...
|
|
static bool | CheckPWMChannel (int channel) |
| Check that the digital channel number is valid. More...
|
|
static bool | CheckAnalogInputChannel (int channel) |
| Check that the analog input number is value. More...
|
|
static bool | CheckAnalogOutputChannel (int channel) |
| Check that the analog output number is valid. More...
|
|
static bool | CheckSolenoidChannel (int channel) |
| Verify that the solenoid channel number is within limits. More...
|
|
static bool | CheckPDPChannel (int channel) |
| Verify that the power distribution channel number is within limits. More...
|
|
static void | SetGlobalError (Error::Code code, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) |
|
static void | SetGlobalWPIError (llvm::StringRef errorMessage, llvm::StringRef contextMessage, llvm::StringRef filename, llvm::StringRef function, int lineNumber) |
|
static Error & | GetGlobalError () |
| Retrieve the current global error.
|
|
std::shared_ptr< DigitalSource > | m_upSource |
|
std::shared_ptr< DigitalSource > | m_downSource |
|
HAL_CounterHandle | m_counter = HAL_kInvalidHandle |
|
Error | m_error |
|
static hal::priority_mutex | _globalErrorMutex |
|
static Error | _globalError |
|
Alias for counter class.
Implement the gear tooth sensor supplied by FIRST. Currently there is no reverse sensing on the gear tooth sensor, but in future versions we might implement the necessary timing in the FPGA to sense direction.