Package edu.wpi.first.hal
Class CounterJNI
java.lang.Object
edu.wpi.first.hal.JNIWrapper
edu.wpi.first.hal.CounterJNI
public class CounterJNI extends JNIWrapper
-
Nested Class Summary
-
Field Summary
Fields Modifier and Type Field Description static int
EXTERNAL_DIRECTION
static int
PULSE_LENGTH
static int
SEMI_PERIOD
static int
TWO_PULSE
-
Constructor Summary
Constructors Constructor Description CounterJNI()
-
Method Summary
Modifier and Type Method Description static void
clearCounterDownSource(int counterHandle)
static void
clearCounterUpSource(int counterHandle)
static void
freeCounter(int counterHandle)
static int
getCounter(int counterHandle)
static boolean
getCounterDirection(int counterHandle)
static double
getCounterPeriod(int counterHandle)
static int
getCounterSamplesToAverage(int counterHandle)
static boolean
getCounterStopped(int counterHandle)
static int
initializeCounter(int mode, IntBuffer index)
static void
resetCounter(int counterHandle)
static void
setCounterAverageSize(int counterHandle, int size)
static void
setCounterDownSource(int counterHandle, int digitalSourceHandle, int analogTriggerType)
static void
setCounterDownSourceEdge(int counterHandle, boolean risingEdge, boolean fallingEdge)
static void
setCounterExternalDirectionMode(int counterHandle)
static void
setCounterMaxPeriod(int counterHandle, double maxPeriod)
static void
setCounterPulseLengthMode(int counterHandle, double threshold)
static void
setCounterReverseDirection(int counterHandle, boolean reverseDirection)
static void
setCounterSamplesToAverage(int counterHandle, int samplesToAverage)
static void
setCounterSemiPeriodMode(int counterHandle, boolean highSemiPeriod)
static void
setCounterUpdateWhenEmpty(int counterHandle, boolean enabled)
static void
setCounterUpDownMode(int counterHandle)
static void
setCounterUpSource(int counterHandle, int digitalSourceHandle, int analogTriggerType)
static void
setCounterUpSourceEdge(int counterHandle, boolean risingEdge, boolean fallingEdge)
-
Field Details
-
TWO_PULSE
- See Also:
- Constant Field Values
-
SEMI_PERIOD
- See Also:
- Constant Field Values
-
PULSE_LENGTH
- See Also:
- Constant Field Values
-
EXTERNAL_DIRECTION
- See Also:
- Constant Field Values
-
-
Constructor Details
-
CounterJNI
public CounterJNI()
-
-
Method Details
-
initializeCounter
-
freeCounter
-
setCounterAverageSize
-
setCounterUpSource
public static void setCounterUpSource(int counterHandle, int digitalSourceHandle, int analogTriggerType) -
setCounterUpSourceEdge
public static void setCounterUpSourceEdge(int counterHandle, boolean risingEdge, boolean fallingEdge) -
clearCounterUpSource
-
setCounterDownSource
public static void setCounterDownSource(int counterHandle, int digitalSourceHandle, int analogTriggerType) -
setCounterDownSourceEdge
public static void setCounterDownSourceEdge(int counterHandle, boolean risingEdge, boolean fallingEdge) -
clearCounterDownSource
-
setCounterUpDownMode
-
setCounterExternalDirectionMode
-
setCounterSemiPeriodMode
-
setCounterPulseLengthMode
-
getCounterSamplesToAverage
-
setCounterSamplesToAverage
-
resetCounter
-
getCounter
-
getCounterPeriod
-
setCounterMaxPeriod
-
setCounterUpdateWhenEmpty
-
getCounterStopped
-
getCounterDirection
-
setCounterReverseDirection
-