Next: Component Behavior, Up: Components [Contents][Index]
A port is an instance of an interface. A component has ports through which it interacts with other components. As such a port is one of the two end-points connecting two components.
port ::= ("provides" interface-type identifier ";") | ("requires" qualifier? interface-type identifier ";") qualifier ::= "external" | "injected";
The keyword provides
indicates that a component implements all
of the interface behavior.
The keyword requires
indicates that a component relies on some
or all of the interface behavior in its implementation.
For example:
provides ihello p; requires ihello r; requires external itimer t; // (1) requires injected ilogger l; // (2)
1) port to a component with a potential delay in its communication (see External)
2) port to a shared resource (see Systems)
Furthermore a component receives its trigger
s from its
surroundings through its ports. Note that a component trigger
is
either a provides-in
or a requires-out
event. If the
component emits events over its ports they are referred to as
action
s. An action
is either a provides-out
or a
requires-in
event.
• Injection | Ports sharing a resource. | |
• External | Ports with external delay. |