Need Types¶
sphinx-need-sysml registers 27 SysML need types with sphinx-needs: 14 structural / behavioral / requirement types from the initial release, plus 13 additional types added in feature 002 to support state-machine, activity, sequence, use case, package, parametric, and allocation diagrams. Each type has a unique ID prefix, color, and style.
Structural Types¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
PartDef |
|
A block/part type definition (e.g., Engine, Vehicle) |
|
Part |
|
An instance/usage of a PartDef |
|
PortDef |
|
A typed port definition |
|
Port |
|
A port usage on a Part |
|
InterfaceDef |
|
A connection interface type |
|
Interface |
|
An interface usage |
|
ConnectionDef |
|
A typed connector definition |
|
Connection |
|
A connector instance |
Behavioral Types¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
ActionDef |
|
A behavioral action type |
|
Action |
|
An action usage |
|
StateDef |
|
A state type |
|
StateUsage |
|
A state usage |
Requirement Types¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
RequirementDef |
|
A requirement type definition |
|
Requirement |
|
A requirement usage/instance |
New in v0.3 — State-Machine¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
Transition |
|
A directed transition between two states |
New in v0.3 — Activity¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
ControlFlow |
|
A control-flow edge between two actions |
|
ObjectFlow |
|
A data-flow edge between two actions |
New in v0.3 — Package¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
Package |
|
A package container |
|
Dependency |
|
A directed package dependency |
New in v0.3 — Use Case¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
UseCase |
|
A user-facing use case |
|
Actor |
|
An external actor |
New in v0.3 — Sequence¶
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
Lifeline |
|
A sequence-diagram lifeline |
|
Message |
|
A message between two lifelines |
New in v0.3 — Parametric (v1.1 diagrams pending)¶
The element types below register in v0.3 so models can declare them, but the rendered parametric diagram ships with v0.4.
Directive |
Title |
ID Prefix |
Description |
|---|---|---|---|
|
ConstraintBlock |
|
A mathematical constraint definition |
|
ConstraintParameter |
|
A typed slot on a ConstraintBlock |
|
ValueProperty |
|
A quantitative attribute of a part |
|
BindingConnector |
|
A binding between a parameter and a value property |
Extra Fields¶
All need types share the following extra fields:
Field |
Type |
Description |
|---|---|---|
|
boolean |
Whether this element is abstract |
|
string |
Parent element ID (enables hierarchy traversal) |
|
string |
UML multiplicity notation (e.g., |
|
string |
Port direction: |
|
boolean |
Whether this port type is conjugated |
|
string |
ID of the Def type this usage instantiates |
|
string |
Comma-separated need IDs this element satisfies |
|
string |
Comma-separated need IDs this requirement refines |
|
string |
Comma-separated need IDs allocated to this element |
|
string |
Need ID of the source Port for a connection |
|
string |
Need ID of the target Port for a connection |
|
boolean |
Whether this is the initial state |
|
boolean |
Whether this is the final state |
Usage Example¶
.. partdef:: Engine
:id: PD-001
:abstract: false
Engine block definition.
.. part:: V8 Engine
:id: P-001
:owned_by: PD-001
:definition: PD-001
:multiplicity: 1
A V8 engine instance.