Goal. Build the shared catalogue of interfaces, messages, handlers, and the wiring that connects them on the device diagram. The vocabulary defined here is what the components in UC-3 use to talk to each other and to the outside world.
Scenarios. Adding interfaces, messages, and message parameters; adding handlers, their functions, and the function parameters; the three wiring patterns on the device diagram (component to interface, handler to interface, component to handler); adjusting the direction or length of a connection; and the rename and delete paths for shared interfaces and messages.
scenario4.1Add an interface
#
Precondition. The editor is open, in either view.
Sequence.
- The User clicks the
+ button in the Interfaces list header.
- A dialog asks for Name (identifier-safe, unique among interfaces) and optional Description.
- The User confirms. The new interface appears in the Interfaces list and is automatically selected, so the User can immediately add its first message.
Postcondition. The new interface is available in the Interfaces list across all components. It does not appear on the device diagram until at least one connection is wired to it.
scenario4.2Add a message to an interface
#
Precondition. Exactly one non-default interface is selected.
Sequence.
- The User clicks the
+ button in the Messages list header.
- A dialog asks for Name (identifier-safe, unique within the parent interface) and optional Description.
- The User confirms. The new message appears in the Messages list under the selected interface.
Postcondition. The new message is available for use in transitions of any component.
scenario4.3Add a message parameter
#
Precondition. Exactly one non-default message is selected. The Parameters panel below the Messages list is visible.
Sequence.
- The User clicks the
+ button in the Parameters panel header.
- A dialog asks for Name (identifier-safe, unique within the message), optional Type (free text; autocompletes against the defined type names), and optional Description.
- The User confirms. The new parameter appears in the Parameters panel, in alphabetical order.
Postcondition. The parameter is shown as name : type — description. It is documentation only — it never reaches the generated PlantUML — but it appears in the spec export's message table and can be the target of three-segment backtick references like Iface:Msg:Param.
scenario4.4Edit a message parameter
#
Precondition. Exactly one non-default message is selected, and exactly one of its parameters is selected in the Parameters panel.
Sequence.
- The User clicks the
✎ button on the parameter row (or presses Enter).
- The dialog opens with the existing Name, Type, and Description values. The User edits them and confirms.
- If the Name changed, every three-segment backtick reference
Iface:Msg:Old in the diagram's prose is rewritten to point at the new name (with the limitation noted in Scenario 9.6 for the action-context shorthand).
Postcondition. The parameter reflects the edits. References to it elsewhere in the diagram are consistent (with the shorthand exception noted above).
scenario4.5Add a handler
#
Precondition. The editor is open, in either view.
Sequence.
- The User clicks the
+ button in the Handlers list header.
- A dialog asks for Name (identifier-safe, unique among components and handlers) and optional Display name. Handlers do not have a Multiplication field, and the Handler's Description is edited via the Description panel (see Scenario 8.2) — not in this dialog.
- The User confirms. The new handler appears in the Handlers list with no functions and no description yet.
- Auto-switch to Device view. If the editor was in Component view, Stadiæ switches to Device view automatically — handlers only show on the device diagram, and the User will want to see what was just added.
Postcondition. The new handler appears in the Handlers list and on the device diagram. The built-in TimerHandler remains muted and locked from edits.
scenario4.6Add a handler function
#
Precondition. Exactly one non-default handler is selected. The Functions list is visible and shows that handler's existing functions.
Sequence.
- The User clicks the
+ button in the Functions list header.
- A dialog asks for Name (identifier-safe, unique within the handler) and optional Description.
- The User confirms. The new function appears in the Functions list.
Postcondition. The handler exposes a new function. It has no parameters yet (see Scenario 4.8 to add them). The function is documentation only — it never reaches the generated PlantUML — but it appears in the spec export's handler chapter.
scenario4.7Edit a handler function
#
Precondition. Exactly one function is selected in the Functions list of a non-default handler.
Sequence.
- The User clicks the
✎ button on the function row (or presses Enter).
- The dialog opens with the existing Name and Description. The User edits them and confirms.
- If the Name changed, every backtick reference
Handler:Old in the diagram's prose is rewritten, plus any bare Old references inside the owning handler's own description.
Postcondition. The function reflects the edits. References to it elsewhere in the diagram are consistent.
scenario4.8Add a handler-function parameter
#
Precondition. Exactly one function is selected in the Functions list of a non-default handler. The Parameters panel below the Functions list is visible.
Sequence.
- The User clicks the
+ button in the Parameters panel header.
- A dialog asks for Name (identifier-safe, unique within the function), optional Type (free text; autocompletes against the defined type names), and optional Description.
- The User confirms. The new parameter appears in the Parameters panel, in alphabetical order.
Postcondition. The parameter is shown as name : type — description. Like the function itself, it is documentation only and appears in the spec export's handler chapter.
scenario4.9Edit a handler-function parameter
#
Precondition. Exactly one function is selected, and exactly one of its parameters is selected in the Parameters panel.
Sequence.
- The User clicks the
✎ button on the parameter row (or presses Enter).
- The dialog opens with the existing Name, Type, and Description values. The User edits them and confirms.
- If the Name changed, every three-segment backtick reference
Handler:Function:Old in the diagram's prose is rewritten.
Postcondition. The parameter reflects the edits. References to it elsewhere in the diagram are consistent.
scenario4.10Wire a component to an interface
#
Precondition. The editor is in Device view. The component and the interface both exist (the interface is non-default — Timer and Logical aren't wired explicitly).
Sequence.
- The User selects exactly one Component and one non-default Interface — in the Components and Interfaces lists or directly on the canvas. Nothing else is selected.
- The User clicks the Add Connection toolbar button.
- Multiplication check. If the component carries a multiplication marker (e.g.
N) and the interface is already wired to a different multiplied component, Stadiæ refuses with an error dialog naming the other multiplied component, and the use case ends. (At most one multiplied component per interface.)
- Otherwise a new wiring line is drawn between the component and the interface, pointing to the right by default. The device diagram updates to show it. If the component is multiplied, the interface is wrapped in the same multiplication rectangle on the diagram and its label gets a
[] suffix.
Postcondition. The device diagram shows the new wiring line. If the same interface also has a Handler wired to it, the Component-side line is drawn with an arrowhead pointing at the Component — Stadiæ infers from the topology that the Handler is the sender on that interface and the Component the receiver.
Failure mode. Multiplication invariant violation (step 3) — the User must remove the conflicting connection or change one of the multiplications before retrying.
scenario4.11Wire a handler to an interface
#
Precondition. The editor is in Device view. The handler and the interface both exist (the interface is non-default).
Sequence.
- The User selects exactly one Handler and one non-default Interface — in the Handlers and Interfaces lists or directly on the canvas. Nothing else is selected.
- The User clicks the Add Connection toolbar button.
- A new wiring line is drawn between the handler and the interface, pointing to the right by default. By being on this interface the handler is implicitly declared as the sender of the interface's messages — components wired to the same interface are the receivers.
Postcondition. The device diagram shows the new wiring line. Any Component–Interface lines on the same interface gain an arrowhead pointing at the Component (the Handler is now the inferred sender; the Components are receivers).
scenario4.12Wire a component to a handler (call dependency)
#
Precondition. The editor is in Device view. The component and the handler both exist. The User wishes to record that the component calls one or more of the handler's functions directly (not via an interface).
Sequence.
- The User selects exactly one Component and one Handler — in the Components and Handlers lists or directly on the canvas. Nothing else is selected.
- The User clicks the Add Connection toolbar button.
- A new call-dependency line is drawn from the component to the handler, pointing to the right by default.
Postcondition. The device diagram shows the new line. The dependency is documentation only — it doesn't change which functions the component can reference from action text (any handler function can already be referenced by qualified name; this line just makes the relationship visible on the device diagram and in the spec export's component context diagram).
scenario4.13Adjust connection direction or length
#
Precondition. Exactly one connection (Component–Interface, Handler–Interface, or Component → Handler) is selected on the device canvas.
Sequence.
- The User opens the Connection Properties dialog by pressing
Enter. Or the User uses the arrow-key shortcut: ← → ↑ ↓ change the connection's direction directly without opening the dialog.
- In the dialog, the User picks one of Right / Left / Up / Down and for Up and Down sets a Length (number of dashes). The User confirms.
- Repeated
↑ or ↓ keystrokes via the shortcut path extend the length by one dash each press, with undo coalescing — the entire keystroke run is one undo step.
Postcondition. The device diagram shows the connection in the new direction and length.
scenario4.14Delete a connection or a wiring entry
#
Precondition. One or more connections or wiring entries are selected on the device canvas (or in the Components, Handlers, or Interfaces lists).
Sequence.
- The User presses
Delete (or Backspace).
- The selected wiring lines are removed from the device diagram. Interfaces left without any wiring disappear from the canvas (they remain in the Interfaces list).
Postcondition. The selected connections are gone. State machines and their transitions are unaffected, but the wiring-vs-usage warning device may now flag interfaces as unwired.
scenario4.15Rename a shared interface
#
Precondition. Exactly one non-default interface is selected.
Sequence.
- The User clicks
✎ (or presses Enter).
- The dialog opens with the existing Name and Description. The User edits them and confirms. Stadiæ rejects the change if the new Name isn't a valid identifier or clashes with another interface.
- If the Name changed, Stadiæ rewrites every backtick reference to the old name across the diagram's prose (qualified
OldIface:Member and bare OldIface), then renames the interface. Transitions in every component and the wiring on the device diagram follow automatically.
Postcondition. The interface has its new name. References in prose, transitions, and wiring are consistent. A single Ctrl+Z reverses the rename together with the prose rewrites.
scenario4.16Rename a message
#
Precondition. Exactly one non-default message is selected.
Sequence.
- The User clicks
✎ (or presses Enter).
- The dialog opens with the existing Name and Description. The User edits them and confirms. Stadiæ rejects the change if the new Name isn't a valid identifier or clashes with another message of the same interface.
- If the Name changed, Stadiæ rewrites every backtick reference
Iface:Old and every parameter reference Iface:Old:Param in the diagram's prose, then renames the message. Every transition that used the message follows automatically.
Postcondition. The message has its new name. References in prose and transitions are consistent.
scenario4.17Delete a shared interface
#
Precondition. Exactly one non-default interface is selected.
Sequence.
- The User clicks
− (or presses Delete).
- Stadiæ asks for confirmation. The User confirms.
- The interface is removed from the Interfaces list. Cascades:
- Every message under the interface disappears.
- Every transition that used those messages drops the message row; if a transition arrow is left with no messages, the arrow itself disappears (except for the initial transition, which is allowed to have no messages).
- Every wiring line on the interface (component-side or handler-side) is removed from the device diagram.
- Backtick references to the deleted interface or any of its messages or parameters become unresolved.
Postcondition. Lists, diagrams, and Transitions tables are consistent across the diagram.
scenario4.18Delete a message
#
Precondition. Exactly one non-default message is selected.
Sequence.
- The User clicks
− (or presses Delete).
- Stadiæ asks for confirmation. The User confirms.
- The message is removed from the Messages list. Cascades:
- Every transition that used the message drops the message row; if an arrow is left with no messages, the arrow itself disappears (except for the initial transition).
- Backtick references to the deleted message or its parameters become unresolved.
Postcondition. The message is gone. Transitions tables and state-machine diagrams reflect the change.