You are here: Elements > Decoder Script Reference > FIELD

FIELD

A FIELD statement always does the following:

Names a field

Defines the size of that field

Generates material to display the content of the field in the Decode Pane

Normally it also:

Moves the pointer forward to the next field

Optionally it may:

Reposition the pointer prior to decoding

Inhibit updating of the pointer (leaving it pointing to the same field)

Make decoding of the field conditional

Massage the field value before storing it

Display something in the Summary Pane

Check the content of the field

Tag the field for use in filtering and other operations

Invoke a method that verifies a frame check sequence (CRC or checksum)

Store a value in a variable

Formally, the composition of a FIELD statement is as follows:

FIELD field_name

[START_BIT StartBitMethod]

SizeMethod

[<Conditional-Clause>: IF [NOT] BooleanMethod [ELSE_SKIP

SizeMethod] | PRINT_IF [NOT] VerifyMethod]

[<Retrieve-Clause>: RETRIEVE RetrievalMethod [ALSO

RetrievalMethod]*]

[<Processing-Clause>: PROCESSING RetrievalMethod [ALSO

RetrievalMethod]*]

FormatMethod [ALSO FormatMethod]

[IN_SUMMARY|IN_SUMMARY_ONLY|IN_COLLAPSED "summary_tag"

column_width]

"detail_tag" | SUPPRESS_DETAIL

[<Tag-Clause>: TAG "tag"]

[MARGIN_TEXT FormatMethod]

[INFO]

[NO_MOVE]

[HOST_DATA_ORDER | NETWORK_DATA_ORDER]

[<Verify-Clause>: VERIFY|SUPPRESS_IF_VERIFIED [NOT]

VerifyMethod [ALSO [NOT] VerifyMethod]]

[<Store-Clause>: STORE variable_name [<Retrieve-Clause>]]

 

Keywords are shown in all capitals. Optional components are shown in square brackets. Elements in angle brackets are compound components that are described below.

The FIELD statement, as defined here, may seem terribly complicated but, as we have seen in the tutorial, most FIELD statements are really rather simple and straightforward because most or all optional components are unneeded.

Here is the composition of a FIELD with all optional parts omitted:

FIELD field_name SizeMethod FormatMethod "detail_tag"

We will now examine each element in turn. We will start with the required components and then list the optional ones in the order in which they appear.