Reference Source Test
public class | source

Scheduler

Default scheduler class describes general task scheduling and robot behaviour

Example:

class MyScheduler extends Scheduler {
 constructor() {
     this.tasks = [
         new InitTask(this, { weight: 10000, time: 10, location: new Point(0, 0) })
     ];
 }
 runNextTask() {
     // Here you can override default scheduler
 }
}

Method Summary

Public Methods
public

Get all registered task

public

Run default action if there is the exception in task is not caught with try {} catch(e) {}.

Public Methods

public getTasks(): Array source

Get all registered task

Return:

Array

Array of tasks type Task

public onUnhandledTaskError(reason: TaskError) source

Run default action if there is the exception in task is not caught with try {} catch(e) {}.

Params:

NameTypeAttributeDescription
reason TaskError

Describes more about an exception