A procedure accepts the following types of input parameters:
When you specify a direct value as a parameter, you must specify its type. Value types have a derivation hierarchy, which is shown in the following table. You can use a more specialized type for a more general type. For example, you can use a model handle in place of an unsigned integer, and you can use either of these types in place of a number.
When a parameter has a type that is not the same as or a derivative of the expected type, if the type is similar, most procedures attempt a conversion to the expected type. If a conversion fails or is not performed, an error occurs.
Note: You can use the ToUInteger procedure (provided with CA Spectrum) to convert a parameter value to an unsigned integer. Many times, this can help to avoid errors due to expected versus actual parameter types.
To specify a parameter type in a procedure, you specify a letter (a short symbol) for the type. For example, both of the parameters in the following procedure are handles (IDs), which are indicated by the letter ‘H.’ The first handle specifies the model for which to generate the event, and the second handle specifies the event to generate.
CreateEvent( { H 0x29c00003 }, { H 0xffff0000 } )
The table that follows provides a short list of parameter types, their derivation hierarchy, and their associated short symbols. For the complete list of short symbols, see EventCondition Rule.
|
Parameter Type |
Description |
Short Symbol |
|---|---|---|
|
Object |
Derivation root |
N/A |
|
List |
List root |
N/A |
|
AttributeList |
List of attribute values |
N/A |
|
EventVariableList |
List of event variables |
N/A |
|
Attribute Value |
Any possible attribute value |
N/A |
|
Number |
Number root |
N/A |
|
Integer |
An integer value |
I |
|
Unsigned Integer |
An unsigned integer value |
U |
|
DateTime |
A time value |
T |
|
ModelHandle |
A model handle |
H |
|
ModelType |
A model type handle |
H |
|
RelationHandle |
A relation handle |
H |
|
Attribute ID |
An attribute ID |
a |
|
Unsigned Long |
An unsigned long (64-bit) value |
L |
|
Boolean |
A Boolean value |
B |
|
Double |
A real value |
R |
|
String |
String root |
N/A |
|
Text String |
A String value |
S |
|
Octet String |
An octet String value |
O |
|
Tagged Octet String |
A hexadecimal tagged octet String |
X |
|
Object ID |
An object ID value |
o |
|
IP Address |
An IP address |
A |
|
Variable |
The value of a variable |
V |
You specify a constant using the letter C followed by the reserved word for the constant. For example, the following procedure creates event 0xffff0000 for the current model:
CreateEvent( {C CURRENT_MODEL}, { H 0xffff0000 } )
You can use the following list of constants in procedures in event maps:
The current event, which is set in the environment automatically by the SpectroSERVER.
The current model, which is set in the environment automatically by the SpectroSERVER.
The model on the left side of an association.
The model on the right side of an association.
The model on either side of an association.
|
Copyright © 2014 CA.
All rights reserved.
|
|