beautypg.com

Main block, Asl decoding statements – Teledyne LeCroy User-Defined Decoding (UDD) Advanced Script Language (ASL) Reference Manual User Manual

Page 14

background image

11

Main Block

Main block contains statements.

Block
{
Statement 1 ;
Statement 2 ;
Statement 3 ;

}

ASL Decoding Statements


Below are Advance Script Language statements that can be used in this block.

Addfield

fieldId = AddField ( StartBit, Length, Name, Description,
Abbreviation, BitOrder )


Remark

fieldId
is a string that specifies ID of fields. Each field has a unique ID. This IDd is the one that you
can use when you want to refer to that field.

This statement adds a field to packet with given specification. This function increases CURPOS one
Length.

Note: CURPOS is a pointer that, when a field is added, moves on input data, so it points to current
index of data for next field.

Parameters

StartBit
specifies the start bit position of the specified field. Value of this parameter can be an
Expression.

Length specifies length of the specified field in bits. Value of this parameter can be an Expression.

Name specifies Name of field.

Description specifies description of field. For the format of this parameter, see the String section

Abbreviation specifies abbreviation of field. If field name is long, you can use an abbreviation for
the field. For the format of this parameter, see the String section.

BitOrder specifies bit order of data of field. Value of this parameter can be one these constants:
MSBLEFT, LSBLEFT. This parameter is optional, and if you do not specify this parameter, default
value is MSBLEFT.

Example

/* This statement adds a field at bit #2 of packet with
the length of 3 bits. The data of this field will be read from
Lowest Bit. */

F1 = AddField(2, 3, ”Name of Field”, ”This field is the flag field.”,
”Abbreviation of field”, LSBLEFT);