summaryrefslogtreecommitdiffstats
path: root/scilab/modules/scicos_blocks
diff options
context:
space:
mode:
authorClément DAVID <clement.david@scilab.org>2010-04-14 16:59:47 +0200
committerClément DAVID <clement.david@scilab.org>2010-04-14 17:08:58 +0200
commit0104033592325dd7017a48d9dc27f1649c87d6b6 (patch)
tree53c1e081d5684836579c7489b0ab2ded1cd4b19a /scilab/modules/scicos_blocks
parent51fbc6c05e639e1b9033b0278d2935e0e52dcbfa (diff)
downloadscilab-0104033592325dd7017a48d9dc27f1649c87d6b6.zip
scilab-0104033592325dd7017a48d9dc27f1649c87d6b6.tar.gz
Xcos: block descriptor tests
Check each block "define" and "set" methods. As described in scicos_getvalue.sci and in the documentation it is expected that the labels and the values must be column vectors. Correct blocks with the same labels and values sizes. See modules/scicos/macros/scicos_utils/scicos_getvalue.sci:31 See help(scicos_graphics)#exprs Bug: #6699 Change-Id: I32eb4b3422229bca2c581d5b43077f35207ad528
Diffstat (limited to 'scilab/modules/scicos_blocks')
-rw-r--r--scilab/modules/scicos_blocks/macros/Branching/CLKGOTO.sci4
-rw-r--r--scilab/modules/scicos_blocks/macros/Electrical/Diode.sci6
-rw-r--r--scilab/modules/scicos_blocks/macros/Electrical/SineVoltage.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/Linear/REGISTER.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/MatrixOp/CUMSUM.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/MatrixOp/EXTTRI.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/MatrixOp/MATSUM.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci2
-rw-r--r--scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci2
9 files changed, 12 insertions, 12 deletions
diff --git a/scilab/modules/scicos_blocks/macros/Branching/CLKGOTO.sci b/scilab/modules/scicos_blocks/macros/Branching/CLKGOTO.sci
index c307c35..6fef810 100644
--- a/scilab/modules/scicos_blocks/macros/Branching/CLKGOTO.sci
+++ b/scilab/modules/scicos_blocks/macros/Branching/CLKGOTO.sci
@@ -83,7 +83,7 @@ case 'set' then
83 exprs=graphics.exprs 83 exprs=graphics.exprs
84 while %t do 84 while %t do
85 [ok,tag,tagvis,exprs]=scicos_getvalue('Set block parameters',.. 85 [ok,tag,tagvis,exprs]=scicos_getvalue('Set block parameters',..
86 ['Tag';'Tag Visibility (1=Local 2=Scoped 3=Global)'],list('str',-1,'vec',1),exprs) 86 ['Tag';'Tag Visibility (1=Local 2=Scoped 3=Global)'];list('str',-1,'vec',1),exprs)
87 if ~ok then break,end 87 if ~ok then break,end
88 if ((tagvis<1)|(tagvis>3)) then 88 if ((tagvis<1)|(tagvis>3)) then
89 message('Tag Visibility must be between 1 and 3');ok=%f; 89 message('Tag Visibility must be between 1 and 3');ok=%f;
@@ -114,7 +114,7 @@ case 'define' then
114 model.firing=-1 114 model.firing=-1
115 model.dep_ut=[%f %f] 115 model.dep_ut=[%f %f]
116 116
117 exprs=['A',sci2exp(1)] 117 exprs=['A';sci2exp(1)]
118 x=standard_define([1.5 1.5],model,exprs,' ') 118 x=standard_define([1.5 1.5],model,exprs,' ')
119 x.graphics.id="Goto" 119 x.graphics.id="Goto"
120end 120end
diff --git a/scilab/modules/scicos_blocks/macros/Electrical/Diode.sci b/scilab/modules/scicos_blocks/macros/Electrical/Diode.sci
index 69ff6b0..b6c52e2 100644
--- a/scilab/modules/scicos_blocks/macros/Electrical/Diode.sci
+++ b/scilab/modules/scicos_blocks/macros/Electrical/Diode.sci
@@ -37,9 +37,9 @@ case 'set' then
37 model=arg1.model; 37 model=arg1.model;
38 while %t do 38 while %t do
39 [ok,Ids,Vt,Maxexp,R,exprs]=scicos_getvalue('Set Diode block parameter',.. 39 [ok,Ids,Vt,Maxexp,R,exprs]=scicos_getvalue('Set Diode block parameter',..
40 ['Saturation cuurent (A)',.. 40 ['Saturation cuurent (A)';..
41 'Voltage equivalent to temperature (Volt)',.. 41 'Voltage equivalent to temperature (Volt)';..
42 'Max exponent for linear continuation',.. 42 'Max exponent for linear continuation';..
43 'R (ohm)'], list('vec',1,'vec',1,'vec',1,'vec',1),exprs) 43 'R (ohm)'], list('vec',1,'vec',1,'vec',1,'vec',1),exprs)
44 if ~ok then break,end 44 if ~ok then break,end
45 model.rpar=[Ids;Vt;Maxexp;R] 45 model.rpar=[Ids;Vt;Maxexp;R]
diff --git a/scilab/modules/scicos_blocks/macros/Electrical/SineVoltage.sci b/scilab/modules/scicos_blocks/macros/Electrical/SineVoltage.sci
index 16e3841..e4dec7c 100644
--- a/scilab/modules/scicos_blocks/macros/Electrical/SineVoltage.sci
+++ b/scilab/modules/scicos_blocks/macros/Electrical/SineVoltage.sci
@@ -40,7 +40,7 @@ case 'set' then
40 model=arg1.model; 40 model=arg1.model;
41 while %t do 41 while %t do
42 [ok,V,ph,frq,offset,start,exprs]=scicos_getvalue('Set voltage source parameter',.. 42 [ok,V,ph,frq,offset,start,exprs]=scicos_getvalue('Set voltage source parameter',..
43 ['Amplitude (Volt)','phase (rad)','Frequency (Hz)','Voltageoffset (V)','Timeoffset (s)'],.. 43 ['Amplitude (Volt)';'phase (rad)';'Frequency (Hz)';'Voltageoffset (V)';'Timeoffset (s)'],..
44 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs) 44 list('vec',1,'vec',1,'vec',1,'vec',1,'vec',1),exprs)
45 if ~ok then break,end 45 if ~ok then break,end
46 model.rpar=[V;ph;frq;offset;start] 46 model.rpar=[V;ph;frq;offset;start]
diff --git a/scilab/modules/scicos_blocks/macros/Linear/REGISTER.sci b/scilab/modules/scicos_blocks/macros/Linear/REGISTER.sci
index a25e5dd..bb3f3e3 100644
--- a/scilab/modules/scicos_blocks/macros/Linear/REGISTER.sci
+++ b/scilab/modules/scicos_blocks/macros/Linear/REGISTER.sci
@@ -93,7 +93,7 @@ case 'define' then
93 model.blocktype='d' 93 model.blocktype='d'
94 model.dep_ut=[%f %f] 94 model.dep_ut=[%f %f]
95 95
96 exprs=strcat(string(z0),';') 96 exprs=strcat(string(z0);';')
97 gr_i=['dly=model.rpar;'; 97 gr_i=['dly=model.rpar;';
98 'txt=[''Shift'';''Register'';string(dly)];'; 98 'txt=[''Shift'';''Register'';string(dly)];';
99 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')'] 99 'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
diff --git a/scilab/modules/scicos_blocks/macros/MatrixOp/CUMSUM.sci b/scilab/modules/scicos_blocks/macros/MatrixOp/CUMSUM.sci
index a59a5bd..c79d62d 100644
--- a/scilab/modules/scicos_blocks/macros/MatrixOp/CUMSUM.sci
+++ b/scilab/modules/scicos_blocks/macros/MatrixOp/CUMSUM.sci
@@ -102,7 +102,7 @@ case 'define' then
102 model.blocktype='c' 102 model.blocktype='c'
103 model.firing=[] 103 model.firing=[]
104 model.dep_ut=[%t %f] 104 model.dep_ut=[%t %f]
105 label=[sci2exp(1),sci2exp(0)]; 105 label=[sci2exp(1);sci2exp(0)];
106 gr_i=['xstringb(orig(1),orig(2),''CUMSUM'',sz(1),sz(2),''fill'');'] 106 gr_i=['xstringb(orig(1),orig(2),''CUMSUM'',sz(1),sz(2),''fill'');']
107 x=standard_define([2 2],model,label,gr_i) 107 x=standard_define([2 2],model,label,gr_i)
108end 108end
diff --git a/scilab/modules/scicos_blocks/macros/MatrixOp/EXTTRI.sci b/scilab/modules/scicos_blocks/macros/MatrixOp/EXTTRI.sci
index 8ce0c5d..a49a366 100644
--- a/scilab/modules/scicos_blocks/macros/MatrixOp/EXTTRI.sci
+++ b/scilab/modules/scicos_blocks/macros/MatrixOp/EXTTRI.sci
@@ -99,7 +99,7 @@ case 'define' then
99 model.blocktype='c' 99 model.blocktype='c'
100 model.firing=[] 100 model.firing=[]
101 model.dep_ut=[%t %f] 101 model.dep_ut=[%t %f]
102 label=[sci2exp(1),sci2exp(1)]; 102 label=[sci2exp(1);sci2exp(1)];
103 gr_i=['txt=[''Tri/Diag'';''Extraction''];';'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');'] 103 gr_i=['txt=[''Tri/Diag'';''Extraction''];';'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']
104 x=standard_define([3 2],model,label,gr_i) 104 x=standard_define([3 2],model,label,gr_i)
105end 105end
diff --git a/scilab/modules/scicos_blocks/macros/MatrixOp/MATSUM.sci b/scilab/modules/scicos_blocks/macros/MatrixOp/MATSUM.sci
index dca3639..3a930e0 100644
--- a/scilab/modules/scicos_blocks/macros/MatrixOp/MATSUM.sci
+++ b/scilab/modules/scicos_blocks/macros/MatrixOp/MATSUM.sci
@@ -104,7 +104,7 @@ case 'define' then
104 model.blocktype='c' 104 model.blocktype='c'
105 model.firing=[] 105 model.firing=[]
106 model.dep_ut=[%t %f] 106 model.dep_ut=[%t %f]
107 label=[sci2exp(1),sci2exp(0)]; 107 label=[sci2exp(1);sci2exp(0)];
108 gr_i=['xstringb(orig(1),orig(2),''MATSUM'',sz(1),sz(2),''fill'');'] 108 gr_i=['xstringb(orig(1),orig(2),''MATSUM'',sz(1),sz(2),''fill'');']
109 x=standard_define([2 2],model,label,gr_i) 109 x=standard_define([2 2],model,label,gr_i)
110end 110end
diff --git a/scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci b/scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci
index 4f21e1b..767afe1 100644
--- a/scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci
+++ b/scilab/modules/scicos_blocks/macros/Misc/DIFF_f.sci
@@ -36,7 +36,7 @@ case 'set' then
36 model=arg1.model; 36 model=arg1.model;
37 while %t do 37 while %t do
38 [ok,x0,xd0,exprs]=scicos_getvalue('Set continuous linear system parameters',.. 38 [ok,x0,xd0,exprs]=scicos_getvalue('Set continuous linear system parameters',..
39 ['Initial state','Initial Derivative'],list('vec',1,'vec',1),exprs) 39 ['Initial state';'Initial Derivative'],list('vec',1,'vec',1),exprs)
40 40
41 41
42 if ~ok then break,end 42 if ~ok then break,end
diff --git a/scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci b/scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci
index 3fb03b4..f52fef4 100644
--- a/scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci
+++ b/scilab/modules/scicos_blocks/macros/Sources/FROMWS_c.sci
@@ -96,7 +96,7 @@ case 'define' then
96 model.dep_ut=[%f %t]; 96 model.dep_ut=[%f %t];
97 gr_i=['txt=[''From workspace''];'.. 97 gr_i=['txt=[''From workspace''];'..
98 ;'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')'] 98 ;'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'')']
99 exprs=[string(varnam),string(Method),string(ZC),string(OutEnd)]; 99 exprs=[string(varnam);string(Method);string(ZC);string(OutEnd)];
100 x=standard_define([3.5 2],model,exprs,gr_i) 100 x=standard_define([3.5 2],model,exprs,gr_i)
101end 101end
102endfunction 102endfunction