beautypg.com

21 name aliasing, Name aliasing, Alias – Teledyne LeCroy UWBTrainer Exerciser Script Language User Manual

Page 115

background image

LeCroy Corporation

UWBTrainer Exerciser - Generation Script Language Reference Manual

107

10.21 Name Aliasing

You can specify different names for named generation language syntax objects, such as
constants, settings, data patterns, templates, variables, generation procedures, instructions, and
named instruction parameters.

For example, you can specify a name that is more understandable for a specific user. You can
also use the same object in different contexts.

After a name alias is created, for the script parser, the alias_name is equivalent to the
alias_value.

Note: Though you can create many name aliases for the same alias value, you cannot redefine a
name alias that was defined before. Also, you cannot create aliases for language keywords, so
syntax constructions (like Send) can never be named objects.

Format

%alias

Alias_Name = Alias_Value

Examples

%alias

TxPower = UwbTxPower

%alias

RegTimer = ConditionRegisterTimer

%alias

WM_FRAME = WIMEDIA_LONG_TEMPLATE_NAME

Set

TxPower =

8

# Use an alias for the 'UwbTxPower' setting.

Frame

WIMEDIA_LONG_TEMPLATE_NAME

{

Data : *

}

Main

{

# Use an alias for the 'ConditionRegisterTimer' instruction.

# Register the auto-reset timer condition named 'TIMER_COND'.

RegTimer ( TIMER_COND,

2000

)

Send

WIMEDIA_LONG_TEMPLATE_NAME

{

Data = {

AA BB CC DD

}

}

# Use an alias for the 'WIMEDIA_LONG_TEMPLATE_NAME' template.

# Send a frame based on the 'WIMEDIA_LONG_TEMPLATE_NAME' template.

# Using aliases for frame/structure templates allows you to

# use short names instead of the long names defined in

# large template libraries.

Send

WM_FRAME

{

Data = {

AA BB CC DD

}

}

}