|
Robotcode
1.0
|
Timer class that works with the s626 board. More...
#include <Timer626.h>
Public Member Functions | |
| Timer (double dt=1) | |
| Constructor: default is 1ms update cycles. | |
| void | init (int lowchannel=1, int highchannel=4, int board=0) |
| Initialize Timer on board 0, any combination of channels. | |
| void | reset (int i) |
| reset timer number i to zero | |
| void | clear () |
| clear all timers and clocks | |
| void | countup () |
| Increase update count by update cycle. | |
| void | countupReal () |
| get the real time phatom or s626 device | |
| double | read (int number) |
| double | readReal (int number) |
| double | operator[] (int number) |
| double | dt () |
Timer class that works with the s626 board.
The class holds two clocks
| Timer::Timer | ( | double | dt = 1 | ) |
Constructor: default is 1ms update cycles.
Timer storage class: Keeps track of number of update cycles and real time this version updates itself from the s626-board; Joern Diedrichsen, 2007 j.diedrichsen@bangor.ac.uk ----------------------------------------------------------------------- Constructor -----------------------------------------------------------------------
| void Timer::init | ( | int | low = 1, |
| int | high = 4, |
||
| int | board = 0 |
||
| ) |
| void Timer::reset | ( | int | timer | ) |
reset timer number i to zero
----------------------------------------------------------------------- reset: Sets a single timer to zero -----------------------------------------------------------------------
| void Timer::clear | ( | ) |
clear all timers and clocks
----------------------------------------------------------------------- clear: Clears all the timers to zero -----------------------------------------------------------------------
| void Timer::countupReal | ( | ) |
get the real time phatom or s626 device
----------------------------------------------------------------------- countup real: gets the real time from the s626 device -----------------------------------------------------------------------
| double Timer::read | ( | int | number | ) | [inline] |
| number | read clock 1, timer i |
| double Timer::readReal | ( | int | number | ) | [inline] |
| number | read clock 2, timer i |
| double Timer::operator[] | ( | int | number | ) | [inline] |
| number | read clock 1, timer i |