summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data_structures_correct/Capacitor.js2
-rw-r--r--dependencies.js79
-rw-r--r--finalmodsheet.xsl8
3 files changed, 84 insertions, 5 deletions
diff --git a/data_structures_correct/Capacitor.js b/data_structures_correct/Capacitor.js
index 1924ddd..d0c9f0d 100644
--- a/data_structures_correct/Capacitor.js
+++ b/data_structures_correct/Capacitor.js
@@ -4,7 +4,7 @@ function Capacitor() {
var model = scicos_model();
var C = 0.01,v = 0;
- model.rpar = new ScilabDouble([C], [v]);
+ model.rpar = new ScilabDouble([C],[v]);
model.sim = new ScilabString(["Capacitor"]);
model.blocktype = new ScilabString(["c"]);
model.dep_ut = new ScilabBoolean([true, false]);
diff --git a/dependencies.js b/dependencies.js
index ec5b2bd..11f6d97 100644
--- a/dependencies.js
+++ b/dependencies.js
@@ -332,6 +332,85 @@ function EventOutBlock() {
}
}
+function RoundBlock() {
+ if (arguments.length > 0) {
+ var options = arguments[0];
+ this.angle = options.angle; // Not Known
+ this.blockType = getData(options.model.blocktype)[0];
+ var dep_ut = getData(options.model.dep_ut);
+ if (dep_ut[0] == "true")
+ this.dependsOnU = "1";
+ this.id = options.id;
+ this.interfaceFunctionName = arguments.callee.caller.name;
+ this.ordering = options.ordering;
+ this.parent = options.parent;
+ if (options.model.sim instanceof Array) {
+ this.simulationFunctionName = getData(options.model.sim[0])[0];
+ var func_type;
+ switch (getData(options.model.sim[1])[0].toString()) {
+ case "-2.0":
+ func_type = "ESELECT";
+ break;
+ case "-1.0":
+ func_type = "IFTHENELSE";
+ break;
+ case "1.0":
+ func_type = "TYPE_1";
+ break;
+ case "2.0":
+ func_type = "TYPE_2";
+ break;
+ case "3.0":
+ func_type = "TYPE_3";
+ break;
+ case "4.0":
+ func_type = "C_OR_FORTRAN";
+ break;
+ case "5.0":
+ func_type = "SCILAB";
+ break;
+ case "99.0":
+ func_type = "DEBUG";
+ break;
+ case "1001.0":
+ func_type = "DYNAMIC_FORTRAN_1";
+ break;
+ case "2001.0":
+ func_type = "DYNAMIC_C_1";
+ break;
+ case "2004.0":
+ func_type = "DYNAMIC_EXPLICIT_4";
+ break;
+ case "10001.0":
+ func_type = "OLDBLOCKS";
+ break;
+ case "10004.0":
+ func_type = "IMPLICIT_C_OR_FORTRAN";
+ break;
+ case "30004.0":
+ func_type = "MODELICA";
+ break;
+ }
+ this.simulationFunctionType = func_type;
+ } else {
+ this.simulationFunctionName = getData(options.model.sim)[0];
+ this.simulationFunctionType = "DEFAULT";
+ }
+ this.style = arguments.callee.caller.name;
+ this.value = options.value; // Not Known
+ this.exprs = options.graphics.exprs;
+ this.realParameters = options.model.rpar;
+ this.integerParameters = options.model.ipar;
+ this.objectsParameters = options.model.opar;
+ this.nbZerosCrossing = options.model.nzcross;
+ this.nmode = options.model.nmode;
+ this.oDState = list();
+ this.equations = list(); // Not Known
+ this.blockName = "RoundBlock";
+ this.blockElementName = arguments.callee.caller.name;
+ }
+}
+
function zeros() {
if (arguments.length == 0) {
return [0];
diff --git a/finalmodsheet.xsl b/finalmodsheet.xsl
index 06f3b0f..9226a66 100644
--- a/finalmodsheet.xsl
+++ b/finalmodsheet.xsl
@@ -172,7 +172,7 @@ Look for TAG:Break1!!!
</xsl:template>
<xsl:template name="Object" match="Object">
<xsl:element name="Array">
- <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock'">
+ <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock'">
<xsl:if test="@as">
<xsl:attribute name="as">
<xsl:value-of select="@as" />
@@ -200,7 +200,7 @@ Look for TAG:Break1!!!
-->
<xsl:template name="Array" match="Array">
<xsl:element name="Array">
- <xsl:if test="name(..)='BasicBlock' or @as='context' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock'">
+ <xsl:if test="name(..)='BasicBlock' or @as='context' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock'">
<xsl:if test="@as">
<xsl:attribute name="as">
<xsl:value-of select="@as" />
@@ -1581,7 +1581,7 @@ Look for TAG:Break1!!!
</xsl:template>
<xsl:template name="ScilabDouble" match="ScilabDouble">
<xsl:element name="ScilabDouble">
- <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock'">
+ <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock'">
<xsl:if test="@as">
<xsl:attribute name="as">
<xsl:value-of select="@as" />
@@ -1613,7 +1613,7 @@ Look for TAG:Break1!!!
</xsl:template>
<xsl:template name="ScilabString" match="ScilabString">
<xsl:element name="ScilabString">
- <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock'">
+ <xsl:if test="name(..)='BasicBlock' or name(..)='AfficheBlock' or name(..)='BigSom' or name(..)='EventInBlock' or name(..)='EventOutBlock' or name(..)='RoundBlock'">
<xsl:if test="@as">
<xsl:attribute name="as">
<xsl:value-of select="@as" />