#include <checkpoint.h>
Public Member Functions | |
| logger (void) | |
Static Public Member Functions | |
| void | operate (bool) |
| enable logging. (off by default). | |
| bool | operate (void) |
| return whether enabled. | |
| void | frequency (short) |
| Set frequency of checkpoints (not obstacle detected ones). | |
| short | frequency (void) |
| Return frequency of checkpoint. | |
| bool | write () |
| Returns true if a checkpoint should be taken relative to provided frequency. | |
| word | top (void) |
| return current number of checkpoints. (0=none) | |
| void | checkpoint (MILLIMETER x, MILLIMETER y, DEGREE angle, CENTIMETER d, DEGREE irangle) |
| log an obstacle event | |
| void | upload (void) |
| upload the log through the oSCI interface (may use host SGserial class later. | |
| void | play (unsigned short time, uint8 &x, uint8 &y, RADIAN &angle, CENTIMETER &d, RADIAN &irangle) |
| playback event (DOS only) | |
| short | time (unsigned short t) |
| return time of next event (DOS only) | |
| void | add_checkpoint (short time, short x, short y, DEGREE angle, CENTIMETER d, DEGREE irangle) |
| adds another checkpoint to structure--used in simulator to load checkpoint structure from file. | |
Static Private Attributes | |
| checkpoint | _checkpoints [CHECKPOINT_MAX] |
| word | _top |
| bool | _operate |
| short | _frequency |
| short | _counter |
Reference checkpoint
|
|
|
|
||||||||||||||||||||||||||||
|
adds another checkpoint to structure--used in simulator to load checkpoint structure from file.
|
|
||||||||||||||||||||||||
|
log an obstacle event
|
|
|
Return frequency of checkpoint.
|
|
|
Set frequency of checkpoints (not obstacle detected ones).
|
|
|
return whether enabled.
|
|
|
enable logging. (off by default).
|
|
||||||||||||||||||||||||||||
|
playback event (DOS only)
|
|
|
return time of next event (DOS only)
|
|
|
return current number of checkpoints. (0=none)
|
|
|
upload the log through the oSCI interface (may use host SGserial class later.
|
|
|
Returns true if a checkpoint should be taken relative to provided frequency. At first the internal oSchedule::timestamp was going to be used, but the time slices sometimes resulted in a timestamp always being an odd number (1,3,5,etc.); thus a frequency of 4 would never be executed. A simple alternative is simply to have an internal counter and compare the frequency with this number--thus you take a checkpoint every Nth scheduled checkpoint. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3