included PWM
This commit is contained in:
parent
143a75cdf0
commit
2fddb6ae3f
10
Test.xml
10
Test.xml
@ -2,16 +2,16 @@
|
||||
<DeviceList xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:noNamespaceSchemaLocation="config.xsd">
|
||||
<Device name="example">
|
||||
<ValueInfo type="boolean"/>
|
||||
<Port protocol="DI">
|
||||
<Pin>GPIO_2</Pin>
|
||||
</Port>
|
||||
</Device>
|
||||
<Device name="PWM_example">
|
||||
<Port protocol="PWM" frequency="2">
|
||||
<Pin>GPIO_10</Pin>
|
||||
</Port>
|
||||
</Device>
|
||||
<Device name="sensorarray">
|
||||
<ValueInfo type="int" unit="°C">
|
||||
<Offset>1.2</Offset>
|
||||
<Factor>2.5</Factor>
|
||||
</ValueInfo>
|
||||
<Port protocol="DI">
|
||||
<Pin>GPIO_3</Pin>
|
||||
<Pin>GPIO_4</Pin>
|
||||
|
34
config.xsd
34
config.xsd
@ -6,6 +6,7 @@
|
||||
<xs:restriction base="xs:string">
|
||||
<xs:enumeration value="DI"/>
|
||||
<xs:enumeration value="DO"/>
|
||||
<xs:enumeration value="PWM"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
@ -18,6 +19,14 @@
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
<!-- available PWM frequencies -->
|
||||
<xs:simpleType name="FrequencyType">
|
||||
<xs:restriction base="xs:integer">
|
||||
<xs:minInclusive value="0"/>
|
||||
<xs:maxInclusive value="1000"/>
|
||||
</xs:restriction>
|
||||
</xs:simpleType>
|
||||
|
||||
|
||||
<!-- available Pins -->
|
||||
<xs:simpleType name="Pin">
|
||||
@ -72,9 +81,6 @@
|
||||
<xs:element name="Device">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element ref="ValueInfo"
|
||||
minOccurs="1"
|
||||
maxOccurs="1"/>
|
||||
<xs:element ref="Port"
|
||||
minOccurs="1"
|
||||
maxOccurs="1"/>
|
||||
@ -85,27 +91,6 @@
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="ValueInfo">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
<xs:element name="Offset"
|
||||
type="xs:float"
|
||||
minOccurs="0"
|
||||
maxOccurs="1"/>
|
||||
<xs:element name="Factor"
|
||||
type="xs:float"
|
||||
minOccurs="0"
|
||||
maxOccurs="1"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="type"
|
||||
type="ValueType"
|
||||
use="required"/>
|
||||
<xs:attribute name="unit"
|
||||
type="xs:string"
|
||||
use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
|
||||
<xs:element name="Port">
|
||||
<xs:complexType>
|
||||
<xs:sequence>
|
||||
@ -115,6 +100,7 @@
|
||||
maxOccurs="unbounded"/>
|
||||
</xs:sequence>
|
||||
<xs:attribute name="protocol" type="ProtocolType" use="required"/>
|
||||
<xs:attribute name="frequency" type="FrequencyType" use="optional"/>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
Loading…
x
Reference in New Issue
Block a user