Table of Contents Previous Chapter 3 Editing MSC Diagrams

3 Editing MSC Diagrams

The MSC Editor is the tool with which you create the Message Sequence Charts, and edit the graphical and textual contents of these MSCs. The MSC Editor provides several windows where you can see the contents of your diagrams. This chapter describes how to work with the MSC Editor. For a reference manual, see chapter 25, The MSC Editor.

General

Editing Functions

The Message Sequence Chart Editor is the graphical tool that you use to create, edit, print and store MSCs. The Message Sequence Chart Editor is integrated with the SDL tools which are included in SDT. This integration provides, among other things, the facility of including MSCs into SDL systems.

The basic editing functionality that the MSCE provides can be summarized as:

Tracing a Simulation

The Message Sequence Chart Editor can also used as a graphical trace tool, which enables the automatic generation of a Message Sequence Chart from a simulation. The results of the simulation will be presented in an MSC Editor window, in which each event of interest will be appended to the chart in order to build up a chart which reflects the history of the simulation. The results of a simulation can be saved in MSC-PR form and reread by the MSC Editor.

The commands that start up the logging of MSC events, set up the scope of trace, stop the logging of events, and so on, are given to the simulator. See chapter 7, Simulating a System.

Validating a System

An MSC can be used as a means to express the requirements on an SDL system. With the MSC Editor and the Validator, SDT provides a powerful validation environment. The basic idea is to draw a Message Sequence Chart using the MSC Editor and then use the Validator to check if there is a possible execution path for the SDL system that satisfies the MSC.

The commands that validate a system are given to the validator. See chapter 8, Validating a System.

Compliance with MSC Rules

MSC Diagrams

The MSC Editor supports virtually all of the ITU language definition for MSCs. All the elements defined in the recommendation Z.120 are supported.

Some extensions have been included in order to provide a tool that is even more powerful when used in the SDT environment, allowing to express a graphical trace in a more intuitive way:

Pagination

MSCs cannot be split into multiple pages in the same way as SDL diagrams. However, if your MSC requires more than one sheet of paper when printing it out, the MSC Editor takes care of splitting the chart into multiple parts to print on separate sheets of the paper size you have specified. You set up the printer pages with The Preference Manager. You can use the Window Options menu choice from the View menu to show the page boundaries on the screen.

Each part of a multiple-part chart can be printed with adjacent page markers to assist you in making up the complete chart. This feature (which is not supported by the ITU Z.120 recommendation) is by default disabled and must be set as a preference.

Syntax Rules at Editing Time

Some of the MSC syntax rules are enforced during edit when you append symbols and lines to your MSC. These rules determine:

This syntax checking cannot be disabled. No syntax checking on text attributes takes place.

Starting the MSC Editor

Before you can start the Message Sequence Chart Editor, you must start the SDT Organizer. (See chapter 22, The SDT Organizer.) In the Organizer, MSCs are handled as references, which you can add and remove from the Organizer Associated Documents Area.

There are a number of ways of starting the MSC Editor:

Starting on an Existing MSC

In this topic, various ways of starting the MSC Editor on existing MSCs are described.

Starting on an Existing MSC Icon

To start the MSC Editor on an existing MSC which is managed by the Organizer, perform the following steps:

  1. In the Organizer Associated Documents Area, locate the icon that represents the MSC of your choice. Select that icon.
  2. To start the MSCE, you have the following options:
  3. After a few seconds, the MSCE responds by issuing its window (see "The MSC Editor Window" on page 1301 in chapter 25, The MSC Editor), then the current MSC data is read from file and the viewport will be positioned at the upper left portion of the chart.

Starting on an Existing MSC, not Managed by the Organizer

To start the MSC Editor on an existing diagram that is not managed by the Organizer (i.e. not contained in the Organizer Associated Documents Area) you must first include it into the Organizer, before the MSC Editor can be started.

To include an existing MSC into the Organizer:

  1. Select the Organizer's Add Diagram command from the Edit menu. A dialog is issued:
    Figure 76 : Adding an MSC 
    -----
    (fig)  
           
    -----
    
  2. Click the Add & Connect button. An SDT Connect Diagram is issued, prompting you to connect the MSC reference to a file on which the MSC is stored.
    Figure 77 : Connecting the MSC to a File. 
    -----
    (fig)  
           
    -----
    
You have the following options:

  1. If the checks passed without errors, the MSC is added to the Organizer's Associated Documents Area, the MSC Editor is started and displays the upper left corner of the MSC.

Starting on a New (Nonexisting) MSC

This operation denotes how to start the MSC Editor when no MSCs are available.

