beautypg.com

2 packet template multiple inheritance, Packet template multiple inheritance – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual

Page 52

background image

Teledyne LeCroy

Voyager USB 3.0 Exerciser Generation Script Language Reference Manual

43

8.4.2 Packet Template Multiple Inheritance

You can create a packet/struct template that inherits field layouts defined in several templates.
The created template has all the fields defined in the inherited templates plus its own fields. All
fields must have unique names.

Multiple inheritance can simplify the construction of complex templates.

Note: The parser adds the fields defined in the created template after it adds fields from the
inherited templates. The parser adds the fields defined in the inherited templates in order from the
left-most ancestor to the right-most ancestor.

Examples

Packet

Base

{
F1 : 16
F2 : 8
F3 : 32
}

Packet

Templ_0

{
FieldT0_8 : 8
FieldT0_16 : 16
}

Packet

Templ_1

{
FieldT1_24 : 24
FieldT1_32 : 32
}

Packet

Combined : Base, Templ_0, Templ_1

{
}

The Combined template above has the fields:

F1 :

16

# Base

F2 :

8

# Base

F3 :

32

# Base

FieldT0_8 :

8

# Templ_0

FieldT0_16 :

16

# Templ_

0

FieldT1_24 :

24

# Templ_1

FieldT1_32 :

32

# Templ_1

Data :

*

# Combined