Skip to content

Commit ef3def6

Browse files
authored
Add fmi schema files (#1075)
1 parent bf322b6 commit ef3def6

14 files changed

+2153
-0
lines changed

schema/fmi2/fmi2Annotation.xsd

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
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:annotation>
4+
<xs:documentation>
5+
Copyright(c) 2008-2011 MODELISAR consortium,
6+
2012-2020 Modelica Association Project "FMI".
7+
All rights reserved.
8+
9+
This schema file is part of the FMI 2.0.2 standard.
10+
11+
This file is licensed by the copyright holders under the 2-Clause BSD License
12+
(https://opensource.org/licenses/BSD-2-Clause):
13+
14+
----------------------------------------------------------------------------
15+
Redistribution and use in source and binary forms, with or without
16+
modification, are permitted provided that the following conditions are met:
17+
18+
- Redistributions of source code must retain the above copyright notice,
19+
this list of conditions and the following disclaimer.
20+
21+
- Redistributions in binary form must reproduce the above copyright notice,
22+
this list of conditions and the following disclaimer in the documentation
23+
and/or other materials provided with the distribution.
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
29+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
----------------------------------------------------------------------------
37+
</xs:documentation>
38+
</xs:annotation>
39+
<xs:complexType name="fmi2Annotation">
40+
<xs:sequence maxOccurs="unbounded">
41+
<xs:element name="Tool">
42+
<xs:annotation>
43+
<xs:documentation>Tool specific annotation (ignored by other tools).</xs:documentation>
44+
</xs:annotation>
45+
<xs:complexType>
46+
<xs:sequence>
47+
<xs:any namespace="##any" processContents="lax" minOccurs="0"/>
48+
</xs:sequence>
49+
<xs:attribute name="name" type="xs:normalizedString" use="required">
50+
<xs:annotation>
51+
<xs:documentation>Name of tool that can interpret the annotation. "name" must be unique with respect to all other elements of the VendorAnnotation list.</xs:documentation>
52+
</xs:annotation>
53+
</xs:attribute>
54+
</xs:complexType>
55+
</xs:element>
56+
</xs:sequence>
57+
</xs:complexType>
58+
</xs:schema>
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
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:annotation>
4+
<xs:documentation>
5+
Copyright(c) 2008-2011 MODELISAR consortium,
6+
2012-2020 Modelica Association Project "FMI".
7+
All rights reserved.
8+
9+
This schema file is part of the FMI 2.0.2 standard.
10+
11+
This file is licensed by the copyright holders under the 2-Clause BSD License
12+
(https://opensource.org/licenses/BSD-2-Clause):
13+
14+
----------------------------------------------------------------------------
15+
Redistribution and use in source and binary forms, with or without
16+
modification, are permitted provided that the following conditions are met:
17+
18+
- Redistributions of source code must retain the above copyright notice,
19+
this list of conditions and the following disclaimer.
20+
21+
- Redistributions in binary form must reproduce the above copyright notice,
22+
this list of conditions and the following disclaimer in the documentation
23+
and/or other materials provided with the distribution.
24+
25+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
26+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
27+
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
28+
PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
29+
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
30+
EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
31+
PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
32+
OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
33+
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
34+
OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
35+
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
36+
----------------------------------------------------------------------------
37+
</xs:documentation>
38+
</xs:annotation>
39+
<xs:attributeGroup name="fmi2RealAttributes">
40+
<xs:attribute name="quantity" type="xs:normalizedString"/>
41+
<xs:attribute name="unit" type="xs:normalizedString"/>
42+
<xs:attribute name="displayUnit" type="xs:normalizedString">
43+
<xs:annotation>
44+
<xs:documentation>Default display unit, provided the conversion of values in "unit" to values in "displayUnit" is defined in UnitDefinitions / Unit / DisplayUnit.</xs:documentation>
45+
</xs:annotation>
46+
</xs:attribute>
47+
<xs:attribute name="relativeQuantity" type="xs:boolean" default="false">
48+
<xs:annotation>
49+
<xs:documentation>If relativeQuantity=true, offset for displayUnit must be ignored.</xs:documentation>
50+
</xs:annotation>
51+
</xs:attribute>
52+
<xs:attribute name="min" type="xs:double"/>
53+
<xs:attribute name="max" type="xs:double">
54+
<xs:annotation>
55+
<xs:documentation>max >= min required</xs:documentation>
56+
</xs:annotation>
57+
</xs:attribute>
58+
<xs:attribute name="nominal" type="xs:double">
59+
<xs:annotation>
60+
<xs:documentation>nominal > 0.0 required</xs:documentation>
61+
</xs:annotation>
62+
</xs:attribute>
63+
<xs:attribute name="unbounded" type="xs:boolean" default="false">
64+
<xs:annotation>
65+
<xs:documentation>Set to true, e.g., for crank angle. If true and variable is a state, relative tolerance should be zero on this variable.</xs:documentation>
66+
</xs:annotation>
67+
</xs:attribute>
68+
</xs:attributeGroup>
69+
<xs:attributeGroup name="fmi2IntegerAttributes">
70+
<xs:attribute name="quantity" type="xs:normalizedString"/>
71+
<xs:attribute name="min" type="xs:int"/>
72+
<xs:attribute name="max" type="xs:int">
73+
<xs:annotation>
74+
<xs:documentation>max >= min required</xs:documentation>
75+
</xs:annotation>
76+
</xs:attribute>
77+
</xs:attributeGroup>
78+
</xs:schema>

0 commit comments

Comments
 (0)