Task
Default task class describes general task robot behaviour during task execution
Static Member Summary
Static Public Members | ||
public static get |
Task is executing |
|
public static get |
Task is finished and it is not be consider in the future |
|
public static get |
Task is ready to be executed |
|
public static get |
Task is suspended and waiting a chance to become ready |
Constructor Summary
Public Constructor | ||
public |
constructor(scheduler: *, weight: *, time: *, location: *) Default constructor for task |
Method Summary
Public Methods | ||
public |
finish() Finish this task and run next one |
|
public |
Get current state |
|
public |
Get predicted time of current task |
|
public |
Get weight of current task |
|
public |
onPathObstacle(detected: *) This method will be executed when some obstacle is detected on the path |
|
public |
onRun() This method will be executed as soon as mep run this task |
|
public |
run() Run current task and change a state |
|
public |
setWeight(weight: *) Change default weight of the task |
|
public |
suspend() Suspend this task and run next one |
Static Public Members
Public Constructors
public constructor(scheduler: *, weight: *, time: *, location: *) source
Default constructor for task
Params:
Name | Type | Attribute | Description |
scheduler | * | {Scheduler} - Reference to strategy's scheduler |
|
weight | * | {Number} - Importance of the task, initial order |
|
time | * | {Number} - Predicted time to be executed |
|
location | * | Predicted area of execution |
Public Methods
public onPathObstacle(detected: *) source
This method will be executed when some obstacle is detected on the path
Params:
Name | Type | Attribute | Description |
detected | * |
public setWeight(weight: *) source
Change default weight of the task
Params:
Name | Type | Attribute | Description |
weight | * | {Number} |