// Generated from task.c - manual changes will be lost
ifdef::sidebartoc[]
include::_Sidebar.adoc[]
endif::[]






































== *$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
link:cmd-component{outfilesuffix}#tasks[`$component tasks`].























































[[name]]
=== *$task name*

Return the name of the task as a string.






[[component]]
=== *$task component*

Return the link:cmd-component{outfilesuffix}[component object] in which
the task is defined.






[[doc]]
=== *$task doc*

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







[[period]]
=== *$task period*

Return a link:cmd-type{outfilesuffix}[numeric floating point constant]
representing the period of the task in seconds. If the task has no
period, this raises an error.

[[delay]]
=== *$task delay*

Return a link:cmd-type{outfilesuffix}[numeric floating point constant]
representing the initial delay of a task in seconds.

[[priority]]
=== *$task priority*

Return a link:cmd-type{outfilesuffix}[integer constant]
representing the task scheduling priority.

[[stack]]
=== *$task stack*

Return a link:cmd-type{outfilesuffix}[integer constant]
representing the stack size of the task.








[[throws]]
=== *$task throws*

Return a list of link:cmd-type{outfilesuffix}[`exceptions`] possibly
raised by the task. This is the concatenation of all exceptions
defined in the task itself and its services.








































[[services]]
=== *$task services*

Return the list of link:cmd-service{outfilesuffix}[services] defined
in the commponent.

















[[codels]]
=== *$task codels*

Return the list of link:cmd-codel{outfilesuffix}[codels] defined
in the task.















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

When called without argument, `$task fsm` returns the list of
link:cmd-type{outfilesuffix}[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
link:cmd-codel{outfilesuffix}[codel] object associated with that
state.

When called with one of the states name as argument and the `type`
keyword, the link:cmd-type{outfilesuffix}[type] object associated with
that state is returned.

















































[[loc]]
=== *$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.







[[class]]
=== *$task class*

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














// eof
