IBM
Contents Index Previous Next



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:

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 -b

C:\IBM\Rational\SDL_TTCN_Suite6.3\bin\wini386\cif2sdt.exe 
myciffile

When 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

Examples of Usage

Example 150

sdt2cif mysystem.sdt

where mysystem.sdt has the following diagrams:

   myblock.sbk
   myprocss.spr
   myservce.ssv
   myproced.spd

The 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.cbk
myprocss.spr   -> myprocss.cpr
myservce.ssv   -> myservce.csv
myproced.spd   -> myproced.cpd

Example 151

sdt2cif 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.

Example 152

sdt2cif myblock.sbk myprocss.spr myservce.ssv

The SDT2CIF tool will convert the three binary files to the CIF files myblock.cbk, myprocss.cpr and myservce.csv.

Example 153

sdt2cif -o blocks.cif block_a.sbk block_b.sbk 
block_c.sbk

The 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.

Example 154

sdt2cif -s block_a.sbk block_b.sbk block_c.sbk

The 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:

Figure 171 : 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.

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:

Figure 172 : SDT2CIF Graphical User Interface

To convert a single binary file, system file or all binary files in a directory, perform the following steps:

  1. Type an file or directory name in the text field under file or directory to convert.
    • To select a file using a standard dialog box, click the folder button which is located to the right of the text field.
  2. Specify the desired options by clicking on check boxes which specify conversion options; look for option explanations in the following subsections.
  3. 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

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
Contents Index Previous Next