OpenTP1 Version 7 Programming Reference C Language

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

Appendix A.2 Creating stubs of application programs that are used together

This section explains how to create the stubs of UAPs that are called from the function dc_rpc_call() and call XATMI interface functions (such as tpcall()).

To create the UAP:

  1. Create an interface definition file.
    For the file to be created, specify the RPC and XATMI interface definitions (for the client). Suffix the file name with .def.
  2. Execute the stbmake command or tpstbmk command.
    Specify the required arguments for the stbmake command, and execute the command. Execution of the command creates the declaration files listed below. xxxxx indicates a character string of an interface definition file name from which .def is excluded.
    • OpenTP1 RPC stub source file (default file name: xxxxx_sstb.c)
    • XATMI stub source file (default file name: xxxxx_stbx.c)
    • XATMI stub header file (default file name: xxxxx_stbx.h)
    If the RPC interface definition and XATMI interface definition coexist, the XATMI stub source file and XATMI stub header file are created.
  3. Compile the stub source files and link them with a UAP.
    Compile the source files created in step 2 with the C compiler, and link them with a UAP.