Jump to content United States-English
HP.com Home Products and Services Support and Drivers Solutions How to Buy
» Contact HP
More options
HP.com home
DCE for the HP e3000: HP e3000 MPE/iX Computer Systems > Chapter 6 Introduction to RPC

DCE-IDL Compiler for RPC 1.2.1

» 

Technical documentation

Complete book in PDF
» Feedback
Content starts here

 » Table of Contents

 » Index

Out-of-Line Marshalling

Out-of-line marshalling (library-based marshalling) causes constructed data types such as unions, pipes or large structures to be marshalled or unmarshalled by auxiliary routines, thus reducing the stub size. The out_of_line attribute directs the IDL compiler to place the marshalling and unmarshalling code in IDL auxiliary stub files, rather than in the direct flow of the stub code.

In-line/Out_of_line: The in_line and out_of_line attributes affect the stub code generated for marshaling and unmarshalling non-scalar parameters (Non-scalar types include int, float, char and pointers in C). Normally IDL compiler generates marshalling and unmarshalling code for all parameters in line. This means that if the same data type is used repeatedly, the identical code will appear in multiple places. If out_of_line is specified, the marshaling and unmarshalling code will be provided as a subroutine, which is called from wherever it is needed.

Enhancing IDL Data Types

IDL support for arrays in previous version was limited to:

  • Arrays with a lower bound of zero.

  • Arrays with conformance or varying dimensions only in the first (major) dimension.

The current version of IDL will remove these restrictions by supporting fully general arrays as described in the IDL functional specification. The following example includes declarations that were not supported in previous version that, but are allowed now:

  • long c1[][4];

  • long c2[][0..3]; /* Same array shape as c1 */

  • long c3[0..*][4]; /* Same array shape as c1 */

  • long c4[0..*][0..3]; /* Same array shape as c1 */

  • float d1[1..10]; /* Equivalent to FORTRAN REAL D1(10) */

  • float d2[*..10]; /* Lower bound is determined at run time */

  • float d3[*..*]; /* Both bounds determined at run time */

The <attr_var>s are in one-to-one correspondence with the dimensions of the array, starting at the first. If there are fewer <attr_var>s than the array has dimensions, the missing <attr_var>s are assumed to be null. An <attr_var> will be non-null if and only if the lower bound of the corresponding dimension is determined at runtime. Not all <attr_var>s in a min_is clause can be null. Below are examples of the syntax. Assume values of variables are as follows: long a = -10; long b = -20; long c = -30; long d = 15; long e = 25.

  • min_is(a)] long g1[*..10]; /* g1[-10..10] */

  • [min_is(a)] long g2[*..10][4]; /* g2[-10..10][0..3] */

  • [min_is(a,b)] long g3[*..10][*..20]; /* g3[-10..10][-20..20] */

  • [min_is(,b)] long g4[2][*..20]; /* g4[0..1][-20..20] */

  • [min_is(a,,c)] long g5[*..7][2..9][*..8]; /* g5[-10..7][2..9][-30..8] */

  • [min_is(a,b,)] long g6[*..10][*..20][3..8]; /* g6[-10..10][-20..20][3..8] */

  • [max_is(,,e),min_is(a)] long g7[*..1][2..9][3..*]; /* g7[-10..1][2..9][3..25] */

  • [min_is(a,,c),max_is(,d,e)] long g8[*..1][2..*][*..*];/* g8[-10..1][2..15][-30..25] */

Support for IDL Encoding Services

This extension to the IDL stub compiler will enable instances of one or more data types to be encoded into and decoded from a byte stream format suitable for persistent storage without invoking RPC Runtime.

The encode and decode attributes are used in conjunction with IDL Encoding service routines (idl_es*) to enable RPC applications to encode datatypes in input parameters into a byte stream and decode datatypes in output parameters from a byte stream without invoking the RPC runtime. Encoding and decoding operations are analogous to marshaling and unmarshalling, except that the data is stored locally and is not transmitted over the network.

Support for User Defined Exceptions

This extension to the IDL compiler will allow specification of a set of user-defined exceptions that may be generated by the server implementation of the interface. If an exception occurs during the execution of the server, it terminates the operation and the exception is propagated from server to client.

Support for Customized Binding Handles

This allows the application developer to add some information that the application wants to pass between the client and server. This can be used when application-specific data is appropriate to use for finding a server and the data is needed as a procedure parameter.

Printable version
Privacy statement Using this site means you accept its terms Feedback to webmaster
© Hewlett-Packard Development Company, L.P.