summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerzy ZAGORSKI <xendoo@gmail.com>2010-06-11 09:53:30 +0200
committerJerzy ZAGORSKI <xendoo@gmail.com>2010-06-17 22:38:11 +0200
commitc74510f51e2b6df79281118e09fd1f1233654b17 (patch)
tree714bfbd0953366203fa0d61f9644f5fe8dc7b0ae
parent89e952f63251ce8a893da65ba0abf4f0568c09af (diff)
downloadscilab-c74510f51e2b6df79281118e09fd1f1233654b17.zip
scilab-c74510f51e2b6df79281118e09fd1f1233654b17.tar.gz
Upgraded compatibility pattern schema
Change-Id: Ifac251f31d18c95743d2dedcc2761837ee1f6fc3
-rw-r--r--scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd34
-rw-r--r--scilab/modules/xcos/etc/simulinkImportBlocks.xml32
2 files changed, 42 insertions, 24 deletions
diff --git a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
index c6461546..1f87d5d 100644
--- a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
+++ b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
@@ -4,19 +4,19 @@
4 jxb:version="2.0"> 4 jxb:version="2.0">
5 5
6 <!--Each Migration Schema, can consist of many blocks, and only one general parameters section --> 6 <!--Each Migration Schema, can consist of many blocks, and only one general parameters section -->
7 <xsd:element name="generals" type="GeneralParameters"/> 7 <!--<xsd:element name="generals" type="GeneralParameters"/> general section will be added as a block to BlockPalette-->
8 <xsd:element name="blocks" type="BlockPallete"/> 8 <xsd:element name="blocks" type="BlockPalette"/>
9 9
10 <xsd:complexType name="GeneralParameters"> 10 <xsd:complexType name="GeneralParameters">
11 <xsd:sequence> 11 <xsd:sequence>
12 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/> 12 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/>
13 <xsd:element name="integer" type="IntegerParameter" minOccurs="0" maxOccurs="unbounded"/> 13 <xsd:element name="integer" type="IntegerParameters" minOccurs="0" maxOccurs="unbounded"/>
14 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/> 14 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/>
15 </xsd:sequence> 15 </xsd:sequence>
16 <xsd:attribute name="dsc" type="xsd:string" use="optional"/> 16 <xsd:attribute name="description" type="xsd:string" use="optional"/>
17 </xsd:complexType> 17 </xsd:complexType>
18 18
19 <xsd:complexType name="BlockPallete"> 19 <xsd:complexType name="BlockPalette">
20 <xsd:sequence> 20 <xsd:sequence>
21 <xsd:element name="block" type="Block" minOccurs="0" maxOccurs="unbounded"/> 21 <xsd:element name="block" type="Block" minOccurs="0" maxOccurs="unbounded"/>
22 </xsd:sequence> 22 </xsd:sequence>
@@ -25,18 +25,18 @@
25 <xsd:complexType name="Block"> 25 <xsd:complexType name="Block">
26 <xsd:sequence> 26 <xsd:sequence>
27 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/> 27 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/>
28 <xsd:element name="integer" type="IntegerParameter" minOccurs="0" maxOccurs="unbounded"/> 28 <xsd:element name="integer" type="IntegerParameters" minOccurs="0" maxOccurs="unbounded"/>
29 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/> 29 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/>
30 </xsd:sequence> 30 </xsd:sequence>
31 <xsd:attribute name="sim" type="xsd:string" use="required"/> 31 <xsd:attribute name="sim" type="xsd:string" use="required"/>
32 <xsd:attribute name="xCos" type="xsd:string" use="required"/> 32 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
33 <xsd:attribute name="dsc" type="xsd:string" use="optional"/> 33 <xsd:attribute name="description" type="xsd:string" use="optional"/>
34 </xsd:complexType> 34 </xsd:complexType>
35 <!-- parameters that differs only in parameter name ex:Constant Value --> 35 <!-- parameters that differs only in parameter name ex:Constant Value -->
36 <xsd:complexType name="SimpleParameter"> 36 <xsd:complexType name="SimpleParameter">
37 <xsd:attribute name="sim" type="xsd:string" use="required"/> 37 <xsd:attribute name="sim" type="xsd:string" use="required"/>
38 <xsd:attribute name="xCos" type="xsd:string" use="required"/> 38 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
39 <xsd:attribute name="dsc" type="xsd:string" use="optional"/> 39 <xsd:attribute name="description" type="xsd:string" use="optional"/>
40 </xsd:complexType> 40 </xsd:complexType>
41 <!-- parameters that in name, and have different string values ex:CSCOPE SCOPE --> 41 <!-- parameters that in name, and have different string values ex:CSCOPE SCOPE -->
42 <xsd:complexType name="StringParameter"> 42 <xsd:complexType name="StringParameter">
@@ -44,27 +44,27 @@
44 <xsd:element name="parMap" type="StringValueMap" minOccurs="1" maxOccurs="unbounded"/> 44 <xsd:element name="parMap" type="StringValueMap" minOccurs="1" maxOccurs="unbounded"/>
45 </xsd:sequence> 45 </xsd:sequence>
46 <xsd:attribute name="sim" type="xsd:string" use="required"/> 46 <xsd:attribute name="sim" type="xsd:string" use="required"/>
47 <xsd:attribute name="xCos" type="xsd:string" use="required"/> 47 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
48 <xsd:attribute name="dsc" type="xsd:string" use="optional"/> 48 <xsd:attribute name="description" type="xsd:string" use="optional"/>
49 </xsd:complexType> 49 </xsd:complexType>
50 50
51 <xsd:complexType name="StringValueMap"> 51 <xsd:complexType name="StringValueMap">
52 <xsd:attribute name="simVal" type="xsd:string" use="required"/> 52 <xsd:attribute name="simVal" type="xsd:string" use="required"/>
53 <xsd:attribute name="xCosVal" type="xsd:string" use="required"/> 53 <xsd:attribute name="xcosVal" type="xsd:string" use="required"/>
54 </xsd:complexType> 54 </xsd:complexType>
55 <!-- parameters that needs to be calculated before setting --> 55 <!-- parameters that needs to be calculated before setting -->
56 <xsd:complexType name="IntegerParameter"> 56 <xsd:complexType name="IntegerParameters">
57 <xsd:sequence> 57 <xsd:sequence>
58 <xsd:element name="parMap" type="IntegerValueMap" minOccurs="1" maxOccurs="unbounded"/> 58 <xsd:element name="parMap" type="IntegerValueMap" minOccurs="1" maxOccurs="unbounded"/>
59 </xsd:sequence> 59 </xsd:sequence>
60 <xsd:attribute name="sim" type="xsd:string" use="required"/> 60 <xsd:attribute name="sim" type="xsd:string" use="required"/>
61 <xsd:attribute name="xCos" type="xsd:string" use="required"/> 61 <xsd:attribute name="xcos" type="xsd:string" use="required"/>
62 <xsd:attribute name="dsc" type="xsd:string" use="optional"/> 62 <xsd:attribute name="description" type="xsd:string" use="optional"/>
63 </xsd:complexType> 63 </xsd:complexType>
64 64
65 <xsd:complexType name="IntegerValueMap"> 65 <xsd:complexType name="IntegerValueMap">
66 <xsd:attribute name="simVal" type="xsd:integer" use="required"/> 66 <xsd:attribute name="simVal" type="xsd:integer" use="required"/>
67 <xsd:attribute name="xCosVal" type="xsd:integer" use="required"/> 67 <xsd:attribute name="xcosVal" type="xsd:integer" use="required"/>
68 </xsd:complexType> 68 </xsd:complexType>
69 <!--Its possible that Ill have to add more parameter types, such as: boolean --> 69 <!--Its possible that Ill have to add more parameter types, such as: boolean -->
70</xsd:schema> 70</xsd:schema>
diff --git a/scilab/modules/xcos/etc/simulinkImportBlocks.xml b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
index 9e6177b..ab90667 100644
--- a/scilab/modules/xcos/etc/simulinkImportBlocks.xml
+++ b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
@@ -1,17 +1,35 @@
1<blocks> 1<blocks>
2 <!--Zero or more repetitions:--> 2 <!--Template-->
3 <block sim="string" xCos="string" dsc="string"> 3 <block sim="string" xcos="string" description="string">
4 <!--Zero or more repetitions:--> 4 <!--Zero or more repetitions:-->
5 <string sim="string" xCos="string" dsc="string"> 5 <string sim="string" xcos="string" description="string">
6 <!--1 or more repetitions:--> 6 <!--1 or more repetitions:-->
7 <parMap simVal="string" xCosVal="string"/> 7 <parMap simVal="string" xcosVal="string"/>
8 </string> 8 </string>
9 <!--Zero or more repetitions:--> 9 <!--Zero or more repetitions:-->
10 <integer sim="string" xCos="string" dsc="string"> 10 <integer sim="string" xcos="string" description="string">
11 <!--1 or more repetitions:--> 11 <!--1 or more repetitions:-->
12 <parMap simVal="100" xCosVal="100"/> 12 <parMap simVal="100" xcosVal="100"/>
13 </integer> 13 </integer>
14 <!--Zero or more repetitions:--> 14 <!--Zero or more repetitions:-->
15 <simple sim="string" xCos="string" dsc="string"/> 15 <simple sim="string" xcos="string" description="string"/>
16 </block>
17 <!-- Constant Block Compatibility Pattern -->
18 <block sim="Constant" xcos="CONST_m" description="no description">
19 <simple sim="Value" xcos="Constant" description="no description"/>
20 </block>
21 <!--Absolute Value Block Compatibility Pattern:-->
22 <block sim="Abs" xcos="ABSOLUTE_VALUE" description="
23 SampleTime - in xcos always inherited;
24 OutMax - output limiter not available;
25 OutDataTypeStr - always inherited(?);
26 RndMeth - rounding mode not available(?);
27 SaturateOnIntegerOverflow - always saturated(?);
28 ">
29 <string sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection">
30 <!--FIXME: here it should be string to int mapping-->
31 <parMap simVal="off" xcosVal="0"/>
32 <parMap simVal="yes" xcosVal="1"/>
33 </string>
16 </block> 34 </block>
17</blocks> 35</blocks>