IBM
Contents Index Previous Next



The Service Encapsulator


The Service Encapsulator application enables access to SDL Suite and TTCN Suite services from the Operating System command line prompt.

Basically the tool connects to the Postmaster, sends a service request message and waits for an answer. When the answer arrives, it is printed on standard output. Finally the application exists.

The Service Encapsulator is also available in source code form to show how the Postmaster's Functional Interface could be used. A description of the internal design of the Service Encapsulator is found in Using the Public Interface. The source code of the Service Encapsulator is found in

$telelogic/examples/public_interface (on UNIX)

<installation directory>\examples\public_interface 
(in Windows)

The Service Encapsulator binary is invoked by:

On UNIX: $telelogic/bin/serverpc <tool> <service> 
<params>

In Windows: <installation directory>\sdtbin\serverpc 
<tool> <service> <params>

where <tool> is the tool that should perform the service, and <service> is the service itself.

The <tool> and <service> arguments could either be entered as a symbolic value or as the assigned integer value. These definitions are found in sdt.h

If the service takes parameters, these should be provided in <params>

Care should be taken in order to enter parameters correctly. In particular if the service uses quoted string parameters:

The tool allows carriage return "\n" and line-feed "\r" to be used.

The tool does not allow <params> to contain binary data. Therefore, the SDL Suite services accepting binary data must only contain ASCII characters.

The tool returns 0 on success and -1 if an error occur. Such errors correspond to errors when calling Postmaster functions, see SPInit, SPSendToTool, SPRead in Functional Interface for possible errors.


http://www.ibm.com/rational
Contents Index Previous Next