scicos_codegeneration - Function to do the scicos code generation in batch mode
Function to generate C code of a Scicos diagram in batch mode.
This function can be used from the ScicosLab prompt in order to do the C code generation. Before use this function the desired diagram must be loaded into ScicosLab, for i.e by using the 'load' command for a diagram enclosed in a '.cos' file.
After the generation, the resulting diagram can be loaded in scicos with 'scicos(scs_m);'.
Default parameters for code generation can be set with the help of the 'Params' right hand side argument.
[ok,scs_m,%cpr] = scicos_codegeneration(scs_m,Params)
- scs_m :
Scicos diagram (obtained i.e by 'load file.cos')
- Params :
A list of properties for scicos code generation
Params(1) : silent_mode : if 1 then no message are displayed during the code generation and default values are taken for the target directory and names.
Params(2) : cblock : if 1 the generated block is replaced by a CBLOCK4 that enclosed the generic parameters and the generated computational function.
Params(3) : rdnom : sets the default name for the generated code.
Params(4) : rpat : sets the default target path for the generated code.
Params(5) : libs : sets the additional external libraries needed by code generation.
Params(6) : opt : if 0, then the standalone code will not be generated -default 1-.
Params(7) : enable_debug : says if additionnal code must be generated to debug generated code.
Params(8) : scopes : list of additionnal scopes used in scs_m; this params must be a matrix of string of size -1,2.
Params(9) : remove : list of blocks that must be removed for the generated code; this params must be a matrix of string of size -1,2.
- ok :
If flag to say if the code generation is successfull
- scs_m :
The resulting diagram, that encloses the generated block if any.
- %cpr :
The resulting compiled structure.
A.Layec INRIA