You should perform the following steps:

  1. Add a reference to an MSC using the Organizer's Add Diagram menu choice.
    Figure 80 : Adding an MSC. 
    -----
    (fig)  
           
    -----
    
  2. Click the Add button in the Add Diagram dialog. A new MSC Icon appears in the Associated Documents Area in the Organizer. The MSC has the status [unconnected], the connection will be established when saving the MSC (see "Saving a Newly Created MSC" on page 170).
    Figure 81 : Having Added a Reference to a Non-Existing MSC. 
    -----
    (fig)  
           
    -----
    
  3. Operate the Edit Diagram menu choice from the Organizer's Edit menu (see step 2. on page 160).
  4. Make sure the New radio button is on (see Figure 82). Click the New button.
    Figure 82 : Editing a nonexisting MSC 
    -----
    (fig)  
           
    -----
    
  5. This terminates the operation. The MSC Editor issues its window, displaying an empty diagram with the name assigned in the Organizer. The MSC icon changes its status from [unconnected] to [unsaved].
    Figure 83 : The MSC Edit has Opened the MSC - Status Unsaved. 
    -----
    (fig)  
           
    -----
    

Exiting the MSC Editor

To exit the MSC Editor:

  1. Select the Exit command from the File menu. If the MSC Editor holds any MSC that has been modified but not saved, a dialog is issued, prompting you to save the changes before the application terminates:
    Figure 84 : The MSC Editor Exit Dialog. 
    -----
    (fig)  
           
    -----
    
  2. The dialog informs you about the name of the diagram in turn to be saved. Depending on what if you want to save the changes or not:

Managing Message Sequence Charts

MSCs are created using the MSC Editor. Once a MSC has been created, you may include it into the structure that is managed by the Organizer tool in order to take full advantage of the functionality that SDT provides. MSCs can however be handled as separate entities.

In this section you can read about how to perform the following operations with SDT:

Creating an MSC

Below are described the two ways to create MSCs:

Creating an MSC from the MSC Editor

To create an MSC from the MSC Editor:

Creating an MSC from the Organizer

The procedure is identical to Starting on an Existing MSC, not Managed by the Organizer, previously described on page 160.

Renaming an MSC

This action denotes changing the name and possibly the type of an MSC. The name and type of an MSC is reflected in the MSC Heading Symbol.

To change the name of an MSC:

  1. Make sure the MSC being displayed in the MSC Editor window is the MSC you want to rename.
  2. Select the Rename command from the Edit menu. A dialog is issued.
    Figure 85 : Renaming an MSC. 
    -----
    (fig)  
           
    -----
    
  3. Click the Rename button to apply the new name and type. The MSC is renamed accordingly and the MSC Heading Symbol is updated.

Opening an MSC

Opening an MSC is possible from the MSC Editor or from the Organizer.

Opening an MSC File from the MSC Editor

To open an MSC file from the MSC Editor:

  1. Select the Open command from the File menu.
    ---------------------------------------------------------
    (fig)  
  2. Alternatively, click the quick button for Open. ---------------------------------------------------------
  3. The menu choice issues a Standard File Selection Dialog (see Figure 86) The general properties of the file selection dialog are described in chapter 21, The SDT Graphical User Interface.
    Figure 86 : Opening a File from the MSC Editor. 
    -----
    (fig)  
           
    -----
    
To select a file to open:

Using the Filter Field

The filter field is set to *.m?? by default. This matches the default file extensions that we recommend for MSCs. However, SDT does not force you to use these default file extensions.

Opening an MSC-PR File

To open an MSC-PR file (a file containing an MSC stored using the Z.120 textual format), you should filter using the *.mpr file extension.

----------------------------------------------------------------
Note:  SDT and instance orient MSC-PR                             
Only event-oriented MSC-PR can be read by the tool. Instance ori  
ented MSC-PR cannot be read by the tool.                          
----------------------------------------------------------------

Opening an MSC from the Organizer

To open an MSC from the Organizer:

  1. In the Organizer Associated Documents Area, locate the icon that represents the MSC of your choice. Select that icon.
  2. To open the MSC, you have the following options:

Saving an MSC

There are several ways to save an MSC. The effect is of saving any changes made to either one specific MSC, or all MSCs modified during the current session.

Saving an MSC can also be performed in conjunction to closing the diagram or exiting the MSC Editor. See "Closing an MSC" on page 175 and "Exiting the MSC Editor" on page 164.

Saving an MSC in the MSC Editor

