Discrete Symbol Integrator block
- Size of inputs :
Type 'vec' of size 1. The size of the regular input port.
- Number of sample :
Type 'vec' of size 1. The length of the symbol in sample.
- Init counter value :
Type 'vec' of size 1. The initial sample where the discrete integration begins.
- Gain :
Type 'vec' of size 1. The gain applied to the regular output port.
- Accepted herited (0/1)? :
Type 'vec' of size 1. Enable the event herited property (disable the event input port).
- always active: no
- direct-feedthrough: yes
- zero-crossing: no
- mode: no
- number/sizes of inputs: 1 / 64
- number/sizes of outputs: 1 / 64
- number/sizes of activation inputs: 0 /
- number/sizes of activation outputs: 0 /
- continuous-time state: no
- discrete-time state: yes
- name of computational function: int_symb
INTSYMB_f.sci
/* int_symb scicos Symbol Integrator
* Type 4 simulation function ver 1.0 - scilab-3.0
* 22 Décembre 2004 Author : - IRCOM GROUP - A.Layec
*/
/* REVISION HISTORY :
* $Log$
*/
#include "machine.h"
#include <stdio.h>
#include "scicos_block.h"
/* Entrée régulière : u[0..nu] : vecteur à intégrer
* Sortie régulière : y[0..nu]=integral(u[0..nu]) : vecteur intégré
* Entrée évènementielle : (à la rigueur)
* Sortie évènementielle : néant
*
* Paramètres entier : ipar[0] : Longueur en échantillons du symbole
* ipar[1] : N° Echantillon initial d'integration
* insz[0] : taille du vecteur d'entrée
*
* Paramètres réels : rpar[0] : gain en sortie
*
* Etat discret : z[0] : mémoire valeur intégrée précedente (pour le bout du vecteur)
*
*/
/*prototype*/
void int_symb(scicos_block *block,int flag)
{
/*Déclaration des variables*/
double *y;
double *u;
double step;
int i,j;
int count,init_c,nu,nech;
/*Récupération des adresses des ports réguliers*/
y=(double *)block->outptr[0];
u=(double *)block->inptr[0];
/*Récupération du nombre d'échantillons*/
nu=block->insz[0];
nech=block->ipar[0];
init_c=block->ipar[1];
step=block->rpar[0];
/*Le flag1*/
if(flag==1)
{
/*Appel intsymb_c*/
intsym_c(&nu,&nech,&init_c,&step,&u[0],&y[0],&block->z[0]);
}
}
IRCOM Group
Alan Layec