summaryrefslogtreecommitdiff
path: root/data_structures_correct/CLOCK_c.js
diff options
context:
space:
mode:
Diffstat (limited to 'data_structures_correct/CLOCK_c.js')
-rw-r--r--data_structures_correct/CLOCK_c.js16
1 files changed, 16 insertions, 0 deletions
diff --git a/data_structures_correct/CLOCK_c.js b/data_structures_correct/CLOCK_c.js
index 1284626..b6910b2 100644
--- a/data_structures_correct/CLOCK_c.js
+++ b/data_structures_correct/CLOCK_c.js
@@ -1,4 +1,20 @@
function CLOCK_c() {
+
+ CLOCK_c.prototype.get = function CLOCK_c() {
+ var options = {
+ dt: ["Period", getData(this.x.model.rpar.objs[1].model.rpar)[0]],
+ t0: ["Initialisation Time", getData(this.x.model.rpar.objs[1].model.firing)],
+ };
+ return options;
+ }
+
+ CLOCK_c.prototype.set = function CLOCK_c() {
+ this.x.model.rpar.objs[1].model.firing = new ScilabDouble([arguments[0]["t0"]]);
+ this.x.model.rpar.objs[1].model.rpar = new ScilabDouble([arguments[0]["dt"]], [arguments[0]["t0"]]);
+ this.x.model.rpar.objs[1].graphics.exprs = new ScilabString([arguments[0]["dt"]], [arguments[0]["t0"]])
+ return new BasicBlock(this.x);
+ }
+
CLOCK_c.prototype.define = function CLOCK_c() {
var evtdly = new EVTDLY_c().internal();
evtdly.graphics.orig = new ScilabDouble([320, 232]);