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 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 |