Programming scicos blocks
fr - eng


sci_struct - Scicos block structure of a scilab computational function

Contents

Module

Description

A Scicos computational function of type 5 can be realized by the use of a Scilab function. That function doesn't really differs from all other scilab function : one can use all functions and instructions of the scilab language inside that function to do the computation.

Such a function must be written in a file with extension .sci, must be loaded inside scilab by the common loading scilab function (exec, getf, getd, genlib,...) and must have two right hand side arguments and one left hand side argument, as the following calling sequence :

function block=myblock(block,flag)
...
//your computational instructions
...
endfunction

When the simulator is calling such a computational function, it build a scilab structure (in the previous exemple this is the named block rhs/lhs arguments) from his own internal C reprensation of a block structure (see C_struct for more details about the C structure of scicos blocks).

That scilab structure is a scilab typed list variable that has the following fields :

!scicos_block nevprt funpt type scsptr nz z noz ozsz oztyp !
!oz nx x xd res nin insz inptr nout outsz outptr nevout !
!evout nrpar rpar nipar ipar nopar oparsz opartyp opar ng g !
!ztyp jroot label work nmode mode !

Each fields are then accessible inside the scilab computational function by the use of :

block.field

Inputs/outputs

Events

Parameters

States

Zero crossing surfaces and modes

Miscallaneous

Authors

Alan Layec INRIA