User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
VIA Telecom, Inc. Proprietary
21
;*****************************************************
; ETS Message ID Definition
;*****************************************************
Begin Message, ETS
Id, uint16, base=enum:ETS Id
; ETS CP DB Read CP Read Command
;********************************************************
Begin Message, CP DB Read CP Read Cmd
Segment, uint8, base=enum:CP DB Segments
Offset, uint16, base=10
Bytes, uint16, base=10, max=217
End
End
Full
Message
Figure 6. Message with Union Submessage Substitution
3.3.7.1 Union Field Identifier
The identifier field, for a union field, determines which union member is to be used. Normally the identifier field
needs to be specified before the union field is defined. That is because union members are of variable length.
As shown in the following definition, the union field is defined after its associated identifier field.
Example:
Begin Message, ETS
Id, uint16, base=enum:ETS Id
Message, union ,enum=Id
End
If the specific size of the union data is known it is possible to have a union identifier follow the union. This could
either be because each of the union members are of the same length or because there is a field prior to the
union field that determines the size of the union data. Only under these circumstances can the union identifier
follow the union. For this to work the union field must contain either the ConsumeBits field parameter or the
ConsumeBytes field parameter to define the length of the union submessage.
Example:
Begin Record, Overhead Message Record, Bitpack
T1T2, count=2, indent=2
DCC, count=2, indent=2
Msg, union, enum=OHD, ConsumeBits=21
OHD, count=3, base=enum:FOCC Overhead Message Enum
End