8 packet and structure template declarations, 1 predefined packet/structure templates, Packet and structure template declarations31 – Teledyne LeCroy Voyager Exerciser Generation Script Language Manual User Manual
Page 40: Predefined packet/structure templates, Struct, 8packet and structure template declarations

Teledyne LeCroy
Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
31
8
Packet and Structure Template Declarations
Packet/structure declarations declare named packet/structure objects. A packet/structure object
gives its target byte stream a set of "fields", each having a unique name. You can fully set up a
byte stream using packet/structure fields.
Note: Templates can inherit field layouts from other templates through ancestor lists.
(
Packet
|
Struct
)
Template_Name
[
:
Ancestor_1, Ancestor_ 2, …
]
[
(Attribute list)
]
[
{
Field Definition 1
Field Definition 2
...
}
]
Note: For packet/structure template declarations, you can use the Packet or Struct keyword.
However, structures are supposed to be used as building blocks for constructing packet payloads
(or similar purposes), rather than for describing full packets.
8.1 Predefined Packet/Structure Templates
Teledyne LeCroy PSG provides some useful USB 3.0 packet templates that can be used in
generation scripts. The predefined packet/structure templates are in the
{USB Protocol Suite application folder}\Generation\Include folder in the following files:
o Main_Pkt_Templates.ginc
– Generic USB 3.0 templates serving as ancestors or building
blocks for other templates
o Main_DP_Pkt_templates.ginc
– Data Packet (DPH/DPP) templates
o Main_TP_Pkt_templates.ginc
– Transaction Packet (TP) templates
o Main_ITP_Pkt_templates.ginc
– Isochronous Timestamp Packet (ITP) templates
o Main_LMP_Pkt_templates.ginc
– Link Management Packet (LMP) templates
Note: You can use custom templates instead of the Teledyne LeCroy PSG templates.