Teledyne LeCroy Conquest User Manual - Users Manual User Manual

Page 228

Advertising
background image

Appendix A

218

AddField

fieldId = AddField ( StartBit, Length, "Name", "Description", "Abbreviation",

< MSBLEFT | LSBLEFT >) ;

Remark:

This statement adds a field to the packet with the given specification. The
value returned by the CURPOS function is automatically increased by the
value of Length parameter. For more details about CURPOS function see
page 229.

Output Parameter:

fieldId:

Identifier assigned to the field.

Input Parameters:

StartBit:

Specifies a zero-based start position of the field in the data, in
bits. This parameter can be an integer or an expression.

Length:

Specifies the length of the field, in bits. This parameter can be
an integer or an expression.

Name:

This string is displayed as the name of the field in the
Interpreted Data table.

Description:

This string is displayed as the description of the field in the
Interpreted Data table.

Abbreviation:

If the Name parameter exceeds the permitted length for the
Interpreted Data table, this abbreviation is used instead. This
parameter is not used in the current version of ASL but must
be included.

MSBLEFT, LSBLEFT: These keywords specify the bit order of the decoded

data, as either MSb->LSb or LSb->MSb. Note that
bytes of the data stream are presented to the decoder
in the same manner as they are transferred over USB,
i.e LSB->MSB. This parameter is optional, and if not
specified MSBLEFT is used by default.

Example:

/* This statement adds a field of 3 bits in length starting at bit 2 of packet.

The data of this field is read from Lowest Bit first. */

F1 = AddField(2, 3, "Flags bitmap",

"This field contains the flags bitmap.",

"Flgs ", LSBLEFT);

Advertising