Previous Page TOC Index Next Page

BeeSoft User's Guide and Reference

3.11 Debugging With the BeeSoft Scheduler


Use the BeeSoft Scheduler’s built in trace function to monitor the execution of a module. This useful debugging tool prints a report (to standard output) whenever a module is polled, when as timeout occurs, when it executes a select callback, etc. In short, you’ll see a running commentary of all the BeeSoft Scheduler’s operations on a module — everything the module does, as it does it. The trace function is a toggle.

trace (RaiModule*); - Turns on trace function.

untrace (RaiModule*); - Turns off trace function.

void verboseOn ( );

If debugging library is in use, turns verbose mode ON. Otherwise, prints a warning.

void verboseOff ( ); - Turns OFF verbose mode.

void timeCheckOn ( );

If debugging library is in use,turns ON the output of callback execution time limits and pollinginterval checks. Otherwise, prints a warning.

void timeCheckOff ( ); - Turns OFF time checking.

void setTimeLimit (raiModule* mod, timeval* limit, unsigned long msecs);

Sets a limit on the time the specified module may take to execute. If the debugging library is in use, this limit is not enforced; rather, a warning is issued whenever a limit is exceeded.

void setSelectTimeLimit (raiModule* mod, unsigned long msecs);

Sets a limit on the time the select callback for the specified module may take to execute. If the debugging library is in use, this limit is not enforced; rather, a warning is issued whenever a limit is exceeded.

void setTimeoutLimit(raiModule* mod, unsigned long msecs);

As in setSelectTimeLimit, sets a limit on the time, but in this case for the specified module’s timeout callbacks. If the debugging library is in use, this limit is not enforced; rather, a warning is issued whenever a limit is exceeded.

void setPollLimit(raiModule* mod, unsigned long msecs);

As in setSelectTimeLimit, sets a limit on the time, but in this case for the specified module’s polling callbacks. This limit is not enforced, but if the debugging library is in use, it issues a warning message whenever a limit is exceeded.

void setPollingErrorLimit(raiModule* mod, unsigned long msecs);

Sets a limit on the difference in the desired interval between polls for a polled callback, and the actual interval the BeeSoft Scheduler provides. Because the underlying operating system does not allow perfect scheduling, this function gives you a way to determine how closely your polling requests are being timed. This limit is not enforced, but if the debugging library is in use, it will issue a warning each time a limit is exceeded. The limit defaults to the polling interval, that is, the warning is issued only if a polling interval is exceeded by 100 percent.

Use the built-in timecheck function to see whether the BeeSoft Scheduler is exceeding a specified limit of time in executing each callback. Use the setSelectTimeLimit call, the setTimeoutTimeLimit call and the setPollTimeLimit call to specify time limits for specific types of callbacks. Similarly, use the setPollingErrorLimit call to place a maximum on the desired interval between polled callbacks. Then, toggle timeCheckOn to see a warning message when the Scheduler exceeds a time limit or polling interval.

Previous Page Page Top TOC Index Next Page