(5) component ::= "component" component-name component-body ";"
(6) component-name ::= identifier
(13) component-body ::= [ "{" exports "}" ]
(14) exports ::= { export }
(15) export ::= idl-statement | property | ids | task | port | attribute | service
(7) component-property ::= ( "doc" string-literals | "version" string-literals | "lang" string-literals | "email" string-literals | "requires" string-list | "codels-require" string-list | "clock-rate" const-expr time-unit | "provides" interface-list | "uses" interface-list ) ";"
A component declaration describes a instance of the GenoM component model. It is defined by a unique name (an identifier) that also defines an IDL scope for any embedded types.
Components export objects from the GenoM component model, namely: IDS (see IDS declaration), tasks (see Task declaration), ports (see Port declaration), attributes (see Attribute declaration) or services (see Service declaration).
Components may also define new types via IDL statements. These types will be defined within the component scope.
A number of properties can be attached to a component:
doc
version
lang
email
requires
pkg-config
format.
codels-requires
pkg-config
format.
clock-rate
provides
uses
port out
is imported as a port in
. Services are imported as remote
objects that can be accessed via codel parameters (see Codel declaration). Other objects are imported as-is.