OpenTP1 Version 7 Programming Guide
There are two ways to create service functions in an SPP or MHP.
These methods are described below.
Stubs are required to communicate between UAPs using RPCs. A stub is a program which corresponds the service group name and service name specified by the client UAP to the server UAP service.
The stub defines the point of entry (entry point) for each UAP service.
When creating a server UAP, link the stub to the object file of the server UAP.
For SUP and UAP that handles offline work, there is no need to define and link the stub.
The figures below show how service functions are created using a stub, for SPP and for MHP separately.
Figure 2-18 Using a stub to acquire service functions (SPP)
Figure 2-19 Using a stub to acquire service functions (MHP)
When the facility for dynamic loading of service functions is used, the service functions are acquired from a UAP library that specifies the point of entry (entry point) for each UAP service. There is no need to create a stub. Instead, you need to create a UAP shared library# that incorporates the service functions. You can then acquire service functions from the UAP shared library, eliminating the need to incorporate multiple services into the main function.
The figures below show how service functions are created using dynamic loading of service functions, separately for SPP and MHP.
Figure 2-20 Using dynamic loading of service functions only (SPP)
Figure 2-21 Using dynamic loading of service functions only (MHP)
Note that a UAP that uses a stub can also use dynamic loading of service functions. In this case, a service function can be added without modifying the UAP that uses a stub.
The figures below show, separately for SPP and MHP, how service functions are created using both a stub and dynamic loading of service functions.
Figure 2-22 Using both dynamic loading of service functions and a stub (SPP)
Figure 2-23 Using both dynamic loading of service functions and a stub (MHP)
All Rights Reserved. Copyright (C) 2006, 2010, Hitachi, Ltd.