next up previous top
Next: MaxConns
Up: Property
Previous: Match

MaxAssocs

Description

The MaxAssocs property is used to further specify a player definition in UniCon. It defines the maximum number of connections in which a player can be involved. To illustrate, a player with a MaxAssocs value of 2 cannot be connected more than two times in a system. This number represents a maximum, not a requirement.

WARNING: In a system described by UniCon, when two players are involved in a bind the external player inherits the number of connections made to an internal player. This may have a bearing on the MaxAssocs value that the system designer chooses for external players in components with composite implementations.

Additionally, the system designer must not choose a MaxAssocs value for an external player which represents an increase in the maximum number of connections to the internal player as specified by its MaxAssocs value. This would defeat the purpose of the
MaxAssocs value of the player to which the external player is ultimately bound - the player corresponding to the source code that implements it in the component with the primitive implementation.

Property Lists

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

Value Syntax

The syntax of the value of the MaxAssocs property is a simple <integer>.

Required Rule

Optional

Each player type has its own default:

----------------------
Player Type    Default  
----------------------
GlobalDataDef  65535        
GlobalDataUse  1        
PLBundle       65535        
RPCCall        1        
RPCDef         65535        
ReadFile       1        
ReadNext       1        
RoutineCall    1        
RoutineDef     65535        
RTLoad         65535        
StreamIn       1        
StreamOut      1        
WriteFile      1        
WriteNext      1        
----------------------

Merge Rule

REPLACE

Subsequent specifications of the MaxAssocs property in a single property list replace earlier specifications (i.e., the last specification is the one that the UniCon compiler uses).

Semantic Checks

The following are the semantic checks performed on the value of the MaxAssocs property:

  1. The value of the MaxAssocs property may not be negative.

  2. The value of the MaxAssocs property cannot exceed the maximum size of an integer in the UniCon language; that value is 65535.

  3. The value of the MaxAssocs property must be at least as large as the value of a player's MinAssocs value.

Example

The following is an example of a specification of a MaxAssocs property. It is embedded in a player definition of type RoutineCall:

  PLAYER heap_sort IS RoutineCall
    SIGNATURE ("int *"; "int *")
    MAXASSOCS (1)
  END heap_sort
The above example prevents the heap_sort RoutineCall player from being connected more than once per instantiation of the component in which it is defined.


next up previous top
Next: MaxConns
Up: Property
Previous: Match

Comments? Mail the current maintainer of this page.

Author: Gregory Zelesnik

Last Modified: May 12, 1996