Project

General

Profile

$task TCL engine command

Those commands manipulate tasks objects and return information about them. They all take a task object as their first argument, noted $task in the following command descriptions. Such an object is typically returned by other procedures, such as $component tasks.

$task name

Return the name of the task as a string.

$task component

Return the component object in which the task is defined.

$task doc

Return a string containing the documentation of the component defined in the doc attributes of the .gen description.

$task period

Return a numeric floating point constant representing the period of the task in seconds. If the task has no period, this raises an error.

$task delay

Return a numeric floating point constant representing the initial delay of a task in seconds.

$task priority

Return a integer constant representing the task scheduling priority.

$task stack

Return a integer constant representing the stack size of the task.

$task throws

Return a list of exceptions possibly raised by the task. This is the concatenation of all exceptions defined in the task itself and its services.

$task services

Return the list of services defined in the commponent.

$task codels

Return the list of codels defined in the task.

$task fsm ['state'] [type|codel]

When called without argument, $task fsm returns the list of states defined in the finite state machine of the task.

When called with one of the states (or state name) as argument, optionally followed by the codel keyword, the procedure returns the codel object associated with that state.

When called with one of the states name as argument and the type keyword, the type object associated with that state is returned.

$task loc [file|line|column|context]

Return a list describing the source location where that task is defined. The list contains four elements: the file name, the line number, the column number and the original component context of the definition. If an optional argument is given, only the corresponding element is returned.

$task class

Always returns the string "task". Useful to determine at runtime that the object is a task object.