diff options
author | ASP1234 | 2016-06-23 11:42:50 +0000 |
---|---|---|
committer | ASP1234 | 2016-06-23 11:42:50 +0000 |
commit | 13bdf2567a765a7230abb2130117e67b7c521e34 (patch) | |
tree | a2e2808bb4ee01519bb65864406873475ccea3d1 /dependencies.js | |
parent | 9abb694b2a82d14643dc695b321f63d8b6f1112e (diff) | |
download | xcos-on-web-13bdf2567a765a7230abb2130117e67b7c521e34.tar.gz xcos-on-web-13bdf2567a765a7230abb2130117e67b7c521e34.tar.bz2 xcos-on-web-13bdf2567a765a7230abb2130117e67b7c521e34.zip |
Minor Fix
Diffstat (limited to 'dependencies.js')
-rw-r--r-- | dependencies.js | 79 |
1 files changed, 79 insertions, 0 deletions
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]; |