3 * Copyright (C) INRIA - METALAU Project <scicos@inria.fr>
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
19 * See the file ./license.txt
25 #include "scicos_block4.h"
28 /* maximum value for sum of number of inputs and outputs ports of a given
32 /* maximum value for sum of number of inputs and outputs of a given block
37 typedef void (*voidf) ();
39 typedef void (*voidf) (void);
43 /* Blocks prototypes */
48 #define DB scicos_block*
50 #define FP scicos_flag*
52 /* flag nclock ntvec rpar nrpar ipar nipar u nu */
53 #define ARGS_scicosm1 IP, IP, IP, DP, IP, IP, IP, DP, IP
55 /* flag nclock t xd x nx z nz tvec ntvec rpar nrpar ipar nipar intabl ni outabl no */
56 #define ARGS_scicos0 FP,IP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DP,IP,DP,IP
58 /* flag nclock t xd x nx z nz tvec ntvec rpar nrpar ipar nipar intabl .... */
59 #define ARGS_scicos FP,IP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP
61 /* flag nclock t xd x nx z nz tvec ntvec rpar nrpar ipar nipar args_in sz_in, n_in args_out sz_out, n_out */
62 #define ARGS_scicos2 FP,IP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DPP,IP,IP,DPP,IP,IP
64 /* flag nclock t xd x nx z nz tvec ntvec rpar nrpar ipar nipar args_in sz_in, n_in args_out sz_out, n_out g ng */
65 #define ARGS_scicos2z FP,IP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DPP,IP,IP,DPP,IP,IP,DP,IP
67 /* flag nclock t residual xd x nx z nz tvec ntvec rpar nrpar ipar nipar intabl .... */
69 #define ARGS_scicosi FP,IP,DP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP,DP,IP
71 /* flag nclockf t residual xd x nx z nz tvec ntvec rpar nrpar ipar nipar args_in sz_in, n_in args_out sz_out, n_out */
72 #define ARGS_scicosi2 FP,IP,DP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DPP,IP,IP,DPP,IP,IP
74 /* flag nclockf t residual xd x nx z nz tvec ntvec rpar nrpar ipar nipar args_in sz_in, n_in args_out sz_out, n_out g ng */
75 #define ARGS_scicosi2z FP,IP,DP,DP,DP,DP,IP,DP,IP,DP,IP,DP,IP,IP,IP,DPP,IP,IP,DPP,IP,IP,DP,IP
78 #define ARGS_scicos4 DB, F
80 typedef void (*ScicosFm1) (ARGS_scicosm1);
81 typedef void (*ScicosF0) (ARGS_scicos0);
82 typedef void (*ScicosF) (ARGS_scicos);
83 typedef void (*ScicosF2) (ARGS_scicos2);
84 typedef void (*ScicosF2z) (ARGS_scicos2z);
85 typedef void (*ScicosFi) (ARGS_scicosi);
86 typedef void (*ScicosFi2) (ARGS_scicosi2);
87 typedef void (*ScicosFi2z) (ARGS_scicosi2z);
88 typedef void (*ScicosF4) (ARGS_scicos4);
120 * @param outtb_elem_in
158 * @return <ReturnValue>
160 int C2F(scicos) (double *x_in, int *xptr_in, double *z__,
161 void **work, int *zptr, int *modptr_in,
162 void **oz, int *ozsz, int *oztyp, int *ozptr,
163 int *iz, int *izptr, double *t0_in,
164 double *tf_in, double *tevts_in, int *evtspt_in,
165 int *nevts, int *pointi_in, void **outtbptr_in,
166 int *outtbsz_in, int *outtbtyp_in,
167 outtb_el * outtb_elem_in, int *nelem1, int *nlnk1,
168 int *funptr, int *funtyp_in, int *inpptr_in,
169 int *outptr_in, int *inplnk_in, int *outlnk_in,
170 double *rpar, int *rpptr, int *ipar, int *ipptr,
171 void **opar, int *oparsz, int *opartyp, int *opptr,
172 int *clkptr_in, int *ordptr_in, int *nordptr1,
173 int *ordclk_in, int *cord_in, int *ncord1,
174 int *iord_in, int *niord1, int *oord_in,
175 int *noord1, int *zord_in, int *nzord1,
176 int *critev_in, int *nblk1, int *ztyp, int *zcptr_in, int *subscr, int *nsubs, double *simpar, int *flag__, int *ierr_out);
181 void callf(double *t, scicos_block * block, scicos_flag * flag);
186 int get_phase_simulation(void);
191 void set_block_error(int err);
196 double get_scicos_time(void);
201 void set_pointer_xproperty(int *pointer);
206 void do_cold_restart(void);
211 int get_block_number(void);
216 void end_scicos_sim(void);
221 void Coserror(const char *fmt, ...);