Binary

Description:

This method formats the current field value in binary notation. The method takes 3 optional parameters. If you want to set only the 2nd or 3rd parameter, you must include values for previous parameters as placeholders.

The "Separator" parameter allows you to specify a character to separate multi-byte fields. The default value of "0" will cause multi-byte fields to run together with no separator. To put a space between each byte, use (Binary " ").

The "Amount of Data to Display" parameter determines the maximum amount of data to display in the Decode pane. A value of 0 will display all data in the field, regardless of length. This parameter is used for limiting the amount of data displayed in the Decode pane for very large fields or fields where the size is unknown ahead of time.

The "Suppress leading zeroes" parameter tells the method whether or not to suppress leading zeroes. The default is "KeepPad", which means all digits in the number will be displayed, while "SuppressPad" causes leading zeroes to be converted to blanks.

FIELD flag_byte (Fixed 8 Bits) (Binary) "Flags"

output: "Flags: 00000101"

FIELD flag_byte (Fixed 8 Bits) (Binary SuppressPad) "Flags"

output: "Flags: 101"

Parameters:

[Optional]

Str

"Separator"

(Default value: 0)

[Optional]

Int

"Amount of data to display (0=unlimited)"

(Default value: 0)

[Optional]

List

"Suppress leading zeroes?"

(Default value: KeepPad)

List values:

KeepPad

SuppressPad

Example:

FIELD multicast_test START_BIT (Move 7 Bits) (Fixed 1 Bit) (Binary) SUPPRESS_DETAIL NO_ MOVE