diff options
-rw-r--r-- | scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd | 29 | ||||
-rw-r--r-- | scilab/modules/xcos/etc/simulinkImportBlocks.xml | 133 |
2 files changed, 143 insertions, 19 deletions
diff --git a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd index 1f87d5d..4a2a12b 100644 --- a/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd +++ b/scilab/modules/xcos/etc/SimulinkImportConfiguration.xsd | |||
@@ -27,6 +27,8 @@ | |||
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="IntegerParameters" 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:element name="str2int" type="Str2IntParameters" minOccurs="0" maxOccurs="unbounded"/> | ||
31 | <xsd:element name="int2str" type="Int2StrParameters" minOccurs="0" maxOccurs="unbounded"/> | ||
30 | </xsd:sequence> | 32 | </xsd:sequence> |
31 | <xsd:attribute name="sim" type="xsd:string" use="required"/> | 33 | <xsd:attribute name="sim" type="xsd:string" use="required"/> |
32 | <xsd:attribute name="xcos" type="xsd:string" use="required"/> | 34 | <xsd:attribute name="xcos" type="xsd:string" use="required"/> |
@@ -66,5 +68,32 @@ | |||
66 | <xsd:attribute name="simVal" type="xsd:integer" use="required"/> | 68 | <xsd:attribute name="simVal" type="xsd:integer" use="required"/> |
67 | <xsd:attribute name="xcosVal" type="xsd:integer" use="required"/> | 69 | <xsd:attribute name="xcosVal" type="xsd:integer" use="required"/> |
68 | </xsd:complexType> | 70 | </xsd:complexType> |
71 | |||
72 | <xsd:complexType name="Str2IntParameters"> | ||
73 | <xsd:sequence> | ||
74 | <xsd:element name="parMap" type="Str2IntValueMap" minOccurs="1" maxOccurs="unbounded"/> | ||
75 | </xsd:sequence> | ||
76 | <xsd:attribute name="sim" type="xsd:string" use="required"/> | ||
77 | <xsd:attribute name="xcos" type="xsd:string" use="required"/> | ||
78 | <xsd:attribute name="description" type="xsd:string" use="optional"/> | ||
79 | </xsd:complexType> | ||
80 | |||
81 | <xsd:complexType name="Str2IntValueMap"> | ||
82 | <xsd:attribute name="simVal" type="xsd:string" use="required"/> | ||
83 | <xsd:attribute name="xcosVal" type="xsd:integer" use="required"/> | ||
84 | </xsd:complexType> | ||
85 | |||
86 | <xsd:complexType name="Int2StrParameters"> | ||
87 | <xsd:sequence> | ||
88 | <xsd:element name="parMap" type="Int2StrValueMap" minOccurs="1" maxOccurs="unbounded"/> | ||
89 | </xsd:sequence> | ||
90 | <xsd:attribute name="sim" type="xsd:string" use="required"/> | ||
91 | <xsd:attribute name="xcos" type="xsd:string" use="required"/> | ||
92 | <xsd:attribute name="description" type="xsd:string" use="optional"/> | ||
93 | </xsd:complexType> | ||
94 | <xsd:complexType name="Int2StrValueMap"> | ||
95 | <xsd:attribute name="simVal" type="xsd:integer" use="required"/> | ||
96 | <xsd:attribute name="xcosVal" type="xsd:string" use="required"/> | ||
97 | </xsd:complexType> | ||
69 | <!--Its possible that Ill have to add more parameter types, such as: boolean --> | 98 | <!--Its possible that Ill have to add more parameter types, such as: boolean --> |
70 | </xsd:schema> | 99 | </xsd:schema> |
diff --git a/scilab/modules/xcos/etc/simulinkImportBlocks.xml b/scilab/modules/xcos/etc/simulinkImportBlocks.xml index ab90667..837242e 100644 --- a/scilab/modules/xcos/etc/simulinkImportBlocks.xml +++ b/scilab/modules/xcos/etc/simulinkImportBlocks.xml | |||
@@ -1,5 +1,5 @@ | |||
1 | <blocks> | 1 | <blocks> |
2 | <!--Template--> | 2 | <!--Template--> |
3 | <block sim="string" xcos="string" description="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" description="string"> | 5 | <string sim="string" xcos="string" description="string"> |
@@ -14,22 +14,117 @@ | |||
14 | <!--Zero or more repetitions:--> | 14 | <!--Zero or more repetitions:--> |
15 | <simple sim="string" xcos="string" description="string"/> | 15 | <simple sim="string" xcos="string" description="string"/> |
16 | </block> | 16 | </block> |
17 | <!-- Constant Block Compatibility Pattern --> | 17 | <!-- Continuous Library Block Parameters --> |
18 | <block sim="Constant" xcos="CONST_m" description="no description"> | 18 | <!-- Derivative Block Compatibility Pattern --> |
19 | <simple sim="Value" xcos="Constant" description="no description"/> | 19 | <block sim="Derivative" xcos="DERIV" description=" |
20 | </block> | 20 | LinearizePole - not available; |
21 | <!--Absolute Value Block Compatibility Pattern:--> | 21 | "> |
22 | <block sim="Abs" xcos="ABSOLUTE_VALUE" description=" | 22 | </block> |
23 | SampleTime - in xcos always inherited; | 23 | <!-- Integrator Block Compatibility Pattern --> |
24 | OutMax - output limiter not available; | 24 | <block sim="Integrator" xcos="INTEGRAL_m" description=" |
25 | OutDataTypeStr - always inherited(?); | 25 | ExternalReset - not available; |
26 | RndMeth - rounding mode not available(?); | 26 | InitialConditionSource - external?internal (?); |
27 | SaturateOnIntegerOverflow - always saturated(?); | 27 | LimitOutput - switched on by default; |
28 | "> | 28 | ShowSaturationPort - N/A; |
29 | <string sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection"> | 29 | ShowStatePort - N/A; |
30 | <!--FIXME: here it should be string to int mapping--> | 30 | AbsoluteTolerance- N/A; |
31 | <parMap simVal="off" xcosVal="0"/> | 31 | IgnoreLimit - N/A; |
32 | <parMap simVal="yes" xcosVal="1"/> | 32 | ContinuousStateAttributes - N/A; |
33 | </string> | 33 | "> |
34 | </block> | 34 | <!--FIXME: Can be complex! --> |
35 | <integer sim="InitialCondition" xcos="Initial Condition" description=""> | ||
36 | <parMap simVal="1" xcosVal="1"/> | ||
37 | </integer> | ||
38 | <integer sim="UpperSaturationLimit" xcos="Upper limit" description=""> | ||
39 | <parMap simVal="1" xcosVal="1"/> | ||
40 | </integer> | ||
41 | <!--FIXME: Can be complex! --> | ||
42 | <integer sim="LowerSaturationLimit" xcos="Lower limit" description=""> | ||
43 | <parMap simVal="1" xcosVal="1"/> | ||
44 | </integer> | ||
45 | <!--FIXME: Can be complex! --> | ||
46 | <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection"> | ||
47 | <parMap simVal="off" xcosVal="0"/> | ||
48 | <parMap simVal="on" xcosVal="1"/> | ||
49 | </str2int> | ||
50 | <str2int sim="ExternalReset" xcos="With re-initialization" description=""> | ||
51 | <!-- TODO: {'none'} | 'rising' | 'falling' | 'either' | 'level' | 'level hold' --> | ||
52 | <parMap simVal="none" xcosVal="0"/> | ||
53 | </str2int> | ||
54 | <str2int sim="LimitOutput" xcos="With saturation" description=""> | ||
55 | <parMap simVal="off" xcosVal="0"/> | ||
56 | <parMap simVal="on" xcosVal="1"/> | ||
57 | </str2int> | ||
58 | </block> | ||
59 | <!-- Math Operations Library Block Parameters --> | ||
60 | <!-- A --> | ||
61 | <!--Absolute Value Block Compatibility Pattern:--> | ||
62 | <block sim="Abs" xcos="ABSOLUTE_VALUE" description=" | ||
63 | SampleTime - in xcos always inherited; | ||
64 | OutMax - output limiter not available; | ||
65 | OutDataTypeStr - always inherited(?); | ||
66 | RndMeth - rounding mode not available(?); | ||
67 | SaturateOnIntegerOverflow - always saturated(?); | ||
68 | "> | ||
69 | <!-- TODO: ZeroCross for the second time, create general parameter --> | ||
70 | <str2int sim="ZeroCross" xcos="zero_crossing" description="Enable zero-crossing detection"> | ||
71 | <parMap simVal="off" xcosVal="0"/> | ||
72 | <parMap simVal="on" xcosVal="1"/> | ||
73 | </str2int> | ||
74 | </block> | ||
75 | <!--Add Block Compatibility Pattern:--> | ||
76 | <block sim="Add" xcos="SUMMATION" description=" | ||
77 | IconShape - not available; | ||
78 | CollapseMode - not available; | ||
79 | CollapseDim - not available; | ||
80 | SampleTime - always inherited; | ||
81 | AccumDataTypeStr - always inherited; | ||
82 | OutMin, OutMax - limiters of in/out values not available; | ||
83 | OutputDataType - always inherited; | ||
84 | LockScale - (?); | ||
85 | RndMeth - integer rounding method, unneccesery as output is inherited from | ||
86 | "> | ||
87 | <!-- TODO: unavailable parameter of data type, should be inherited from inputs some special handling needed --> | ||
88 | <simple sim="unavailable" xcos="Datatype" description="should be inherited from inputs"/> | ||
89 | <!-- TODO: '++-' to [1 , 1 , -1], some special handling needed --> | ||
90 | <str2int sim="Inputs" xcos="Number of inputs or sign vector" description="String with +/- to vec [1/-1]"> | ||
91 | <parMap simVal="+" xcosVal="1"/> | ||
92 | <parMap simVal="-" xcosVal="-1"/> | ||
93 | </str2int> | ||
94 | <str2int sim=" SaturateOnIntegerOverflow" xcos="Do on Overflow" description=""> | ||
95 | <parMap simVal="on" xcosVal="1"/> | ||
96 | <parMap simVal="off" xcosVal="0"/> | ||
97 | </str2int> | ||
98 | </block> | ||
99 | <!--Algebraic Constraint Compatibility Pattern:--> | ||
100 | <block sim="Algebraic Constraint" xcos="CONSTRAINT_c" description="no description"> | ||
101 | <simple sim="z0" xcos="initial guess values" description="no description"/> | ||
102 | </block> | ||
103 | <!--Assignment Compatibility Pattern:--> | ||
104 | <block sim="Assignment" xcos="Assignment" description="no description"> | ||
105 | <integer sim="NumberOfDimensions" xcos="Number of output dimensions" description=""> | ||
106 | <parMap simVal="1" xcosVal="1"/> | ||
107 | </integer> | ||
108 | <str2int sim="IndexMode" xcos="Index Base" description=""> | ||
109 | <parMap simVal="Zero-based" xcosVal="0"/> | ||
110 | <parMap simVal="One-based" xcosVal="1"/> | ||
111 | </str2int> | ||
112 | <str2int sim="IndexOptionArray" xcos="Index Option" description=""> | ||
113 | <parMap simVal="Zero-based" xcosVal="0"/> | ||
114 | <parMap simVal="One-based" xcosVal="1"/> | ||
115 | </str2int> | ||
116 | <!--TODO: IndexOptions: See IndexOptionArray parameter for more information. | ||
117 | 'Assign all' | {'Index vector (dialog)'} | 'Index vector (port)' | 'Starting index (dialog)' | 'Starting index (port)' | ||
118 | FIXME: Is it available only in scicos? | ||
119 | --> | ||
120 | </block> | ||
121 | <!-- B --> | ||
122 | |||
123 | <!-- Sources Library Block Parameters --> | ||
124 | <!-- C --> | ||
125 | <!-- Constant Block Compatibility Pattern --> | ||
126 | <block sim="Constant" xcos="CONST_m" description="no description"> | ||
127 | <simple sim="Value" xcos="Constant" description="no description"/> | ||
128 | </block> | ||
129 | |||
35 | </blocks> | 130 | </blocks> |