next up previous top
Next: Trace
Up: Property
Previous: SegmentSet

Signature

Description

The Signature property is used to further specify a player definition in UniCon. It is only legal in the property lists of players of the following types: GlobalDataDef,
GobalDataUse, ReadFile, RPCCall, RPCDef, RoutineCall, RoutineDef, StreamIn, StreamOut, and WriteFile. It is used to specify the data types of the arguments and the return values in routine players, the data types of global data players, and the structure of the data in stream players.

Property Lists

The Signature property can legally be specified in the property list in the following UniCon language element:

Value Syntax

The syntax of the value part of the Signature property depends upon the <player_type> in the <player> definition in which it is specified.

The syntax for the Signature property in a GlobalDataDef player is a single <identifier> or "string" surrounded by parentheses.

The syntax for the Signature property in a GlobalDataUse player is a single <identifier> or "string" surrounded by parentheses.
The syntax for the Signature property in a ReadFile player is a list of items that are either <identifier>s or "string"s, surrounded by parentheses.
The syntax for the Signature property in a RoutineCall 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 comma-separated 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.
The syntax for the Signature property in a RoutineDef 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 comma-separated 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.
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.
The syntax for the Signature property in an RPCDef 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.
The syntax for the Signature property in a StreamIn player is a single <identifier> or "string", surrounded by parentheses.
The syntax for the Signature property in a StreamOut player is a single <identifier> or "string", surrounded by parentheses.
The syntax for the Signature property in a WriteFile player is a list of items that are either <identifier>s or "string"s, surrounded by parentheses.

Required Rule

Required

There is no default value for the Signature property.

Merge Rule

ERROR

Subsequent specifications of the Signature property in a single property list are reported as errors. The UniCon compiler uses the first of the duplicate Signature properties it encounters.

Semantic Checks

There are no semantic checks performed on the value of the Signature property. However, UniCon does perform signature checking in connections. All errors encountered in signature checking of players in connections are reported as Warnings, allowing the system to be constructed regardless of the mismatches.

  1. In ProcedureCall connections, the UniCon compiler compares the signature of each RoutineCall player with the signature of the RoutineDef player. The number of arguments in each signature, the data types of the arguments in corresponding positions in the argument lists, and the data types of the return values are compared. If the signatures are not identical in each comparison, UniCon reports the mismatches as errors.

  2. In RemoteProcCall connections, the UniCon compiler compares the signature of each RPCCall player with the signature of the RPCDef player. The number of arguments in each signature, the data types of the arguments in corresponding positions in the argument lists, and the data types of the return values are compared. If the signatures are not identical in each comparison, UniCon reports the mismatches as errors.

  3. In DataAccess connections, the UniCon compiler compares the signature of each GlobalDataUse player with the signature of the GlobalDataDef player. The data type constituting the signature in each player is compared. If the signatures are not identical, UniCon reports the mismatch as an error.

  4. In Pipe connections, the UniCon compiler connects StreamIn players to StreamOut players, StreamIn players to ReadNext players, and StreamOut players to WriteNext players. In the first case, the data type constituting the signature of the StreamIn player is compared with the data type of the StreamOut player. In the other two cases, the data type of the StreamIn or StreamOut player is compared with the first data type in the list of data types in the RecordFormat property of the component containing the ReadNext or WriteNext player. If the data types are not identical, UniCon reports the mismatch as an error.

Example

The following are examples of specifications of Signature properties. There is an example for every player type for which a Signature property is legal:

  PLAYER input_data_stream IS StreamIn
    SIGNATURE ("line")
  END input_data_stream
PLAYER output_data_stream IS StreamOut SIGNATURE ("line") END output_data_stream
PLAYER global_variable IS GlobalDataDef SIGNATURE ("int") END global_variable
PLAYER global_variable IS GlobalDataUse SIGNATURE ("int") END global_variable
PLAYER local_routine IS RoutineCall SIGNATURE ("int", "char *"; "void") END local_routine
PLAYER local_routine IS RoutineDef SIGNATURE ("int", "char *"; "void") END local_routine
PLAYER remote_routine IS RPCCall SIGNATURE ("int", "double"; "void") END remote_routine
PLAYER remote_routine IS RPCDef SIGNATURE ("int", "double"; "void") END remote_routine
PLAYER read IS ReadFile SIGNATURE ("line") END read
PLAYER write IS WriteFile SIGNATURE ("line") END write

next up previous top
Next: Trace
Up: Property
Previous: SegmentSet

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996