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


























Port declaration
----------------

Ports implement the data flow between components as a publish/subscribe
model. Ports have a name and a type. They can be either `out` ports (for
publishing data) or `in` ports (for subscribing to a sibling `out` port).

****
[horizontal]
(23) `*port                  ::=*` ::
   `"port"` <<grammar#dotgen-rule-opt-multiple,`opt-multiple`>> <<grammar#dotgen-rule-port-dir,`port-dir`>> <<grammar#dotgen-rule-type-spec,`type-spec`>> <<grammar#dotgen-rule-identifier,`identifier`>> <<grammar#dotgen-rule-opt-properties,`opt-properties`>> `";"`
(25) `*opt-multiple          ::=*` ::
   `[` `"multiple"` `]`
(24) `*port-dir              ::=*` ::
   `"in"` +
                              `|` `"out"`
****

Ports are by default `single` ports, i.e. they define one type of exported
data. The optional `multiple` qualifier can be used to define a 'dynamic
list' of ports of the given type, instead of a single slot. Suchs ports are
accessed as an array indexed by strings. In this case, ports are created or
destroyed dynamically be the codels. The
link:../mappings/index{outfilesuffix}[IDL mappings] section for ports
explains how this is done.
























// eof
