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:/includeAfter 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.
There is no default value for the RPCTypesIn property.
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.
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
Author:
Last Modified: May 12, 1996