
Section 6 Definitions of Server Functions
Rev. 1.01 Mar. 17, 2008 Page 67 of 128
REJ10J1822-0101
6.6.5
COUNT (Number of Elements in an Array)
Description:
When ARY is used, it must be followed by a definition of COUNT, which indicates the number of
elements in the array to be passed between the client and the server.
(1)
When the input/output keyword selected for ARY is IN
In this case, a parameter specification that includes ARY must be followed by a single definition
of COUNT to indicate the number of elements in the array.
<parameter including ARY>,<definition of COUNT>
COUNT is an expression that specifies the number of elements in the array to be passed from the
client to the server.
RPCGEN creates client-stub code that makes an RPC call after setting the size of an input IOVEC
structure by using an expression of the kind specified in figure 6.2. This must be taken into
account when COUNT is defined. For example, the expression for COUNT must not contain any
variables that hold the return value of a function. Figures 6.2 and 6.3 show the code for example 5
(without SVR_AUTH) of the examples introduced following the figures.
int func (struct INF * inf, struct ST * ptr )
{
IOVEC __input[2];
...
__input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(inf);
__input[ __ulInputPar+ ].ulSize = sizeof(*inf);
...
if (((UINT32)(inf->count)) > 0UL)
{
__input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(
ptr
);
__input[ __ulInputPar+ ].ulSize = sizeof(
*ptr
) * ((UINT32)(
inf->count
));
}
...
rpc_call(...);
}
Figure 6.2 Code Output to the Client Stub (IN) for COUNT
Содержание Stub Generator REJ10J1822-0101
Страница 4: ......
Страница 6: ......
Страница 12: ...vi ...
Страница 16: ...Section 2 Installation Rev 1 01 Mar 17 2008 Page 4 of 128 REJ10J1822 0101 ...
Страница 34: ...Section 4 Executing RPCGEN Rev 1 01 Mar 17 2008 Page 22 of 128 REJ10J1822 0101 ...
Страница 60: ...Section 5 Specifications of a Config File Rev 1 01 Mar 17 2008 Page 48 of 128 REJ10J1822 0101 ...
Страница 104: ...Section 7 Server Functions Not Supported by RPCGEN Rev 1 01 Mar 17 2008 Page 92 of 128 REJ10J1822 0101 ...
Страница 118: ...Section 9 Notes Rev 1 01 Mar 17 2008 Page 106 of 128 REJ10J1822 0101 ...
Страница 131: ...Section 11 Samples Rev 1 01 Mar 17 2008 Page 119 of 128 REJ10J1822 0101 ...
Страница 140: ...Section 11 Samples Rev 1 01 Mar 17 2008 Page 128 of 128 REJ10J1822 0101 ...
Страница 143: ......
Страница 144: ...1753 Shimonumabe Nakahara ku Kawasaki shi Kanagawa 211 8668 Japan Stub Generator V 1 00 REJ10J1822 0101 User s Manual ...