MEDparameterInfo.c
Aller à la documentation de ce fichier.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #include "med_config.h"
00020 #include <med.h>
00021 #include "med_outils.h"
00022 #include <string.h>
00023
00037 med_err MEDparameterInfo(const med_idt fid,
00038 const int paramit,
00039 char * const paramname,
00040 med_parameter_type * const paramtype,
00041 char * const description,
00042 char * const dtunit,
00043 med_int * const nstep)
00044 {
00045 med_err _ret = -1;
00046 char _parampath[MED_TAILLE_NUM_DATA+MED_NAME_SIZE+1] = MED_NUM_DATA;
00047 int _num = paramit -1;
00048
00049 _MEDmodeErreurVerrouiller();
00050
00051
00052 if ( _MEDobjectGetName(fid, _parampath ,_num, paramname) < 0 ) {
00053 MED_ERR_(_ret,MED_ERR_ACCESS,MED_ERR_DATAGROUP,_parampath);ISCRUTE_int(paramit);
00054 ISCRUTE_id(fid);
00055 goto ERROR;
00056 }
00057 strcat(_parampath,paramname);
00058
00059
00060 if ( MEDparameterInfoByName(fid, paramname, paramtype, description,
00061 dtunit, nstep) < 0) {
00062 MED_ERR_(_ret,MED_ERR_CALL,MED_ERR_API,MED_ERR_PARAM_MSG);
00063 SSCRUTE(paramname);SSCRUTE(_parampath);SSCRUTE("MEDparameterInfoByName");
00064 goto ERROR;
00065 }
00066
00067 _ret = 0;
00068 ERROR:
00069
00070 return _ret;
00071 }