14 Data Structures
14.1 scicos_main Scicos editor main data structure
DEFINITION :
scs_m=list(params,o_1,....,o_n)
PARAMETERS :
- params
: Scilab list, params=list(wpar,title,tol,tf,context,void,options,void,void,doc))
1
- wpar
: viewing parameters: [w,h,Xshift,Yshift]
2
- w
: real scalar,Scicos editor window width
- h
: real scalar,Scicos editor window height
- Xshift
: real scalar, diagram drawing x offset within Scicos editor window
- Yshift
: real scalar, diagram drawing y offset within Scicos editor window
1
- title
: character string, diagram title and default name of save file name
- tol
: 1 x 4 vector [atol,rtol,ttol,maxt], where atol, rtol are
respectively absolute and relative tolerances for the ode solver,
ttol is the minimal distance between to different events time
and maxt is maximum integration time interval for a single call to the
ode solver.
- tf
: real scalar, final time for simulation.
- context
: vector of character strings, Scilab instructions used to define
Scilab variables used in block definitions as symbolic parameters.
- void
: unused fields
- options
: list(With3D,Color3D)
2
- With3D
: boolean, true for 3D shape blocks
- Color3D
: vector with three entries [R,G,B]. defines the color of 3D shape
1
- doc
: user defined diagram documentation structure, default value is list()
0
- o_i
: block or link or deleted object data structure.
See scicos_block and scicos_link).
Deleted object data structure is marked list('Deleted').
- scs_m
: main Scicos structure
DESCRIPTION :
Scicos editor uses and modifies the Scicos editor main data
structure to keep all information relative to the edited
diagram. Scicos compiler uses it as a input.
See Also :
scicos
X, scicos_block
X, scicos_link
X
14.2 scicos_block Scicos block data structure
DEFINITION :
blk=list('Block',graphics,model,void,gui)
PARAMETERS :
- "Block"
: keyword used to define list as a Scicos block representation
- graphics
: Scilab list, graphic properties data structure
- model
: Scilab list, system properties data structure.
- void
: unused, reserved for future use.
- gui
: character string, the name of the graphic user interface function
(generally written in Scilab) associated with the block.
- blk
: Scilab list, Scicos block data structure
DESCRIPTION :
Scicos editor creates and uses for each block a data structure
containing all information relative to the graphic interface and
simulation part of the block. Each of them are stored in the Scicos
editor main data structure. Index of these in Scicos
editor main data structure is given by the creation order.
For Super blocks model(8) contains a data structure
similar to the scicos_main data structure.
See Also :
scicos_graphics
X, scicos_model
X
14.3 scicos_graphics Scicos block graphics data structure
DEFINITION :
graphics=list(orig,sz,flip,exprs,pin,pout,pein,peout,gr_i)
PARAMETERS :
- orig
: 2 x 1 vector, the coordinate of down-left point of the block shape.
- sz
: vector [w,h], where w is the width and h the
height of the block shape.
- flip
: boolean, the block orientation. if true the input ports are on the
left of the box and output ports are on the right. if false the input ports are on the
right of the box and output ports are on the left.
- exprs
: column vector of strings, contains expressions answered by the user
at block set time.
- pin
: column vector of integers. If pin(k)<>0 then kth input
port is connected to the pin(k)<>0 block, else the port is
unconnected. If no input port exist pin==[].
- pout
: column vector of integers. If pout(k)<>0 then kth output
port is connected to the pout(k)<>0 block, else the port is
unconnected. If no output port exist pout==[].
- pein
: column vector of ones. If pein(k)<>0 then kth event input
port is connected to the pein(k)<>0 block, else the port is
unconnected. If no event input port exist pein==[].
- peout
: column vector of integers. If peout(k)<>0 then kth
event output port is connected to the epout(k)<>0 block, else the port is
unconnected. If no event output port exist peout==[].
- gr_i
: column vector of strings, contains Scilab instructions used to
customize the block graphical aspect. This field may be set with
"Icon" sub_menu.
- graphics
: Scilab list, Scicos block graphics data structure.
DESCRIPTION :
Scicos block graphics data structure contains all information relative
to graphical display of the block and to user dialogue. Fields may be
fixed by block definition or set as a result of user dialogue or connections.
See Also :
scicos
X, scicos_model
X, scicos_main
X
14.4 scicos_model Scicos block functionality data structure
DEFINITION :
model=list(sim,in,out,evtin,evtout,state,dstate,..
rpar,ipar,blocktype,firing,dep_ut,label,import,ID)
PARAMETERS :
- sim
: list(fun,typ) or fun. In the latest case typ is supposed to be 0.
1
- fun
: character string, the name of the block simulation function (a
linked C or Fortran procedure or a Scilab function).
- typ
: integer, calling sequence type of simulation function (see
documentation for more precision).
0
- in
: column vector of integers, input port sizes indexed from top to
bottom of the block. If no input port exist in==[].
- out
: column vector of integers, output port sizes indexed from top to
bottom of the block. If no output port exist in==[].
- evtin
: column vector of ones, the size of evtin gives the number of
event input ports. If no event input port exists evtin must be equal
to [].
- evtout
: column vector of ones, the size of evtout gives the number of
event output ports. If no event output port exists evtout must be equal
to [].
- state
: column vector, the initial continuous state of the block. Must be
[] if no continuous state.
- dstate
: column vector, the initial discrete state of the block. Must be
[] if no discrete state.
- rpar
: column vector, the vector of floating point block parameters. Must be
[] if no floating point parameters.
- ipar
: column vector, the vector of integer block parameters. Must be
[] if no integer parameters.
- blocktype
: a character with possible values:
1
- :
'c' block output depend continuously of the time.
- :
'd' block output changes only on input events.
- :
'z' zero crossing block
- :
'l' logical block
0
- firing
: a vector whose size is equal to the size of evtout> It contains
output initial event dates (Events generated before any input event
arises). Negative values stands for no initial event on the
corresponding port.
- dep_ut
: 1x 2 vector of boolean [dep_u, dep_t], dep_u must be
true if output depends continuously of the input, dep_t must be
true if output depends continuously of the time.
- label
: a character string, used as a label
- import
: Unused.
- ID
: a character string, used as an identifier.
- model
: Scilab list, Scicos block model data structure.
DESCRIPTION :
Scicos block model data structure contains all information relative
to the simulation functionality of the block. Fields may be
fixed by block definition or set.
If block is a super block, the fields
state,dstate,ipar,blocktype,firing,
dep_ut, are unused.
The rpar field contains a
data structure similar to the scicos_main data structure.
See Also :
scicos
X, scicos_model
X, scicos_main
X
14.5 scicos_link Scicos link data structure
DEFINITION :
lnk=list('Link',xx,yy,'drawlink',id,[0,0],ct,from,to)
PARAMETERS :
- "Link"
: keyword used to define list as a Scicos link representation
- xx
: vector of x coordinates of the link path.
- yy
: vector of y coordinates of the link path.
- id
: Character string, the link id
- ct
: 2 x 1 vector, [color,typ] where color defines the color
used for the link drawing and typ defines its type (0 for
regular link ,1 for event link).
- from
: 2 x 1 vector, [block,port] where block is the index of
the block at the origin of the link and port is the index of the
port.
- to
: 2 x 1 vector, [block,port] where block is the index of
the block at the end of the link and port is the index of the
port.
DESCRIPTION :
Scicos editor creates and uses for each link a data structure
containing all information relative to the graphic interface and
interconnection information. Each of them are stored in the Scicos
editor main data structure. Index of these in Scicos
editor main data structure is given by the creation order.
See Also :
scicos
X, scicos_main
X, scicos_graphics
X, scicos_model
X
14.6 scicos_cpr Scicos compiled diagram data structure
DEFINITION :
cpr=list(state,sim,cor,corinv)
PARAMETERS :
- state
: Scilab tlist contains initial state.
1
- state('x')
: continuous state vector.
- state('z')
: discrete state vector.
- state('tevts')
: vector of event dates
- state('evtspt')
: vector of event pointers
- state('pointi')
: pointer to next event
state('npoint')
: not used yet
state('outtb')
: vector of inputs/outputs initial values.
0
- sim
: Scilab tlist. Usually generated by Scicos
Compile menu. Some useful entries are:
1
- sim('rpar')
: vector of blocks' floating point parameters
- sim('rpptr')
: (nblk+1) x 1 vector of integers,
sim('rpar')(rpptr(i):(rpptr(i+1)-1)) is the vector of floating
point parameters of the ith block.
- sim('ipar')
: vector of blocks' integer parameters
- sim('ipptr')
: (nblk+1) x 1 vector of integers,
sim('ipar')(ipptr(i):(ipptr(i+1)-1)) is the vector of integer
parameters of the ith block.
- sim('funs')
: vector of strings containing the names of each block simulation function
- sim('xptr')
: (nblk+1) x 1 vector of integers,
state('x')(xptr(i):(xptr(i+1)-1)) is the continuous state
vector of the ith block.
- sim('zptr')
: (nblk+1) x 1 vector of integers,
state('z')(zptr(i):(zptr(i+1)-1)) is the discrete state
vector of the ith block.
- sim('inpptr')
: (nblk+1) x 1 vector of integers,
inpptr(i+1)-inpptr(i) gives
the number of input ports. inpptr(i)th points to the
beginning of ith block inputs within the indirection table inplnk.
- sim('inplnk')
: nblink x 1 vector of integers,
inplnk(inpptr(i)-1+j) is the
index of the link connected to the jth input port of the ith block.
where j goes from 1 to inpptr(i+1)-inpptr(i)).
- sim('outptr')
: (nblk+1) x 1 vector of integers,
outptr(i+1)-outptr(i) gives
the number of output ports. outptr(i)th points to the
beginning of ith block outputs within the indirection table outlnk.
- sim('outlnk')
: nblink x 1 vector of integers,
outlnk(outptr(i)-1+j) is the
index of the link connected to the jth output port of the ith block.
where j goes from 1 to outptr(i+1)-outptr(i)).
- sim('lnkptr')
: (nblink+1) x 1 vector of integers,
kth entry points to the
beginning of region within outtb dedicated to link indexed k.
- sim('funs')
: vector of strings containing the names of each block simulation function
- sim('funtyp')
: vector of block block types.
0
- cor
: is a list with same recursive structure as scs_m each leaf
contains the index of associated block in cpr data structure.
- corinv
: corinv(i) is the path of i th block defined in cpr data structure
in the scs_m data structure.
DESCRIPTION :
Scicos compiled diagram data structure contains all information needed
to simulate the system (see scicosim).
See Also :
scicos
X, scicos_model
X, scicos_main
X, scicosim
X