|
|
|
|
hdScheduleAsynchronous
Description: Schedules an operation to be executed by the scheduler in the servo loop, and does not wait for its completion. Scheduler callbacks submitted from the servo loop thread are run immediately regardless of priority. Syntax:
Argument Definition pCallback The function callback.pUserData The data to be used by the function.nPriority The priority of the operation. Callbacks areprocessed once per scheduler tick, in order of decreasing priority. Returns: Handle for the operation. Usage: Typically used for scheduling callbacks that run every tick of the servo loop. For example, one can run a dynamic simulation within an asynchronous callback and set forces within that simulation. Example:
|
HDSchedulerCallback Type
Description: Scheduler operation function type, used to define operations to be run in the scheduler thread. Syntax:
Argument Definition pUserData Data used by the operation, created when theoperation is scheduled. Returns: HD_CALLBACK_DONE or HD_CALLBACK_CONTINUE depending on whether the operation is complete or should be executed again the next tick of the scheduler. Usage: Scheduled by hdSchedulerSynchronous() or hdScheduleAsynchronous(), the operation is then run during the next scheduler tick, or immediately for synchronous operations if the scheduler has not been started. The return value controls whether the operation terminates after being run or runs again in the next scheduler tick. A periodic operation, i.e. one that is executed indefinitely, should return HD_CALLBACK_DONE when it is finally to be unscheduled. Example:
|