=== Port Interface Definitions A *port interface definition* defines a <> and associates a name with it. ==== Syntax `interface` <> `{` _port-interface-member-sequence_ `}` _port-interface-member-sequence_ is an <> in which each element is a *port interface member*, and the terminating punctuation is a semicolon. A port interface member is one of the following: * A <> * An <> ==== Semantics The identifier is the name of the interface. A port interface definition _D_ represents a set _S_ of <>, computed as follows: . For each port instance specifier _P_ that is a member of _D_, add _P_ to _S_. . For each interface import specifier _s_ that is a member of _D_, <> _s_ to a set of port instance specifiers _S~s~_ and add _S~s~_ to _S_. The set of port instances represented by _D_ must satisfy the following rules: . Each port instance specifier must have a distinct name. . At most one of each special port kind may appear in the set. ==== Examples [source,fpp] ---- @ A command interface interface CommandInterface { @ A port for receiving commands from the command dispatcher command recv port cmdIn @ A port for sending command registration requests to the command dispatcher command reg port cmdRegOut @ A port for sending responses to the command dispatcher command resp port cmdRespOut } @ A com interface interface ComInterface { @ Com input port async input port comIn: Fw.Com @ Com output port output port comOut: Fw.Com } @ A component that imports the Command and Com interfaces separately active component CommandComSeparate { @ Import the command interface import CommandInterface @ Import the com interface import ComInterface } @ An interface composed of the Command and Com interfaces interface CommandComInterface { @ Import the command interface import CommandInterface @ Import the com interface import ComInterface } @ A component that imports the CommandCom interface interface CommandComComposed { @ Import the CommandCom interface import CommandComInterface } ----