summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJerzy ZAGORSKI <xendoo@gmail.com>2010-05-31 12:35:32 +0200
committerJerzy ZAGORSKI <xendoo@gmail.com>2010-06-04 16:54:43 +0200
commit9feb5c8e1dfdeb09b23c6ccda73ab89b145bf877 (patch)
tree2686a06807c49499c485b489e9ee45c30f79450b
parentde3685819a0d816b5b2c4c19776b4ddc29dcf0eb (diff)
downloadscilab-9feb5c8e1dfdeb09b23c6ccda73ab89b145bf877.zip
scilab-9feb5c8e1dfdeb09b23c6ccda73ab89b145bf877.tar.gz
Added migration pattern configuration file and xml templates for compatibility patterns (corrected)
Change-Id: I850942c2719df1e271e90fd6b8abdb3ae9f517d0
-rw-r--r--scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd70
-rw-r--r--scilab/modules/xcos/etc/simulinkImportBlocks.xml17
-rw-r--r--scilab/modules/xcos/etc/simulinkImportGeneralParameters.xml14
3 files changed, 101 insertions, 0 deletions
diff --git a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
new file mode 100644
index 0000000..c6461546
--- /dev/null
+++ b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd
@@ -0,0 +1,70 @@
1<?xml version="1.0" encoding="UTF-8"?>
2<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
3 xmlns:jxb="http://java.sun.com/xml/ns/jaxb"
4 jxb:version="2.0">
5
6 <!--Each Migration Schema, can consist of many blocks, and only one general parameters section -->
7 <xsd:element name="generals" type="GeneralParameters"/>
8 <xsd:element name="blocks" type="BlockPallete"/>
9
10 <xsd:complexType name="GeneralParameters">
11 <xsd:sequence>
12 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/>
13 <xsd:element name="integer" type="IntegerParameter" minOccurs="0" maxOccurs="unbounded"/>
14 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/>
15 </xsd:sequence>
16 <xsd:attribute name="dsc" type="xsd:string" use="optional"/>
17 </xsd:complexType>
18
19 <xsd:complexType name="BlockPallete">
20 <xsd:sequence>
21 <xsd:element name="block" type="Block" minOccurs="0" maxOccurs="unbounded"/>
22 </xsd:sequence>
23 </xsd:complexType>
24 <!-- parameter won't be found in Block scope, It'll be searched among general parameters. This way it will be possible to shadow parameter -->
25 <xsd:complexType name="Block">
26 <xsd:sequence>
27 <xsd:element name="string" type="StringParameter" minOccurs="0" maxOccurs="unbounded"/>
28 <xsd:element name="integer" type="IntegerParameter" minOccurs="0" maxOccurs="unbounded"/>
29 <xsd:element name="simple" type="SimpleParameter" minOccurs="0" maxOccurs="unbounded"/>
30 </xsd:sequence>
31 <xsd:attribute name="sim" 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"/>
34 </xsd:complexType>
35 <!-- parameters that differs only in parameter name ex:Constant Value -->
36 <xsd:complexType name="SimpleParameter">
37 <xsd:attribute name="sim" 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"/>
40 </xsd:complexType>
41 <!-- parameters that in name, and have different string values ex:CSCOPE SCOPE -->
42 <xsd:complexType name="StringParameter">
43 <xsd:sequence>
44 <xsd:element name="parMap" type="StringValueMap" minOccurs="1" maxOccurs="unbounded"/>
45 </xsd:sequence>
46 <xsd:attribute name="sim" 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"/>
49 </xsd:complexType>
50
51 <xsd:complexType name="StringValueMap">
52 <xsd:attribute name="simVal" type="xsd:string" use="required"/>
53 <xsd:attribute name="xCosVal" type="xsd:string" use="required"/>
54 </xsd:complexType>
55 <!-- parameters that needs to be calculated before setting -->
56 <xsd:complexType name="IntegerParameter">
57 <xsd:sequence>
58 <xsd:element name="parMap" type="IntegerValueMap" minOccurs="1" maxOccurs="unbounded"/>
59 </xsd:sequence>
60 <xsd:attribute name="sim" 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"/>
63 </xsd:complexType>
64
65 <xsd:complexType name="IntegerValueMap">
66 <xsd:attribute name="simVal" type="xsd:integer" use="required"/>
67 <xsd:attribute name="xCosVal" type="xsd:integer" use="required"/>
68 </xsd:complexType>
69 <!--Its possible that Ill have to add more parameter types, such as: boolean -->
70</xsd:schema>
diff --git a/scilab/modules/xcos/etc/simulinkImportBlocks.xml b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
new file mode 100644
index 0000000..9e6177b
--- /dev/null
+++ b/scilab/modules/xcos/etc/simulinkImportBlocks.xml
@@ -0,0 +1,17 @@
1<blocks>
2 <!--Zero or more repetitions:-->
3 <block sim="string" xCos="string" dsc="string">
4 <!--Zero or more repetitions:-->
5 <string sim="string" xCos="string" dsc="string">
6 <!--1 or more repetitions:-->
7 <parMap simVal="string" xCosVal="string"/>
8 </string>
9 <!--Zero or more repetitions:-->
10 <integer sim="string" xCos="string" dsc="string">
11 <!--1 or more repetitions:-->
12 <parMap simVal="100" xCosVal="100"/>
13 </integer>
14 <!--Zero or more repetitions:-->
15 <simple sim="string" xCos="string" dsc="string"/>
16 </block>
17</blocks>
diff --git a/scilab/modules/xcos/etc/simulinkImportGeneralParameters.xml b/scilab/modules/xcos/etc/simulinkImportGeneralParameters.xml
new file mode 100644
index 0000000..a506193
--- /dev/null
+++ b/scilab/modules/xcos/etc/simulinkImportGeneralParameters.xml
@@ -0,0 +1,14 @@
1<generals dsc="string">
2 <!--Zero or more repetitions:-->
3 <string sim="string" xCos="string" dsc="string">
4 <!--1 or more repetitions:-->
5 <parMap simVal="string" xCosVal="string"/>
6 </string>
7 <!--Zero or more repetitions:-->
8 <integer sim="string" xCos="string" dsc="string">
9 <!--1 or more repetitions:-->
10 <parMap simVal="100" xCosVal="100"/>
11 </integer>
12 <!--Zero or more repetitions:-->
13 <simple sim="string" xCos="string" dsc="string"/>
14</generals>