next up previous top
Next: SegmentDef
Up: Property
Previous: RPCTypeDef

RPCTypesIn

Description

The RPCTypesIn property is used to further specify Process and SchedProcess component instantiations and definitions in UniCon. It is used to describe the set of files in the file system that contain the source code data type definitions corresponding to the complex data types defined in RPCTypeDef properties in the same component.

The glue code generated to support remote procedure calls between processes (see the Description for the RPCTypeDef property) requires visibility of the type definitions for all the data types of the arguments in the signatures of the remote routine calls and definitions. The UniCon compiler, therefore, must know the location of the actual data type definitions in the source code implementation of a system so that it can pass the information along to the IDL compiler of the appropriate RPC facility in order to generate the glue code. The RPCTypesIn property allows the system designer to specify the names and locations of these files. As with the RPCTypeDef property, the RPCTypesIn property is only necessary if the data types of some of the arguments in the remote routine calls and definitions are complex data types (i.e., data types that are not one of the pre-defined simple C standard data types: short, int, long, float, double, char, and unsigned; character string data types are considered to be complex. See the Description for the RPCTypeDef property for more information).

It is recommended that all complex data type definitions be placed in C language include files, and that these files be included in the source code implementing a Process or
SchedProcess component with the #include C language preprocessor directive. This allows the data type definitions to be easily included in the generated glue code in the same way (the UniCon compiler does the inclusion automatically via the IDL specification of the remote routine definitions).

Each file name in the RPCTypesIn list can either be fully qualified with an absolute or relative path specification, or it may simply be the name of the file. During the semantic checking phase of compilation, the UniCon compiler checks for the existance of each file in the file system. If the file name does not contain path information, the UniCon compiler first looks in the current directory for the file (i.e., the current working directory in the Unix environment in which the system designer invoked the compiler). If the file is not found there, it searches all of the directories specified in the CPATH environment variable for the file. In the Unix environment, the CPATH environment variable can be set as follows:

  setenv CPATH /usr/gz/include:/usr/include:/include
After performing the above command at the Unix shell prompt, the CPATH variable contains a colon-separated list of directory paths. The UniCon compiler searches each directory until it finds the file. It searches the directories from left to right, so in the example above it would first search the directory /usr/gz/include. If the file did not exist there, the compiler would next search the directory /usr/include, and so on. If the UniCon compiler does not find the file in the current directory or in the directories in the CPATH environment variable, it reports an error message stating that the file does not exist.

NOTE: The CPATH environment variable must be set in the Unix environment prior to the invocation of the UniCon compiler.

Lastly, relative path names are interpreted beginning from the current working directory in the Unix environment in which the UniCon compiler is invoked. Relative path names in a UniCon definition are not recommended. The location from which the UniCon compiler is invoked cannot usually be guaranteed from compilation to compilation. Either absolute path names should be specified in the file name, or no path names at all.

Property Lists

The RPCTypesIn property can legally be specified in the property list in the following
UniCon language elements:

Value Syntax

The syntax of the value part of the RPCTypesIn property consists of a list of items that are <identifier>s or "string"s enclosed in parentheses.

Required Rule

Optional

There is no default value for the RPCTypesIn property.

Merge Rule

MERGE

More than one specification of the RPCTypesIn property in a single property list is treated as a single specification with the union of all values in all of the specifications.

Semantic Checks

Each element in the list of the RPCTypesIn property represents a file name containing type definitions that implement the complex data types defined in RPCTypeDef properties. The only semantic check made on the value of the RPCTypesIn property is to check that the files associated with the file names in the list exist in the file system.

Example

The following are examples of specifications of RPCTypesIn properties. They are embedded in the instantiation of a SchedProcess component:

  USES Server INTERFACE RTServer
    PRIORITY (2)
    RPCTYPEDEF (new_type; struct; 12)
    RPCTYPEDEF (another_type; new_type)
    RPCTYPEDEF (an_array_type; char; [12] 25)
    RPCTYPESIN ("server_app1.h")
    RPCTYPESIN ("/usr/gz/include/server_app2.h")
  END Server

next up previous top
Next: SegmentDef
Up: Property
Previous: RPCTypeDef

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996