beautypg.com

Depends(...) – Teledyne LeCroy USB Chief - File Based Decode Manual User Manual

Page 19

background image

15

C

OMPUTER

A

CCESS

T

ECHNOLOGY

C

ORPORATION

USB R

EQUEST

D

EFINITION

(.

REQ

) F

ILES

Reference Manual

Depends(...)

Use

Depends(...)

to create a definition that displays a a field or a set of fields

in different ways, depending on certain conditions. It works similarly to a C
language

switch

statement. The basic structure of a

Depends(...)

definition

is this:

Depends(<keyword>[&<mask value>]

opt

)=

{

<value>=
{

...

}
...
[<keyword>= ...]

opt

}

Keywords

Keywords that can be used inside the parentheses of a

Depends(...)

definition

are:

bmRequestType

,

Databytes(m,n)

,

wIndex

, and

wValue

. The value

to which the keyword refers is the condition that the decoding depends upon.
Possible values, along with their corresponding decoding definitions, are listed
within the curly braces on the right-hand side of the

Depends(...)

entry. In this

example,

wValue=
{

Depends(bmRequestType)=
{

0x01=
{

WordValue=
{

0x0000=One

}

}
0x02=
{

FormatValue=Two %d

}

}

}