beautypg.com

Renesas Stub Generator V.1.00 User Manual

Page 80

background image

Section 6 Definitions of Server Functions

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

REJ10J1822-0101

UINT32 rpcsvr_SMPL_func( rpc_server_stub_info * __pInfo )

{

...

inf = (struct INF *)( __pInfo->pucParamArea + __ulInputParamOffset);

__ulInputParamOffset += ALIGNUP4(sizeof(*inf));

if (((UINT32)(

inf->count

)) > 0UL)

{

ptr

= (struct ST *)( __pInfo->pucParamArea + __ulInputParamOffset);

}

...

ret = func( inf,

ptr

);

...

return ((UINT32)ret);

}

Figure 6.3 Code Output to the Server Stub (IN) for COUNT

Examples:

Example 1

Specification of a server function

int func(struct ST *ptr);

Pointer ptr to an array of 10 elements of the structure type (ST) will be passed.

Definition of the server function

int ret = func([IN ARY]struct ST *ptr, [COUNT]10);

This manual is related to the following products: