|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
|
+--java.lang.Thread
|
+--com.dctl.hardware.timer.Timer
Base timer class. All timers extend this class
| Field Summary | |
protected TimerCallback |
callback
The callback to call |
protected static int |
EVENT_COUNTER
|
protected int |
hHandle
The timer handle |
protected int |
instance
The timer instance |
protected static int |
MEASUREMENT
|
protected int |
mode
The mode the timer is in |
protected int |
pQueue
The queue |
protected static int |
PWM
|
protected static int |
TICK_TIMER
|
| Fields inherited from class java.lang.Thread |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
Timer(int instance,
int mode)
Create a new timer on the specified instance |
|
| Method Summary | |
void |
run()
The main processing loop. |
protected void |
setCallback(TimerCallback callback)
Set the callback to call and the interval in microseconds to call it |
protected void |
setContinuous(boolean continuous)
Set the continuous mode |
protected void |
setEnabled(boolean state)
Set the enabled state |
protected void |
setInterval(int interval)
Set the interval in microseconds |
protected void |
waitForNotification()
Wait for notification |
| Methods inherited from class java.lang.Thread |
activeCount, currentThread, getName, getPriority, isAlive, join, setPriority, sleep, start, toString, yield |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected static final int TICK_TIMER
protected static final int EVENT_COUNTER
protected static final int PWM
protected static final int MEASUREMENT
protected int hHandle
protected int instance
protected int pQueue
protected TimerCallback callback
protected int mode
| Constructor Detail |
public Timer(int instance,
int mode)
throws IllegalArgumentException,
SystemException
instance - The instancemode - The mode for the timer
IllegalArgumentException - IllegalArgumentException if the timer instance does not exist
SystemException - if there is an error in the operation| Method Detail |
protected void setCallback(TimerCallback callback)
callback - The timer callback
protected void setInterval(int interval)
throws SystemException
interval - The interval
SystemException - if there is an error in the operation
protected void setContinuous(boolean continuous)
throws SystemException
continuous - True to run continuously, false otherwise
SystemException
protected void setEnabled(boolean state)
throws SystemException
state - True to enable, false to disable
SystemExceptionpublic void run()
run in interface Runnablerun in class Thread
protected void waitForNotification()
throws SystemException
SystemException - if there is an error
|
DCT Lightfoot v3 API specification | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||