Home | History | Annotate | Download | only in schemas
      1 <?xml version="1.0" encoding="UTF-8"?>
      2 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
      3 	<xs:attributeGroup name="Nameable">
      4 		<xs:attribute name="Name" type="xs:NMTOKEN" use="required"/>
      5 		<xs:attribute name="Description" type="xs:string" use="optional"/>
      6 	</xs:attributeGroup>
      7 	<xs:attributeGroup name="TypedNameable">
      8 		<xs:attributeGroup ref="Nameable"/>
      9 		<xs:attribute name="Type" type="xs:NMTOKEN" use="required"/>
     10 	</xs:attributeGroup>
     11 	<xs:complexType name="ComponentInstance">
     12 		<xs:attributeGroup ref="TypedNameable"/>
     13 		<xs:attributeGroup ref="ArrayLengthAttribute"/>
     14 		<xs:attribute name="Mapping" use="optional"/>
     15 	</xs:complexType>
     16 	<xs:simpleType name="SizeType">
     17 		<xs:restriction base="xs:positiveInteger">
     18 			<xs:pattern value="8|16|32"/>
     19 		</xs:restriction>
     20 	</xs:simpleType>
     21 	<xs:simpleType name="SizeType64">
     22 		<xs:restriction base="xs:positiveInteger">
     23 			<xs:pattern value="8|16|32|64"/>
     24 		</xs:restriction>
     25 	</xs:simpleType>
     26 	<xs:attributeGroup name="IntegerParameterAttributes">
     27 		<xs:attribute name="Size" type="SizeType" use="required"/>
     28 		<xs:attribute name="Min" type="xs:integer" use="optional"/>
     29 		<xs:attribute name="Max" type="xs:integer" use="optional"/>
     30 		<xs:attribute name="Signed" type="xs:boolean" use="optional" default="false"/>
     31 	</xs:attributeGroup>
     32 	<xs:attributeGroup name="ArrayLengthAttribute">
     33 		<xs:attribute name="ArrayLength" type="xs:nonNegativeInteger" use="optional" default="0"/>
     34 	</xs:attributeGroup>
     35 	<xs:complexType name="Adaptation">
     36 		<xs:attribute name="Offset" type="xs:integer" default="0"/>
     37 	</xs:complexType>
     38 	<xs:complexType name="LinearAdaptationType">
     39 		<xs:complexContent>
     40 			<xs:extension base="Adaptation">
     41 				<xs:attribute name="SlopeNumerator" type="xs:double" default="1"/>
     42 				<xs:attribute name="SlopeDenominator" type="xs:double" default="1"/>
     43 			</xs:extension>
     44 		</xs:complexContent>
     45 	</xs:complexType>
     46 	<xs:element name="LinearAdaptation" type="LinearAdaptationType"/>
     47 	<xs:element name="LogarithmicAdaptation">
     48 		<xs:complexType>
     49 			<xs:complexContent>
     50 				<xs:extension base="LinearAdaptationType">
     51 					<xs:attribute name="LogarithmBase" type="xs:double" default="10"/>
     52 					<xs:attribute name="FloorValue" type="xs:double" default="-INF"/>
     53 				</xs:extension>
     54 			</xs:complexContent>
     55 		</xs:complexType>
     56 	</xs:element>
     57 	<xs:complexType name="Parameter" abstract="true">
     58 		<xs:attributeGroup ref="Nameable"/>
     59 		<xs:attribute name="Mapping" type="xs:string" use="optional"/>
     60 		<xs:attributeGroup ref="ArrayLengthAttribute"/>
     61 	</xs:complexType>
     62 	<xs:element name="BooleanParameter">
     63 		<xs:complexType>
     64 			<xs:complexContent>
     65 				<xs:extension base="Parameter">
     66 					<xs:attribute name="Size" fixed="8"/>
     67 				</xs:extension>
     68 			</xs:complexContent>
     69 		</xs:complexType>
     70 	</xs:element>
     71 	<xs:complexType name="IntegerParameterType">
     72 		<xs:complexContent>
     73 			<xs:extension base="Parameter">
     74 				<xs:choice minOccurs="0">
     75 					<xs:element ref="LinearAdaptation"/>
     76 					<xs:element ref="LogarithmicAdaptation"/>
     77 				</xs:choice>
     78 				<xs:attributeGroup ref="IntegerParameterAttributes"/>
     79 				<xs:attribute name="Unit" type="xs:token" use="optional"/>
     80 			</xs:extension>
     81 		</xs:complexContent>
     82 	</xs:complexType>
     83 	<xs:element name="IntegerParameter" type="IntegerParameterType"/>
     84 	<xs:complexType name="EnumParameterType">
     85 		<xs:complexContent>
     86 			<xs:extension base="Parameter">
     87 				<xs:sequence>
     88 					<xs:element name="ValuePair" maxOccurs="unbounded">
     89 						<xs:complexType>
     90 							<xs:attribute name="Literal" type="xs:string" use="required"/>
     91 							<xs:attribute name="Numerical" use="required">
     92 								<xs:simpleType>
     93 									<xs:restriction base="xs:string">
     94 										<xs:pattern value="0|[+-]?[1-9][0-9]*"/>
     95 										<xs:pattern value="0x[0-9a-fA-F]+"/>
     96 									</xs:restriction>
     97 								</xs:simpleType>
     98 							</xs:attribute>
     99 						</xs:complexType>
    100 					</xs:element>
    101 				</xs:sequence>
    102 				<xs:attribute name="Size" type="SizeType" use="required"/>
    103 			</xs:extension>
    104 		</xs:complexContent>
    105 	</xs:complexType>
    106 	<xs:element name="EnumParameter" type="EnumParameterType">
    107 		<xs:unique name="LiteralUniqueness">
    108 			<xs:selector xpath="ValuePair"/>
    109 			<xs:field xpath="@Literal"/>
    110 		</xs:unique>
    111 		<xs:unique name="NumericalUniqueness">
    112 			<xs:selector xpath="ValuePair"/>
    113 			<xs:field xpath="@Numerical"/>
    114 		</xs:unique>
    115 	</xs:element>
    116 	<xs:simpleType name="PointBound">
    117 		<xs:restriction base="xs:string">
    118 			<xs:pattern value="(0|[+-]?0\.[0-9]+|(([+-]?[1-9][0-9]*)(\.[0-9]+)?))([Ee][+-]?[0-9]+)?"/>
    119 		</xs:restriction>
    120 	</xs:simpleType>
    121 	<xs:complexType name="PointParameterType">
    122 		<xs:complexContent>
    123 			<xs:extension base="Parameter">
    124 				<xs:attribute name="Unit" type="xs:token" use="optional"/>
    125 			</xs:extension>
    126 		</xs:complexContent>
    127 	</xs:complexType>
    128 	<xs:complexType name="FixedPointParameterType">
    129 		<xs:complexContent>
    130 			<xs:extension base="PointParameterType">
    131 				<xs:attribute name="Size" type="SizeType" use="required"/>
    132 				<xs:attribute name="Integral" type="xs:nonNegativeInteger" use="required"/>
    133 				<xs:attribute name="Fractional" type="xs:nonNegativeInteger" use="required"/>
    134 			</xs:extension>
    135 		</xs:complexContent>
    136 	</xs:complexType>
    137 	<xs:element name="FixedPointParameter" type="FixedPointParameterType"/>
    138 	<xs:complexType name="FloatingPointParameterType">
    139 		<xs:complexContent>
    140 			<xs:extension base="PointParameterType">
    141 				<xs:attribute name="Size" fixed="32"/>
    142 				<xs:attribute name="Min" type="PointBound" use="optional"/>
    143 				<xs:attribute name="Max" type="PointBound" use="optional"/>
    144 			</xs:extension>
    145 		</xs:complexContent>
    146 	</xs:complexType>
    147 	<xs:element name="FloatingPointParameter" type="FloatingPointParameterType"/>
    148 	<xs:complexType name="BitParameterType">
    149 		<xs:attributeGroup ref="Nameable"/>
    150 		<xs:attribute name="Size" use="required">
    151 			<xs:simpleType>
    152 				<xs:restriction base="xs:positiveInteger">
    153 					<xs:maxInclusive value="64"/>
    154 				</xs:restriction>
    155 			</xs:simpleType>
    156 		</xs:attribute>
    157 		<xs:attribute name="Pos" use="required">
    158 			<xs:simpleType>
    159 				<xs:restriction base="xs:nonNegativeInteger">
    160 					<xs:maxInclusive value="63"/>
    161 				</xs:restriction>
    162 			</xs:simpleType>
    163 		</xs:attribute>
    164 		<xs:attribute name="Max" type="xs:integer" use="optional"/>
    165 	</xs:complexType>
    166 	<xs:element name="BitParameterBlock">
    167 		<xs:complexType>
    168 			<xs:sequence>
    169 				<xs:element name="BitParameter" type="BitParameterType" maxOccurs="unbounded"/>
    170 			</xs:sequence>
    171 			<xs:attributeGroup ref="Nameable"/>
    172 			<xs:attribute name="Size" type="SizeType64" use="required"/>
    173 			<xs:attribute name="Mapping" type="xs:string" use="optional"/>
    174 		</xs:complexType>
    175 		<xs:unique name="BitParameterBlockSubElementsUniqueness">
    176 			<xs:selector xpath="*"/>
    177 			<xs:field xpath="@Name"/>
    178 		</xs:unique>
    179 	</xs:element>
    180 	<xs:element name="StringParameter">
    181 		<xs:complexType>
    182 			<xs:attributeGroup ref="Nameable"/>
    183 			<xs:attribute name="Mapping" type="xs:string" use="optional"/>
    184 			<xs:attribute name="MaxLength" type="xs:nonNegativeInteger" use="required"/>
    185 		</xs:complexType>
    186 	</xs:element>
    187 	<xs:group name="ParameterBlockGroup">
    188 		<xs:choice>
    189 			<xs:element ref="BooleanParameter"/>
    190 			<xs:element ref="IntegerParameter"/>
    191 			<xs:element ref="EnumParameter"/>
    192 			<xs:element ref="FixedPointParameter"/>
    193 			<xs:element ref="FloatingPointParameter"/>
    194 			<xs:element ref="BitParameterBlock"/>
    195 			<xs:element ref="StringParameter"/>
    196 			<xs:element name="Component" type="ComponentInstance"/>
    197 			<xs:element name="ParameterBlock" type="ParameterBlockType">
    198 				<xs:unique name="ParameterBlockSubElementsUniqueness">
    199 					<xs:selector xpath="*"/>
    200 					<xs:field xpath="@Name"/>
    201 				</xs:unique>
    202 			</xs:element>
    203 		</xs:choice>
    204 	</xs:group>
    205 	<xs:complexType name="ParameterBlockType">
    206 		<xs:sequence>
    207 			<xs:group ref="ParameterBlockGroup" maxOccurs="unbounded"/>
    208 		</xs:sequence>
    209 		<xs:attributeGroup ref="Nameable"/>
    210 		<xs:attributeGroup ref="ArrayLengthAttribute"/>
    211 		<xs:attribute name="Mapping" type="xs:string" use="optional"/>
    212 	</xs:complexType>
    213 </xs:schema>
    214