Prev Next

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

  1. Create a SysML Block named 'Equation' with a Port named 'Equation'.
  2. Create a SysML Block named 'ComplexNumber' with Ports named 'Real' and 'Imaginary'.
  3. Display the Properties window (Alt+1) for the Port 'Equation' and select the 'Property' tab.
  4. 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'.
  5. Right-click on Port 'Equation' and select the 'Features | Interaction Points...' option. The Features window displays at the 'Interaction Points' tab.
  6. Select the 'Show Owned/Inherited' checkbox. Ports 'Real' and 'Imaginary' are shown in the list panel.
  7. Select the checkboxes against 'Real' and 'Imaginary'. The two Ports are now nested in Port 'Equation'.

This SysML Block Definition diagram shows how ports nest other ports in the same way that blocks nest other blocks, in Sparx Systems Enterprise Architect.