Table of Contents Previous Chapter 2 Editing SDL Diagrams
This section describes the methods when performing the following tasks on SDL diagrams:
Diagrams can be created from within other diagrams. When created, they form part of the current active system in the SDL Editor, and their presence is instantly reflected in the Diagram Structure Area or Associated Documents Area of the SDT Organizer. This is achieved by inserting SDL diagram reference symbols.
Diagrams may also be created as separate unrelated new entities. They will however not be incorporated in the diagram structure of the Organizer.
Examples of both diagram creation methods is given below.
To create a related diagram from another diagram:
- Open the SDL diagram from where to start (see "Opening a Diagram" on page 44). Any page will do.
- Insert the SDL reference symbol.
- Assign the symbol the name of your choice. The symbol type and name must be unique within the SDL diagram; the SDL Editor performs this check for you.
- When deselecting the reference symbol, the Organizer's diagram structure is updated accordingly.
- Double-click the newly added reference symbol. SDT allows you to specify what action to perform. You have the option to
- Create a new buffer in the SDL Editor (i.e. create a new diagram), or
- Copy an existing file.
Select the option of your choice and click Edit.
- The SDL Editor will now create a new buffer, possibly a new window, and display the newly created diagram.
- You should save both the parent and the child diagram later on in your editing session, to make changes permanent.
Example 1 : An Organizer Structure.
As an example, in the Organizer diagram structure in Figure 8, a system is shown with only one block diagram.
Figure 8 : A Basic System shown in a Diagram Structure.
-----
(fig)
-----
Suppose the system diagram is being edited. We now add a new block reference symbol, name it Block_B and deselect it. The Organizer diagram structure becomes:
Figure 9 : Having added a Reference Symbol.
-----
(fig)
-----
SDT shows that the newly added reference symbol is not yet connected to any physical file with the [unconnected] identifier.
Now, double-click the Block_B symbol. (This can actually be done from within the SDL Editor or the Organizer, the two actions are the same). SDT prompts you to specify whether you want to create a new file or to connect the newly created block to an existing file.
Figure 10 : Creating a new Buffer.
-----
(fig)
-----
Make sure the New radio button is on and click Edit. A new dialog appears, where you are to specify the name of the first SDL page to add to the diagram (an SDL diagram must contain at least one SDL page).
Assign the page name of your choice (see "Adding a Page" on page 56 for more information the various options) and click OK.
A new block diagram with the name Block_B is created. The SDL Editor responds by issuing a window showing this diagram. Also, the Organizer's diagram structure is updated, showing the new diagram icon, inserted at the corresponding place in the SDL hierarchy.
Figure 11 on page 42 shows the result:
- A newly created diagram, empty except for the diagram heading
- The resulting diagram structure
To create a new, unrelated diagram:
- Select New from the the File menu in the menu bar of the SDL Editor and you are able to create every type of diagram shown in Figure 12.
Figure 12 : Creating a New Diagram.
-----
(fig)
-----
- Enter the required name of the new diagram in the Diagram Name field. The name should be in keeping with SDL naming conventions.
- Choose the type of diagram required from the selection available in diagram type menu. To see this menu, click on the Diagram Type button which will show the last type of diagram to have been created.
- When you have completed these actions, click on the New button. A new dialog box is shown inviting you to add a page, as each diagram must have at least one page. See the section "Adding a Page" on page 56 for this.
- The SDL Editor opens a window on the newly created diagram.
When a diagram has been created, it needs to be brought into the SDL hierarchy to be available for future selection in the Organizer. Otherwise, it will only be available by opening it from the SDL Editor (see "Opening a Diagram File from the SDL Editor" on page 44).
To insert a diagram into the SDL hierarchy:
- Create the diagram using the New command from the SDL Editor. Save the diagram on file (see "Saving a Diagram in the SDL Editor" on page 47).
- Open the diagram that will refer to the newly created diagram (see "Opening a Diagram" on page 44).
- In the diagram you just opened, add a diagram reference symbol with a type and name that matches the newly created diagram. A new icon appears in the Organizer diagram structure.
- With the Organizer Connect Diagram command, connect the new icon with the file on which the diagram is stored. See chapter 22, The SDT Organizer on page 1089 for a description of this command.
Once a reference symbol is placed in the newly created page of the new diagram in the SDL Editor, the SDT Organizer is updated to reflect this. This indicates that the SDL hierarchy is updated.
There are several ways of opening a diagram for editing, depending on where you are and what you need to access.
To open a file:
- The Open menu choice allows you to open a file. It is selected from the File menu.
---------------------------------------------------------
(fig)
- Alternatively, click the quick button for Open.
---------------------------------------------------------
The menu choice issues a Standard File Selection Dialog (see Figure 13). The general properties of the file selection dialog are described in chapter 21, The SDT Graphical User Interface.
Figure 13 : Opening a File from the SDL Editor.
-----
(fig)
-----
To select a file to open:
- Select the file of your choice in the files list and click OK. If you happen to select a file that is already opened by the SDL Editor, you will be notified with the following message:
Figure 14 : Attempting to Open an Already Opened File.
-----
(fig)
-----
---------------------------------------------------------------------
Note:
The status bar at the bottom the SDL Editor provides information
about the diagram type and name stored on the file which is selected
in the file list.
---------------------------------------------------------------------
The filter field is set to *.s?? by default. This matches the default file extensions that we recommend for SDL diagrams. However, SDT does not force you to use these default file extensions.
- If you have used other file extensions than the default, you should apply another suitable file filter and click the Filter button to bring these files into view. For a reference about default file extensions used by the SDL Editor, see the table in chapter 23, The SDL Editor, in section "Diagram Type" on page 1190.
It is also possible to open a diagram from the SDT Organizer.
To open a diagram, there are several methods:
- Select an SDL diagram icon or the text line next to it in the Diagram Structure Area or Associated Documents Area of the SDT Organizer. Then select the Edit Diagram menu choice from the Organizer's Edit menu.
- Point to an SDL diagram icon in the Organizer and press the right mouse button. On the pop-up menu that is displayed, select the Edit Diagram manu choice.
- Double-click on an SDL diagram icon in the SDT Organizer.
When the Analyze command from the Generate menu in the SDT Organizer has been performed, it is possible to show the source of Analyzer error reports in an SDL Editor.
To do this:
- Select the Show Error menu choice from the View menu in the Organizer Log Window. An SDL Editor window is opened with the source of error (i.e. an SDL symbol) selected.
It is possible to open a diagram from the SDL Editor with a simple double-click on a reference symbol.
To do this:
- Locate the SDL reference symbol referring to the diagram you want to open.
- Double-click the symbol. The SDL Editor opens the diagram.
If a GR trace has been performed in the SDT Simulator, invoking the ShowNextSymbol or ShowPreviousSymbol simulator commands will display either the next symbol to be executed or the previously executed symbol in a diagram in an SDL Editor window.
There are several ways to save a diagram. The effect is of saving any changes made to either one specific diagram, or all diagrams modified during the current session.
Saving a diagram can also be performed in conjunction to closing the diagram or exiting the SDL Editor. See "Closing a Diagram" on page 50 and "Exiting the SDL Editor" on page 37.
In the SDL Editor, a request to save should be made from the window showing the diagram to be saved (see "Transferring to a Diagram" on page 50 for how to access and show a specific diagram) that is read by the SDL Editor.
To save a diagram:
When a diagram that is not connected to any file (i.e. a newly created diagram) is to be saved, you need to specify a file to store the diagram on.
To save a newly created diagram:
- Select the Save command from the File menu. A Standard File Selection Dialog is issued (see Figure 15).
- Specify the file to save the diagram on.
- The default file name that the SDL Editor suggests consists of <diagramname> appended with a default file extension (see the table on page 1190 in chapter 23, The SDL Editor for default file extensions).
- If a file with this default name already exists, you are required to specify a new name.
- Click OK to confirm the file name and to save the diagram.
Figure 15 : Saving a New Diagram.
-----
(fig)
-----
A global save can be made of all the diagrams that are open in the current session, and have had modifications done to them.
To save all diagrams:
- Select Save All from the File menu. All diagrams which are modified are saved. (You will be prompted to specify a file for new diagrams that have never been saved on file.)
It is possible to save the diagram being edited into another file. You may either continue working with the original file or with the newly created copy.
To save a copy of an SDL diagram and continue working with the new copy:
- Select Save As from the File menu. A Standard File Selection Dialog is issued.
- The default file name which is suggested is the same file as the original was stored on, appended with an integer suffix (1, ..., N) in order to build up a unique file name.
- Click the OK button to confirm. The SDL diagram 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.
To save a copy of an SDL diagram and continue working with the original:
- Select Save As from the File menu. A Standard File Selection Dialog is issued.
- The default file name which is suggested is the same file as the original was stored on, appended with an integer suffix (1, ... ,N) that guarantees a unique file name. If the suggested file name is not suitable, you may type the new filename or the directory path and filename required into the File field.
- Click the OK button to confirm. The SDL diagram is saved on the specified file, and the window with the file from where the save was made remains open for editing.
Closing a diagram also means closing all instances of all windows displaying any page contained in that diagram.
To close a diagram:
- Select the Close Diagram menu choice from the File menu. The command should be performed from a window showing any of the pages contained in the diagram to close.
- 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 16 below.
Figure 16 : Prompting to Save a Diagram when Closing it.
-----
(fig)
-----
- Clicking Save saves the diagram and closes it.
- Clicking No save closes the diagram without saving it first.
- Clicking Cancel closes the dialog without closing the diagram.
The SDL Editor allows you to print an entire SDL diagram or a selection of pages or objects contained in the diagram. To print multiple SDL diagrams, you should print from the Organizer.
How to print an SDL diagram is described in chapter 4, Printing Information, on page 258.
This section describes how to transfer to a diagram that is currently read by the SDL Editor. (The diagram 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 SDL diagrams and pages (up to a maximum of the last nine to have been opened). If more than nine pages are open, a tenth menu choice, List All, provides access to a list dialog where all diagrams and pages are listed.
To transfer to one of the diagrams opened by the SDL Editor:
- Click the Diagrams menu to see the list of diagrams.
- Then, select the required diagram name and page (each menu choice contains the type and name of the diagram, followed by a slash and the name of the page, and finally the name of the file the diagram is stored on.) The window containing the page is instantly displayed.
You may order the SDL Editor to rearrange the layout of an SDL diagram, for instance if you run out of space on any of the pages that build up the diagram.
The algorithms that control how the new layout will be are described in "Automatic Layouting of Diagrams" on page 1269 in chapter 23, The SDL Editor.
To rearrange an SDL diagram:
- Make sure the diagram to rearrange is the active one.
- Select Tidy Up from the Tools menu. A dialog is issued, prompting you to confirm the operation:
Figure 18 : The Confirm Tidy Up Dialog.
-----
(fig)
-----
- Click on Tidy Up to confirm the operation. The SDL Editor rearranges the diagram (this may take some time, depending on how complex your diagram is).
- You should inspect the diagram in order to check its appearance before continuing working with it (the SDL Editor allows you to Undo the operation from the Edit menu).
This section describes the more important aspects of page handling.
Each diagram page must have a unique name for identification purposes. This name must be correct in accordance with the naming convention in SDL for pages. Each diagram must contain at least one page, and there is no maximum amount of pages that a diagram may contain.
The autonumbering facility available for pages relates to automatically updating the sequential numbering when pages are added or deleted.
When diagrams are opened, the default way of presentation is that the first page of the requested diagram is shown (first in accordance to order in which pages have been added). This default can be overruled, and you can go directly to a specific page that has been predetermined.
Most of the page managing functions are available through the menu choices on the Pages menu.
A number of functions are available through the Edit menu choice in this menu (see Figure 19 on page 54):
Other page functions are available in the SDL Editor:
Within an SDL diagram, page locations are set according to the order in which they are added (see "Adding a Page" on page 56). This order is reflected in:
- The Organizer diagram structure and associated documents.
- The listing order for pages in the Edit Pages dialog (see Figure 19)
The SDL Editor allows you to change the order of pages. To re-order pages, you use the Cut Button and Paste Button. See "Cutting a Page" and "Pasting a Page" on page 61.
Whenever you name a page, the names that you use must strictly adhere to SDL naming conventions. If you use unacceptable notation (e.g. blank spaces or a semi-colon), you receive a message that shows the name you have typed in, and says that it is illegal.
If autonumbering is required, a nice feature can assign numeric names to the pages in the diagram. The page names will be assigned 1, 2, 3 and so forth.
To apply autonumbering on a page:
- Select the Edit menu choice.
- Select the page to autonumber in the page list.
- Toggle the Autonumbered toggle button to on in the Edit Pages dialog. You are then prompted if you want to autonumber the selected page only or all pages, or to change your mind (see Figure 20).
Figure 20 : Specifying what Pages to Autonumber.
-----
(fig)
-----
- If you click Yes, the SDL Editor assigns the page name the highest assigned numeric value + 1. You are then returned to the Edit Pages dialog.
- If you click All Pages, all pages will be assigned numeric names, starting with 1. The numbering will follow the listing order in the page list. You are then returned to the Edit Pages dialog.
The autonumbering feature can be turned off if required. This must for instance be done if you want to assign a specific name on a page.
To remove autonumbering on a page:
- Select the Edit menu choice.
- In the page list, select the page to remove autonumbering on.
- Toggle the Autonumbered toggle button to off in the Edit Pages dialog. You are then prompted to confirm the operation (see Figure 21).
Figure 21 : Confirming to Remove Autonumbering.
-----
(fig)
-----
- Clicking Yes transfers you to a Rename Page dialog (see Figure 24 on page 59) where you assign the page a new name. Autonumbering is removed.
To add a page to an existing diagram:
- Select the Edit menu choice.
- In the list of existing pages, select the page to precede or succeed the new page to be added.
- Click the Add button. The Add Page dialog is issued.
Figure 22 : Adding a Page.
-----
(fig)
-----
- Enter the required page name in keeping with SDL conventions (remember, the name must be unique within the diagram). Otherwise, select Autonumbered on if you want the pages to be automatically renumbered to incorporate the new page. See "Applying Autonumbering on Page Names" on page 55 for more information on this topic.
- Select the position where the new page must go - either before or after the current page.
- Select the type of page required. The dialog box automatically shows the page options that are available to you under SDL rules. This action is not possible to perform on diagrams that can have one page type only.
- When all is entered, click OK. After completion of the Add Page dialog, control is returned to the Edit Pages dialog, allowing you to for instance add additional pages.
- Terminate the operation by clicking Done.
When a diagram is opened without specifying a particular page, the default is that it is opened at the first page that has been added to the diagram, showing the upper left part of the page.
It is possible however to open a diagram at a specific page in the SDL Editor.
To specify the page to be opened first:
- Bring up the Edit Pages dialog (see "Adding a Page" on page 56 for how to do this.
- The Open this page first field, below the toggle button, reflects what page is specified as to be opened first (page 1 in Figure 23).
Figure 23 : Specifying what Page to Open First.
-----
(fig)
-----
- To specify another page, select the page to be opened first in the Edit pages dialog.
- Turn the Open this page first button on. The identification of the page to be opened is then placed under the Open this page first button.
- Click Done to close the dialog.
To rename an SDL page:
- Select the Edit menu choice.
- Select the page to rename in the page list. Auto-numbered pages cannot be renamed.
- To rename an auto-numbered page, first click the Autonumbered button off. Autonumbering is removed on the selected page and the Rename Page dialog is issued. Go to step 4. below.
- Click the Rename button. The Rename Page dialog is issued.
Figure 24 : Renaming a Page.
-----
(fig)
-----
- Fill in the required new name in keeping with SDL naming conventions. Page names must be unique within the diagram.
- Click OK. After completion of the Rename Page dialog, control is returned to the Edit Pages dialog. You can now for instance rename other pages.
- Terminate the operation by clicking Done.
To clear a page:
- Select the Edit menu choice.
- Select the page to be deleted in the page list.
- Click on the Clear option and the following confirm dialog appears - see Figure 25, where two options are available:
Figure 25 : Clearing (deleting) a Page.
-----
(fig)
-----
- Click on Clear to delete page. You are returned to the Edit Pages dialog where the page has been removed.
- Click on Cancel to stop the page deletion action. You are returned to the Edit Pages dialog box without any action having been taken.
---------------------------------------------------------------------
Caution!
Please clear pages with caution as there is no Undo option available.
---------------------------------------------------------------------
---------------------------------------------------------------------
Note: If only one page in diagram
If it is the only page in a diagram, you cannot remove it. A message
to this effect is shown.(fig)
Figure 26 : Attempting to Clear the Last Page.
---------------------------------------------------------------------
- When you have deleted the pages of your choice, click Done.
To copy an SDL page:
- Select the Edit menu choice.
- Select the required page to be copied in the page list.
- Click on the Copy Button. The page is copied to the clipboard and is from now on available for pasting.
- Click Done to close the Edit Pages dialog.
To cut an SDL page:
- Select the Edit menu choice.
- Select the required page to be cut in the page list.
- Click on the Cut Button. The page is copied to the clipboard and disappears from the page list.
- You may now paste the page into the same or into another diagram. Click Done to close the Edit Pages dialog.
To paste an SDL page:
- Open the SDL diagram where to paste the page (an SDL page must have been copied or cut into the clipboard during the current SDT session. Otherwise the Paste button is dimmed).
- Select the Edit menu choice.
- In the list of existing pages, select the page to precede or succeed the new page to be pasted. Click the Paste Button. The Paste Page dialog is issued.
Figure 27 : Pasting a Page.
-----
(fig)
-----
- Enter the required page name in keeping with SDL conventions (remember, the name must be unique within the diagram). Otherwise, select Autonumbered on if you want the pages to be automatically renumbered to incorporate the page to be pasted. See "Applying Autonumbering on Page Names" on page 55 for more information on this topic.
- Select the position where to paste the page - either before or after the current page.
- When all is entered, click Paste. After completion of the Paste Page dialog, control is returned to the Edit Pages dialog.
- Terminate the operation by clicking Done.
There are several ways to transfer to another page of the current diagram. When you transfer to a page, that page becomes current, and is placed on the top of the stack in the window if you are using one window only. Otherwise, that page will be displayed in a window of its own which pops up.
To transfer to any of the pages of the current SDL diagram by specifying it:
- You can transfer to one of the pages which are located not further than two pages from the current page by selecting that page in the Pages menu.
- In the Edit Pages dialog, you may transfer to a page by scrolling the page list (if necessary) to bring the required page into view. Click on the required page to select it and then click on the Edit button. You are transferred to the selected page.
- Alternatively, bring up the Organizer window and double-click on the icon symbolizing the page of interest.
To transfer to the page where the current page is referenced from (i.e. where the SDL reference symbol referring to the current diagram is located):
You may transfer to the next or previous page in the diagram. The order is specified according to the listing order in the Edit Pages dialog (see Figure 19 on page 54).
To transfer to the next or previous page:
To transfer to the first page of the diagram:
Select the First menu choice from the Pages menu. You are transferred to the first page of the diagram.
To transfer to the last page of the diagram:
Select the Last menu choice from the Pages menu. You are transferred to the last page of the diagram.
SDT allows to print individual pages from the SDL Editor. You can also restrict the scope of printing to a part of the page. A number of options which affect the resulting printout are possible to specify.
How to print SDL pages is described in chapter 4, Printing Information, on page 260.
If the current size of the page does not fit your needs, you can resize it.
To resize a page:
- Make sure the SDL Editor is showing the page you want to resize. If not, transfer to the page to resize (see "Transferring to a Page" on page 62).
- Select the Drawing Size menu choice from the Edit menu. A dialog is issued, showing the current width and height:
Figure 28 : Adjusting the Page Size.
-----
(fig)
-----
- Type in the new values. You must specify new values that are at least as large as stated. Click OK to apply the new values.
----------------------------------------------------------------------
Note:
If you enlarge a page so that the page size becomes wider or larger
than the physical page size defined in the Print Options, your print
outs will require more pages than before, if you use a fixed printout
scale.
We recommend you to enlarge pages with restraint.
----------------------------------------------------------------------
Each SDL Editor window shows one SDL page. The SDL Editor is a multi-window tool, allowing you to open new windows on a page 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 page.
The window managing functions you can perform are:
To open a new window:
- Go to the window from which you want to open a window.
- 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.
To close a window:
- Go to the window you wish to close.
- Select Close Window from the Windows menu.
- If the window you want to close happens to be the last window opened by the SDL Editor, the SDL Editor will terminate. If any changes were applied on any of the pages, you will be prompted to save the changes, or to cancel the exit request.
The various component parts of the SDL 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 pages 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 29. All of these options can also be set as preferences.
Figure 29 : Selecting Window Options.
-----
(fig)
-----
See "Opening the Grammar Help Window" on page 130 for this operation.
See "Opening the Signal Dictionary Window" on page 135 for this operation.
This page intentionally left blank
Table of Contents Next Chapter