Tasks
Tasks represent a resource program.
There are different types of tasks:
- Services
- Internal tasks
- Nominal tasks
- Subroutines
Internal Tasks
An internal task is local to a resource.
In the tree, it is identified by the icon , such as RobotTask1 in the image above.
An internal task cannot be simulated stand alone. It must be called from a nominal task or a service defined in the current resource.
Services
A service is created inside an organizational or non-organizational resource. A service is intended to be called from other resources, such as the parent resource of a sibling programmable resource. If no such resource calls it, it is not run during the simulation unless it is the root task being simulated.
In the tree, it is identified by the icon , such as RobotTask in the image above.
Unlike internal tasks, a service can be called from other resources:
- The organizational resource parent.
- A programmable resource defined under the same organizational resource.
When you click Play on the Compass, you can simulate services.
Nominal Tasks
A nominal task is created inside organizational resources. A nominal task is not callable, it is run by default whenever the resource owner is included in the simulation.
In the tree, it is identified by the icon , such as Task in the image above.
Like an internal task, a nominal task cannot be called from other resources.
You can create only one nominal task inside a resource.
When you click Play on the Compass, you execute the nominal task.
Subroutines
A subroutine is created inside an existing task.
In the tree, it is identified by the icon , such as SubRoutine in the image above.
A subroutine can only be called from its parent task.
Scoping
Inside a resource, the visibility of the tasks is bottom up: a task can only "see," and therefore call, the tasks above it in the tree.
For example, in the schema above, RobotTask can call RobotTask1 but RobotTask1 cannot call RobotTask.