4.2 Standard Ports, Flow Ports & Interfaces
Key Takeaways
Ports define localized interaction points on block or part boundaries, encapsulating internal implementation while enabling external interconnection.
Standard ports model service-oriented and operation-based interactions, typed by interfaces that use provided (ball) and required (socket) notation.
Flow ports model discrete or continuous transfer of physical matter, energy, or data, visually indicated by perimeter squares with internal directional arrows.
Atomic flow ports transmit a single flow item typed by a value type, block, or signal, whereas non-atomic flow ports transmit bundled items typed by a flow specification.
Conjugation of a non-atomic flow port (denoted by a tilde prefix ~) inverts all in and out flow property directions within the typing flow specification.
4.2 Standard Ports, Flow Ports & Interfaces
Quick Summary: In SysML, ports define interaction points located on the boundary of a block or part. They allow internal subsystems to interact with each other and with the external environment without exposing internal implementation details. Under foundational SysML specifications (v1.2), the language defines two distinct port categories: standard ports (which model service invocations and operations typed by interfaces using ball-and-socket notation) and flow ports (which model the transmission of matter, energy, and data, indicated by small squares with directional arrows).
Modularity and encapsulation are essential engineering principles for complex system design. If internal parts connected directly to the internal variables or functions of other parts, any modification to a subsystem would trigger cascading redesigns across the entire system. SysML enforces structural encapsulation through ports. By mediating all interactions through dedicated perimeter gates, ports allow engineers to swap out, upgrade, or reconfigure internal components provided the boundary port contracts remain preserved.
The Role of Ports in System Architecture
A port is a structural feature of a classifier that specifies a distinct interaction point between that classifier and its environment or between the classifier and its internal parts:
- Perimeter Placement: Graphically rendered as a small square resting directly on the boundary line of a block (on a BDD) or a part usage (on an IBD).
- Encapsulation Boundary: Shielding internal structures so that external components only interact with the port rather than reaching inside the component.
- Interface Contracts: A port declares what capabilities, operations, or flow items it provides to other entities, and what it requires from them.
Standard Ports vs. Flow Ports in SysML 1.2
The OCSMP Model User exam tests the foundational SysML 1.2 modeling constructs, which distinguish sharply between two port types based on the nature of the interaction:
-
Standard Ports (Behavioral / Service-Oriented):
- Derived directly from UML 2.
- Intended for client-server invocations, behavioral service requests, and synchronous or asynchronous function calls.
- Does not have directional arrows inside the port square.
- Typed by one or more interfaces.
- SysML 1.2 calls standard ports "another name for UML 2 ports" and says they are typically used for peer-to-peer synchronous request/reply services.
-
Flow Ports (Item Transfer / Physical & Informational Flows):
- Introduced specifically by SysML to address physical and continuous engineering domains.
- Intended for transferring matter (e.g., fuel, hydraulic fluid), energy (e.g., electrical current, heat), or data (e.g., telemetry packets, raw bitstreams).
- Features an internal directional arrow showing the allowable direction of item movement.
- Typed by a
«valueType»,«block»,«signal», or«flowSpecification». - SysML 1.2 says flow ports "are intended to be used for asynchronous, broadcast, or send-and-forget interactions."
Standard Ports: Service Invocations and Interfaces
A standard port models a software or behavioral interface where one component requests a service and another executes it. Standard ports are typed by Interfaces.
Provided vs. Required Interface Notation
To specify the role of a standard port, SysML uses the canonical "ball-and-socket" notation:
-
Provided Interface ("Ball" or "Lollipop"
-O):- Represented by a solid line extending from the port square terminating in a full circle (ball).
- Semantics: The owning block implements and provides the operations declared in the interface. Other blocks can call these operations.
- Example: A
PowerDistributionUnitprovides anIPowerControlinterface with operations liketurnOnChannel()andreadVoltage().
-
Required Interface ("Socket"
-():- Represented by a solid line extending from the port square terminating in a half-circle (cup or socket).
- Semantics: The owning block demands or depends upon the operations declared in the interface to perform its duties. It expects an external block to supply this functionality.
- Example: A
FlightComputerrequires anIPowerControlinterface to command power states.
-
Ball-and-Socket Assembly (
-O)-):- When two parts with complementary provided and required interfaces are connected, the ball fits neatly inside the socket.
- This visually depicts a verified service binding between client and server.
+--------------------+ +--------------------+
| flightComputer | | powerDistributor |
| [Part] | | [Part] |
| [ ]-(====================)-[ ] |
| socket (Req) ball (Prov) |
+--------------------+ +--------------------+
Flow Ports: Transferring Matter, Energy, and Data
While software components often communicate via operation calls, physical and hardware engineering requires modeling fluids, currents, forces, and signals. SysML flow ports provide this capability.
Directional Semantics and Visual Notations
A flow port is rendered as a small square on the block perimeter containing an arrowhead that indicates the permitted direction of flow:
| Direction Tag | Arrowhead Appearance | Semantic Meaning | Practical System Example |
|---|---|---|---|
in | Arrow pointing inward toward the block interior (▶]) | Inflow: The block receives items from the outside environment. | fuelIn : RocketFuel on an engine. |
out | Arrow pointing outward away from the block ([▶) | Outflow: The block generates or expels items to the outside. | exhaustOut : GasExhaust on a thruster. |
inout | Double-headed arrow pointing both inward and outward (◀▶) | Bidirectional: Items can flow both into and out of the block. | fluidLine : HydraulicFluid on a dual-acting cylinder. |
Atomic Flow Ports vs. Non-Atomic Flow Ports
Flow ports are divided into two distinct structural variants based on how they are typed:
1. Atomic Flow Ports
- Definition: A flow port that transfers a single, indivisible kind of flow item.
- Typing Classifiers: Typed directly by a
«valueType», a«block», or a«signal».- Example typed by value type:
voltage : Volts(directionin). - Example typed by block:
coolant : LiquidNitrogen(directioninout). - Example typed by signal:
abortCommand : EmergencyAbortSignal(directionin).
- Example typed by value type:
- Arrowhead Rule: Must show an internal direction arrow (
in,out, orinout). - Exam Constraint: An atomic flow port cannot be typed by a
«flowSpecification».
2. Non-Atomic Flow Ports
- Definition: A flow port that transmits a complex bundle or collection of distinct flow items across a single interface channel.
- Typing Classifier: Typed exclusively by a
«flowSpecification». - Symbol: SysML 1.2 draws a non-atomic flow port with two open arrowheads facing away from each other (
< >) inside the square, because the direction of each item is declared by the flow properties of the typing flow specification. - Exam Constraint: A non-atomic flow port can never be typed by a simple value type or block.
Flow Specifications and Conjugate Flow Ports
A Flow Specification is a specialized classifier stereotyped as «flowSpecification» defined on a BDD. It acts as an interface definition for non-atomic flow ports.
Anatomy of a Flow Specification
Inside a «flowSpecification» box on a BDD, flow properties are listed within the compartment labeled flowProperties. A flow specification may own only flow properties; it cannot own operations or receptions. Each property declares:
- A direction (
in,out, orinout) - A property name
- A typing classifier
+-----------------------------------------------+
| «flowSpecification» |
| AvionicsBus |
+-----------------------------------------------+
| flowProperties |
| in flightCommands : CommandPacket |
| out telemetryData : TelemetryPacket |
| inout busClock : Frequency |
+-----------------------------------------------+
Conjugation and the Tilde (~) Operator
When two components communicate across a bus typed by AvionicsBus, they cannot both have identical in and out ports. If both sides declared out telemetryData, they would transmit toward each other with no receiver, resulting in an interface mismatch.
To solve this cleanly without forcing the modeler to create two mirrored flow specifications, SysML introduces conjugate flow ports:
- Notation: Indicated by prefixing the flow specification name with a tilde (
~), such as~AvionicsBus. - Older Notation: SysML 1.2 also describes a conjugated flow port drawn as a black-filled square with white text; its notation table marks that filled form as deprecated in favor of the
~prefix. In aflow portscompartment, a conjugated port can be marked{conjugated}. - Compartment Form: A block may list its ports in compartments instead of drawing squares:
flow portsentries use the formin | out | inout portName : portType(e.g.,in ac : ACVoltage), andstandard portsentries useportName : InterfaceName(e.g.,p1 : ITransCmd).
The Inviolable Rule of Conjugation
When a flow port is conjugated (~), the directions of all flow properties declared inside the typing flow specification are inverted:
Applying conjugation to AvionicsBus produces:
out flightCommands : CommandPacket(inverted fromin)in telemetryData : TelemetryPacket(inverted fromout)inout busClock : Frequency(remainsinout)
This guarantees that the regular port and the conjugated port fit together in perfect harmony.
Comprehensive Port Comparison Tables
Table 1: Standard Ports vs. Flow Ports
| Feature | Standard Port | Flow Port |
|---|---|---|
| Primary Purpose | Behavioral calls, operation execution, client-server | Transfer of matter, energy, or data |
| Origin | UML 2 (adopted by SysML) | SysML specification (v1.0-v1.2) |
| Typing Elements | Interface (or class) | ValueType, Block, Signal, or FlowSpecification |
| Directional Notation | No arrows inside port square; uses ball/socket lines | Internal arrows inside port square (in, out, inout) |
| Provided / Required | Ball (-O) = Provided, Socket (-() = Required | Handled via in, out, or flow spec conjugation (~) |
| Conjugation Available? | Uses complementary provided/required interfaces | Uses tilde (~) conjugation on flow specifications |
Table 2: Atomic Flow Ports vs. Non-Atomic Flow Ports
| Modeling Dimension | Atomic Flow Port | Non-Atomic Flow Port |
|---|---|---|
| Payload Capacity | Single, indivisible item | Complex bundle of multiple flow properties |
| Permissible Types | «valueType», «block», or «signal» | Strictly «flowSpecification» |
| Direction Marker | Arrow inside the square showing in or out (double-headed for inout) | < > symbol: two open arrowheads facing away from each other |
| Can It Be Conjugated? | No (direction is explicitly set on the port itself) | Yes (using ~ to reverse property directions) |
| Typical Use Cases | Fuel pipes, power wires, thermocouple readouts | Data buses (CAN, MIL-STD-1553, Ethernet), hydraulic loops |
Worked Engineering Scenario: Hybrid Spacecraft Power and Thermal Bus
Consider an earth-observation satellite architecture containing two primary parts:
-
PowerDistributionUnit(PDU):- Atomic Flow Port
solarIn: TypeDirectCurrent, directionin(arrow pointing inward). Receives raw electrical power from solar panels. - Atomic Flow Port
mainBusOut: TypeDirectCurrent, directionout(arrow pointing outward). Delivers regulated 28V DC power to internal electronics. - Standard Port
pduDiagnostics: Decorated with a solid ball representing the provided interfaceIPowerTelemetrywith operationsgetVoltage()andgetTemperature().
- Atomic Flow Port
-
FlightComputer(OBC):- Atomic Flow Port
powerIn: TypeDirectCurrent, directionin(arrow pointing inward). Connected toPDU.mainBusOut. - Standard Port
diagClient: Decorated with an open socket representing the required interfaceIPowerTelemetry. Connected toPDU.pduDiagnosticsin a ball-and-socket assembly. - Non-Atomic Flow Port
payloadBus: Typed by~PayloadDataBus(conjugated). Connected to the payload camera'sdataBusport (typed by regularPayloadDataBus). Telemetry flows into the OBC, while instrument commands flow out.
- Atomic Flow Port
Common Exam Traps & Pitfalls
- Trap 1: Ball-and-Socket Inversion: Remember: Ball = Provided (the block implements the functions), Socket = Required (the block needs the functions). An exam question will often describe a sensor reporting data and ask whether it exposes a ball or socket; if the sensor implements the read operation, its port displays a ball.
- Trap 2: Adding Arrows to Standard Ports: Standard ports never have directional arrows inside their squares. If a diagram shows a port with an internal arrow, it is a flow port, not a standard port.
- Trap 3: Typing Atomic Flow Ports with Flow Specifications: An atomic flow port can only be typed by a single block, signal, or value type. If an option claims an atomic flow port is typed by a
«flowSpecification», it is invalid. - Trap 4: Inverting
inoutProperties During Conjugation: When conjugating a flow specification with~, candidates often mistakenly thinkinoutproperties invert or disappear.inoutproperties remain completely unchanged asinout. - Trap 5: Flow Ports Calling Operations: Flow ports transmit data, physical matter, or energy; they do not invoke software operations or services. Service invocations belong exclusively to standard ports.
In SysML 1.2, what is the precise semantic effect of prefixing the flow specification of a non-atomic flow port with a tilde symbol (e.g., ~AvionicsBus)?
The port is marked as an asynchronous buffer that queues incoming messages during system initialization.
The port is designated as private, preventing internal peer parts from discovering its structural features.
The port is marked as optional, allowing the enclosing block to compile even if no connector binds to it.
The port is conjugated, inverting the direction of all in and out flow properties declared in the typing flow specification while leaving inout properties unchanged.
On an Internal Block Diagram, a modeler observes a port represented by a perimeter square from which a solid line extends, terminating in a solid filled circle ("ball" or "lollipop"). How should this visual notation be interpreted under SysML specification rules?
An atomic flow port that receives high-voltage electrical current from an external battery pack.
A standard port exposing a provided interface whose operations the owning block implements and makes available to other system elements.
A standard port exposing a required interface that depends on an external service implemented by a peer block.
A non-atomic flow port transmitting an encrypted bundle of multiplexed telemetry packets.
Which of the following modeling constructs is legally permitted to serve as the typing classifier for an atomic flow port in SysML?
A «valueType», «block», or «signal» representing a single, indivisible flow item.
Exclusively a «flowSpecification» containing multiple bundled flow properties.
A package namespace containing behavioral activity diagrams.
An uninstantiated association class defining relationship attributes.
Sections you finish are checked off in the contents.