pib2xml(1)

πŸ’– pib2xml πŸ’–

okay so bestie, welcome to pib2xml, a lil tool from the Qualcomm Atheros Open Powerline Toolkit that literally just prints object driven xml editior intructions ✨ (yes that's the actual name, we don't gatekeep typos here, we honor them πŸ’…). It lives in section 1 of the manual, iykyk.


🌸 SYNOPSIS 🌸

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

✨ DESCRIPTION ✨

So what does it do? It writes XML editor instructions on stdout. That's the whole vibe. πŸŽ€

But β€” and this is the part you can't skip β€” it needs an object definition file that contains the size and name of data regions and members within a binary object or file. Like, it cannot function without it, fr fr.

Then each individual data member gets presented as XML instructions, and those instructions can be used by the program pxe to edit PIB files. slay. πŸ‘‘


πŸ’… OPTIONS πŸ’…

  • -f definitions β€” 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, no cap. There is no default file, so if you forget it you're on your own bestie 😭
  • -s schema β€” the url for the XML schema. The default schema is piboffset.xsd for the Qualcomm Atheros Powerline Toolkit verion of this program. (their spelling, not mine 🫢)
  • -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. very giving validator energy ✨
  • -?, --help β€” print program help summary on stdout. This option takes precedence over other options on the command line. it's the main character, periodt.
  • -!, --version β€” print program version information on stdout. Also 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. pls do this, they're not psychic πŸ™ˆ

πŸ¦‹ ARGUMENTS πŸ¦‹

  • file β€” 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.

🌈 EXAMPLES 🌈

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

πŸ”₯ SEE ALSO πŸ”₯

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

go read those too, they're all in the group chat πŸ’œ


πŸ‘‘ CREDITS πŸ‘‘

Charles Maier


open-plc-utils-0.0.3, November 2013 β€” that's the version and the date bestie, mwah, stay hydrated, run your tools, and always pass -f πŸ’–βœ¨πŸ¦‹πŸŽ€πŸ’