beautypg.com

2 server-stub functions generated by rpcgen – Renesas Stub Generator V.1.00 User Manual

Page 107

background image

Section 8 Application Interface

Rev. 1.01 Mar. 17, 2008 Page 95 of 128

REJ10J1822-0101

8.2

Server-Stub Functions Generated by RPCGEN

RPCGEN outputs the server-stub functions themselves to _svr.c and the prototype
declarations to _svr.h.

The name of each server-stub function takes the form rpcsvr__name>. refers to the server name defined with SVR_NAME and name> refers to server function names defined between the braces {} of RPC_FUNC.

Since the server-stub functions are called from within the RPC library, the user usually does not
need to recognize the APIs of the server-stub functions output by RPCGEN. If SVRSTUB is used
to prevent creation of the server-stub functions, however, the user must implement the server-stub
functions in accord with the specifications.

Example:

Contents of a config file

SVR_NAME{ EXAMPLE };

RPC_FUNC{

int ret = func1([IN DFLT]int par);

func([OUT PTR]struct ST *ptr);

};

Specification of a client-stub function

UINT32 rpcsvr_EXAMPLE_func1(rpc_server_stub_info * const __pInfo);

UINT32 rpcsvr_EXAMPLE_func2(rpc_server_stub_info * const __pInfo);

This manual is related to the following products: