Chapter 14: fireinspector- specific primitives, Bitfieldinit(), Getnbits -- additional parameters – Teledyne LeCroy FireInspector - File Based Decoding User Manual

Page 63: 14 fireinspector-specific primitives, Getnbits, Hapter, Nspector, Pecific, Rimitives

Advertising
background image

57

CATC S

CRIPTING

L

ANGUAGE

1.0

C

HAPTER

14

Reference Manual

FireInspector-Specific Primitives

C

HAPTER

14: F

IRE

I

NSPECTOR

-

S

PECIFIC

P

RIMITIVES

BitfieldInit()

BitfieldInit(<bitfield_identifier string>,
<title string>)

Return value

None.

Comments

BitfieldInit

initializes the data structure for keeping field information. This

field information can be presented to the user in the form of a dialog box (see

BitfieldDialog()

” on page 58). The primitives

GetNBits

and

NextNBits

both support optional arguments for appending information to this

data stucture (see

GetNBits

-- Additional parameters” on page 57 and

NextNBits

-- Additional parameters” on page 58).

Example

See “Example for FireInspector-Specific Primitives” on page 60.

GetNBits

-- Additional parameters

GetNBits

contains two additional, optional arguments in FireInspector to add

data to the

BitfieldInit

data structure:

bitfield_identifier

and

bitfield_label

. In FireInspector,

GetNBits

has this structure:

GetNBits(<bit_source list or raw>, <bit_offset
integer>, <bit_count integer>, <bitfield_identifier
string>

opt

, <bitfield_label string>

opt

)

Use

bitfield_identifier

to refer to a bitfield data structure that has been

named in a

BitfieldInit

declaration. Use

bitfield_label

to assign a

label to the group of bits being read. For example:

GetNBits( data, 0, 1, "Identifier", "Label" );

Parameter

Meaning

Default Value

Comments

bitfield_identifier string

The name of

the bitfield

data structure

Used to refer to this bitfield data structure in sub-
sequent calls to other primitives.

title string

Displays in the title bar of the dialog box.

Advertising