|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.acces.aiousb.Counter
public class Counter
Class Counter represents a single counter/timer. One accesses a counter through its
CounterSubsystem
parent object (see getCounter()
).
Field Summary | |
---|---|
static int |
MODE_HW_TRIGGERED
Mode 5: hardware triggered strobe (retriggerable) (see setMode() ). |
static int |
MODE_ONE_SHOT
Mode 1: hardware retriggerable one-shot (see setMode() ). |
static int |
MODE_RATE_GENERATOR
Mode 2: rate generator (see setMode() ). |
static int |
MODE_SQUARE_WAVE
Mode 3: square wave mode (see setMode() ). |
static int |
MODE_SW_TRIGGERED
Mode 4: software triggered mode (see setMode() ). |
static int |
MODE_TERMINAL_COUNT
Mode 0: interrupt on terminal count (see setMode() ). |
Method Summary | |
---|---|
int |
getDeviceIndex()
Gets the index of the parent device on the USB bus. |
char |
readCount()
Reads a counter's current count value. |
char |
readCountAndSetModeAndCount(int mode,
char count)
Reads a counter's current count value, then sets a new mode and loads a new count value into the counter. |
char[] |
readCountAndStatus()
Reads a counter's current count value and status. |
Counter |
setCount(char count)
Loads a count value into the counter. |
Counter |
setMode(int mode)
Sets the counter's mode. |
Counter |
setModeAndCount(int mode,
char count)
Sets a counter mode and loads a count value into the counter. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int MODE_TERMINAL_COUNT
setMode()
).
public static final int MODE_ONE_SHOT
setMode()
).
public static final int MODE_RATE_GENERATOR
setMode()
).
public static final int MODE_SQUARE_WAVE
setMode()
).
public static final int MODE_SW_TRIGGERED
setMode()
).
public static final int MODE_HW_TRIGGERED
setMode()
).
Method Detail |
---|
public int getDeviceIndex()
public Counter setMode(int mode)
mode
- the counter mode. May be one of:MODE_TERMINAL_COUNT
MODE_ONE_SHOT
MODE_RATE_GENERATOR
MODE_SQUARE_WAVE
MODE_SW_TRIGGERED
MODE_HW_TRIGGERED
java.lang.IllegalArgumentException
OperationFailedException
public Counter setCount(char count)
count
- the count value (0-65,535) to load into the counter.
OperationFailedException
public Counter setModeAndCount(int mode, char count)
mode
- the counter mode (see setMode()
).count
- the count value (0-65,535) to load into the counter.
java.lang.IllegalArgumentException
OperationFailedException
public char readCount()
OperationFailedException
public char[] readCountAndStatus()
OperationFailedException
public char readCountAndSetModeAndCount(int mode, char count)
mode
- the counter mode (see setMode()
).count
- the count value (0-65,535) to load into the counter.
java.lang.IllegalArgumentException
OperationFailedException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |