DOKK / manpages / debian 12 / plc-utils-extra / pib2xml.1.en
pib2xml(1) Qualcomm Atheros Open Powerline Toolkit pib2xml(1)

pib2xml - print object driven xml editior intructions

pib2xml [options] file [file] [...] [>stdout]

Write XML editor instructions on stdout. This requires an object definition file that contains the size and name of data regions and members within a binary object or file. Individual data members are presented as XML instructions that can be used by program pxe to edit PIB files.

The name of the object definition file that contains the size, name and description of objects within a binary file. The definition file is not modified. This option is required. There is no default file.

The url for the XML schema. The default schema is piboffset.xsd for the Qualcomm Atheros Powerline Toolkit verion of this program.

-x
Print an XML schema on stdout. This schema defines the elements and attributes used to define data objects and members read from input files. It can be used to validate XML files used with program pxe.

-?,--help
Print program help summary on stdout. This option takes precedence over other options on the command line.

-!,--version
Print program version information on stdout. This option takes precedence over other options on the command line. Use this option when sending screen dumps to Atheros Technical Support so that they know exactly which version of the Linux Toolkit you are using.

The name of a binary file. The file must have either Thunderbolt/Lightning or Panther/Lynx format or output will be incorrect. The file is not modified by this program. Only one such file is permitted on the command line.

The following is an example object definition file that defines a standard ethernet frame and member fields within it. The comments and descriptions shown are optional. The field lengths and field names are not. Zero-length fields denote arbitrary field groups and are used by program offset to print headings.


# ========================================
#
# ----------------------------------------


0 header
6 ODA Own Destination Address
6 OSA Own Source Address
2 ET Ethertype or frame length


# ========================================
#
# ----------------------------------------


0 body
1500 Payload


# ========================================
#
# ----------------------------------------


0 trailer
4 CRC Cyclical Redundancy Check

The following command uses object definition file ether.txt to identify and display member fields within binary file abc.bin as a set of xml instructions that can be used by program xde to edit other files.


# pib2xml -f ether.txt abc.bin

The next command writes the xml schema that defines the elements and attributes used in the edit instructions to file data.xsd. This file can be used to validate xml edit instructions.


# pib2xml -x > data.xsd

chkpib(7), chkpib2(7), getpib(7), modpib(1), pibcomp(1), pibdump(1), setpib(1), xml2pib(1)


Charles Maier

November 2013 open-plc-utils-0.0.3