Programming scicos blocks
fr - eng


C_struct - C Block structure of a computational function

Contents

Module

Description

The C structure of a Scicos block defines all the fields to handle data provided by the simulator such inputs/outputs, parameters, states, ...

That structure of type scicos_block is defined in the file scicos_block4.h, and user must include that header in each computational functions in the form :

#include "scicos_block4.h"

void mycomputfunc(scicos_block *block,int flag)
{
 ...
}

The fields, that can be either C pointers or directly data, are then accessible via the *block structure :

block->field

This access is a direct approach and most of users should prefer the C_macros approach for facilities purpose.

In the current version of Scicos, the scicos->block structure is defined :

/* scicos_block structure definition */
typedef struct {
  int nevprt;
  voidg funpt ;
  int type;
  int scsptr;
  int nz;
  double *z;
  int noz;
  int *ozsz;
  int *oztyp;
  void **ozptr;
  int nx;
  double *x;
  double *xd;
  double *res;
  int nin;
  int *insz;
  void **inptr;
  int nout;
  int *outsz;
  void **outptr;
  int nevout;
  double *evout;
  int nrpar;
  double *rpar;
  int nipar;
  int *ipar;
  int nopar;
  int *oparsz;
  int *opartyp;
  void **oparptr;
  int ng;
  double *g;
  int ztyp;
  int *jroot;
  char *label;
  void **work;
  int nmode;
  int *mode;
} scicos_block;

Inputs/outputs

Events

Parameters

States and work

Zero crossing surfaces and modes

Miscallaneous

Authors

Alan Layec INRIA