![]() |
![]() |
![]() |
![]() |
![]() |
SDT2CIF Converter Tool
The SDT2CIF tool converts binary format files to CIF files. It can convert one or more specified binary format files, SDL system files or all SDL diagram files in a specified directory.
The SDT2CIF converter also supports the mixed platform feature of the SDL Suite (for more information on this topic, see Windows and UNIX File Compatibility. If the converter finds a [DRIVES] section during the conversion of an SDL system file, it assumes that this system file is used on mixed platforms. This makes the converter change all characters in output file name to lower case (on UNIX) or replace the part of the path by the drive letter (in Windows).
The SDT2CIF converter never overwrites existing data files. If the converter finds that the file it was going to write already exists, it generates a new name for the output file by replacing the two last characters at the end of the file name.
The SDT2CIF converter can be started in the following ways:
- From the OS command line; see Command Line Syntax.
- As a separate application with a graphical user interface (Windows only); see Graphical User Interface (Windows only).
- From the Organizer's Generate menu choice Convert GR to CIF.
- On UNIX, a dialog is then opened; see Convert GR to CIF Dialog (UNIX only).
- In Windows, the separate application is then started; see Graphical User Interface (Windows only).
Command Line Syntax
On UNIX, the SDT2CIF tool can be invoked from the OS prompt as follows:
sdt2cif [-v[ersion]] [-h] [-r] [-g] [-i] [-s]
[-o <output file name>] ( <binary diagram file> | <system file> | <directory> )*(Windows only) When started without options or with -r option only, the Graphical User interface will be started, otherwise the application will execute as a command line application. However, to be able to get the output in the command window when run as a command line application you must use the special application conspawn as a wrapper (assuming C:\IBM\Rational\SDL_TTCN_Suite6.3 is the installation directory)
C:\IBM\Rational\SDL_TTCN_Suite6.3\bin\wini386\conspawn.exe -bC:\IBM\Rational\SDL_TTCN_Suite6.3\bin\wini386\cif2sdt.exe myciffileWhen using the converter as a command line application and invoking it within emacs path names in input files are lost. Therefore be sure to do a "cd" to the directory where the files are before invoking the converter.
The meaning of the command-line options is given in the following sections.
Command Line Options
- -v or -version (show the version)
- -h (show the command line syntax)
- -r (reuse a started session)
- -g (include graphical SDT references)
- -i (omit CIF comments)
- -s (single file)
- -o (save the generated files under the name specified)
Examples of Usage
sdt2cif mysystem.sdtwhere mysystem.sdt has the following diagrams:
myblock.sbkmyprocss.sprmyservce.ssvmyproced.spdThe SDT2CIF tool will convert all the diagrams referred to in the system file and save them in the CIF format under transformed names:
myblock.sbk -> myblock.cbkmyprocss.spr -> myprocss.cprmyservce.ssv -> myservce.csvmyproced.spd -> myproced.cpdsdt2cif mysdtdir(where mysdtdir specifies a directory name)
The SDT2CIF tool will look in the directory mysdtdir and convert all binary files (but not system files - this would cause double conversion) to the corresponding CIF files.
sdt2cif myblock.sbk myprocss.spr myservce.ssvThe SDT2CIF tool will convert the three binary files to the CIF files myblock.cbk, myprocss.cpr and myservce.csv.
sdt2cif -o blocks.cif block_a.sbk block_b.sbk block_c.sbkThe SDT2CIF tool will convert the three binary files block_a.sbk, block_b.sbk, block_c.sbk and put all diagrams converted into the file blocks.cif.
sdt2cif -s block_a.sbk block_b.sbk block_c.sbkThe SDT2CIF tool will convert the three binary files block_a.sbk, block_b.sbk, block_c.sbk and put all diagrams converted into the file named blocks_a.cbk (resulting from the name under which the first file in the list of files to convert would be saved if the -s switch was not specified).
Convert GR to CIF Dialog (UNIX only)
On UNIX, the SDT2CIF converter can also be started by selecting Convert GR to CIF from the Organizer's Generate menu. This opens the Convert GR to CIF dialog:
The dialog functions as a front-end to the sdt2cif converter described in Command Line Syntax. The only functionality not supported by the dialog is the possibility to specify a directory name as input to the conversion.
- Source SDL/GR file or system file
- Generate one CIF file
- If this option is enabled, the converter will save all converted diagrams into one file. The name of this file is determined from the Destination CIF file name check box state. If the check box is not selected, the name of the file will be the same as the name the first file being converted would get. This option is disabled by default. If the check box is selected, the name of the file with diagrams will be the name specified in the Destination CIF file name text field.
- Include graphical SDL/GR references
- This option directs the SDT2CIF converter to include graphical SDT references in the generated CIF files (see SDT References for more information on this topic). If this option is enabled, graphical SDT references are stored as SDL/PR comments; otherwise they are omitted. This option is disabled by default.
- Include CIF comments
- Destination CIF file name
- Convert
- Clicking this button will initiate the conversion, using the options currently displayed in the dialog. Messages issued by the converter will appear in the Organizer Log window. The possible messages are listed in Messages from SDT2CIF Converter.
Graphical User Interface (Windows only)
In Windows, the SDT2CIF converter is either started outside the SDL Suite by using the sdt2cif executable in the release, or by selecting Convert GR to CIF from the Organizer's Generate menu. It provides a Graphical User Interface to control the conversions:
To convert a single binary file, system file or all binary files in a directory, perform the following steps:
- Type an file or directory name in the text field under file or directory to convert.
- Specify the desired options by clicking on check boxes which specify conversion options; look for option explanations in the following subsections.
- Click the Generate CIF button.
After these steps, the conversion will proceed, possibly printing warning/errors/information messages into the Conversion log text box.
After the conversion has been performed, the SDT2CIF converter can be used again to convert more files or directories.
Converter Options
- file or directory to convert
- Generate one CIF file
- If this option is enabled, the converter will save all converted diagrams into one file. The name of this file is determined from the Desired CIF file name check box state. If the check box is not selected, the name of the file will be the same as the name the first file being converted would get. This option is disabled by default. If the check box is selected, the name of the file with diagrams will be the name specified in the Desired CIF file name text field.
- Include graphical SDT references
- This option directs the SDT2CIF converter to include graphical SDT references in the generated CIF files (see SDT References for more information on this topic). If this option is enabled, graphical SDT references are stored as SDL/PR comments; otherwise they are omitted. This option is disabled by default.
- Include CIF comments
- Desired CIF file name
- Conversion log
- This text box contains warning/error/information messages issued by the converter during the last conversion. The possible messages are listed in Messages from SDT2CIF Converter.
- Generate CIF
- Exit
Messages from SDT2CIF Converter
The SDT2CIF converter issues an information message when it needs to inform the user about something; for example, when it changes the output file name so as not to overwrite an existing file. It also issues a warning message when some non-fatal error is found; for example, when some symbol on a diagram occurs in a wrong context. It prints an error message when it is not possible to continue the conversion; for example, when the input file is wrong or corrupt.
Message Format
The general format for warning/error messages is the following:
ERROR <error code>: <error text> <additional information>WARNING <warning code>: <warning text> <additional information>The <error code> specifies the error code which can be used to find the warning/error explanation (see the following sections). The <error text> gives a short explanation of what is wrong. The <additional information> specifies additional information about the error (for example, it can specify the name of an endpoint constraint that could not be bound).
The list of possible warning/error messages follows in the next sections.
List of Error Messages
Error 1: Arguments required (UNIX only)
This error indicates that no command-line arguments were given to the SDT2CIF converter, which thus cannot continue processing. To remedy the situation, supply one or more file/directory name(s) to convert.
Error 2: Illegal option (UNIX only)
This message is issued when an invalid option is found in the command line. To remedy the situation, supply an appropriate option instead of the invalid one.
Error 3: Duplicate option (UNIX only)
This message is issued when a duplicate command-line option is found. The command line options can be specified only once. To remedy the situation, remove duplicated options from the command line.
Error 4: Missing output file (UNIX only)
This message is issued when the option -o has been specified, but no output file name follows. To remedy the situation, supply an output file name after the -o option.
Error 5: Illegal command line syntax (UNIX only)
This message is issued when the command line is found not to obey the command-line syntax. To remedy the situation, make the command line conform to the command-line syntax.
Error 6: Impossible to connect to SDT PostMaster
This message is issued when the SDT2CIF converter cannot connect to the PostMaster.
In Windows, the SDT2CIF converter requires the PostMaster to be running in order to perform conversion. Start the Organizer and try again.
On UNIX, the most likely cause of this message is that either the path to the SDL Suite tools is not in the search path, or the maximum number of licenses is reached. To remedy the situation, ensure that the SDL Editor can be started (i.e. it is in the search path) and that there are enough licenses available.
Error 7: SDLE cannot convert the file
This message means that either the file is corrupt or the SDL Editor cannot read the source file or write to output file. To remedy the situation, ensure that the source file is valid and that there is enough disk space. Try to Restart the SDL Suite and re-run the converter.
List of Warning Messages
Warning 1: No input files (UNIX only)
This message means that the SDT2CIF converter did not find any suitable file for conversion among those specified on the command line. To remedy the situation, ensure the specified file/path names are correct.
Warning 2: Cannot convert file or directory
This message is most probably caused by a path/file name misspelling. To remedy the situation, ensure that the specified file/path names are correct.
Warning 3: SDLE says: ...
This warning is issued when the SDT2CIF converter receives reply from the SDL Editor with message explaining the reason of the error. To see the more detailed explanation of the reason for the error, see the text following the colon.
http://www.ibm.com/rational |
![]() |
![]() |
![]() |
![]() |