Component Interface (a.k.a. Ports)
component MyComp {
port <<sync>> in int inPort1,
<<timed>> in int inPort2,
out int outPort1, // No timing specified
<<untimed>> out int outPort2;
port out boolean outPortInSeparateDeclaration;
}
The definition of a port contains the following concepts: * The port's direction: Either it is incoming or outgoing. Through incoming ports, a component receives data from its environment. Through outgoing ports, a component sends data to its environment. * The port's' type. Only data of that can flow through the port. See [Type system] for more information about types. * The port's name that is later used to refer to the port and the information flowing through it.
Complete syntax
port (<port-timing>) <direction> <type> <name> ;