Protocol decoding section, Define option block, Rotocol – Teledyne LeCroy User-Defined Decoding (UDD) Advanced Script Language (ASL) Reference Manual User Manual

Page 12: Ecoding, Ection

Advertising
background image

9

Protocol Decoding Section

[Decoding]
Define Options Block

Valid Ranges Block
Main Block

End


As specified above, the decoding section starts with [Decoding] keyword and ends with End
keyword. You should write the decoding program in this section.

This section consists of Define Option Block, Valid Ranges Block, and Main Block with ASL
Decoding Statements
. Keywords designate the start and the end of each block.

Define Option Block

DefineOptions

fieldId1 = ( Description1, Value11-Value12 ;

Description2, Value21-Value22;

Description3, Value3);

fieldId2 = ( Description4, Value4 ;

Description5, Value51, Value52;

);

EndOptions

Remark

If a protocol has a field such that each value of that field has an equivalent string, ASL makes this
field an optional field. You can define different options of optional fields by the DefineOptions
statement.

FieldId is a string that specifies the ID of an optional field.

Parameters

Value is the value of option of the field with specified fieldId.

Value1
is lower range for data of the field with specified fieldId.

Value2 is upper range for data of the field with specified fieldId. This value is optional. If you want
to specify a range for one of options of a field, you must use Value2.

Description string is the description for the specified range (Value1 to Value2) or specified value.
For format of this parameter see Formatted String Structure

.


Example

/* F3, F4, F1 and BlockStatus are fields. */
DefineOptions
F3 = (“First Option”, 0x0000-0x1000, “Second Option”, 0x1001-4352);
F4 = (“Option 1 for F4”, 0x0-14, “Option 2 for F4”, 0x0f);
F1 =(“Option for F1”, 0x00-0xff);
BlockStatus = (“Option for BlockStatus”, 0-0x1100);
EndOptions

Advertising