Back to index

salome-kernel  6.5.0
Defines | Typedefs | Functions
CalciumC.c File Reference
#include "calcium.h"
#include "calciumf.h"
#include "CalciumFortranInt.h"
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stddef.h>

Go to the source code of this file.

Defines

#define CALCIUM_EXT_LECT_INTERFACE_C_(_name, _timeType, _type, _typeName, _qual)
#define STAR   *
#define CALCIUM_LECT_INTERFACE_C_(_name, _timeType, _calInt, _type, _typeName, _qual, lastarg)
#define STAR   *
#define LCH_LAST_PARAM   ,int strsize
#define CALCIUM_ECR_INTERFACE_C_(_name, _timeType, _calInt, _type, _typeName, _qual, lastarg)

Typedefs

typedef int InfoType
typedef char bool

Functions

InfoType ecp_fint_ (void *component, char *nomVar, float t)
InfoType ecp_fini_ (void *component, char *nomVar, int i)
InfoType ecp_efft_ (void *component, char *nomVar, float t)
InfoType ecp_effi_ (void *component, char *nomVar, int i)
InfoType ecp_lch (void *component, int mode, float *ti, float *tf, int *i, char *nomvar, int bufferLength, int *nRead, char ***data, int strSize)
void ecp_lch_free (char **data)
 CALCIUM_EXT_LECT_INTERFACE_C_ (len, float, int, int2integer,)
 CALCIUM_EXT_LECT_INTERFACE_C_ (lre, float, float, float,)
 CALCIUM_EXT_LECT_INTERFACE_C_ (ldb, double, double, double,)
 CALCIUM_EXT_LECT_INTERFACE_C_ (llo, float, int, bool,)
 CALCIUM_EXT_LECT_INTERFACE_C_ (lcp, float, float, cplx,)
 CALCIUM_LECT_INTERFACE_C_ (len, float, int, int, int2integer,,)
 CALCIUM_LECT_INTERFACE_C_ (llg, float, int, long, long2integer,,)
 CALCIUM_LECT_INTERFACE_C_ (lln, float, int, long, long,,)
 CALCIUM_LECT_INTERFACE_C_ (lre, float, int, float, float,,)
 CALCIUM_LECT_INTERFACE_C_ (ldb, double, int, double, double,,)
 CALCIUM_LECT_INTERFACE_C_ (llo, float, int, int, bool,,)
 CALCIUM_LECT_INTERFACE_C_ (lcp, float, int, float, cplx,,)
 CALCIUM_LECT_INTERFACE_C_ (lch, float, int, char, str, STAR, LCH_LAST_PARAM)
 CALCIUM_LECT_INTERFACE_C_ (len_fort_, float, cal_int, cal_int, integer,,)
 CALCIUM_LECT_INTERFACE_C_ (lin_fort_, float, cal_int, int, int2integer,,)
 CALCIUM_LECT_INTERFACE_C_ (llg_fort_, float, cal_int, long, long2integer,,)
 CALCIUM_LECT_INTERFACE_C_ (lre_fort_, float, cal_int, float, float,,)
 CALCIUM_LECT_INTERFACE_C_ (ldb_fort_, double, cal_int, double, double,,)
 CALCIUM_LECT_INTERFACE_C_ (llo_fort_, float, cal_int, int, bool,,)
 CALCIUM_LECT_INTERFACE_C_ (lcp_fort_, float, cal_int, float, cplx,,)
 CALCIUM_LECT_INTERFACE_C_ (lch_fort_, float, cal_int, char, str, STAR, LCH_LAST_PARAM)
 CALCIUM_LECT_INTERFACE_C_ (lln_fort_, float, cal_int, long, long,,)
