next up previous top
Next: RPCDef
Up: Player Type
Previous: RoutineDef

RPCCall

Semantics

The player type RPCCall corresponds to an imported remote procedure in a component. An imported remote procedure is actually realized as a call to a remote procedure definition that is located in (i.e., exported by) another component. The remote procedure call has a name and a signature. The name refers to the name of the remote procedure as it appears in the definition in the exporting component, and the signature describes the expectations that the importing component has regarding the types of the arguments and the type of the return value in the remote procedure definition (the RPCDef player in the exporting component specifies the actual signature).

An RPCCall player describes a call made in one process to a service located in a remote process. It does not describe a call to a function or procedure defined within the same process. Remote procedure calls are made between RPCCall and RPCDef players defined in Process or SchedProcess components.

Component Types In

A player of type RPCCall can legally be defined in components of the following types:

Role Type
Associations

A player of type RPCCall can legally be associated with the following role type in a RemoteProcCall connection:

Properties

The following properties can be legally included in the property list of an RPCCall player:

The syntax for the MaxAssocs property in an RPCCall player is a single <integer> surrounded by parentheses:

MAXASSOCS (1)
The syntax for the MinAssocs property in an RPCCall player is a single <integer> surrounded by parentheses:

MINASSOCS (1)
The syntax for the Signature property in an RPCCall player consists of two fields, separated by a semicolon, surrounded by parentheses. Each of the fields is optional, yet one of them must be specified. The first field is a list of items that are either <identifier>s or "string"s. The second field is a single <identifier> or "string". If the first field is omitted, the semicolon is required. If the second field is omitted, the semicolon must not be present:

SIGNATURE (int, "char *", double; "void")
SIGNATURE (int, "char *", double)
SIGNATURE (; "void")

Implementation Considerations

In the source code implementation, an RPCCall player is implemented as a local procedure or function call, in the syntax of the given programming language (in this case C). The UniCon compiler generates the glue code to turn the local routine call into a remote procedure call, and the support for the remote procedure call gets built at system construction time. The following are examples of local function calls in C (in boldface type) that eventually get turned into remote procedure calls at system construction time:

/* assume the function returns an integer result, and the variable is of type integer */
an_integer = a_remote_function_call (parameter1, parameter2);
/* the result of the remote function call below is discarded, making it look like a remote procedure call */ a_remote_procedure_call (parameter1, parameter2);
NOTE: The UniCon compiler generates glue code that supports two forms of remote procedure calls: InterProcess Communication (IPC) calls on Mach platforms, and RPCGen-based remote procedure calls on SunOS platforms. The Mach IPC facility does not permit remote function calls, only remote procedure calls. Therefore, no remote procedure call in a Mach application may return a value (i.e., all remote procedure calls must look like example number two, above). If results must be returned in a Mach application, they must be returned via the arguments in the argument list.


next up previous top
Next: RPCDef
Up: Player Type
Previous: RoutineDef

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996