Interfacing function
eng


INTBLK_f

File content


//INTBLK_f Scicos integer block
//Classical interface function ver1.0 - scilab-2.7
//18 décembre 2003 - IRCOM GROUP - Author : A.Layec
function [x,y,typ]=INTBLK_f(job,arg1,arg2)
x=[];y=[];typ=[]
select job
case 'plot' then
  standard_draw(arg1)
case 'getinputs' then
  [x,y,typ]=standard_inputs(arg1)
case 'getoutputs' then
  [x,y,typ]=standard_outputs(arg1)
case 'getorigin' then
  [x,y]=standard_origin(arg1)
case 'set' then
  x=arg1;
  graphics=arg1.graphics;model=arg1.model;
  exprs=graphics.exprs;

case 'define' then

  model=scicos_model()
  model.sim=list('intblk',2)
  model.in=-1
  model.out=-1
  model.evtin=[]
  model.evtout=[]
  model.dstate=[]
  model.rpar=[]
  model.ipar=[]
  model.blocktype='d'
  model.firing=[]
  model.dep_ut=[%t %f]

  gr_i=['txt=[''Int''];';
    'xstringb(orig(1),orig(2),txt,sz(1),sz(2),''fill'');']
  exprs=[];
  x=standard_define([2 2],model,exprs,gr_i)
end
endfunction