InfoType cp_cd (void *component, char *instanceName)
InfoType cp_fin (void *component, int code)
 CALCIUM_ECR_INTERFACE_C_ (een, float, int, int, int2integer,,)
 CALCIUM_ECR_INTERFACE_C_ (elg, float, int, long, long2integer,,)
 CALCIUM_ECR_INTERFACE_C_ (ere, float, int, float, float,,)
 CALCIUM_ECR_INTERFACE_C_ (edb, double, int, double, double,,)
 CALCIUM_ECR_INTERFACE_C_ (elo, float, int, int, bool,,)
 CALCIUM_ECR_INTERFACE_C_ (ecp, float, int, float, cplx,,)
 CALCIUM_ECR_INTERFACE_C_ (ech, float, int, char, str, STAR, LCH_LAST_PARAM)
 CALCIUM_ECR_INTERFACE_C_ (eln, float, int, long, long,,)
 CALCIUM_ECR_INTERFACE_C_ (een_fort_, float, cal_int, cal_int, integer,,)
 CALCIUM_ECR_INTERFACE_C_ (elg_fort_, float, cal_int, long, long2integer,,)
 CALCIUM_ECR_INTERFACE_C_ (ein_fort_, float, cal_int, int, int2integer,,)
 CALCIUM_ECR_INTERFACE_C_ (ere_fort_, float, cal_int, float, float,,)
 CALCIUM_ECR_INTERFACE_C_ (edb_fort_, double, cal_int, double, double,,)
 CALCIUM_ECR_INTERFACE_C_ (elo_fort_, float, cal_int, int, bool,,)
 CALCIUM_ECR_INTERFACE_C_ (ecp_fort_, float, cal_int, float, cplx,,)
 CALCIUM_ECR_INTERFACE_C_ (ech_fort_, float, cal_int, char, str, STAR, LCH_LAST_PARAM)
 CALCIUM_ECR_INTERFACE_C_ (eln_fort_, float, cal_int, long, long,,)
InfoType cp_fini (void *component, char *nomvar, int i)
InfoType cp_fint (void *component, char *nomvar, float t)
InfoType cp_effi (void *component, char *nomvar, int i)
InfoType cp_efft (void *component, char *nomvar, float t)

Define Documentation

#define CALCIUM_ECR_INTERFACE_C_ (   _name,
  _timeType,
  _calInt,
  _type,
  _typeName,
  _qual,
  lastarg 
)
Value:
_calInt cp_##_name (void * component, _calInt mode,                   \
                       _timeType t, _calInt i,                          \
                       char * nomvar, _calInt nbelem,                   \
                       _type _qual * data                               \
                       lastarg ) {                                      \
                                                                        \
    int     _mode         =  mode;                                      \
    long    _i            =  i;                                         \
    size_t  _nbelem       =  nbelem;                                    \
    _timeType _t          =  t;                                         \
    fflush(stdout);                                                     \
    fflush(stderr);                                                     \
    if ( (data == NULL) || (nbelem < 1) ) return CPNTNULL;              \
                                                                        \
    _calInt info =  ecp_ecriture_##_typeName (component, _mode, &_t, _i, \
                                               nomvar, _nbelem,         \
                                               data );                  \
    fflush(stdout);                                                     \
    fflush(stderr);                                                     \
                                                                        \
    return info;                                                        \
  };                                                                    \

Definition at line 254 of file CalciumC.c.

#define CALCIUM_EXT_LECT_INTERFACE_C_ (   _name,
  _timeType,
  _type,
  _typeName,
  _qual 
)
Value:
InfoType ecp_##_name (void * component, int mode,                     \
                        _timeType * ti, _timeType * tf, int * i,        \
                        char * nomvar, int bufferLength,                \
                        int * nRead, _type _qual ** data ) {            \
    size_t _nRead;                                                      \
    long   _i=*i;                                                       \
    fflush(stdout);                                                     \
    fflush(stderr);                                                     \
                                                                        \
    InfoType info =  ecp_lecture_##_typeName (component, mode, ti, tf, &_i, \
                                              nomvar, bufferLength, &_nRead, \
                                              data );                   \
    /*    std::cout << "-------- CalciumInterface(C Part), Valeur de data : " << std::endl; */ \
    /*    std::cout << "Ptr :" << *data << std::endl;                           */ \
    /*    for (int j=0; j<_nRead;++j)                                           */ \
    /*      printf("--- Valeur de data[%d] : %d \n",j,(*data)[j]);              */ \
    /*    std::cout << "Ptr :" << *data << std::endl;                           */ \
    /*                                                                  */ \
    /*    std::cerr << "-------- CalciumInterface(C Part) MARK 2 ------------------" << std::endl; */ \
    if(mode == CP_SEQUENTIEL)   \
      *i = _i;                                                          \
    *nRead=_nRead;                                                      \
    /*    std::cerr << "-------- CalciumInterface(C Part) MARK 3 ------------------" << std::endl; */ \
                                                                        \
    return info;                                                        \
  };                                                                    \
  void ecp_##_name##_free ( _type _qual * data) {                       \
    ecp_lecture_##_typeName##_free(data);                               \
  };

