Teledyne-lecroy Voyager Exerciser Generation Script Language Manua Uživatelský manuál Strana 51

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 167
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 50
Teledyne LeCroy Voyager USB 3.0 Exerciser Generation Script Language Reference Manual
42
8.4 Packet Template Inheritance
You can create a packet/struct template that inherits field layouts defined in another template.
The created template has all the fields defined in the inherited templates plus its own fields. All
fields must have unique names.
Note: The parser adds the fields defined in the created packet template after it adds fields from
the inherited templates.
You can change the default field values of the inherited fields.
8.4.1 Packet Template Single Inheritance
A new template inherits the field layouts from another template using an ancestor list.
Examples
Packet MY_DataPacket : DataPacket
{
# Example of a field with variable length having a default value.
Data : * = { 00 00 00 01 }
}
# More examples of template inheritance
const LMP = 0
const LMP_SET_LINK_FUNC = 1
Packet USB3Common
{
Type : 5
}
Packet LMPCommon : USB3Common # Derive a template from a USB3Common
# template.
{
Type = LMP
SubType : 4
}
Packet LMP_SetLinkFunction : LMPCommon
{
SubType = LMP_SET_LINK_FUNC
Resv1 : 1;
Force_LinkPM_Accept : 1;
Resv2 : 5;
Resv3 : 16;
Resv4 : 32;
Resv5 : 32;
CRC_16 : 16 # Auto calculated
: LinkCtrlWord # structure template insertion
}
Zobrazit stránku 50
1 2 ... 46 47 48 49 50 51 52 53 54 55 56 ... 166 167

Komentáře k této Příručce

Žádné komentáře