User's Manual

Engineering Test Software Operation
Rev 28_A Sept 2005
VIA Telecom, Inc. Proprietary
11
3.2.6 GlobalVar Definition
GlobalVar section defines the global variables in all ETS text definitions. Each entry in this section specifies the
following:
The name of the global variable
The default value of this global variable
The following is an example:
Begin GlobalVar, Only One Global Var Block
PREV, default = 6
; add more here
End
There are two ways to use a global variable, as described in the next two sections.
3.2.6.1 Associating a field with a global variable
To associate a field with a global variable, use GlobalVar attribute for a field. For example:
P REV, count = 8, GlobalVar=PREV, indent = 2
This means that if ETS is going to consume a message with this field, ETS will set the global variable PREV
based on the value of this field. If ETS is going to produce a message with this field, ETS will use the value of
global variable PREV to encode this field.
3.2.6.2 Using “exist” Condition Based on a Global Variable for a Field
For example:
CDMA Freq, count = 8, indent = 2, exist = (PREV > 5)
Here the PREV is a global variable specified in the GlobalVar section.
3.2.6.3 Using “exist” Condition Based on a Global Variable for a Group of Fields
For example:
Begin Message, CP Spy CP PE ENG_LAYER2_TR 13 15 Rsp, BitPack
;…
Prat, count = 2, indent = 2
#existif (PREV >5)
CDMA Freq, count = 11, indent = 2
Ext CDMA Freq, count = 11, indent = 2
#endexistif
; …
End
The two fields, “CDMA Freq” and “Ext CDMA Freq”, only exist when the global variable PREV is greater than 5.
3.2.7 Conditional Definitions
ETS Definitions can be defined conditional on global variables using #existif, #orexistif, and #endexistif. Field
names must still be unique (no duplicated field allowed) even if they appear in different conditional statements.
The following is an example of the syntax for commands that are disabled based on a condition of a global
variable: