create one (or multiple) nested libdyn simulation within a normal libdyn block it is possible to switch between them by an special input signal
[sim, outlist, computation_finished] = ld_simnest(sim, ev, inlist, insizes, outsizes, intypes, outtypes, fn_list, dfeed, asynchron_simsteps, switch_signal, reset_trigger_signal )
INPUTS:
switch_signal: signal used to switch between different nested simulations
reset_trigger_signal: when 1 the current simulation is reset (sync)
OR when 1 the current simulation is triggered (async)
inlist - list( ) of input signals to the block, that will be forwarded to the nested simulation(s)
PARAMETERS:
ev - events to be forwarded to the nested simulation
insizes - input ports configuration
outsizes - output ports configuration
intypes - ignored for now, put ORTD.DATATYPE_FLOAT for each port
outtypes - ignored for now, put ORTD.DATATYPE_FLOAT for each port
fn_list - list( ) of scilab functions defining sub-schematics
dfeed - the block containing all sub-schematics is configured with dfeed
asynchron_simsteps - if == 1 one simulation steps will be simulated in a thread
when finished the result becomes available to the blocks outports
if == 2 the simulation will be simulated in a thread and can be synchronised
by the subsimulation itselft through synchronisation blocks (e.g. ld_synctimer)
if == 0 the nested simulation runns synchronous to the upper level simulation.
(i.e. no thread is started)
OUTPUTS:
outlist - list( ) of output signals
computation_finished - optional and only meanful if asynchron_simsteps > 0 (means async computation)