In the MSC Editor, a request to save should be made from the window showing the MSC to be saved (see "Transferring to an MSC" on page 176 for how to access and show a specific MSC) that is read by the MSC Editor.

To save an MSC:

Saving a Newly Created MSC

When an MSC that is not connected to any file (i.e. a newly created MSC) is to be saved, you need to specify a file to store the diagram on.

To save a newly created MSC:

  1. Select the Save command from the File menu. A Standard File Selection Dialog is issued (see Figure 88).
  2. Specify the file to save the diagram on.
  3. Click OK to confirm the file name and to save the MSC.
    Figure 88 : Saving a New MSC. 
    -----
    (fig)  
           
    -----
    

Saving All MSCs

A global save can be made of all the MSCs that are open in the current session, and that are modified.

To save all MSCs:

Saving an MSC i MSC-PR Format

SDT allows you to save an MSC in the MSC-PR format. See "Generating MSC-PR (Textual Format)" on page 235 for how to do this.

Appending an MSC Reference to the Organizer

To append an MSC Reference to the Organizer:

  1. Select the Organizer's Add Diagram command from the Edit menu. A dialog is issued:
    Figure 89 : Adding an MSC 
    -----
    (fig)  
           
    -----
    
  2. Click the Add button. An SDT Connect Diagram is issued, prompting you to connect the MSC reference to a file on which the MSC is stored.
    Figure 90 : Connecting the MSC to a File. 
    -----
    (fig)  
           
    -----
    
  1. If the checks passed without errors, the MSC is added to the Organizer's Associated Documents Area, sorted alphabetically.

Saving a Copy of an MSC

The MSC Editor allows you to save a copy of an MSC that you are working on.

Continuing Working with the New Copy

To save a copy of an MSC and continue working with the new copy:

  1. Select Save As from the File menu. A Standard File Selection Dialog is issued.
  2. Click the OK button to confirm. The MSC is copied to the specified file, the file containing the original is closed, and the window from where the save was made remains open for editing the newly created file.

Continuing working with the original

To save a copy of an MSC and continue working with the original:

  1. Select Save As from the File menu. A Standard File Selection Dialog is issued.
  2. Click the OK button to confirm. The MSC is saved on the specified file, and the window with the file from where the save was made remains open for editing.

Closing an MSC

Closing an MSC also means closing all instances of all windows displaying that MSC.

To close an MSC:

  1. Select the Close Diagram menu choice from the File menu. The command should be performed from the window showing the diagram to close.
  2. If modifications have been made to a diagram, an SDT Close dialog is shown providing the opportunity to save the modifications before closing the diagram - see Figure 93 below.
    Figure 93 : Prompting to Save an MSC when Closing it. 
    -----
    (fig)  
           
    -----
    

Printing an MSC

The MSC Editor supports printing one MSC at the time, or a selection of objects contained in an MSC. A number of options are available for customizing the resulting printout.

How to print an MSC is described in chapter 4, Printing Information, on page 263.

Transferring to an MSC

This section describes how to transfer to an MSC that is currently read by the MSC Editor. (The MSC that you would like to see may reside in a window which is not on top of the screen.)

The Diagrams menu menu shows all MSCs (up to a maximum of the last nine to have been opened). If more than nine MSCs are open, a tenth menu choice, List All, provides access to a list dialog where all MSCs currently opened are listed.

To transfer to one of the MSCs opened by the MSC Editor:

  1. Click Diagrams to bring down the menu showing the MSCs.
  2. Then, select the required MSC (each menu choice identifies the MSC by its name followed by the file the MSC is stored on). The window containing the page is instantly displayed.

Rearranging an MSC

The MSC Editor has the ability to rearrange an MSC in order to apply a nicer appearance or to extract a subset of the instances that you are interested in. The following topics are discussed:

Resizing an MSC

There are two ways an MSC can be resized:

Resizing Automatically

When appending objects with the double-click facility, the Message Sequence Chart Editor will automatically enlarge the MSC size when the MSC has grown so that it reaches the bottom or right of the drawing area. The drawing area is enlarged according to the value of a preference parameter.

Resizing Manually

If the current size of an MSC is not adequate, you can resize it with a command.

To resize an MSC manually:

  1. Make sure the MSC Editor is displaying the MSC you want to resize. If not, transfer to the appropriate MSC (see "Transferring to an MSC" on page 176).
  2. From the Edit menu, select the menu choice Drawing Size. A dialog appears:
    Figure 95 : Resizing an MSC. 
    -----
    (fig)  
           
    -----
    
  3. Type in the new width and height for the MSC. You must type in values within the allowed range.
  4. Click OK to apply the new size. The MSC is resized accordingly.

