Renesas Stub Generator V.1.00 User Manual
Renesas Stub Generator V.1.00 User Manual

Renesas Stub Generator V.1.00 User Manual

Renesas microcomputer development environment system
Table of Contents

Advertisement

Quick Links

To our customers,
Old Company Name in Catalogs and Other Documents
st
On April 1
, 2010, NEC Electronics Corporation merged with Renesas Technology
Corporation, and Renesas Electronics Corporation took over all the business of both
companies. Therefore, although the old company name remains in this document, it is a valid
Renesas Electronics document. We appreciate your understanding.
Renesas Electronics website:
Issued by: Renesas Electronics Corporation (http://www.renesas.com)
Send any inquiries to http://www.renesas.com/inquiry.
http://www.renesas.com
st
April 1
, 2010
Renesas Electronics Corporation

Advertisement

Table of Contents
loading

Summary of Contents for Renesas Stub Generator V.1.00

  • Page 1 On April 1 , 2010, NEC Electronics Corporation merged with Renesas Technology Corporation, and Renesas Electronics Corporation took over all the business of both companies. Therefore, although the old company name remains in this document, it is a valid Renesas Electronics document. We appreciate your understanding.
  • Page 2 Renesas Electronics. Renesas Electronics shall not be in any way liable for any damages or losses incurred by you or third parties arising from the use of any Renesas Electronics product for an application categorized as “Specific”...
  • Page 3 Stub Generator V.1.00 User’s Manual Renesas Microcomputer Development Environment System Rev.1.01 2008.03...
  • Page 5 Please be sure to implement safety measures to guard against the possibility of physical injury, and injury or damage caused by fire in the event of the failure of a Renesas product, such as safety design for hardware and software including but not limited to redundancy, fire control and malfunction prevention, appropriate treatment for aging degradation or any other applicable measures.
  • Page 7 This manual describes how to use the stub generator. Read this manual and understand it well before using the stub generator. Notes on Descriptions RPCGEN Abbreviation for the stub generator Prefix Prefix 0x indicates a hexadecimal number. Numbers with no prefix are decimal.
  • Page 8 States and/or other countries. The formal name of Windows® is Microsoft Windows Operating System. 3. All other product names are trademarks or registered trademarks of the respective holders. Renesas Technology Homepage Various support information are available on the following Renesas Technology homepage: http://www.renesas.com/en/tools/...
  • Page 9: Table Of Contents

    Section 1 Overview...1 Overview... 1 Operating Environment... 2 Section 2 Installation...3 Downloading... 3 Installing RPCGEN... 3 Section 3 Functions and Files Generated by RPCGEN ...5 Functions Generated by RPCGEN... 5 3.1.1 Client... 6 3.1.2 Server ... 6 Files Generated by RPCGEN... 7 Section 4 Executing RPCGEN ...9 Executing RPCGEN ...
  • Page 10 5.4.3 CLNT_INCFILE... 30 5.4.4 SVR_INCFILE ... 31 Server Information... 32 5.5.1 SVR_NAME... 32 5.5.2 SVR_ID ... 33 5.5.3 SVR_VERSION ... 34 5.5.4 SVR_NOINIT... 34 5.5.5 SVR_NOSTUBTBL ... 35 5.5.6 SVR_NOSHUTDOWN ... 36 5.5.7 SVR_STATIC... 37 5.5.8 SVR_AUTH ... 38 5.5.9 SVR_SECTION...
  • Page 11 Optional Keywords ... 83 6.7.1 SVRSTUB (Server Stub) ... 84 6.7.2 SVRFUNC (Server Function Name) ... 85 6.7.3 CLNTSTUB (Client Stub) ... 86 6.7.4 UNACK (Asynchronous Call) ... 87 6.7.5 CLNTCOPYCBK (RPC Call by rpc_call_copycbk())... 88 Section 7 Server Functions Not Supported by RPCGEN ...89 Parameter ...
  • Page 13: Section 1 Overview

    Section 1 Overview Section 1 Overview Overview The stub generator (hereafter referred to as RPCGEN) is a tool used to generate the source code of the client and server stubs that are required whenever the remote procedure call (RPC) facility of the HI7200/MP realtime operating system is to be used.
  • Page 14: Operating Environment

    Operating Environment RPCGEN is provided as a Perl script file. Table 1.1 shows the operating environment. Table 1.1 Operating Environment Item Operating Environment Realtime OS HI7200/MP V.1.00 Release 00 or later Perl environment We have confirmed correct execution of RPCGEN by ActivePerl 5.8.8.820 (for Windows®...
  • Page 15: Section 2 Installation

    Downloading RPCGEN can be downloaded for free from the Renesas Web site at the following URL. http://www.renesas.com Installing RPCGEN The file for downloading has been compressed in the zip format. Expanding the zip file generates the files listed in table 2.1. These files must be stored in a suitable folder.
  • Page 16 Section 2 Installation Rev. 1.01 Mar. 17, 2008 Page 4 of 128 REJ10J1822-0101...
  • Page 17: Section 3 Functions And Files Generated By Rpcgen

    Section 3 Functions and Files Generated by RPCGEN Functions Generated by RPCGEN Figure 3.1 shows the functions generated by RPCGEN. Figure 3.1 Functions Generated by RPCGEN Client Server Client- Server- initialization initialization function function Client-stub Server-stub functions functions Client- Server- shutdown shutdown function...
  • Page 18: Client

    3.1.1 Client (1) Client-initialization function This function initiates the connection with the server. Specifying CLNT_NOINIT prevents the creation of the client-initialization function. (2) Client-shutdown function This function ends the connection with the server. Specifying CLNT_NOSHUTDOWN prevents the creation of the client-shutdown function. (3) Client-stub functions Each of these functions makes an RPC call and has the same API as or an API similar to the server function.
  • Page 19: Files Generated By Rpcgen

    Files Generated by RPCGEN RPCGEN generates the files listed in table 3.1 in accord with the name of the config file. Table 3.1 Files Generated by RPCGEN Filename Description <config file>_clnt.c Client-stub source file <config file>_clnt.h Client-stub header file <config file>_private.h Internal header file for the client stub <config file>_svr.c...
  • Page 20 Section 3 Functions and Files Generated by RPCGEN (3) <config file>_private.h (internal header file for the client stub) This is a header file included by <config file>_clnt.c only. (4) <config file>_svr.c (server-stub source file) This file contains the server-stub functions, server-initialization function, server-shutdown function, and server-stub function table.
  • Page 21: Section 4 Executing Rpcgen

    Section 4 Executing RPCGEN Executing RPCGEN RPCGEN must be executed from the command prompt as follows. perlΔ-I<rpcgen path>Δ<rpcgen path>\rpcgen.plΔ <config file>[Δ<option>...](RET) <rpcgen path> is a path to the directory where RPCGEN has been installed. <config file> refers to a file describing the specifications of the client and server stubs to be generated.
  • Page 22: Options

    Options 4.2.1 PUBI Format: PUBI="<path>" Description: This option is used to specify the path for output of <config file>_public.h. If this option is used, a definition of PUB_INCPATH in the config file is ignored. 4.2.2 CLNTS Format: CLNTS="<path>" Description: This option is used to specify the path for output of <config file>_clnt.c. If this option is used, a definition of CLNT_SOURCEPATH in the config file is ignored.
  • Page 23: Svrs

    4.2.4 SVRS Format: SVRS="<path>" Description: This option is used to specify the path for output of <config file>_svr.c. If this option is used, a definition of SVR_SOURCEPATH in the config file is ignored. 4.2.5 SVRI Format: SVRI="<path>" Description: This option is used to specify the path for output of <config file>_svr.h. If this option is used, a definition of SVR_INCPATH in the config file is ignored.
  • Page 24: Executing Rpcgen As A Build Phase In The High-Performance Embedded Workshop

    Executing RPCGEN as a Build Phase in the High-performance Embedded Workshop After RPCGEN has been registered as a custom build phase in the workspace, it will be automatically executed at the time of building. (1) Defining Custom Placeholders The following two custom placeholders must be defined. •...
  • Page 25 Section 4 Executing RPCGEN (2) Adding a File Extension To make execution as a custom build phase work, the filename extension “.x” for config files must be added as a filename extension to be used in custom build phases. Select [Project->File Extensions] from the menu bar of the High-performance Embedded Workshop.
  • Page 26 Section 4 Executing RPCGEN Figure 4.3 [Add File Extension] Dialog Box Rev. 1.01 Mar. 17, 2008 Page 14 of 128 REJ10J1822-0101...
  • Page 27 Section 4 Executing RPCGEN (3) Creating the RPCGEN Custom Build Phase Select [Build->Build Phases] from the menu bar of the High-performance Embedded Workshop. This opens the [Build Phases] dialog box shown in figure 4.4. Figure 4.4 [Build Phases] Dialog Box Clicking on the [Add] button invokes the [New Build Phase] wizard (figure 4.5).
  • Page 28 Figure 4.5 [New Build Phase - Step 1 of 4] Dialog Box Click on [Next] to go to step 2. Figure 4.6 [New Build Phase - Step 2 of 4] Dialog Box Rev. 1.01 Mar. 17, 2008 Page 16 of 128 REJ10J1822-0101...
  • Page 29 Section 4 Executing RPCGEN At step 2, select [Multiple phase]. Then select [RPCGEN config file] for [Select input file group]. Click on [Next] to go to step 3. Figure 4.7 [New Build Phase - Step 3 of 4] Dialog Box [Phase name]: Any name defined by the user (“rpcgen”...
  • Page 30 Section 4 Executing RPCGEN Figure 4.8 [New Build Phase - Step 4 of 4] Dialog Box Although no environment variables need to be added for RPCGEN, you can add environment variables for the Perl environment as required. Creation of the RPCGEN custom build phase is now complete. Next, the syntax for messages about RPCGEN must be defined.
  • Page 31 Section 4 Executing RPCGEN Now settings must be made so that the files output by RPCGEN will be deleted by [Build->Clean Current Project] or [Build->Clean All Projects] from the High-performance Embedded Workshop. Select [Build->rpcgen] to open the [rpcgen Options] dialog box (figure 4.10). Select the [Output Files] tab, check that the “RPCGEN config file”...
  • Page 32 Section 4 Executing RPCGEN (4) Settings in the [Build Phases] Dialog Box The created RPCGEN custom build phase is shown at the bottom of the [Build Phases] dialog box. Use the [Move Up] button to move “rpcgen” so that it is above “SH C/C++ Library Generator.” Figure 4.12 [Build Phases] Dialog Box - [Build Order] Tab Open the [Build File Order] tab.
  • Page 33 Section 4 Executing RPCGEN Figure 4.13 [Build Phases] Dialog Box - [Build File Order] Tab Setting of the RPCGEN build phase is now complete. Rev. 1.01 Mar. 17, 2008 Page 21 of 128 REJ10J1822-0101...
  • Page 34 Section 4 Executing RPCGEN Rev. 1.01 Mar. 17, 2008 Page 22 of 128 REJ10J1822-0101...
  • Page 35: Section 5 Specifications Of A Config File

    Section 5 Specifications of a Config File A config file contains definitions used for creation of the client and server stubs. Specifically, such definitions are made by appending keywords for passing to RPCGEN to the API of the server functions (as described in section 6, Definitions of Server Functions). Read this section carefully before creating your own config file.
  • Page 36: Comments

    (3) Server information • SVR_NAME{…}; • SVR_ID{…}; • SVR_VERSION{…}; • SVR_NOINIT; • SVR_NOSHUTDOWN; • SVR_NOSTUBTBL; • SVR_STATIC{…}; • SVR_SECTION{…}; • SVR_AUTH; (4) Client information • CLNT_NOINIT; • CLNT_NOSHUTDOWN; • CLNT_CALLCHK; • CLNT_SECTION{…}; (5) Server functions • RPC_FUNC{…}; Server functions are only defined within the braces of RPC_FUNC; multiple server functions can be defined.
  • Page 37: File Locations

    File Locations Use the statements listed below to define paths to the files generated by RPCGEN. If these definitions are omitted, RPCGEN will generate the source or header files in the current directory. If a definition is otherwise correct but the defined path does not exist or the directory already contains read-only files, RPCGEN displays an error message and terminates the processing.
  • Page 38: Clnt_Sourcepath

    5.3.2 CLNT_SOURCEPATH Format: CLNT_SOURCEPATH{"<path>"}; Description: This statement defines the path under which <config file>_clnt.c will be generated. When the CLNTS option is used, a definition of CLNT_SOURCEPATH is ignored. Example: CLNT_SOURCEPATH{"clnt\source"}; <config file>_clnt.c will be generated in the clnt\source directory under the current directory. 5.3.3 CLNT_INCPATH Format:...
  • Page 39: Svr_Sourcepath

    5.3.4 SVR_SOURCEPATH Format: SVR_SOURCEPATH{"<path>"}; Description: This statement defines the path under which <config file>_svr.c will be generated. When the SVRS option is used, a definition of SVR_SOURCEPATH is ignored. Example: SVR_SOURCEPATH{"svr\source"}; <config file>_svr.c will be generated in the svr\source directory under the current directory. 5.3.5 SVR_INCPATH Format:...
  • Page 40: Controlling The Output Of #Include Directives

    Standard include file for the compiler Header file of data-type definitions; comes with Renesas operating systems (such as the HI7200/MP) RPC header file that comes with Renesas operating systems (such as the HI7200/MP) Include file common to the client and server stubs...
  • Page 41: Order Of #Include Directives

    Section 5 Specifications of a Config File 5.4.1 Order of #Include Directives RPCGEN outputs #include directives to files in the following order. (1) <config file>_clnt.c 1. Default include files (in the order given in table 5.1) 2. File(s) defined with GLOBAL_INCFILE (in the order of file definition) 3.
  • Page 42: Global_Incfile

    5.4.2 GLOBAL_INCFILE Format: GLOBAL_INCFILE{<file>[ Description: This statement is for the output of #include directives for the specified files to <config file>_clnt.c and <config file>_svr.c. File(s) must be specified in the form "filename" or <filename>. The difference between these two formats is as defined in the specification of the #include directive. When two or more files are to be specified, they must be separated by a space.
  • Page 43: Svr_Incfile

    Section 5 Specifications of a Config File 5.4.4 SVR_INCFILE Format: Δ SVR_INCFILE{<file>[ <file>...]}; Description: This statement is for the output of #include directives for the specified files to <config file>_svr.c. File(s) must be specified in the form "filename" or <filename>. The difference between these two formats is as defined in the specification of the #include directive.
  • Page 44: Server Information

    Server Information The following types of definitions are available for defining server information. • SVR_NAME{…}; • SVR_ID{…}; • SVR_VERSION{…}; • SVR_NOINIT; • SVR_NOSHUTDOWN; • SVR_NOSTUBTBL; • SVR_STATIC{…}; • SVR_SECTION{…}; • SVR_AUTH; 5.5.1 SVR_NAME Format: SVR_NAME {<server name>}; Description: This statement defines the server name. The defined server name will be applied to the names of stub functions, etc.
  • Page 45: Svr_Id

    5.5.2 SVR_ID Format: SVR_ID {<ID number>}; Description: This statement defines the server ID. The ID number can only be specified as a 4-byte integer constant that can be represented as UINT32 or a C-language macro name to be replaced by such a 4-byte integer constant.
  • Page 46: Svr_Version

    5.5.3 SVR_VERSION Format: SVR_VERSION {<server version>}; Description: This statement defines the server version. The server version can only be specified as a 4-byte integer constant that can be represented as UINT32 or a C-language macro name to be replaced by such a 4-byte integer constant.
  • Page 47: Svr_Nostubtbl

    Section 5 Specifications of a Config File 5.5.5 SVR_NOSTUBTBL Format: SVR_NOSTUBTBL; Description: The server-stub function table is rpc_server_info.ServerStubList, the table defined by rpc_start_server() or rpc_start_server_with_paramarea() called by the server-initialization function. If this statement is present, RPCGEN will not create the server-stub function table. Use SVR_NOSTUBTBL when the server-initialization function is provided as part of the application.
  • Page 48: Svr_Noshutdown

    Section 5 Specifications of a Config File 5.5.6 SVR_NOSHUTDOWN Format: SVR_NOSHUTDOWN; Description: If this statement is present, RPCGEN will not create the server-shutdown function. Use SVR_NOSHUTDOWN when the server-shutdown function is provided as part of the application. The server-shutdown function generated by RPCGEN calls rpc_stop_server() to stop the server. Although rpc_stop_server() generally allows specification of a callback function to be executed at the time the server is stopped, no callback function is specifiable for the server-shutdown function generated by RPCGEN.
  • Page 49: Svr_Static

    5.5.7 SVR_STATIC Format: SVR_STATIC{<size> Description: This statement defines the server as static. If this definition is omitted, the server will be dynamic. Note that SVR_STATIC cannot be used in conjunction with SVR_NOINIT. <Size> indicates the size of the server parameter area. Specify an integer constant that can be represented as UINT32.
  • Page 50: Svr_Auth

    Section 5 Specifications of a Config File 5.5.8 SVR_AUTH Format: SVR_AUTH; Description: There are two ways to assign the server ID and server version. (1) Model 1 Model 1 applies when SVR_AUTH has not been specified. In this model, the application does not recognize the server ID or server version. The server ID and server version are determined within the client and server stubs generated by RPCGEN.
  • Page 51 Section 5 Specifications of a Config File Server application Client application Any server IDs and func(...) (same API Any server IDs and server versions in as the original server versions in parameters are ignored server function) parameters are ignored <config file>_public.h Client- Client- Server-...
  • Page 52 Section 5 Specifications of a Config File (2) Model 2 Model 2 applies when SVR_AUTH has been specified. In this model, the application assigns the server ID and server version. RPCGEN outputs definitions of the server ID and server version in <config file>_public.h so that the application is able to acquire this information.
  • Page 53 Section 5 Specifications of a Config File <config file>_public.h Server ID Client application Server application Server version rpcclnt_<server name>_func Server ID and server version Server ID and server version (server ID, server version, ...) Client- Client- Server- Server- initialization initialization initialization shutdown Client stub...
  • Page 54: Svr_Section

    5.5.9 SVR_SECTION Format: SVR_SECTION{<section name>}; Description: This statement specifies the section to which the server stubs will be assigned. When this definition is omitted, one of the section names (alphabetical characters) listed below will automatically be assigned. If SVR_SECTION has been defined, the actual section name will be one of the letters listed below followed by <section name>.
  • Page 55: Client Information

    Client Information The following definitions of client information are available. • CLNT_NOINIT; • CLNT_NOSHUTDOWN; • CLNT_CALLCHK; • CLNT_SECTION{…}; 5.6.1 CLNT_NOINIT Format: CLNT_NOINIT; Description: RPCGEN creates the following client-initialization function in <config file>_clnt.c as the standard: INT32 rpcclnt_<server name>_init(UINT32 __ulRPCServerID, UINT32 __ulRPCServerVersion );...
  • Page 56: Clnt_Noshutdown

    5.6.2 CLNT_NOSHUTDOWN Format: CLNT_NOSHUTDOWN; Description: RPCGEN creates the following client-shutdown function in <config file>_clnt.c as the standard: INT32 rpcclnt_<server name>_shutdown(UINT32 __ulRPCServerID, UINT32 __ulRPCServerVersion ); If the CLNT_NOSHUTDOWN statement is present, RPCGEN will not create the client-shutdown function. Use CLNT_NOSHUTDOWN when the client-shutdown function is provided as part of the application.
  • Page 57: Clnt_Callchk

    5.6.3 CLNT_CALLCHK Format: CLNT_CALLCHK; Description: RPCGEN creates the following code in <config file>_clnt.c to facilitate saving of the return values of RPC calls (rpc_call() or rpc_call_copycbk()) and outputs the API of *rpc_retval_adr() in <config file>_clnt.h. *rpc_retval_adr() = rpc_call(...); rpc_retval_adr() must be implemented by the user. If this definition is omitted, the following code, which discards the return value of an RPC call, will be created.
  • Page 58: Clnt_Section

    5.6.4 CLNT_SECTION Format: CLNT_SECTION{<section name>}; Description: This statement specifies the section to which the client stubs will be assigned. When this definition is omitted, one of the section names (alphabetical characters) listed below will automatically be assigned. If CLNT_SECTION has been defined, the actual section name will be one of the letters listed below followed by the <section name>.
  • Page 59: Server Functions

    Server Functions The following definition statement is available for defining server functions. • RPC_FUNC{…}; Server functions 5.7.1 RPC_FUNC Format: RPC_FUNC <definitions of server functions>; Description: Enter definitions of server functions between the braces {} of RPC_FUNC. For information on definition statements for server functions, refer to section 6, Definitions of Server Functions. Example: RPC_FUNC int ret = func1([IN DFLT]int par);...
  • Page 60 Section 5 Specifications of a Config File Rev. 1.01 Mar. 17, 2008 Page 48 of 128 REJ10J1822-0101...
  • Page 61: Section 6 Definitions Of Server Functions

    Section 6 Definitions of Server Functions Format Server functions must be defined in one of the following formats. (1) <specification of the return value> <variable to be returned> = <function name>(<parameter>, ...)[<option>Δ...]; (2) <function name> (<parameter>, ...)[<option>Δ...]; (3) <directive to extend the return value><specification of the return value>...
  • Page 62 Example 2: Specification of a server function void func(struct ST *ptr); The function takes ptr, a pointer to a structure of type ST, as an input and does not return a value. Definition of the server function func([IN PTR]struct ST *ptr)[UNACK]; Description •...
  • Page 63 Example 3: Specification of a server function double func(double inf); The input is inf and a value of type double will be returned. Definition of the server function [RETEXT]double dret = func([IN DFLT]double inf); Description • Directive to extend the return value: •...
  • Page 64: Function-Type Directives

    Function-Type Directives 6.2.1 Function with a Return Value Format: <type of the return value> Description: <Variable to hold the return value> refers to a local variable used to store the return value in both client and server stubs. A parameter of the function may be specified as this variable. Example: Specification of a server function int func(int par);...
  • Page 65: Function Without A Return Value

    6.2.2 Function without a Return Value Description: For a function that doesn’t have a return value, a return-value specification must not be made. Example: Specification of a server function void func(struct ST *ptr); The function has no input and returns a value in the ST structure indicated by *ptr. Definition of the server function func([OUT PTR]struct ST *ptr);...
  • Page 66: When The Return Value Is Not Representable As A 4-Byte Integer

    6.2.3 When the Return Value is not Representable as a 4-Byte Integer Format: Δ [RETEXT] <type of the return value> <variable to hold the return value>= Description: By default, the return value is cast into UINT32 in the server stub and then transferred to the client.
  • Page 67: Function Names

    Function Names Description: Type the name of the function you wish to use. Example: Specification of a server function int func(int par); The function takes par as an input and returns a value of type int. Definition of the server function int ret = func([IN DFLT]int par);...
  • Page 68: Parameters

    Parameters Parameters must be defined in the following format. [parameter directive]<parameter specification> The parameter directive is a declaration of the following parameter specification and has the form given below. [<type of input/output>Δ<data type>] <type of input/output>: Specify one of the keywords given in section 6.5, Keywords for Input/Output.
  • Page 69: Keywords For Input/Output

    Keywords for Input/Output The following three keywords are available for setting the input/output attributes of parameters. • IN: Input • OUT: Output • INOUT: Input and output The following optional keywords can also be attached to the keywords listed above (note, however, that REF and DESC cannot be used at the same time).
  • Page 70: Out (Output)

    6.5.2 OUT (Output) Description: This keyword defines a parameter as an output from the server function. The data output by the server function to the area specified by the parameter are returned to the client. This keyword can only be used with the data-type keywords PTR and ARY. Example: Specification of a server function void func(struct ST *ptr);...
  • Page 71: Inout (Input And Output)

    6.5.3 INOUT (Input and Output) Description: This keyword defines a parameter as an input to and output from the server function. The data in the area specified by the parameter are transferred from the client to the server and then passed to the server function.
  • Page 72: Ref (Passing By Reference)

    6.5.4 REF (Passing by Reference) Description: This keyword specifies that only the address of the parameter will be passed between the client and the server. REF is useful when the size of the parameter to be passed is large. This keyword can be used in conjunction with IN and with the data-type keywords PTR, STR, and ARY.
  • Page 73 Without the REF specification, the data indicated by the pointer variable specified with PTR, STR, or ARY are transferred. The transferred pointer points to a different area from that before the transfer. With the REF specification, the pointer variable is transferred. In this case, the pointer points to the same area even after the transfer.
  • Page 74: Desc (Specified Parameter Is Not Passed From The Client To The Server)

    6.5.5 DESC (Specified Parameter is not Passed from the Client to the Server) Description: This keyword specifies that the parameter will not be passed from the client to the server. This keyword can also be used with IN. Example: Specification of a server function int func(void);...
  • Page 75: Keywords For Data Types

    Keywords for Data Types Select one of the following four available keywords. • DFLT: Default • PTR: Pointer • STR: String • ARY: Array When ARY is selected, the parameter for COUNT must also be specified. 6.6.1 DFLT (Default) Input/Output Keywords Available for Use in Combination with DFLT: Description: The parameter itself is transferred between the client and server.
  • Page 76: Str (String)

    6.6.2 STR (String) Input/Output Keywords Available in Combination with STR: Description: The string specified as the parameter is transferred from the client to the server. STR is only specifiable when the parameter is of the character type. When STR is used with REF, the pointer to the string is transferred instead of the string itself. For details, refer to section 6.5.4, REF (Passing by Reference).
  • Page 77: Ptr (Pointer)

    6.6.3 PTR (Pointer) Input/Output Keywords Available in Combination with PTR: Description: The data pointed to by a specified pointer are transferred between the client and the server. PTR is only specifiable when the parameter is of the pointer type. When IN has been selected and REF is used with PTR, the pointer value is transferred instead of the data it indicates.
  • Page 78: Ary (Array)

    Section 6 Definitions of Server Functions 6.6.4 ARY (Array) Input/Output Keywords Available in Combination with ARY: Description: The data of a specified array are transferred between the client and the server. ARY is only specifiable when the parameter is of the array type. As the parameter specification that follows this keyword, define a parameter that expresses the first address of the array.
  • Page 79: Count (Number Of Elements In An Array)

    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. 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.
  • Page 80 UINT32 rpcsvr_SMPL_func( rpc_server_stub_info * __pInfo ) inf = (struct INF *)( __pInfo->pucParamArea + __ulInputParamOffset); __ulInputParamOffset += ALIGNUP4(sizeof(*inf)); if (((UINT32)(inf->count)) > 0UL) = (struct ST *)( __pInfo->pucParamArea + __ulInputParamOffset); ret = func( inf, return ((UINT32)ret); Figure 6.3 Code Output to the Server Stub (IN) for COUNT Examples: Example 1 Specification of a server function...
  • Page 81 Example 2 Specification of a server function int func(struct ST *ptr, int count); Pointer ptr to an array of count elements of the structure type (ST) will be passed. Definition of the server function int ret = func([IN ARY]struct ST *ptr, [COUNT]count,[IN DFLT]int count);...
  • Page 82 Example 5 Specification of a server function int func(struct INF *inf, struct ST *ptr); ptr points to an array to be given to the server function and inf indicates other input information. It has a type-int member count, which indicates the number of elements in the array pointed to by ptr.
  • Page 83 When the input/output keyword selected for ARY is OUT In this case, a parameter specification that includes ARY must be followed by two definitions of COUNT to indicate the number of elements in the array. <parameter including ARY>,<definition of first COUNT>, <definition of second COUNT>...
  • Page 84 int func (struct INF * inf, struct ST * ptr ) IOVEC __input[1]; IOVEC __output[1]; __input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(inf); __input[ __ulInputParamCount++ ].ulSize if (((UINT32)(inf->count)) > 0UL) __output[ __ulOutputParamCount ].pBaseAddress __output[ __ulOutputParamCount++ ].ulSize rpc_call(...); Figure 6.4 Code Output to the Client Stub (OUT) for First COUNT Rev.
  • Page 85 UINT32 rpcsvr_SMPL_func( rpc_server_stub_info * __pInfo ) inf = (struct INF *)( __pInfo->pucParamArea + __ulInputParamOffset); __ulInputParamOffset += ALIGNUP4(sizeof(*inf)); if (((UINT32)(inf->count)) > 0UL) = (struct ST *)( __pInfo->pucParamArea + __ulInputParamOffset); ret = func( inf, __pInfo->pOutputIOVectorTable[ __ulOutputParamCount if (((UINT32)(ret )) > 0UL) __pInfo->pOutputIOVectorTable[ __ulOutputParamCount++ ].ulSize = sizeof(*ptr) * ((UINT32)(ret else __pInfo->pOutputIOVectorTable[ __ulOutputParamCount++ ].ulSize = 0UL;...
  • Page 86 Examples: Example 1 Specification of a server function int func(struct ST *ptr); ptr points to an array for output that has 10 elements. func outputs all 10 elements. Definition of the server function int ret = func([OUT ARY]struct ST *ptr,[COUNT]10, [COUNT]10)); Example 2 Specification of a server function int func(struct ST *ptr, int *p_count);...
  • Page 87 Example 4 Specification of a server function int func(struct ST *ptr, int *p_count); ptr points to an array for output that has *p_count elements. func outputs the return parameter *p_count as the number of elements. Definition of the server function int ret = func([OUT ARY]struct ST *ptr, [COUNT]*p_count, [COUNT]*p_count,[INOUT PTR]int *p_count);...
  • Page 88 Example 6 Specification of a server function int func(struct INF *inf, struct ST *ptr, int *p_count); ptr points to an array for output and inf indicates other input information. It has a type-int member count, which indicates the number of elements in the array pointed to by ptr. func outputs the return parameter *p_count as the number of elements.
  • Page 89 Example 8 Specification of a server function int func(struct INF *inf, struct ST *ptr); ptr points to an array for output and inf indicates other input information, including a type-int member count, which indicates the number of elements in the array pointed to by ptr. The return value indicates the number of elements to be output.
  • Page 90 int func (struct INF * inf, struct ST * ptr ) IOVEC __input[2]; IOVEC __output[1]; __input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(inf); __input[ __ulInputParamCount++ ].ulSize if (((UINT32)(inf->count)) > 0UL) __input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(ptr); __input[ __ulInputParamCount++ ].ulSize if (((UINT32)(inf->count)) > 0UL) __output[ __ulOutputParamCount ].pBaseAddress __output[ __ulOutputParamCount++ ].ulSize rpc_call(...);...
  • Page 91 UINT32 rpcsvr_SMPL_func( rpc_server_stub_info * __pInfo ) inf = (struct INF *)( __pInfo->pucParamArea + __ulInputParamOffset); __ulInputParamOffset += ALIGNUP4(sizeof(*inf)); if (((UINT32)(inf->count)) > 0UL) = (struct ST *)( __pInfo->pucParamArea + __ulInputParamOffset); __ulInputParamOffset += ALIGNUP4(sizeof(*ptr) * ((UINT32)(inf->count))); = func( inf, __pInfo->pOutputIOVectorTable[ __ulOutputParamCount if (((UINT32)(ret )) > 0UL) __pInfo->pOutputIOVectorTable[ __ulOutputParamCount++ ].ulSize = sizeof(*ptr) * ((UINT32)(ret else...
  • Page 92 Examples: Example 1 Specification of a server function int func(struct ST *ptr); ptr points to an array for input and output that has 10 elements. func outputs all 10 elements. Definition of the server function int ret = func([INOUT ARY]struct ST *ptr,[COUNT]10, [COUNT]10); Example 2 Specification of a server function int func(struct ST *ptr, int *p_count);...
  • Page 93 Example 4 Specification of a server function int func(struct ST *ptr, int *p_count); ptr points to an array for input and output that has *p_count elements. func outputs the return parameter *p_count as the number of elements. Definition of the server function int ret = func([INOUT ARY]struct ST *ptr, [COUNT]*p_count,[COUNT]*p_count,[INOUT PTR]int *p_count);...
  • Page 94 Example 6 Specification of a server function int func(struct INF *inf, struct ST *ptr, int *p_count); ptr points to an array for input and output and inf indicates other input information, including a type-int member count, which indicates the number of elements in the array pointed to by ptr. func outputs the return parameter *p_count as the number of elements.
  • Page 95: Optional Keywords

    Example 8 Specification of a server function int func(struct INF *inf, struct ST *ptr); ptr points to an array for input and output and inf indicates other input information, including a type-int member count, which indicates the number of elements in the array pointed to by ptr. The return value indicates the number of elements to be output.
  • Page 96: Svrstub (Server Stub)

    Table 6.2 shows the available combinations of optional keywords. Table 6.2 Combinations of Optional Keywords SVRSTUB SVRSTUB SVRFUNC CLNTSTUB UNACK CLNTCOPYCBK : Available ⎯: Not available (RPCGEN reports an error and terminates processing) 6.7.1 SVRSTUB (Server Stub) Format: [SVRSTUB] <server-stub function name> Description: A server stub provided by the user is to be used, so RPCGEN does not create a server stub.
  • Page 97: Svrfunc (Server Function Name)

    6.7.2 SVRFUNC (Server Function Name) Format: [SVRFUNC]<replacement server function name> Description: RPCGEN replaces the name of the server function to be called by the server stub with a specific name. Use SVRFUNC when the name of a function as called by the client does not match the name of the function as called by the server.
  • Page 98: Clntstub (Client Stub)

    6.7.3 CLNTSTUB (Client Stub) Format: [CLNTSTUB] Description: A client stub provided by the user is to be used, so RPCGEN does not create a client stub. Example: Specification of a server function int func(int par); The function takes par as an input and returns a value of type int. RPCGEN will not create a client stub for func because the user will provide this client stub.
  • Page 99: Unack (Asynchronous Call)

    6.7.4 UNACK (Asynchronous Call) Format: [UNACK] Description: The client makes RPC calls in asynchronous mode. When UNACK is not used, RPC calls are made in synchronous mode. UNACK cannot be used with CLNTSTUB. Note: When UNACK is used, the return value of the server function must be of type void and the input/output keyword for parameters must be IN.
  • Page 100: Clntcopycbk (Rpc Call By Rpc_Call_Copycbk())

    6.7.5 CLNTCOPYCBK (RPC Call by rpc_call_copycbk()) Format: [CLNTCOPYCBK]<function 1> <function 2> Description: RPC calls are started by rpc_call_copycbk(). <function 1> and <function 2> are copy callback functions specified in rpc_call_copycbk(). Specification of the two callback functions is mandatory. The prototype for the callback functions must conform with the RPC specifications and has to be declared in a file included by the client stub.
  • Page 101: Section 7 Server Functions Not Supported By Rpcgen

    Section 7 Server Functions Not Supported by RPCGEN This section gives the types of functions not supported by RPCGEN. If a server function you are using falls under the definitions in this section, use SVRSTUB or CLNTSTUB so that RPCGEN will not create a server or client stub for the server function.
  • Page 102 (2) Multiple-level pointers RPCGEN only recognizes the first level of multiple-level pointers. Example: Specification of a server function int func(int **ptr); The function takes ptr, a pointer to a pointer to int-type data, as an input. Definition of the server function int ret = func([IN PTR] int **ptr);...
  • Page 103: Return Value

    Return Value (1) Pointer If a function returns a pointer-type value, this return value indicates an address in the server. RPCGEN does not create any code to transfer the data indicated by the pointer from the server to the client. Example: Specification of a server function int *func(int par);...
  • Page 104 Section 7 Server Functions Not Supported by RPCGEN Rev. 1.01 Mar. 17, 2008 Page 92 of 128 REJ10J1822-0101...
  • Page 105: Section 8 Application Interface

    Section 8 Application Interface Client-Stub Functions Generated by RPCGEN The client-stub functions are called by the client application. This section gives the specifications for the client-stub functions generated by RPCGEN. The client-stub functions must be called in accord with the definitions in these specifications. If CLNTSTUB is used to prevent creation of client-stub functions, the user must implement client- stub functions in accord with the specifications.
  • Page 106 (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 <config file>_clnt.c and the prototype declarations to <config file>_clnt.h.
  • Page 107: Server-Stub Functions Generated By Rpcgen

    Server-Stub Functions Generated by RPCGEN RPCGEN outputs the server-stub functions themselves to <config file>_svr.c and the prototype declarations to <config file>_svr.h. The name of each server-stub function takes the form rpcsvr_<server name>_<server function name>. <Server name> refers to the server name defined with SVR_NAME and <server function name>...
  • Page 108: Server-Initialization Function

    Server-Initialization Function The server-initialization function is called by the server application and starts up the server by using rpc_start_server() or rpc_start_server_with_paramarea(). When SVR_NOINIT has not been specified, RPCGEN generates a server-initialization function rpcsvr_<server name>_init. RPCGEN outputs the server-initialization function itself to <config file>_svr.c and the prototype declaration to <config file>_svr.h.
  • Page 109: Server-Stub Function Table

    • Specification The server is started up by calling rpc_start_server() when SVR_STATIC has not been specified or rpc_start_server_with_paramarea() when SVR_STATIC has been specified. When SVR_AUTH has not been specified, however, the definitions of server ID and version in __config. UlRPCServerID and __config. UlRPCServerVersion are ignored. Instead, the macros RPCSVR_ID_<server name>...
  • Page 110 (3) With SVR_NOSTUBTBL and without SVR_NOINIT RPCGEN does not generate the server-stub function table but does generate the server- initialization function. RPCGEN assumes that the server-stub function table shown below is provided in the application and outputs the server-initialization function, which externally refers to the table, to <config file>_svr.c.
  • Page 111: Server-Shutdown Function

    Server-Shutdown Function The server-shutdown function is called by the server application and stops the server by using rpc_stop_server(). When SVR_NOSHUTDOWN has not been specified, RPCGEN generates a server-shutdown function rpcsvr_<server name>_shutdown. RPCGEN outputs the server-shutdown function itself to <config file>_svr.c and the prototype declaration to <config file>_svr.h. <Server name>...
  • Page 112: Client-Initialization Function

    Client-Initialization Function The client-initialization function is called by the client application and initiates connection to the server by using rpc_connect(). When CLNT_NOINIT has not been specified, RPCGEN generates a client-initialization function rpcclnt_<server name>_init. RPCGEN outputs the client-initialization function itself to <config file>_clnt.c and the prototype declaration to <config file>_clnt.h.
  • Page 113: Client-Shutdown Function

    Client-Shutdown Function The client-shutdown function is called by the client application and terminates the connection to the server by using rpc_disconnect(). When CLNT_NOSHUTDOWN has not been specified, RPCGEN generates a client-shutdown function rpcclnt_<server name>_shutdown. RPCGEN outputs the client-shutdown function itself to <config file>_clnt.c and the prototype declaration to <config file>_clnt.h.
  • Page 114: Rpc_Retval_Adr()

    rpc_retval_adr() rpc_retval_adr() is a client function to be provided by the user when CLNT_CALLCHK (refer to section 5.6.3, CLNT_CALLCHK) is specified. rpc_retval_adr() must be created according to the specification given below. • C-language API INT32 *rpc_retval_adr(void); • Specification The address to hold the return value that depends on the context (task or non-task) in which rpc_retval_adr() was called is returned.
  • Page 115 • Example of implementation (for the HI7200/MP) #define MAXTSKID static INT32 retval[MAXTSKID+1]; INT32 *rpc_retval_adr(void) INT32 *retval_adr; myid; if(sns_ctx() == TRUE) /* In a non-task context */ retval_adr = retval; else /* In a task context */ get_tid(%myid); retval_adr = &retval[GET_LOCALID(myid)]; return retval_adr;...
  • Page 116: Config File>_Public.h

    <Config file>_public.h The following macro definitions are output to <config file>_public.h. #define RPCSVR_ID_<server name> #define RPCSVR_VERS_<server name> <Server name>, <server ID>, and <server version> refer to the server name, server ID, and server version defined with SVR_NAME, SVR_ID, and SVR_VERSION, respectively. The position of <config file>_public.h depends on whether SVR_AUTH has been specified or not.
  • Page 117: Section 9 Notes

    Section 9 Notes Section 9 Notes (1) Check that the source program generated by RPCGEN works as intended. We do not guarantee the operation of the program generated by RPCGEN. Be sure to check that the program works as you intended. RPCGEN does not report errors except in cases where a fatal error has been detected (i.e.
  • Page 118 Section 9 Notes Rev. 1.01 Mar. 17, 2008 Page 106 of 128 REJ10J1822-0101...
  • Page 119: Section 10 Error Messages

    Section 10 Error Messages RPCGEN shows an error message and terminates processing only when it has detected a fatal error (i.e. when continuing with the current processing is impossible). In other words, RPCGEN behaves as if it has successfully completed code generation in many cases where it has not in fact done so.
  • Page 120: General

    10.2 General Cannot open configuration file. RPCGEN cannot access the specified config file. No <keyword> definition. <keyword> must not be omitted. The <keyword> directory doesn't exist. The directory <keyword> was specified as a path by a definition such as PUB_INCPATH but does not exist.
  • Page 121: Section 11 Samples

    This section introduces samples of the code in a config file and the corresponding output files. To create these samples, we have used the C standard library functions and the HI7200/MP service calls listed in table 11.1. This is simply because we have assumed that most users will understand these functions, not because the functions should necessarily be distributed by the RPC facility.
  • Page 122: Config File (Sample.x)

    11.1 Config File (sample.x) /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ PUB_INCPATH {"include"}; SVR_SOURCEPATH {"server"}; SVR_INCPATH {"server"}; CLNT_SOURCEPATH {"client"}; CLNT_INCPATH {"client"}; xxx_private.h GLOBAL_INCFILE {<stdlib.h> "kernel.h"}; //SVR_INCFILE {"..." "..."}; //CLNT_INCFILE {"..." "..."}; SVR_NAME {SMPL}; SVR_ID {1}; SVR_VERSION {2}; // SVR_AUTH;...
  • Page 123 // stdlib.h [RETEXT] double ret = atof ([IN STR] const char *nptr); int ret = atoi ([IN REF STR] const char *nptr); // HI7200/MP service calls (renamed from original service call name) ER ercd = ref_tsk2 ([IN DFLT] ID tskid, [OUT PTR] T_RTSK *pk_rtsk); ER ercd = ref_sem2 ([IN DFLT] ID semid, [OUT PTR] T_RSEM *pk_rsem);...
  • Page 124: Sample_Clnt.h

    11.2 sample_clnt.h /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a * rebuild.
  • Page 125: Sample_Private.h

    #endif #endif /* End of _RPC_SMPL_CLNT_H */ 11.3 sample_private.h /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a...
  • Page 126: Sample_Clnt.c

    11.4 sample_clnt.c /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a * rebuild.
  • Page 127 UINT32 __ulOutputParamCount = 0UL; IOVEC __output[1]; double ret; UINT32 __ulReturn; __info.ulMarshallingType __info.ulServerID __info.ulServerVersion __info.ulServerProcedureID __info.AckMode __info.pInputIOVectorTable __info.ulInputIOVectorTableSize __info.pOutputIOVectorTable __info.ulOutputIOVectorTableSize = sizeof(__output) / sizeof (IOVEC); __info.pulLastOutputIOVectorSize __info.pulReturnValue __input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)(nptr); __input[ __ulInputParamCount++ ].ulSize = strlen((const char *)(nptr)) + 1UL; __output[ __ulOutputParamCount ].pBaseAddress __output[ __ulOutputParamCount++ ].ulSize *rpc_retval_adr() =...
  • Page 128 UINT32 __ulInputParamCount = 0UL; IOVEC __input[1]; int ret; __info.ulMarshallingType __info.ulServerID __info.ulServerVersion __info.ulServerProcedureID __info.AckMode __info.pInputIOVectorTable __info.ulInputIOVectorTableSize __info.pOutputIOVectorTable __info.ulOutputIOVectorTableSize __info.pulLastOutputIOVectorSize __info.pulReturnValue __input[ __ulInputParamCount ].pBaseAddress = (UINT8 *)&nptr; __input[ __ulInputParamCount++ ].ulSize *rpc_retval_adr() = return ret; ER ref_tsk2 ( ID tskid, UINT32 __ulLastOutputIOVectorSize; rpc_call_info __info; UINT32 __ulInputParamCount = 0UL;...
  • Page 129 __info.ulMarshallingType __info.ulServerID __info.ulServerVersion __info.ulServerProcedureID __info.AckMode __info.pInputIOVectorTable __info.ulInputIOVectorTableSize __info.pOutputIOVectorTable __info.ulOutputIOVectorTableSize (IOVEC); __info.pulLastOutputIOVectorSize __info.pulReturnValue __input[ __ulInputParamCount ].pBaseAddress = &tskid; __input[ __ulInputParamCount++ ].ulSize __output[ __ulOutputParamCount ].pBaseAddress __output[ __ulOutputParamCount++ ].ulSize *rpc_retval_adr() = return ercd; ER ref_sem2 ( ID semid, UINT32 __ulLastOutputIOVectorSize; rpc_call_info __info; UINT32 __ulInputParamCount = 0UL; IOVEC __input[1];...
  • Page 130 __info.ulMarshallingType __info.ulServerID __info.ulServerVersion __info.ulServerProcedureID __info.AckMode __info.pInputIOVectorTable __info.ulInputIOVectorTableSize __info.pOutputIOVectorTable __info.ulOutputIOVectorTableSize (IOVEC); __info.pulLastOutputIOVectorSize __info.pulReturnValue __input[ __ulInputParamCount ].pBaseAddress = &semid; __input[ __ulInputParamCount++ ].ulSize __output[ __ulOutputParamCount ].pBaseAddress __output[ __ulOutputParamCount++ ].ulSize *rpc_retval_adr() = return ercd; INT32 rpcclnt_SMPL_init ( UINT32 __ulRPCServerID, UINT32 __ulRPCServerVersion ) return rpc_connect( RPCSVR_ID_SMPL, RPCSVR_VERS_SMPL ); INT32 rpcclnt_SMPL_shutdown ( UINT32 __ulRPCServerID, UINT32 __ulRPCServerVersion ) return rpc_disconnect( RPCSVR_ID_SMPL, RPCSVR_VERS_SMPL, NULL, 0UL...
  • Page 131 Section 11 Samples Rev. 1.01 Mar. 17, 2008 Page 119 of 128 REJ10J1822-0101...
  • Page 132: Sample_Svr.h

    11.5 sample_svr.h /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a * rebuild.
  • Page 133 Section 11 Samples UINT32 rpcsvr_SMPL_ref_sem2( rpc_server_stub_info * __pInfo ); INT32 rpcsvr_SMPL_init ( rpc_svr_config * __config ); INT32 rpcsvr_SMPL_shutdown ( UINT32 __ulServerID, UINT32 __ulServerVersion ); #ifdef __cplusplus #endif #endif /* End of _RPC_SMPL_SVR_H */ Rev. 1.01 Mar. 17, 2008 Page 121 of 128 REJ10J1822-0101...
  • Page 134: Sample_Svr.c

    11.6 sample_svr.c /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a * rebuild.
  • Page 135 nptr = ( const char *)( __pInfo->pucParamArea + __ulInputParamOffset); ret = atof( nptr ); *((double *)(__pInfo->pOutputIOVectorTable[ __ulOutputParamCount ].pBaseAddress)) = ret; __pInfo->pOutputIOVectorTable[ __ulOutputParamCount ].ulSize = sizeof(double); __pInfo->ulOutputIOVectorTableSize = 1UL; return (UINT32)NULL; UINT32 rpcsvr_SMPL_atoi( rpc_server_stub_info * __pInfo ) const char * nptr; UINT32 __ulInputParamOffset = 0UL;...
  • Page 136 T_RTSK * pk_rtsk; UINT32 __ulInputParamOffset = 0UL; UINT32 __ulOutputParamCount = 0UL; ER ercd; tskid = *(ID *)( __pInfo->pucParamArea + __ulInputParamOffset); __ulInputParamOffset += ALIGNUP4(sizeof(ID)); pk_rtsk = ( T_RTSK *)( __pInfo->pucParamArea + __ulInputParamOffset); ercd = ref_tsk2( tskid, pk_rtsk ); __pInfo->pOutputIOVectorTable[ __ulOutputParamCount ].pBaseAddress = pk_rtsk; __pInfo->pOutputIOVectorTable[ __ulOutputParamCount++ ].ulSize = sizeof(*pk_rtsk);...
  • Page 137 pk_rsem = ( T_RSEM *)( __pInfo->pucParamArea + __ulInputParamOffset); ercd = ref_sem2( semid, pk_rsem ); __pInfo->pOutputIOVectorTable[ __ulOutputParamCount ].pBaseAddress = pk_rsem; __pInfo->pOutputIOVectorTable[ __ulOutputParamCount++ ].ulSize = sizeof(*pk_rsem); __pInfo->ulOutputIOVectorTableSize = 1UL; return ((UINT32)ercd); static UINT32 (* const __rpcsvr_SMPL_StubTable[])(rpc_server_stub_info *) = rpcsvr_SMPL_atof, rpcsvr_SMPL_atoi, rpcsvr_SMPL_ref_tsk2, rpcsvr_SMPL_ref_sem2, INT32 rpcsvr_SMPL_init ( rpc_svr_config * __config ) rpc_server_info __server_info;...
  • Page 138 __server_info.ulRPCServerVersion __server_info.ServerStubTaskPriority >ServerStubTaskPriority; __server_info.ServerStubList __server_info.ulNumFunctions __server_info.ulStubStackSize >ulStubStackSize; __server_info.pUserDefinedData >pUserDefinedData; __server_info.ulMaxParamAreaSize >ulMaxParamAreaSize; return rpc_start_server( &__server_info ); INT32 rpcsvr_SMPL_shutdown ( UINT32 __ulServerID, UINT32 __ulServerVersion ) return rpc_stop_server( RPCSVR_ID_SMPL, RPCSVR_VERS_SMPL, NULL, 0UL Rev. 1.01 Mar. 17, 2008 Page 126 of 128 REJ10J1822-0101 = RPCSVR_VERS_SMPL; = __config- = __rpcsvr_SMPL_StubTable;...
  • Page 139: Sample_Public.h

    11.7 sample_public.h /********************************************************************** File Header Comment : Sample Config File for RPCGEN **********************************************************************/ /********************************************************************** * Do not edit, unless you really know what you are doing, * this file was automatically generated by: rpcgen.pl on 2007/11/28 * Be aware that this file may be generated as part of the build and * therefore any changes made by hand will possibly be lost on a * rebuild.
  • Page 140 Section 11 Samples Rev. 1.01 Mar. 17, 2008 Page 128 of 128 REJ10J1822-0101...
  • Page 141 Stub Generator V.1.00 Publication Date: Rev.1.01, March 17, 2008 Published by: Sales Strategic Planning Div. Renesas Technology Corp. Edited by: Customer Support Department Global Strategic Communication Div. Renesas Solutions Corp. © 2008. Renesas Technology Corp., All rights reserved. Printed in Japan.
  • Page 142 Nippon Bldg., 2-6-2, Ohte-machi, Chiyoda-ku, Tokyo 100-0004, Japan http://www.renesas.com RENESAS SALES OFFICES Refer to "http://www.renesas.com/en/network" for the latest and detailed information. Renesas Technology America, Inc. 450 Holger Way, San Jose, CA 95134-1368, U.S.A Tel: <1> (408) 382-7500, Fax: <1> (408) 382-7501 Renesas Technology Europe Limited Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, U.K.
  • Page 144 Stub Generator V.1.00 User’s Manual 1753, Shimonumabe, Nakahara-ku, Kawasaki-shi, Kanagawa 211-8668 Japan REJ10J1822-0101...

This manual is also suitable for:

Stub generator rej10j1822-0101

Table of Contents