Next: 5.2 Computational function
Up: 5.1 Interfacing function
Previous: 5.1.1.1 Parameters
5.1.2 Block data-structure definition
Each Scicos block is defined by a Scilab data structure as
follows:
list('Block',graphics,model,unused,GUI_function)
where GUI_function is a string containing the name of the
corresponding Interfacing function and
graphics is the structure containing the graphical data:
graphics=..
list([xo,yo],[l,h],orient,dlg,pin,pout,pcin,pcout,gr_i)
- xo: x coordinate of block origin
- yo: y coordinate of block origin
- l: block's width
- h: block's height
- orient: boolean, specifies if block is flipped or not (regular
inputs are on the left or right).
- dlg: vector of character strings, contains block's
symbolic parameters.
- pin: vector, pin(i) is the number of the link
connected to ith regular input port, or 0 if this port is not
connected.
- pout: vector, pout(i) is the number of the link
connected to ith regular output port, or 0 if this port is not
connected.
- pcin: vector, pcin(i) is the number of the link
connected to ith activation input port, or 0 if this port is not
connected.
- pcout: vector, pcout(i) is the number of the link
connected to ith activation output port, or 0 if this port is not
connected.
- gr_i: character string vector, Scilab instructions used to draw
the icon.
The data structure containing simulation information is model:
model=list(eqns,#input,#output,#clk_input,#clk_output,..
state,dstate,rpar,ipar,typ,firing,deps,label,unused)
- eqns: list containing two elements. First element
is a string containing
the name of the Computational function (fortran, C, or Scilab
function). Second element
is an integer specifying the type of the Computational function. The
type of a Computational function specifies essentially its calling
sequence; more on that later.
- #input: vector of size equal to the number of block's regular
input ports. Each entry specifies the size of the corresponding input
port. A negative integer stands for ``to be determined by the
compiler''. Specifying the same negative integer on
more than one input or output port tells the compiler that these ports have
equal sizes.
- #output: vector of size equal to the number of block's regular
output ports. Each entry specifies the size of the corresponding
output port. Specifying the same negative integer on
more than one input or output port tells the compiler that these ports have
equal sizes.
- #clk_input: vector of size equal to the number
of activation input ports. All entries
must be equal to 1. Scicos does not support vectorized activation links.
- #clk_output: vector of size equal to the
number of activation output ports. All entries
must be equal to 1. Scicos does not support vectorized activation links.
- state: column vector of initial continuous state.
- dstate: column vector of initial discrete state.
- rpar: column vector of real parameters passed on to the corresponding
Computational function.
- ipar: column vector of integer parameters passed on to the
corresponding Computational function.
- typ: string. Basic block type: 'z' if ZBB,
'l' if
SBB and anything else for except 's' for RBB.
- firing: column vector of initial firing times of size equal to
the number of activation output ports of the block. It includes
preprogrammed event firing times (<0 if no firing).
- deps: [udep timedep]
- udep: boolean. True if system has direct feed-through, i.e., at least
one of the outputs depends explicitly on one of the inputs.
- timedep: boolean. True if block is time dependent.
- label: character string, used as block identifier. This field
may be set by the label button in Block menu.
Next: 5.2 Computational function
Up: 5.1 Interfacing function
Previous: 5.1.1.1 Parameters
Scilab Group