Next: 2 Meta Operator TypeSpecs
Up: 1 General Operator TypeSpec
Previous: 1 Struct TypeSpec
<Union TypeSpec> ::=
MP_CommonOperatorPkt(MP_Union)n<MP TypeSpec>n
MP_Union is a union of n prototypes (MP Typespecs).
The index n to a packet specification indicates that this packet has
n arguments, each of which is a prototype (MP TypeSpec) and
the indices 1 to n are used for union discrimination.
The index 1 refers to the first prototype, index 2
to the second prototype, and so on.
At communication time, when the sender is preparing to put a value
described by a MP_Union operator, the sender must
first put an IMP_Uint32 in the range 1 to n in the data
packet.
This discriminator is followed by the data.
In parsing the prototype, the receiver must remain aware of
MP_Union operators and store the argument prototypes in
the proper order.
In reading the incoming data for a node described by a
MP_Union, the parser must first read in an
IMP_Uint32 identifying the particular prototype to use, then
read in the data according to that prototype.
Obviously, if the receiver reads an index greater than n, an error
must be returned.
An example is given at the end of the section.
Next: 2 Meta Operator TypeSpecs
Up: 1 General Operator TypeSpec
Previous: 1 Struct TypeSpec
| ZCA Home |
Reports |