Definition at line 57 of file CalciumC.c.

#define CALCIUM_LECT_INTERFACE_C_ (   _name,
  _timeType,
  _calInt,
  _type,
  _typeName,
  _qual,
  lastarg 
)
Value:
_calInt cp_##_name (void * component, _calInt mode,                   \
                       _timeType * ti, _timeType * tf, _calInt * i,     \
                       char * nomvar, _calInt bufferLength,             \
                       _calInt * nRead, _type _qual * data              \
                       lastarg ) {                                      \
                                                                        \
    int    _mode         = (int) mode;                                  \
    size_t _bufferLength = bufferLength;                                \
    size_t _nRead;                                                      \
    long   _i            =*i;                                           \
    fflush(stdout);                                                     \
    fflush(stderr);                                                     \
                                                                        \
    if ( (data == NULL) || (_bufferLength < 1) ) return CPNTNULL;       \
                                                                        \
    _calInt info =  ecp_lecture_##_typeName (component, _mode, ti, tf, &_i, \
                                              nomvar, _bufferLength, &_nRead, \
                                              &data );                  \
    if(mode == CP_SEQUENTIEL)                                           \
      *i = _i;                                                          \
    *nRead=_nRead;                                                      \
    fflush(stdout);                                                     \
    fflush(stderr);                                                     \
                                                                        \
    return info;                                                        \
  };                                                                    \
  void cp_##_name##_free ( _type _qual * data) {                        \
    ecp_lecture_##_typeName##_free(data);                               \
  };

Definition at line 133 of file CalciumC.c.

#define LCH_LAST_PARAM   ,int strsize

Definition at line 211 of file CalciumC.c.

#define STAR   *

Definition at line 210 of file CalciumC.c.

#define STAR   *

Definition at line 210 of file CalciumC.c.


Typedef Documentation

typedef char bool

Definition at line 38 of file CalciumC.c.

typedef int InfoType

Definition at line 37 of file CalciumC.c.


Function Documentation

