OpenTP1 Version 7 Tester and UAP Trace User's Guide

[Contents][Index][Back][Next]

12.1.1 Creating UAP execution format programs

Organization of this subsection
(1) Creating UAP execution format program with the RPC or XATMI interface
(2) Creating UAP execution format program with a TxRPC interface

(1) Creating UAP execution format program with the RPC or XATMI interface

Figure 12-1 shows the procedure for creating a UAP execution format program with the RPC or XATMI interface.

Figure 12-1 Procedure for creating UAP execution format program with the RPC or XATMI interface

[Figure]

To create the stub source program for creating a UAP execution format program with an RPC or XATMI interface, use the stbmake command with an RPC (or XATMI) interface definition file. See the manual OpenTP1 Programming Guide for details on the stbmake command.

The following examples show how to generate stubs.

Example:
Generate stubs from an RPC interface definition file.
stbmake spp1stb.def
             1.
  1. RPC interface definition file
    (The name of the source file generated in this example is spp1stb_sstb.c.)

Example:
Generate stubs from an XATMI interface definition file.
stbmake -x spp1stb.def
                1.
  1. XATMI interface definition file
    (The name of the source file generated in this example is spp1stb_stbx.c and the header file name is spp1stb_stbx.h.)

After generating the stubs, compile the stubs and UAP (C or COBOL). Use the header file provided by TP1/Server Base.

After compilation, link the stub object file and UAP object file to the simulation functions library provided by the offline tester.

(2) Creating UAP execution format program with a TxRPC interface

Figure 12-2 shows the procedure for creating a UAP execution format program with a TxRPC interface.

Figure 12-2 Procedure for creating UAP execution format program with the TxRPC interface

[Figure]

To create the client stub or server stub source program or server UAP templates for creating a UAP execution format program with the TxRPC interface, use the OpenTP1 txidl command with the Interface Definition Language (IDL) file. See the manual OpenTP1 Programming Guide for details on the txidl command.

The following example shows how to create stubs and a template.

Example:
Generate stubs from an IDL file
txidl spp1.idl
          1.
  1. Interface Definition Language file name
    The following six files are generated in this example:
    spp1_cstub.c (Client stub source)
    spp1_sstub.c (Server stub source)
    Cspp1 (User service definition for client)
    Sspp1 (User service definition for server)
    spp1.h (Header file)
    spp1.c (Server source program template)

After generating the files, code the UAP based on the template and then compile the stubs and UAP (C). Use the header file provided by OpenTP1. See the manual OpenTP1 Programming Reference C Language for how to create the UAP.

After compilation, link the stub object file and UAP object file to the simulation functions library provided by the offline tester. For a client UAP, link the client stub object file. For a server UAP, link the server stub object file.