# CHART PUS Packet definition files

namespace xsi = "http://www.w3.org/2001/XMLSchema-instance"

start = packet

packet = element packet  {
    attribute xsi:noNamespaceSchemaLocation { text } &

    ## packet name
	element name { text } &

    ## table description string
	element description { text } &

    ## Special Packet IDentifier
	element spid { xsd:integer }? &

    ## PUS service
	element service { xsd:integer }? &

    ## PUS subservice
	element subservice { xsd:integer }? &

    ## PUS application ID
	element apid { xsd:integer } &

    ## First byte where dynamic parameter processing begins
	element dynamic-start { xsd:integer }? &

    ## First additional identifier parameter
	element param1 { xsd:integer }? &

    ## Second additional identifier parameter
	element param2 { xsd:integer }? &

    ## Type of binary pre-paremeter standard header
	element header-type { "TM"|"STDXPUSS"|"STDXCCSD" }? &

    ## Event configuration
	element format { "xdr"|"zxdr" }? &

    ## List of tables we write to
    element table {  # raw only
        ## Our table name
        element name { text } &

		## List of parameters
		element field {
			## Parameter name
			element name { text } &

			## Byte offset for static fields
			element byte { xsd:integer }? &

			## Bit offset for static fields
			element bit { xsd:integer }? &

			## If this field cotrols duplication of subsequenct parameters
			element group-size { xsd:integer }? &

			## Bit offset to introduce a gap inbetween variable parameters
			element offset-mod { xsd:integer }? &

			## Time offset in ms if this parameter has a different time to the main packet
			element time-offset { xsd:integer }? &

			## Specific a number of fixed repeats of this parameter (sic)
			element num-occ { xsd:integer }? &

			## Stride between fixed repeats (sic)
			element bits-between-occ { xsd:integer }? &

			## Time delta between repeats (sic)
			element time-delta-occ { xsd:integer }?
		}*
    }*
}

Download as raw Relax-NG Compact here or as raw XSD here