CALCIUM_ECR_INTERFACE_C_ ( een  ,
float  ,
int  ,
int  ,
int2integer   
)
CALCIUM_ECR_INTERFACE_C_ ( elg  ,
float  ,
int  ,
long  ,
long2integer   
)
CALCIUM_ECR_INTERFACE_C_ ( ere  ,
float  ,
int  ,
float  ,
float   
)
CALCIUM_ECR_INTERFACE_C_ ( edb  ,
double  ,
int  ,
double  ,
double   
)
CALCIUM_ECR_INTERFACE_C_ ( elo  ,
float  ,
int  ,
int  ,
bool   
)
CALCIUM_ECR_INTERFACE_C_ ( ecp  ,
float  ,
int  ,
float  ,
cplx   
)
CALCIUM_ECR_INTERFACE_C_ ( ech  ,
float  ,
int  ,
char  ,
str  ,
STAR  ,
LCH_LAST_PARAM   
)
CALCIUM_ECR_INTERFACE_C_ ( eln  ,
float  ,
int  ,
long  ,
long   
)
CALCIUM_ECR_INTERFACE_C_ ( een_fort_  ,
float  ,
cal_int  ,
cal_int  ,
integer   
)
CALCIUM_ECR_INTERFACE_C_ ( elg_fort_  ,
float  ,
cal_int  ,
long  ,
long2integer   
)
CALCIUM_ECR_INTERFACE_C_ ( ein_fort_  ,
float  ,
cal_int  ,
int  ,
int2integer   
)
CALCIUM_ECR_INTERFACE_C_ ( ere_fort_  ,
float  ,
cal_int  ,
float  ,
float   
)
CALCIUM_ECR_INTERFACE_C_ ( edb_fort_  ,
double  ,
cal_int  ,
double  ,
double   
)
CALCIUM_ECR_INTERFACE_C_ ( elo_fort_  ,
float  ,
cal_int  ,
int  ,
bool   
)
CALCIUM_ECR_INTERFACE_C_ ( ecp_fort_  ,
float  ,
cal_int  ,
float  ,
cplx   
)
CALCIUM_ECR_INTERFACE_C_ ( ech_fort_  ,
float  ,
cal_int  ,
char  ,
str  ,
STAR  ,
LCH_LAST_PARAM   
)
CALCIUM_ECR_INTERFACE_C_ ( eln_fort_  ,
float  ,
cal_int  ,
long  ,
long   
)
CALCIUM_EXT_LECT_INTERFACE_C_ ( len  ,
float  ,
int  ,
int2integer   
)
CALCIUM_EXT_LECT_INTERFACE_C_ ( lre  ,
float  ,
float  ,
float   
)
CALCIUM_EXT_LECT_INTERFACE_C_ ( ldb  ,
double  ,
double  ,
double   
)
CALCIUM_EXT_LECT_INTERFACE_C_ ( llo  ,
float  ,
int  ,
bool   
)
CALCIUM_EXT_LECT_INTERFACE_C_ ( lcp  ,
float  ,
float  ,
cplx   
)
CALCIUM_LECT_INTERFACE_C_ ( len  ,
float  ,
int  ,
int  ,
int2integer   
)
CALCIUM_LECT_INTERFACE_C_ ( llg  ,
float  ,
int  ,
long  ,
long2integer   
)
CALCIUM_LECT_INTERFACE_C_ ( lln  ,
float  ,
int  ,
long  ,
long   
)
CALCIUM_LECT_INTERFACE_C_ ( lre  ,
float  ,
int  ,
float  ,
float   
)
CALCIUM_LECT_INTERFACE_C_ ( ldb  ,
double  ,
int  ,
double  ,
double   
)
CALCIUM_LECT_INTERFACE_C_ ( llo  ,
float  ,
int  ,
int  ,
bool   
)
CALCIUM_LECT_INTERFACE_C_ ( lcp  ,
float  ,
int  ,
float  ,
cplx   
)
CALCIUM_LECT_INTERFACE_C_ ( lch  ,
float  ,
int  ,
char  ,
str  ,
STAR  ,
LCH_LAST_PARAM   
)
CALCIUM_LECT_INTERFACE_C_ ( len_fort_  ,
float  ,
cal_int  ,
cal_int  ,
integer   
)
CALCIUM_LECT_INTERFACE_C_ ( lin_fort_  ,
float  ,
cal_int  ,
int  ,
int2integer   
)
CALCIUM_LECT_INTERFACE_C_ ( llg_fort_  ,
float  ,
cal_int  ,
long  ,
long2integer   
)
CALCIUM_LECT_INTERFACE_C_ ( lre_fort_  ,
float  ,
cal_int  ,
float  ,
float   
)
CALCIUM_LECT_INTERFACE_C_ ( ldb_fort_  ,
double  ,
cal_int  ,
double  ,
double   
)
CALCIUM_LECT_INTERFACE_C_ ( llo_fort_  ,
float  ,
cal_int  ,
int  ,
bool   
)
CALCIUM_LECT_INTERFACE_C_ ( lcp_fort_  ,
float  ,
cal_int  ,
float  ,
cplx   
)
CALCIUM_LECT_INTERFACE_C_ ( lch_fort_  ,
float  ,
cal_int  ,
char  ,
str  ,
STAR  ,
LCH_LAST_PARAM   
)
CALCIUM_LECT_INTERFACE_C_ ( lln_fort_  ,
float  ,
cal_int  ,
long  ,
long   
)
InfoType cp_cd ( void *  component,
char *  instanceName 
)

Definition at line 236 of file CalciumC.c.

                                                       {
  InfoType info =  ecp_cd_(component,instanceName);
  return info;
}

Here is the call graph for this function:

InfoType cp_effi ( void *  component,
char *  nomvar,
int  i 
)

