Nested Ports in SysML
This statement is derived from the SysML 1.5 Specification:
'Ports nest other ports in the same way that blocks nest other blocks. The type of the port is a block (or one of its specializations) that also has ports.'
For example, a complex number is made up of two members (of type Real) - the real value and the imaginary value. This is represented by the Block ComplexNumber with two Ports, Real and Imaginary. An Equation Block has a Port that takes a ComplexNumber, but we might want to connect the real and imaginary portions of that variable to different sources. Therefore we have to show them, on the Equation Port, in order to connect them up.
This facility is available in Enterprise Architect for all versions of SysML and for UML.
To create a representation of this example
- Create a SysML Block named 'Equation' with a Port named 'Equation'.
- Create a SysML Block named 'ComplexNumber' with Ports named 'Real' and 'Imaginary'.
- Display the Properties window ( ) for the Port 'Equation' and select the 'Property' tab.
- In the 'Type' field, click on the drop-down arrow and select the 'Select Type' option, then locate and select the 'ComplexNumber' Block element; this sets the 'Type' field to 'ComplexNumber'.
- Right-click on Port 'Equation' and select the 'Features | Interaction Points...' option. The Features window displays at the 'Interaction Points' tab.
- Select the 'Show Owned/Inherited' checkbox. Ports 'Real' and 'Imaginary' are shown in the list panel.
- Select the checkboxes against 'Real' and 'Imaginary'. The two Ports are now nested in Port 'Equation'.