Monday 11 November 2019

Rational Rhapsody Tip #69 - Timing diagrams in Rational Rhapsody (Simple)

In my effort to get to 100 Rhapsody tips and tricks video's this 8 min video is the first in a series covering the different diagram types in UML and SysML. I provide Rhapsody training for both systems and software engineers, focused on getting the best of the tool in different domains such as automotive, defence/aerospace and industrial real-time and embedded markets (www.mbsetraining.com). Timing Diagrams are a type of Interaction diagram in UML. They were first added in the major revision known as UML 2.0 (in 2005). The video shows both the compact and elaborated form of the diagram in Rhapsody. I use Rhapsody 8.4 here (2019). The compact form of the diagram was first added to Rhapsody in 8.0.5 (2013). The diagram is much like a sequence diagram on its side. Lifelines represent classifiers like classes/objects, actors or use cases. They show how the condition of the lifeline changes with respect to time. The sequence can be annotated to show both the messages or events that cause the conditions of the classifier to change over time, and observations or constraints about the time or duration in the sequence.
















Timing Diagrams are a Unified Modeling Language (UML) diagram. They were first added in the major revision known as UML 2.0 (in 2005). They are a type of interaction diagram.

To create a timing diagram right-click the project folder, then select Add New > Diagrams > Timing Diagram. On the New Diagram dialog specify whether the diagram should be a compact or elaborated timing diagram.

Compact timing diagrams were first added in 8.0.5 (2013). Elaborated Timing Diagram were first added in Rhapsody 8.1.2.

The diagram is much like a sequence diagram on its side. Lifelines represent classifiers like classes/objects, actors or use cases. You can set them to realize existing elements, or you can drag the existing element to the drawing area.

To draw an event or operation we need to bind it to a state invariant (condition marker). The state invariant shows the state of the lifeline. For example, here we’re showing the tap changing state from Off to On. You can also bind markers to existing states.

There are various annotations that can be used. For example timeouts.

Of, course, we can also access common tools like Requirements. E.g the tap will turn off automatically after 10s.

The time axis settings can be changed in the General tab of the diagram. The General tab settings here are persisted as properties.

The default display options can therefore be set up in profiles or stereotypes with desired settings.

You can use the property TimingDiagram::General::DefaultDiagramForm at Project level or in a Profile to specify the selected default diagram type.

When using elaborated timing diagrams, you add and remove state invariants by right-clicking the rectangle at the beginning of the lifeline and selecting Manage Invariants... from the popup menu.

The are various types of annotation. To add a duration constraint or duration observation, Rhapsody adds duration brackets around the event. Add the necessary time measurements. For constraints, add a minimum and maximum time; for observations, add a single unit of observed time.

To add a timing constraint or timing observation, Rational Rhapsody adds brackets around the event. Add the necessary time measurements. For constraints, add a minimum and maximum time; for observations, add a single unit of observed time.

To add a lifeline destruction event, on the drawing palette, click the Destruction event icon, then click the end of the lifeline.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.