beautypg.com

Renesas Stub Generator V.1.00 User Manual

Page 106

background image

Section 8 Application Interface

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

REJ10J1822-0101

(2) When SVR_AUTH has been specified

Each of the client-stub functions has a different API from the corresponding actual server function
and the server ID and server version information are added as parameters. RPCGEN outputs the
client-stub functions themselves to _clnt.c and the prototype declarations to file>_clnt.h.

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

The first and second parameters of the client-stub functions are the server ID and server version,
respectively. The names of the parameters are fixed to __ulID and __ulVers. The third and
subsequent parameters are the first and subsequent parameters of the actual server function and
their names are those defined in RPC_FUNC.

Example:

Contents of a config file

SVR_NAME{ EXAMPLE };

SVR_ID{ 1 };

SVR_VERSION{ 2 };

SVR_AUTH;

RPC_FUNC{

int ret = func1([IN DFLT]int par1, [IN DFLT]int par2);

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

};

Specification of a client-stub function

int rpcclnt_EXAMPLE_func1(UINT32 __ulID, UINT32 __ulVers, int par1, int

par2);

void rpcclnt_EXAMPLE_func2(UINT32 __ulID, UINT32 __ulVers, struct ST

*ptr);

This manual is related to the following products: