10 #include "AnalogTriggerOutput.h"
11 #include "CounterBase.h"
12 #include "SensorBase.h"
13 #include "LiveWindow/LiveWindowSendable.h"
24 typedef enum {kTwoPulse=0, kSemiperiod=1, kPulseLength=2, kExternalDirection=3} Mode;
27 explicit Counter(uint32_t channel);
28 Counter(uint8_t moduleNumber, uint32_t channel);
37 void SetUpSource(uint8_t moduleNumber, uint32_t channel);
73 uint32_t GetIndex() {
return m_index;}
77 void StartLiveWindowMode();
78 void StopLiveWindowMode();
79 virtual std::string GetSmartDashboardType();
80 void InitTable(ITable *subTable);
87 void InitCounter(Mode mode = kTwoPulse);
89 bool m_allocatedUpSource;
90 bool m_allocatedDownSource;
DigitalSource * m_downSource
What makes the counter count down.
Definition: Counter.h:84
Definition: AnalogTrigger.h:16
void SetPulseLengthMode(float threshold)
Definition: Counter.cpp:498
Counter()
Definition: Counter.cpp:49
void SetSemiPeriodMode(bool highSemiPeriod)
Definition: Counter.cpp:483
Definition: DigitalSource.h:19
void ClearUpSource()
Definition: Counter.cpp:300
void Stop()
Definition: Counter.cpp:581
int32_t Get()
Definition: Counter.cpp:555
DigitalSource * m_upSource
What makes the counter count up.
Definition: Counter.h:83
void SetDownSourceEdge(bool risingEdge, bool fallingEdge)
Definition: Counter.cpp:417
void Reset()
Definition: Counter.cpp:569
void SetDownSource(uint32_t channel)
Definition: Counter.cpp:325
bool GetDirection()
Definition: Counter.cpp:671
virtual ~Counter()
Definition: Counter.cpp:172
void SetUpSource(uint32_t channel)
Definition: Counter.cpp:207
void Start()
Definition: Counter.cpp:542
void ClearDownSource()
Definition: Counter.cpp:433
Definition: CounterBase.h:15
Definition: SensorBase.h:20
void SetUpdateWhenEmpty(bool enabled)
Definition: Counter.cpp:643
void SetUpSourceEdge(bool risingEdge, bool fallingEdge)
Definition: Counter.cpp:284
void SetSamplesToAverage(int samplesToAverage)
Definition: Counter.cpp:527
void SetReverseDirection(bool reverseDirection)
Definition: Counter.cpp:686
int GetSamplesToAverage()
Definition: Counter.cpp:514
void SetMaxPeriod(double maxPeriod)
Definition: Counter.cpp:623
bool GetStopped()
Definition: Counter.cpp:659
tCounter * m_counter
The FPGA counter object.
Definition: Counter.h:85
void SetUpDownCounterMode()
Definition: Counter.cpp:458
void SetExternalDirectionMode()
Definition: Counter.cpp:471