$component TCL engine command
Those commands manipulate components objects and return information about
them. They all take a compoent object as their first argument, noted
$component in the following command descriptions. Such an object is
typically returned by other procedures, such as
dotgen components.
$component name
Return the name of the component as a string.
$component doc
Return a string containing the documentation of the component defined
in the doc attributes of the .gen description.
$component version
Return a string containing the version of the component defined in
the version attribute of the .gen description.
$component lang
Return a string containing the programming language of the component
codels defined in the lang attribute of the .gen description.
$component email
Return a string containing the maintainer e-mail of the component
defined in the email attribute of the .gen description.
$component clockrate
Return a numeric floating point constant
representing the period of the internal component clock in
seconds. This is either the value defined in the clock-rate
attributes of the .gen description, or the greatest common divisor
of all the periods of periodic tasks if no clock-rate is defined. If
the component has no periodic tasks, this raises an error.
$component stack
Return a integer constant representing the minimum stack size of all tasks of the component.
$component ids
Return the ids struct type of the
component.
$component require
Return a list of strings containing the requirement of the component
defined in the require attribute of the .gen description.
$component codels-require
Return a list of strings containing the requirement of the component
defined in the codels-require attribute of the .gen description.
$component throws
Return a list of exceptions possibly
raised by the commponent. This is the concatenation of all exceptions
defined in the component itself and its tasks and services.
$component tasks
Return the list of tasks defined in the commponent.
$component ports [[in|out|simple|multiple] …]
Return the list of ports defined in the commponent. The list may be filtered by a keyword described below. Multiple keyword may be given: they are combined with an implicit 'or'.
| 'in' |
Return the input ports. |
| 'out' |
Return the output ports. |
| 'simple' |
Return the ports that are not of kind |
| 'multiple' |
Return the ports that are of kind |
$component services
Return the list of services defined in the commponent.
$component remotes
Return the list of remote services defined in the commponent.
$component codels [[validate|simple|fsm] …]
Return the list of codels defined in the commponent. The list may be filtered by a keyword described below. Multiple keyword may be given: they are combined with an implicit 'or'.
| 'validate' |
Return the validation codels. |
| 'simple' |
Return the simple codels of functions. |
| 'fsm' |
Return the codels associated with activities and a state machine. |
$component types ['visibility'] ['filter']
Return the list of types defined in the
commponent. The list may be filtered according to a particular
visiblity and a filter function.
| 'visibility' |
Must be one of
|
| 'filter' |
The optional filter can be used to filter out some elements from the
type list. The filter must be a tcl anonymous function (see tcl
|
$component digest ['filter']
Return a string containing a MD5 hash of the commponent. The hash is
computed using relevant data of ports (name, kind, type) and services
(name, parameters direction and type). The list of objects used in the
hash may be filtered according to a particular filter function.
| 'filter' |
The optional filter must be a tcl anonymous function (see tcl
|
$component loc [file|line|column|context]
Return a list describing the source location where that component 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.
$component class
Always returns the string "component". Useful to determine at runtime that the object is a component object.