When executing your application, the BeeSoft Scheduler looks at each module and attempts to execute each callback according to your specifications. It continues to do this - executing callbacks whose conditions are met - until it received orders to shut down.
Use a polled callback when you want to specify a specific interval between executions of the function. For example, you might want to take a look at the sonar readings every 50 milliseconds, whether or not any new readings have come in. The polled callback is the most frequently used callback.
Each module whether BeeSoft-supplied or user-written may allow you to define one or more module-specific callbacks. Use this type of callback when you want to execute your function whenever a particular event occurs. For example, the BeeSoft-supplied baseClient module accepts a callback executed whenever the robots base reports a new heading.
Use a shutdown callback to do any necessary cleanup once the BeeSoft Scheduler has been told to halt. Since most robot resources are controlled by BeeSoft-supplied modules that take care of cleanly closing down those resources, youll seldom have to supply any of your own shutdown callbacks.
Use a select callback when you need to get data from a specific file before performing some function. For example, you might want to use a file of data communicated from the robots base as input to a particular function. With a select callback, as soon as that base data file is ready, your function will be executed. The BeeSoft servers themselves make frequent use of select callbacks to manage the streams of data flowing in through the physical connections to the robots resources.
Use a timeout callback when you want to execute a particular function only when its associated timer expires. If you dont then reset the timer, the BeeSoft Scheduler wont execute that callback again. (Remember, if you want a function executed periodically, use a polled callback.)
Lets say you want to see an error message if you havent heard anything from the robots base for more than two seconds. You might set up your module with both a select callback and a timeout callback. The BeeSoft Scheduler will execute the select callback each time a report is received from the robots base, and then reset the timer for two seconds hence. But if no report from the robot base is forthcoming in two seconds, the Scheduler will execute the timeout callback.