Definition at line 347 of file CalciumC.c.

{
  InfoType info =  ecp_effi_(component,nomvar,i);
  return info;
}

Here is the call graph for this function:

InfoType cp_efft ( void *  component,
char *  nomvar,
float  t 
)

Definition at line 353 of file CalciumC.c.

{
  InfoType info =  ecp_efft_(component,nomvar,t);
  return info;
}

Here is the call graph for this function:

InfoType cp_fin ( void *  component,
int  code 
)

Definition at line 241 of file CalciumC.c.

                                             {
  /* TODO : gérer avec les callbacks des ports DSC */

  InfoType info =  ecp_fin_(component,code);

  return info;
}

Here is the call graph for this function:

InfoType cp_fini ( void *  component,
char *  nomvar,
int  i 
)

Definition at line 335 of file CalciumC.c.

{
  InfoType info =  ecp_fini_(component,nomvar,i);
  return info;
}

Here is the call graph for this function:

InfoType cp_fint ( void *  component,
char *  nomvar,
float  t 
)

Definition at line 341 of file CalciumC.c.

{
  InfoType info =  ecp_fint_(component,nomvar,t);
  return info;
}

Here is the call graph for this function:

InfoType ecp_effi_ ( void *  component,
char *  nomVar,
int  i 
)

Definition at line 137 of file CalciumCInterface.cxx.

{
  Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); 
  try
    {
      CalciumInterface::ecp_effi( *_component,nomvar,i);
    }
  catch ( const CalciumException & ex)
    {
      DEBTRACE( ex.what() );
      return ex.getInfo();
    }
  return CalciumTypes::CPOK;

}

Here is the caller graph for this function:

InfoType ecp_efft_ ( void *  component,
char *  nomVar,
float  t 
)

Definition at line 154 of file CalciumCInterface.cxx.

{
  Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); 
  try
    {
      CalciumInterface::ecp_efft( *_component,nomvar,t);
    }
  catch ( const CalciumException & ex)
    {
      DEBTRACE( ex.what() );
      return ex.getInfo();
    }
  return CalciumTypes::CPOK;
}

Here is the caller graph for this function:

InfoType ecp_fini_ ( void *  component,
char *  nomVar,
int  i 
)

Definition at line 104 of file CalciumCInterface.cxx.

{
  Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); 
  try
    {
      CalciumInterface::ecp_fini( *_component,nomvar,i);
    }
  catch ( const CalciumException & ex)
    {
      DEBTRACE( ex.what() );
      return ex.getInfo();
    }
  return CalciumTypes::CPOK;

}

Here is the caller graph for this function:

InfoType ecp_fint_ ( void *  component,
char *  nomVar,
float  t 
)

Definition at line 121 of file CalciumCInterface.cxx.

{
  Superv_Component_i * _component = static_cast<Superv_Component_i *>(component); 
  try
    {
      CalciumInterface::ecp_fint( *_component,nomvar,t);
    }
  catch ( const CalciumException & ex)
    {
      DEBTRACE( ex.what() );
      return ex.getInfo();
    }
  return CalciumTypes::CPOK;
}

Here is the caller graph for this function:

InfoType ecp_lch ( void *  component,
int  mode,
float *  ti,
float *  tf,
int *  i,
char *  nomvar,
int  bufferLength,
int *  nRead,
char ***  data,
int  strSize 
)

Definition at line 94 of file CalciumC.c.

                                            {

  size_t _nRead;
  long   _i=*i;
  fflush(stdout);fflush(stderr);

  InfoType info =  ecp_lecture_str (component, mode, ti, tf, &_i,
                                    nomvar, bufferLength, &_nRead,
                                    data);/*, strSize );
                                             strSize est  inutile pour les ports CALCIUM
                                             qui gèrent des tailles quelconques de chaines. */
  if(mode == CP_SEQUENTIEL)
    *i = _i;
  *nRead=_nRead;
  fflush(stdout);fflush(stderr);
  return info;
};
void ecp_lch_free ( char **  data)

Definition at line 114 of file CalciumC.c.

                                 {                              \
  ecp_lecture_str_free(data);                                   \
};