Changing the Spacing (Grid)

When the MSC Editor layouts an MSC, it makes use of a horizontal and vertical spacing parameter that affect the total height and width of the MSC. All instances and events on instances are positioned with an integer multiple of the spacing parameters.

To change the spacing:

  1. Make sure the MSC Editor is displaying the MSC on which you want to apply a new spacing. If not, transfer to the appropriate MSC (see "Transferring to an MSC" on page 176).
  2. From the Edit menu, select the Spacing command. The Spacing dialog is issued:
    Figure 96 : Adjusting the Spacing Parameters. 
    -----
    (fig)  
           
    -----
    
  3. Drag the sliders for a coarse adjustment. Click left or right on the slider bar for a fine adjustment.
  4. Apply the new spacing parameters by clicking OK. The MSC is redrawn, using the new spacing parameters for positioning of objects.

Tidying up (Reorganizing) an MSC

The MSC Editor can reform and redraw an MSC for you, so that you don't need to spend a large amount of time on the tedious task of rearranging the layout.

To tidy up an MSC:

  1. Make sure the MSC you want to rearrange is the one currently being displayed in the MSC Editor.
  2. From the Tools menu, select the Tidy Up command. A dialog is issued.
    Figure 97 : Tidying Up an MSC. 
    -----
    (fig)  
           
    -----
    
  3. Adjust the horizontal and vertical spacing to the values of your choice by dragging the sliders (for a coarse adjustment) or clicking left or right on the slider bar (for a fine adjustment).
  4. Select the desired grouping mode for the adjustment of dynamically created instances in relation to their parent instances.
  1. When the options are adjusted, click the Tidy Up button. The editor compresses and reorders the information in the diagram, as if you had redrawn the MSC using the double-click facility when positioning all objects.
    ---------------------------------------------------------------
    Caution!                                                         
    Tidying up an MSC cannot be undone. The appearance of the origi  
    nal diagram may become modified to a large extent.               
    ---------------------------------------------------------------
    

Filtering an MSC

Having created an MSC, you may be interested in some of the instances only (this is in particular true when you have generated an MSC when tracing a simulator). The MSC Editor can filter a diagram for you.

To filter an MSC:

  1. Make sure the MSC you want to filter is the one currently being displayed in the MSC Editor.
  2. Select the Filter menu choice from the Tools menu. The Filter dialog is issued.
    Figure 101 : Filtering an MSC. 
    -----
    (fig)  
           
    -----
    
  3. Select the instances to be included in the new MSC from the Include Instance list.
  4. You can restrict the types of objects to be included in the new MSC by turning their corresponding toggle buttons off. By default, all types of objects are included.
  5. Click the Filter button. The MSC Editor filters the source diagram and produces a new, unsaved MSC. The resulting MSC is rearranged as if you had applied the Tidy Up command.
Example 5 : Filtering an MSC.  
Figure 102 : The Original Unfiltered Diagram. 
-----
(fig)  
       
-----
Filtering the diagram with Instance_1 and Instance_2 selected in the Include Instance list results in Figure 103 on page 185:

Figure 103 : The Filtered Diagram. 
-----
(fig)  
       
-----

Managing Windows

Each MSC Editor window shows one MSC. The MSC Editor is a multi-window tool, allowing you to open new windows on a diagram and close windows that are no longer needed.

A newly opened window is a mirror image of the window from which the selection to open a window was made. Multiple windows may be opened (one at a time) and are all the same as the original. Any subsequent modifications made will reflect the same in either the original window, or any of the newly opened window(s). This option affords the possibility of viewing in more than one window, and can ideally be used in conjunction with the scaling factor when looking at a detailed MSC.

The window managing functions you can perform are:

Opening a New Window

To open a new window:

  1. Go to the window from which you want to open a window.
  2. Select New Window from the Window menu. The replicated window is opened almost instantaneously, and its screen position is offset from the window from where it was activated.
This command overrides the Always new Window option of the Editor Options dialog from the View menu, when it is toggled to the off position.

Closing a Window

To close a window:

  1. Go to the MSC Editor window you wish to close.
  2. Select Close Window from the Windows menu.

Hiding and Showing Parts of the MSC Editor Window

The various component parts of the MSC Editor window can be shown or hidden as required. If they are hidden, it increases the drawing area available to be used in the creation or modification of a diagram.

All the available options for hiding and showing parts of the window can be found in the dialog box accessed via the Window Options command on the View menu - see Figure 392 on page 1331. All of these options can also be set as preferences.

This page intentionally left blank

 
Table of Contents Next Chapter