Merge branch 'Fulup-Dev' of github.com:iotbzh/unicens2-binding into Fulup-Dev
[apps/agl-service-unicens.git] / data / unicens.xsd
1 <?xml version="1.0" encoding="UTF-8"?>\r
2 <!-- edited with XMLSpy v2017 rel. 3 (x64) (http://www.altova.com) by Pavel Hanak (Microchip Technology Germany II GmbH & Co. KG) -->\r
3 <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">\r
4         <xs:element name="Unicens">\r
5                 <xs:annotation>\r
6                         <xs:documentation>Schema for the description of a UNICENS configuration</xs:documentation>\r
7                 </xs:annotation>\r
8                 <xs:complexType>\r
9                         <xs:choice maxOccurs="unbounded">\r
10                                 <xs:element name="Node">\r
11                                         <xs:complexType>\r
12                                                 <xs:sequence>\r
13                                                         <xs:choice minOccurs="0" maxOccurs="unbounded">\r
14                                                                 <xs:element name="USBPort">\r
15                                                                         <xs:complexType>\r
16                                                                                 <xs:attribute name="PhysicalLayer" type="USBPortPhysicalLayer" use="required"/>\r
17                                                                                 <xs:attribute name="DeviceInterfaces" type="HexNumber" use="required"/>\r
18                                                                                 <xs:attribute name="StreamingIfEpInCount" type="DecNumber" use="required"/>\r
19                                                                                 <xs:attribute name="StreamingIfEpOutCount" type="DecNumber" use="required"/>\r
20                                                                         </xs:complexType>\r
21                                                                 </xs:element>\r
22                                                                 <xs:element name="MediaLBPort">\r
23                                                                         <xs:complexType>\r
24                                                                                 <xs:attribute name="ClockConfig" type="MediaLBPortClockConfig" use="required"/>\r
25                                                                         </xs:complexType>\r
26                                                                 </xs:element>\r
27                                                                 <xs:element name="StreamPort">\r
28                                                                         <xs:complexType>\r
29                                                                                 <xs:attribute name="ClockConfig" type="StreamPortClockConfig" use="required"/>\r
30                                                                                 <xs:attribute name="DataAlignment" type="StreamPortDataAlignment" use="required"/>\r
31                                                                         </xs:complexType>\r
32                                                                 </xs:element>\r
33                                                         </xs:choice>\r
34                                                         <xs:choice minOccurs="0" maxOccurs="unbounded">\r
35                                                                 <xs:element name="SyncConnection">\r
36                                                                         <xs:complexType>\r
37                                                                                 <xs:complexContent>\r
38                                                                                         <xs:extension base="Connection">\r
39                                                                                                 <xs:attribute name="MuteMode" type="SyncConnectionMuteMode" use="optional"/>\r
40                                                                                         </xs:extension>\r
41                                                                                 </xs:complexContent>\r
42                                                                         </xs:complexType>\r
43                                                                 </xs:element>\r
44                                                                 <xs:element name="AVPConnection">\r
45                                                                         <xs:complexType>\r
46                                                                                 <xs:complexContent>\r
47                                                                                         <xs:extension base="Connection">\r
48                                                                                                 <xs:attribute name="IsocPacketSize" type="AVPConnectionIsocPacketSize" use="required"/>\r
49                                                                                         </xs:extension>\r
50                                                                                 </xs:complexContent>\r
51                                                                         </xs:complexType>\r
52                                                                 </xs:element>\r
53                                                         </xs:choice>\r
54                                                 </xs:sequence>\r
55                                                 <xs:attribute name="Address" type="HexNumber" use="required"/>\r
56                                                 <xs:attribute name="Script" type="xs:string" use="optional"/>\r
57                                         </xs:complexType>\r
58                                 </xs:element>\r
59                                 <xs:element name="Script">\r
60                                         <xs:complexType>\r
61                                                 <xs:sequence>\r
62                                                         <xs:choice maxOccurs="unbounded">\r
63                                                                 <xs:element name="GPIOPortCreate">\r
64                                                                         <xs:complexType>\r
65                                                                                 <xs:attribute name="DebounceTime" type="DecNumber" use="required"/>\r
66                                                                         </xs:complexType>\r
67                                                                 </xs:element>\r
68                                                                 <xs:element name="GPIOPortPinMode">\r
69                                                                         <xs:complexType>\r
70                                                                                 <xs:attribute name="PinConfiguration" type="HexData" use="required"/>\r
71                                                                         </xs:complexType>\r
72                                                                 </xs:element>\r
73                                                                 <xs:element name="GPIOPinState">\r
74                                                                         <xs:complexType>\r
75                                                                                 <xs:attribute name="Mask" type="HexNumber" use="required"/>\r
76                                                                                 <xs:attribute name="Data" type="HexNumber" use="required"/>\r
77                                                                         </xs:complexType>\r
78                                                                 </xs:element>\r
79                                                                 <xs:element name="I2CPortCreate">\r
80                                                                         <xs:complexType>\r
81                                                                                 <xs:attribute name="Speed" type="I2CPortCreateSpeed" use="required"/>\r
82                                                                         </xs:complexType>\r
83                                                                 </xs:element>\r
84                                                                 <xs:element name="I2CPortWrite">\r
85                                                                         <xs:complexType>\r
86                                                                                 <xs:attribute name="Mode" type="I2CPortWriteMode" use="optional"/>\r
87                                                                                 <xs:attribute name="BlockCount" type="DecNumber" use="optional"/>\r
88                                                                                 <xs:attribute name="Address" type="HexNumber" use="required"/>\r
89                                                                                 <xs:attribute name="Length" type="DecNumber" use="optional"/>\r
90                                                                                 <xs:attribute name="Payload" type="HexData" use="required"/>\r
91                                                                                 <xs:attribute name="Timeout" type="DecNumber" use="optional"/>\r
92                                                                         </xs:complexType>\r
93                                                                 </xs:element>\r
94                                                                 <xs:element name="I2CPortRead">\r
95                                                                         <xs:complexType>\r
96                                                                                 <xs:attribute name="Address" type="HexNumber" use="required"/>\r
97                                                                                 <xs:attribute name="Length" type="DecNumber" use="required"/>\r
98                                                                                 <xs:attribute name="Timeout" type="DecNumber" use="optional"/>\r
99                                                                         </xs:complexType>\r
100                                                                 </xs:element>\r
101                                                                 <xs:element name="MsgSend">\r
102                                                                         <xs:complexType>\r
103                                                                                 <xs:attribute name="FBlockId" type="HexNumber" use="required"/>\r
104                                                                                 <xs:attribute name="FunctionId" type="HexNumber" use="required"/>\r
105                                                                                 <xs:attribute name="OpTypeRequest" type="HexNumber" use="required"/>\r
106                                                                                 <xs:attribute name="OpTypeResponse" type="HexNumber" use="optional"/>\r
107                                                                                 <xs:attribute name="PayloadRequest" type="HexData" use="required"/>\r
108                                                                                 <xs:attribute name="PayloadResponse" type="HexData" use="optional"/>\r
109                                                                         </xs:complexType>\r
110                                                                 </xs:element>\r
111                                                                 <xs:element name="Pause">\r
112                                                                         <xs:complexType>\r
113                                                                                 <xs:attribute name="WaitTime" type="DecNumber" use="required"/>\r
114                                                                         </xs:complexType>\r
115                                                                 </xs:element>\r
116                                                         </xs:choice>\r
117                                                 </xs:sequence>\r
118                                                 <xs:attribute name="Name" type="xs:string" use="required"/>\r
119                                         </xs:complexType>\r
120                                 </xs:element>\r
121                         </xs:choice>\r
122                         <xs:attribute name="AsyncBandwidth" type="DecNumber" use="required"/>\r
123                 </xs:complexType>\r
124         </xs:element>\r
125         <xs:complexType name="Connection">\r
126                 <xs:choice minOccurs="2" maxOccurs="2">\r
127                         <xs:element name="MOSTSocket" type="MOSTSocketType"/>\r
128                         <xs:element name="USBSocket">\r
129                                 <xs:complexType>\r
130                                         <xs:attribute name="EndpointAddress" type="HexNumber" use="required"/>\r
131                                         <xs:attribute name="FramesPerTransaction" type="DecNumber" use="required"/>\r
132                                 </xs:complexType>\r
133                         </xs:element>\r
134                         <xs:element name="MediaLBSocket">\r
135                                 <xs:complexType>\r
136                                         <xs:attribute name="ChannelAddress" type="HexNumber" use="required"/>\r
137                                         <xs:attribute name="Bandwidth" type="xs:integer" use="required"/>\r
138                                 </xs:complexType>\r
139                         </xs:element>\r
140                         <xs:element name="StreamSocket">\r
141                                 <xs:complexType>\r
142                                         <xs:attribute name="StreamPinID" type="StreamSocketStreamPinID" use="required"/>\r
143                                         <xs:attribute name="Bandwidth" type="xs:integer" use="required"/>\r
144                                 </xs:complexType>\r
145                         </xs:element>\r
146                         <xs:element name="Splitter" type="SplitterCombinerType"/>\r
147                         <xs:element name="Combiner" type="SplitterCombinerType"/>\r
148                 </xs:choice>\r
149         </xs:complexType>\r
150         <xs:simpleType name="HexNumber">\r
151                 <xs:annotation>\r
152                         <xs:documentation>Hexadecimal number in the format 0xd..d</xs:documentation>\r
153                 </xs:annotation>\r
154                 <xs:restriction base="xs:string">\r
155                         <xs:pattern value="0x(0|[1-9a-fA-F][0-9a-fA-F]*)"/>\r
156                 </xs:restriction>\r
157         </xs:simpleType>\r
158         <xs:simpleType name="DecNumber">\r
159                 <xs:annotation>\r
160                         <xs:documentation>Decimal number</xs:documentation>\r
161                 </xs:annotation>\r
162                 <xs:restriction base="xs:integer"/>\r
163         </xs:simpleType>\r
164         <xs:simpleType name="USBPortPhysicalLayer">\r
165                 <xs:annotation>\r
166                         <xs:documentation>Physical Layer of USB port</xs:documentation>\r
167                 </xs:annotation>\r
168                 <xs:restriction base="xs:string">\r
169                         <xs:enumeration value="Standard"/>\r
170                         <xs:enumeration value="HSIC"/>\r
171                 </xs:restriction>\r
172         </xs:simpleType>\r
173         <xs:simpleType name="MediaLBPortClockConfig">\r
174                 <xs:annotation>\r
175                         <xs:documentation>Clock Config of MediaLB port</xs:documentation>\r
176                 </xs:annotation>\r
177                 <xs:restriction base="xs:string">\r
178                         <xs:enumeration value="256Fs"/>\r
179                         <xs:enumeration value="512Fs"/>\r
180                         <xs:enumeration value="1024Fs"/>\r
181                         <xs:enumeration value="2048Fs"/>\r
182                         <xs:enumeration value="3072Fs"/>\r
183                         <xs:enumeration value="4096Fs"/>\r
184                         <xs:enumeration value="6114Fs"/>\r
185                         <xs:enumeration value="8192Fs"/>\r
186                 </xs:restriction>\r
187         </xs:simpleType>\r
188         <xs:simpleType name="StreamPortClockConfig">\r
189                 <xs:annotation>\r
190                         <xs:documentation>Clock Config of Stream port</xs:documentation>\r
191                 </xs:annotation>\r
192                 <xs:restriction base="xs:string">\r
193                         <xs:enumeration value="8Fs"/>\r
194                         <xs:enumeration value="16fs"/>\r
195                         <xs:enumeration value="32Fs"/>\r
196                         <xs:enumeration value="64Fs"/>\r
197                         <xs:enumeration value="128Fs"/>\r
198                         <xs:enumeration value="256Fs"/>\r
199                         <xs:enumeration value="512Fs"/>\r
200                         <xs:enumeration value="Willdcard"/>\r
201                 </xs:restriction>\r
202         </xs:simpleType>\r
203         <xs:simpleType name="StreamPortDataAlignment">\r
204                 <xs:annotation>\r
205                         <xs:documentation>Data Alignment of Stream port</xs:documentation>\r
206                 </xs:annotation>\r
207                 <xs:restriction base="xs:string">\r
208                         <xs:enumeration value="Left16Bit"/>\r
209                         <xs:enumeration value="Left24Bit"/>\r
210                         <xs:enumeration value="Right16Bit"/>\r
211                         <xs:enumeration value="Right24Bit"/>\r
212                         <xs:enumeration value="Seq"/>\r
213                 </xs:restriction>\r
214         </xs:simpleType>\r
215         <xs:simpleType name="StreamSocketStreamPinID">\r
216                 <xs:annotation>\r
217                         <xs:documentation>Stream Pin ID of Stream socket</xs:documentation>\r
218                 </xs:annotation>\r
219                 <xs:restriction base="xs:string">\r
220                         <xs:enumeration value="SRXA0"/>\r
221                         <xs:enumeration value="SRXA1"/>\r
222                         <xs:enumeration value="SRXB0"/>\r
223                         <xs:enumeration value="SRXB1"/>\r
224                 </xs:restriction>\r
225         </xs:simpleType>\r
226         <xs:simpleType name="SyncConnectionMuteMode">\r
227                 <xs:annotation>\r
228                         <xs:documentation>Mute Mode of Sync connection</xs:documentation>\r
229                 </xs:annotation>\r
230                 <xs:restriction base="xs:string">\r
231                         <xs:enumeration value="NoMuting"/>\r
232                         <xs:enumeration value="MuteSignal"/>\r
233                 </xs:restriction>\r
234         </xs:simpleType>\r
235         <xs:simpleType name="AVPConnectionIsocPacketSize">\r
236                 <xs:annotation>\r
237                         <xs:documentation>Isoc Packet Size of AVP connection</xs:documentation>\r
238                 </xs:annotation>\r
239                 <xs:restriction base="xs:integer">\r
240                         <xs:enumeration value="188"/>\r
241                         <xs:enumeration value="196"/>\r
242                         <xs:enumeration value="206"/>\r
243                 </xs:restriction>\r
244         </xs:simpleType>\r
245         <xs:simpleType name="I2CPortCreateSpeed">\r
246                 <xs:annotation>\r
247                         <xs:documentation>Speed parameter of I2CPortCreate</xs:documentation>\r
248                 </xs:annotation>\r
249                 <xs:restriction base="xs:string">\r
250                         <xs:enumeration value="SlowMode"/>\r
251                         <xs:enumeration value="FastMode"/>\r
252                 </xs:restriction>\r
253         </xs:simpleType>\r
254         <xs:simpleType name="I2CPortWriteMode">\r
255                 <xs:annotation>\r
256                         <xs:documentation>Mode parameter of I2CPortWrite</xs:documentation>\r
257                 </xs:annotation>\r
258                 <xs:restriction base="xs:string">\r
259                         <xs:enumeration value="DefaultMode"/>\r
260                         <xs:enumeration value="RepeatedStartMode"/>\r
261                         <xs:enumeration value="BurstMode"/>\r
262                 </xs:restriction>\r
263         </xs:simpleType>\r
264         <xs:simpleType name="HexData">\r
265                 <xs:annotation>\r
266                         <xs:documentation>String which represents byte array as hexadecimal digits with space after each two digits</xs:documentation>\r
267                 </xs:annotation>\r
268                 <xs:restriction base="xs:string">\r
269                         <xs:pattern value="[0-9a-fA-F]{2}(\s+[0-9a-fA-F]{2})*"/>\r
270                 </xs:restriction>\r
271         </xs:simpleType>\r
272         <xs:complexType name="SplitterCombinerType">\r
273                 <xs:sequence>\r
274                         <xs:element name="MOSTSocket" type="SCMOSTSocketType" maxOccurs="unbounded"/>\r
275                 </xs:sequence>\r
276                 <xs:attribute name="BytesPerFrame" type="xs:integer" use="required"/>\r
277         </xs:complexType>\r
278         <xs:complexType name="MOSTSocketType">\r
279                 <xs:attribute name="Route" type="xs:string" use="required"/>\r
280                 <xs:attribute name="Bandwidth" type="xs:integer" use="required"/>\r
281                 <xs:attribute name="IsActive" type="xs:boolean" use="optional"/>\r
282                 <xs:attribute name="RouteId" type="HexNumber" use="optional"/>\r
283         </xs:complexType>\r
284         <xs:complexType name="SCMOSTSocketType">\r
285                 <xs:complexContent>\r
286                         <xs:extension base="MOSTSocketType">\r
287                                 <xs:attribute name="Offset" type="xs:integer" use="required"/>\r
288                         </xs:extension>\r
289                 </xs:complexContent>\r
290         </xs:complexType>\r
291 </xs:schema>\r