![]() |
![]() |
![]() |
![]() |
![]() |
Managing Message Sequence Charts
Besides the SDL tools, SDL Suite and TTCN Suite also support the Z.120 recommendation, also known as Message Sequence Charts (MSC). You should have a basic understanding of MSC symbols to fully understand this exercise.
In this tutorial we will demonstrate some application areas of MSCs.
- First, an MSC may be used for describing the requirements on the dynamic behavior of a system, viewed as a "black box" which receives external stimuli (corresponding to SDL signals issued from the environment) and respond by sending SDL signals to the environment.
- MSCs may also help you to understand a problem, by offering a way of presenting, in graphical form, some use cases which have been identified, before proceeding with the design in SDL.
- Generating MSCs as the result of a simulation of a system also provides a mean to understand the dynamic behavior and verify it against the expected behavior.
- Finally, MSCs can be input to an SDL Explorer where you can verify that the scenario that the MSC is describing may actually occur and under what circumstances.
What You Will Learn
Inserting an MSC into the Organizer
To create an MSC, you use the Organizer, where the MSC will be managed as an Other Document. In this exercise, we will create an MSC where you will describe the dynamic behavior of the system DemonGame. You will also use this MSC as a reference when simulating and validating the system (this is done in later exercises).
- Select the Organizer chapter Other Documents.
From the Edit menu, select the command Add New, or click the quick button for this.
- The Add New dialog is opened, prompting you to specify a diagram name and type.
- Adjust the dialog options as in Figure 78 above:
- Click the OK button. An MSC icon appears in the Organizer's Other Documents chapter; the lower part of your Organizer window should look like Figure 79, once the MSC Editor is started (you may have to raise the Organizer window if the MSC Editor covers it).
- The MSC you have inserted into the Organizer is intended to describe the behavior of the system and you will associate it with the system diagram. The association will be visible in the Organizer.
- Make sure the MSC icon is selected and select the Associate command from the Edit menu. A dialog is displayed.
- Select the system DemonGame item in the list and click OK.
- Look at the resulting Organizer structure. In addition to the MSC icon in the Other Documents chapter, an MSC Link icon appears, connected to the system diagram icon. If you select it, the Organizer's status bar informs you about the link to the actual MSC.
Editing an MSC
- Raise the MSC Editor window for the newly added MSC symbol. The window of the MSC Editor looks similar to the SDL Editor window, but provides of course a different symbol menu and different set of commands and quick-buttons.
Your next task is to use the MSC Editor to create the following diagram:
The MSC basically consists of four instances (the vertical lines starting with a rectangle), a number of messages (the horizontal lines ending with an arrow), a create process (the dashed horizontal line), a timer (the symbol starting with an hourglass and ending with an arrow) and two condition symbols (with the shape of a hexagon). You also find a text symbol, containing a textual comment in it.
How to Draw the MSC
We suggest that you draw the MSC as described below. If you are unsure what symbol in the symbol menu to use, select or point to a symbol and look at the description in the Status Bar.
- Start by entering the text symbol and fill in its contents. (This is done in the same way as with the SDL Editor).
- Then, insert the three instances with the instance name Environment, Main and Demon:
- To insert an instance, locate the instance head symbol in the symbol menu, select it and place it into the drawing area as shown in Figure 83; as soon as you insert an instance head, the MSC Editor automatically appends an instance axis (with an infinite length).
- Type in the text to assign the instance name (Environment, Main, Demon)
- To assign the instance kind (process Main, process Demon), select the small rectangle located immediately above the instance head symbol and type in the text.
- Once the three instances are added, insert the message Newgame:
- Select the message symbol in the symbol menu
- Move the pointer into the diagram. You will notice that a circle indicates a start position outside an instance axis.
- Click once on the instance axis Environment to define the start of the message.
- Move the pointer towards the instance axis Main. The message arrow follows the pointer, and a filled circle now indicates an end position outside an instance axis.
- Click a second time on the instance axis Main to specify the end of the message.
- Type in the name of the message (Newgame).
- If you are not satisfied with the placement of a message, you may move it up or down by dragging the mouse. You may also move only the start or end position of the message along the instance axis.
- The instance Game is dynamically created. To add Game, you use the create process symbol. You insert it in a similar fashion as a message:
- Select the create process symbol in the symbol menu.
- Click once on the instance axis Main to specify the source of the create process symbol.
- Click a second time to specify the location of the instance head. A process create and an instance head with its axis are inserted.
- Fill in the instance kind and instance name fields (after you have selected the instance head).
- If desired, you may move the instance head symbol.
- Continue by adding the first condition symbol to the instance axis Game:
- Add a timer to the instance axis Demon:
- Select the timer symbol in the symbol menu.
- Click once on the instance axis to specify the base of the timer symbol.
- Move the pointer downwards and click a second time on the same instance axis to locate the end of the timer (the end must reside below the source).
- Enter the name of the timer: T
- You may drag the start or endpoint to resize the timer symbol, if required. You may also drag the symbol to move it up or down.
- Insert the message Bump.
- Add the second condition symbol, Winning, to the instance axis Game.
- Add the remaining messages. The message Score also contains a parameter with the value 1. To enter the parameter value, select the lower of the two selection rectangles and type in the text 1.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |