summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorASP12342016-06-23 11:02:36 +0000
committerASP12342016-06-23 11:02:36 +0000
commit530aadbcc2deb36a0e9d542dc4e35b39f922eb4d (patch)
treeac309f2183f722983a0c1d3c2091d2a8d57ca0fa
parent83dd01cf5241b06446572ebd5acb01cfdd87fe39 (diff)
downloadxcos-on-web-530aadbcc2deb36a0e9d542dc4e35b39f922eb4d.tar.gz
xcos-on-web-530aadbcc2deb36a0e9d542dc4e35b39f922eb4d.tar.bz2
xcos-on-web-530aadbcc2deb36a0e9d542dc4e35b39f922eb4d.zip
Implement c_block Block
-rwxr-xr-xblocks_xcos/CLKFROM.xcos74
-rwxr-xr-xblocks_xcos/CLKGOTO.xcos80
-rw-r--r--data_structures_correct/CLKGOTO.js21
-rw-r--r--data_structures_correct/c_block.js34
4 files changed, 126 insertions, 83 deletions
diff --git a/blocks_xcos/CLKFROM.xcos b/blocks_xcos/CLKFROM.xcos
index 3bd351a..191d104 100755
--- a/blocks_xcos/CLKFROM.xcos
+++ b/blocks_xcos/CLKFROM.xcos
@@ -1,41 +1,35 @@
<?xml version="1.0" encoding="UTF-8"?>
-<XcosDiagram background="-1" title="Untitled">
- <!--Xcos - 1.0 - scilab-5.5.2 - 20150331 1152-->
- <Array as="context" scilabClass="String[]">
- <add value=""/>
- </Array>
- <mxGraphModel as="model">
- <root>
- <mxCell id="116bf7f7:15524e5bb35:-7ff9"/>
- <mxCell id="116bf7f7:15524e5bb35:-7ffa" parent="116bf7f7:15524e5bb35:-7ff9"/>
- <BasicBlock blockType="d" id="116bf7f7:15524e5bb35:-7fe3" interfaceFunctionName="CLKFROM" parent="116bf7f7:15524e5bb35:-7ffa" simulationFunctionName="clkfrom" simulationFunctionType="DEFAULT" style="CLKFROM">
- <ScilabString as="exprs" height="1" width="1">
- <data column="0" line="0" value="A"/>
- </ScilabString>
- <ScilabDouble as="realParameters" height="0" width="0"/>
- <ScilabDouble as="integerParameters" height="0" width="0"/>
- <Array as="objectsParameters" scilabClass="ScilabList">
- <ScilabString height="1" width="1">
- <data column="0" line="0" value="A"/>
- </ScilabString>
- </Array>
- <ScilabDouble as="nbZerosCrossing" height="1" width="1">
- <data column="0" line="0" realPart="0.0"/>
- </ScilabDouble>
- <ScilabDouble as="nmode" height="1" width="1">
- <data column="0" line="0" realPart="0.0"/>
- </ScilabDouble>
- <Array as="oDState" scilabClass="ScilabList"/>
- <Array as="equations" scilabClass="ScilabList"/>
- <mxGeometry as="geometry" height="7.0" width="7.0" x="37.5" y="37.0"/>
- </BasicBlock>
- <mxCell connectable="0" id="116bf7f7:15524e5bb35:-7fe3#identifier" parent="116bf7f7:15524e5bb35:-7fe3" style="noLabel=0;opacity=0;" value="From" vertex="1">
- <mxGeometry as="geometry" relative="1" x="0.5" y="1.1"/>
- </mxCell>
- <CommandPort dataType="UNKNOW_TYPE" id="116bf7f7:15524e5bb35:-7fe2" ordering="1" parent="116bf7f7:15524e5bb35:-7fe3" style="CommandPort;align=center;verticalAlign=bottom;spacing=10.0;rotation=90">
- <mxGeometry as="geometry" height="8.0" width="8.0" x="-3.0" y="1.0"/>
- </CommandPort>
- </root>
- </mxGraphModel>
- <mxCell as="defaultParent" id="116bf7f7:15524e5bb35:-7ffa" parent="116bf7f7:15524e5bb35:-7ff9"/>
-</XcosDiagram>
+<XcosDiagram background="-1" title="Untitled - 4:12:04 PM">
+ <!--Xcos - 1.0 - scilab-5.5.2 - 20150331 1152-->
+ <mxGraphModel as="model">
+ <root>
+ <mxCell id="-50510869:1557c914f41:-7fcc" />
+ <mxCell id="-50510869:1557c914f41:-7fcd" parent="-50510869:1557c914f41:-7fcc" />
+ <BasicBlock blockType="d" id="-50510869:1557c914f41:-7fc6" interfaceFunctionName="CLKFROM" parent="-50510869:1557c914f41:-7fcd" simulationFunctionName="clkfrom" simulationFunctionType="DEFAULT" style="CLKFROM">
+ <ScilabString as="exprs" height="1" width="1">
+ <data column="0" line="0" value="A" />
+ </ScilabString>
+ <ScilabDouble as="realParameters" height="0" width="0" />
+ <ScilabDouble as="integerParameters" height="0" width="0" />
+ <Array as="objectsParameters" scilabClass="ScilabList">
+ <ScilabString height="1" width="1">
+ <data column="0" line="0" value="A" />
+ </ScilabString>
+ </Array>
+ <ScilabDouble as="nbZerosCrossing" height="1" width="1">
+ <data column="0" line="0" realPart="0.0" />
+ </ScilabDouble>
+ <ScilabDouble as="nmode" height="1" width="1">
+ <data column="0" line="0" realPart="0.0" />
+ </ScilabDouble>
+ <Array as="oDState" scilabClass="ScilabList" />
+ <Array as="equations" scilabClass="ScilabList" />
+ <mxGeometry as="geometry" height="20.0" width="40.0" x="150.0" y="110.0" />
+ </BasicBlock>
+ <CommandPort dataType="UNKNOW_TYPE" id="-50510869:1557c914f41:-7fc5" ordering="1" parent="-50510869:1557c914f41:-7fc6" style="CommandPort;align=center;verticalAlign=bottom;spacing=10.0;rotation=90">
+ <mxGeometry as="geometry" height="8.0" width="8.0" x="16.0" y="20.0" />
+ </CommandPort>
+ </root>
+ </mxGraphModel>
+ <mxCell as="defaultParent" id="-50510869:1557c914f41:-7fcd" parent="-50510869:1557c914f41:-7fcc" />
+</XcosDiagram> \ No newline at end of file
diff --git a/blocks_xcos/CLKGOTO.xcos b/blocks_xcos/CLKGOTO.xcos
index 3436f79..2e9b622 100755
--- a/blocks_xcos/CLKGOTO.xcos
+++ b/blocks_xcos/CLKGOTO.xcos
@@ -1,44 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
-<XcosDiagram background="-1" title="Untitled">
- <!--Xcos - 1.0 - scilab-5.5.2 - 20150331 1152-->
- <Array as="context" scilabClass="String[]">
- <add value=""/>
- </Array>
- <mxGraphModel as="model">
- <root>
- <mxCell id="116bf7f7:15524e5bb35:-7fcd"/>
- <mxCell id="116bf7f7:15524e5bb35:-7fce" parent="116bf7f7:15524e5bb35:-7fcd"/>
- <BasicBlock blockType="d" id="116bf7f7:15524e5bb35:-7fcb" interfaceFunctionName="CLKGOTO" parent="116bf7f7:15524e5bb35:-7fce" simulationFunctionName="clkgoto" simulationFunctionType="DEFAULT" style="CLKGOTO">
- <ScilabString as="exprs" height="2" width="1">
- <data column="0" line="0" value="A"/>
- <data column="0" line="1" value="1"/>
- </ScilabString>
- <ScilabDouble as="realParameters" height="0" width="0"/>
- <ScilabDouble as="integerParameters" height="1" width="1">
- <data column="0" line="0" realPart="1.0"/>
- </ScilabDouble>
- <Array as="objectsParameters" scilabClass="ScilabList">
- <ScilabString height="1" width="1">
- <data column="0" line="0" value="A"/>
- </ScilabString>
- </Array>
- <ScilabDouble as="nbZerosCrossing" height="1" width="1">
- <data column="0" line="0" realPart="0.0"/>
- </ScilabDouble>
- <ScilabDouble as="nmode" height="1" width="1">
- <data column="0" line="0" realPart="0.0"/>
- </ScilabDouble>
- <Array as="oDState" scilabClass="ScilabList"/>
- <Array as="equations" scilabClass="ScilabList"/>
- <mxGeometry as="geometry" height="7.0" width="7.0" x="37.5" y="37.0"/>
- </BasicBlock>
- <mxCell connectable="0" id="116bf7f7:15524e5bb35:-7fcb#identifier" parent="116bf7f7:15524e5bb35:-7fcb" style="noLabel=0;opacity=0;" value="Goto" vertex="1">
- <mxGeometry as="geometry" relative="1" x="0.5" y="1.1"/>
- </mxCell>
- <ControlPort dataType="UNKNOW_TYPE" id="116bf7f7:15524e5bb35:-7fca" ordering="1" parent="116bf7f7:15524e5bb35:-7fcb" style="ControlPort;align=center;verticalAlign=top;spacing=10.0;rotation=90">
- <mxGeometry as="geometry" height="8.0" width="8.0" x="-3.0" y="-8.0"/>
- </ControlPort>
- </root>
- </mxGraphModel>
- <mxCell as="defaultParent" id="116bf7f7:15524e5bb35:-7fce" parent="116bf7f7:15524e5bb35:-7fcd"/>
-</XcosDiagram>
+<XcosDiagram background="-1" title="Untitled - 4:20:26 PM">
+ <!--Xcos - 1.0 - scilab-5.5.2 - 20150331 1152-->
+ <mxGraphModel as="model">
+ <root>
+ <mxCell id="-50510869:1557c914f41:-7fbd" />
+ <mxCell id="-50510869:1557c914f41:-7fbe" parent="-50510869:1557c914f41:-7fbd" />
+ <BasicBlock blockType="d" id="-50510869:1557c914f41:-7fb7" interfaceFunctionName="CLKGOTO" parent="-50510869:1557c914f41:-7fbe" simulationFunctionName="clkgoto" simulationFunctionType="DEFAULT" style="CLKGOTO">
+ <ScilabString as="exprs" height="2" width="1">
+ <data column="0" line="0" value="A" />
+ <data column="0" line="1" value="1" />
+ </ScilabString>
+ <ScilabDouble as="realParameters" height="0" width="0" />
+ <ScilabDouble as="integerParameters" height="1" width="1">
+ <data column="0" line="0" realPart="1.0" />
+ </ScilabDouble>
+ <Array as="objectsParameters" scilabClass="ScilabList">
+ <ScilabString height="1" width="1">
+ <data column="0" line="0" value="A" />
+ </ScilabString>
+ </Array>
+ <ScilabDouble as="nbZerosCrossing" height="1" width="1">
+ <data column="0" line="0" realPart="0.0" />
+ </ScilabDouble>
+ <ScilabDouble as="nmode" height="1" width="1">
+ <data column="0" line="0" realPart="0.0" />
+ </ScilabDouble>
+ <Array as="oDState" scilabClass="ScilabList" />
+ <Array as="equations" scilabClass="ScilabList" />
+ <mxGeometry as="geometry" height="20.0" width="40.0" x="140.0" y="200.0" />
+ </BasicBlock>
+ <ControlPort dataType="UNKNOW_TYPE" id="-50510869:1557c914f41:-7fb6" ordering="1" parent="-50510869:1557c914f41:-7fb7" style="ControlPort;align=center;verticalAlign=top;spacing=10.0;rotation=90">
+ <mxGeometry as="geometry" height="8.0" width="8.0" x="16.0" y="-8.0" />
+ </ControlPort>
+ </root>
+ </mxGraphModel>
+ <mxCell as="defaultParent" id="-50510869:1557c914f41:-7fbe" parent="-50510869:1557c914f41:-7fbd" />
+</XcosDiagram> \ No newline at end of file
diff --git a/data_structures_correct/CLKGOTO.js b/data_structures_correct/CLKGOTO.js
new file mode 100644
index 0000000..5d31526
--- /dev/null
+++ b/data_structures_correct/CLKGOTO.js
@@ -0,0 +1,21 @@
+function CLKGOTO () {
+
+ CLKGOTO.prototype.define = function CLKGOTO() {
+ var model = scicos_model();
+ model.sim = new ScilabString(["clkgoto"]);
+ model.evtin = new ScilabDouble([1]);
+ model.opar=list(new ScilabString(["A"]));
+ model.ipar=new ScilabDouble([1]);
+ model.blocktype = new ScilabString(["d"]);
+ model.firing = new ScilabDouble([-1]);
+ model.dep_ut = new ScilabBoolean([false,false]);
+
+ var exprs = new ScilabString(["A"],[sci2exp(1)]);
+ this.x=new standard_define(new ScilabDouble([2,1]),model,exprs,new ScilabString([" "]));
+ this.x.graphics.id = new ScilabString(["Goto"]);
+ return new BasicBlock(this.x);
+ }
+ CLKGOTO.prototype.details = function CLKGOTO() {
+ return this.x;
+ }
+}
diff --git a/data_structures_correct/c_block.js b/data_structures_correct/c_block.js
new file mode 100644
index 0000000..274e66e
--- /dev/null
+++ b/data_structures_correct/c_block.js
@@ -0,0 +1,34 @@
+function c_block() {
+
+ c_block.prototype.define = function c_block() {
+
+ this.in1 = 1;
+ this.out = 1;
+ this.rpar = [];
+ this.typ = "c";
+ this.funam = "toto";
+
+ var model = scicos_model();
+ model.sim = list(new ScilabString([" "]), new ScilabDouble([2001]));
+ model.in = new ScilabDouble([this.in1]);
+ model.out = new ScilabDouble([this.out]);
+ model.evtin = new ScilabDouble();
+ model.evtout = new ScilabDouble();
+ model.state = new ScilabDouble();
+ model.dstate = new ScilabDouble();
+ model.rpar = new ScilabDouble();
+ model.ipar = new ScilabDouble([0]);
+ model.blocktype = new ScilabString([this.typ]);
+ model.firing = new ScilabDouble();
+ model.dep_ut = new ScilabBoolean([true, false]);
+
+ var label = list(new ScilabString([sci2exp(this.in1)], [sci2exp(this.out)], [sci2exp(this.rpar)], [this.funam]), list(new ScilabDouble()));
+ var gr_i = new ScilabString(["xstringb(orig(1),orig(2),\"c_block\",sz(1),sz(2));"]);
+ this.x = new standard_define(new ScilabDouble([3, 2]), model, label, gr_i);
+ return new BasicBlock(this.x);
+ }
+ c_block.prototype.details = function c_block() {
+
+ return this.x;
+ }
+} \ No newline at end of file