| [637] | 1 |  | 
|---|
|  | 2 | /*======================================================================*/ | 
|---|
|  | 3 | /*                                                                      */ | 
|---|
|  | 4 | /*               archeops.h  :  structure de données                    */ | 
|---|
|  | 5 | /*                                                                      */ | 
|---|
|  | 6 | /*======================================================================*/ | 
|---|
|  | 7 |  | 
|---|
|  | 8 | #define         _archeops | 
|---|
| [652] | 9 | #define         version_num             29 | 
|---|
| [637] | 10 |  | 
|---|
| [649] | 11 | /*  defini ici que si l'on n'a pas inclu ecclib.h qui contient les memes definitions */ | 
|---|
|  | 12 | #ifndef _ECC_LIB_H_ | 
|---|
| [645] | 13 | #define ECC_TOTAL 255 | 
|---|
|  | 14 | #define ECC_DATA 239       /* Nb de bytes de data encodes */ | 
|---|
|  | 15 | #define ECC_SIZE (ECC_TOTAL-ECC_DATA) /* Nb de bytes encodeurs */ | 
|---|
|  | 16 | #define SIZE_HEAD sizeof(int4)*3  /* 3 mots d'entete de blocs */ | 
|---|
|  | 17 | #endif | 
|---|
| [649] | 18 |  | 
|---|
| [637] | 19 | /*======================================================================*/ | 
|---|
|  | 20 | /*                                                                      */ | 
|---|
|  | 21 | /*                      historique des modifications                    */ | 
|---|
|  | 22 | /*                                                                      */ | 
|---|
|  | 23 | /*                                                                      */ | 
|---|
|  | 24 | /*  VERSION 24:                                                         */ | 
|---|
|  | 25 | /*                                                                      */ | 
|---|
|  | 26 | /*      - utilise le fichier archeops.c                                 */ | 
|---|
|  | 27 | /*      - nb_max_bolo=24  avec nb_bolo_util=18                          */ | 
|---|
| [639] | 28 | /*      - change la structure du block param                            */ | 
|---|
| [637] | 29 | /*      - change la structure du block dilution                         */ | 
|---|
|  | 30 | /*                                                                      */ | 
|---|
| [639] | 31 | /*  VERSION 25:                                                         */ | 
|---|
|  | 32 | /*                                                                      */ | 
|---|
|  | 33 | /*      - la compression marche                                         */ | 
|---|
|  | 34 | /*      - 4 signaux synchro O.K.                                        */ | 
|---|
|  | 35 | /*      - change la structure dil : contient les temperatures           */ | 
|---|
| [637] | 36 | /*                                                                      */ | 
|---|
| [643] | 37 | /*  VERSION 26:                                                         */ | 
|---|
|  | 38 | /*                                                                      */ | 
|---|
|  | 39 | /*      - int4 pour compatibilité toutes machines                       */ | 
|---|
| [645] | 40 | /*                                                                      */ | 
|---|
|  | 41 | /*  VERSION 27:                                                         */ | 
|---|
|  | 42 | /*      - ajout dans chaque block-type d'une structure "ecc" dont la    */ | 
|---|
|  | 43 | /*      taille est adaptee a la taille du bloc:                         */ | 
|---|
|  | 44 | /*              on ajoute 16 bytes servant a la correction d'erreur     */ | 
|---|
|  | 45 | /*              pour chaque paquet de 241 bytes de donnees.             */ | 
|---|
|  | 46 | /*      les bytes d'ECC sont calcules avant envoi sur la ligne          */ | 
|---|
|  | 47 | /*      telemesure.                                                     */ | 
|---|
|  | 48 | /*      Ils peuvent servir a l'arrivee pour verifier et corriger quand  */ | 
|---|
|  | 49 | /*      c'est possible les donnees. On peut corriger au maximu 7 bytes  */ | 
|---|
|  | 50 | /*      erronnes.                                                       */ | 
|---|
|  | 51 | /*                                                                      */ | 
|---|
| [649] | 52 | /*  VERSION 28:                                                         */ | 
|---|
|  | 53 | /*      - corrigée la taille du block gyroscope avec ecc                */ | 
|---|
|  | 54 | /*      - compatible avec la generation de l'ecc dans le transputer     */ | 
|---|
| [652] | 55 | /*      - mais sans ecc: trops long a calculer | 
|---|
|  | 56 | /*                                                                      */ | 
|---|
|  | 57 | /*              VOL  Trapani  AVEC  VERSION  28                         */ | 
|---|
|  | 58 | /*                                                                      */ | 
|---|
|  | 59 | /*  VERSION 29:                                                         */ | 
|---|
|  | 60 | /*      - toujours  define  _archeops                                   */ | 
|---|
|  | 61 | /*      - blocks longueur variable si l'on change archeops.c            */ | 
|---|
|  | 62 | /*      - pour fonctionnement sans transputer  (CTB)                    */ | 
|---|
|  | 63 | /*              faire preceder archeops.h  de  acquisition.h            */ | 
|---|
|  | 64 | /*              qui contiendra un #define _sans_transputer              */ | 
|---|
|  | 65 | /*                                                                      */ | 
|---|
| [637] | 66 | /*======================================================================*/ | 
|---|
|  | 67 |  | 
|---|
|  | 68 |  | 
|---|
|  | 69 | /*======================================================================*/ | 
|---|
|  | 70 | /*  ---------------  parametres generaux de definition   -------------  */ | 
|---|
|  | 71 | /*======================================================================*/ | 
|---|
| [639] | 72 | #ifndef int4 | 
|---|
|  | 73 | #ifdef __alpha | 
|---|
|  | 74 | #define int4 int | 
|---|
|  | 75 | #undef programme | 
|---|
|  | 76 | #else | 
|---|
|  | 77 | #define int4 long | 
|---|
|  | 78 | #endif | 
|---|
|  | 79 | #endif | 
|---|
|  | 80 |  | 
|---|
|  | 81 | #ifdef linux | 
|---|
|  | 82 | #undef programme | 
|---|
|  | 83 | #endif | 
|---|
|  | 84 |  | 
|---|
| [643] | 85 |  | 
|---|
| [637] | 86 |  | 
|---|
|  | 87 | #ifdef  _archeops | 
|---|
|  | 88 | /*#define _test_diabolo  relecture des blocks fabriques avec diabolo    */ | 
|---|
|  | 89 | #define _trapani                /*  configuration  prevue pour Trapani  */ | 
|---|
|  | 90 | /*#define _kiruna                 block standard prevu pour kiruna      */ | 
|---|
|  | 91 | #endif | 
|---|
|  | 92 |  | 
|---|
|  | 93 |  | 
|---|
|  | 94 |  | 
|---|
|  | 95 | /*======================================================================*/ | 
|---|
|  | 96 | /*  --------------      valeurs des parametres dans     -------------   */ | 
|---|
|  | 97 | /*  --------------      les différentes configurations  -------------   */ | 
|---|
|  | 98 | /*======================================================================*/ | 
|---|
|  | 99 | /*                                                                      */ | 
|---|
|  | 100 | /*  configuration pour Trapani : 3 bebos  /  12 bolos                   */ | 
|---|
|  | 101 | /*                                                                      */ | 
|---|
|  | 102 | /*  bebo1 :   voies  1  à  6    -->  bolo  1 a  6                       */ | 
|---|
|  | 103 | /*  bebo2 :   voies  9  à  14   -->  bolo  7 à 12                       */ | 
|---|
|  | 104 | /*                                                                      */ | 
|---|
|  | 105 | /*  bebo6 :                                                             */ | 
|---|
|  | 106 | /*      voies  41 42 43 44      =  carte simplifiee avec AMP01          */ | 
|---|
|  | 107 | /*      voies  45 et 46         = chauffage pour regulation             */ | 
|---|
|  | 108 | /*      on ecrira plus tard le stockage des donnees simplifiees         */ | 
|---|
|  | 109 | /*                                                                      */ | 
|---|
|  | 110 | /*                                                                      */ | 
|---|
|  | 111 | /*======================================================================*/ | 
|---|
|  | 112 |  | 
|---|
|  | 113 | /*      nb_per_block    doit etre divisible par 2                                               */ | 
|---|
|  | 114 | /*      nb_max_bolo     doit etre divisible par 2 pour archeops   (impair pour diabolo ?? )     */ | 
|---|
| [652] | 115 | /*      parametr.nb_bolo        doit etre divisible par 2 pour archeops   (impair pour diabolo ?? )     */ | 
|---|
| [637] | 116 |  | 
|---|
|  | 117 |  | 
|---|
| [652] | 118 | #ifndef _diabolo | 
|---|
| [637] | 119 |  | 
|---|
|  | 120 | #define nb_max_bolo             36      /*  nombre maxi de bolos                                */ | 
|---|
| [652] | 121 | /*#define nb_bolo_util          32        nombre de bolos réellement transmis                   */ | 
|---|
| [637] | 122 | #define nb_per_block            36      /*  nombre de periodes entieres dans un block           */ | 
|---|
|  | 123 | #define nb_max_mes_per          88      /*  nb de points maxi dans une periode complete         */ | 
|---|
|  | 124 | #define nb_photo_diodes         46      /*  nb de canaux de mesure du senseur stellaire         */ | 
|---|
|  | 125 |  | 
|---|
| [652] | 126 | #else | 
|---|
| [637] | 127 |  | 
|---|
|  | 128 | #define nb_max_bolo             9       /*  nombre maxi de bolos                                */ | 
|---|
|  | 129 | #define nb_per_block            20      /*  nombre de periodes entieres dans un block           */ | 
|---|
|  | 130 | #define nb_max_mes_per          128     /*  nb de points maxi dans une periode complete         */ | 
|---|
|  | 131 | #define nb_photo_diodes         0       /*  nb de canaux de mesure du senseur stellaire         */ | 
|---|
|  | 132 |  | 
|---|
|  | 133 | #endif | 
|---|
|  | 134 |  | 
|---|
|  | 135 |  | 
|---|
|  | 136 | #ifdef  _sans_transputer | 
|---|
|  | 137 | #define nb_byte_mot             5       /*  nombre d'octets dans un mot d'acquisition planck    */ | 
|---|
|  | 138 | #else | 
|---|
|  | 139 | #define nb_byte_mot             8       /*  nombre d'octets dans un mot d'acquisition archeops  */ | 
|---|
|  | 140 | #endif | 
|---|
|  | 141 |  | 
|---|
| [643] | 142 |  | 
|---|
| [652] | 143 | #define nb_max_nom_bolo         40      /*  nombre maxi de noms et coef bolo dans la table      */ | 
|---|
|  | 144 |  | 
|---|
| [639] | 145 | #define nb_sync                 4       /*  nombre de signaux de synchro                        */ | 
|---|
|  | 146 | /*  6 pour diabolo                                      */ | 
|---|
|  | 147 | /* toujours multiple de 4 pour archeops                 */ | 
|---|
| [652] | 148 |  | 
|---|
| [637] | 149 | #define nb_element_catalog      256     /* nombre d'éléments catalog par reponse enregistreur   */ | 
|---|
|  | 150 |  | 
|---|
|  | 151 |  | 
|---|
| [652] | 152 |  | 
|---|
| [637] | 153 | #ifdef  transmet_data_brute | 
|---|
|  | 154 | #define         taille_maxi_block_archeops      sizeof(block_type_data_brute) | 
|---|
|  | 155 | #else                                   /*      le plus gros des différents blocks de télémesure*/ | 
|---|
|  | 156 | #define         taille_maxi_block_archeops      sizeof(block_type_bolo) | 
|---|
|  | 157 | #endif | 
|---|
|  | 158 |  | 
|---|
| [652] | 159 |  | 
|---|
|  | 160 |  | 
|---|
|  | 161 | #define         nombre_de_regul         4       /*  nombre de blocks regulation     */ | 
|---|
|  | 162 | #define         nombre_de_voies         6       /*  nombre de voies pour selectionner un groupe de bolos */ | 
|---|
| [637] | 163 | #define         nb_type_blocks          20      /*  nombre de type de blocks (multiple de 4)    */ | 
|---|
| [652] | 164 |  | 
|---|
|  | 165 | #define         nb_modes_telemesure     10      /*  cadence d'emission des blocks               */ | 
|---|
| [643] | 166 | #define         nb_modes_flash           3 | 
|---|
| [637] | 167 |  | 
|---|
|  | 168 | /*======================================================================*/ | 
|---|
|  | 169 | /*  -------     codes  de  controle  pour  la  transmission    -----    */ | 
|---|
|  | 170 | /*=======================   télécommande      ==========================*/ | 
|---|
|  | 171 | /*======================================================================*/ | 
|---|
|  | 172 |  | 
|---|
|  | 173 |  | 
|---|
|  | 174 | /*   --------------   codes de reconnaissance des paquets de télécommande       --------------   */ | 
|---|
|  | 175 |  | 
|---|
|  | 176 | #define         debut_telecommande              0x23456789 | 
|---|
|  | 177 | #define         fin_telecommande                0x98765432 | 
|---|
|  | 178 |  | 
|---|
|  | 179 | /*   ------------ codes de direction des commandes envoyées a l'EPLD Archeops   --------------   */ | 
|---|
|  | 180 |  | 
|---|
|  | 181 | #define         tc_dir_transputer               1 | 
|---|
|  | 182 | #define         tc_dir_reset_epld               3 | 
|---|
| [649] | 183 | #define         tc_dir_reset_trp                4 | 
|---|
| [637] | 184 |  | 
|---|
|  | 185 | /*  -------------  codes  des  prefix des  telecommandes traités le transputer  --------------   */ | 
|---|
|  | 186 |  | 
|---|
|  | 187 | #define         tc_horloge                      255     /* (-1) */ | 
|---|
|  | 188 | #define         tc_cadence1                     128 | 
|---|
|  | 189 | #define         tc_cadence2                     129 | 
|---|
|  | 190 | #define         tc_cadence3                     130 | 
|---|
|  | 191 | #define         tc_regul                        251     /* (-5) */ | 
|---|
| [652] | 192 | #define         tc_switch_dil           250 | 
|---|
| [637] | 193 | #define         tc_dac_dil                      249 | 
|---|
|  | 194 |  | 
|---|
|  | 195 | /*======================================================================*/ | 
|---|
|  | 196 | /*      telecommande reduite  sur 18 bit                                */ | 
|---|
|  | 197 | /*======================================================================*/ | 
|---|
|  | 198 |  | 
|---|
|  | 199 | /*______________________________________________________________________________________________*/ | 
|---|
|  | 200 | /*      1er mot :       code de debut de telecommande reduite                                   */ | 
|---|
|  | 201 | #define         tc_reduite                      248 | 
|---|
|  | 202 | /*______________________________________________________________________________________________*/ | 
|---|
|  | 203 | /*      2eme mot:       4bit:   16 codes  de direction  tc2                                     */ | 
|---|
|  | 204 | enum{tc2_reset_epld,tc2_bolo_dacV,tc2_bolo_dacI,tc2_bolo_dacT | 
|---|
|  | 205 | ,tc2_bolo_dacL,tc2_bolo_gain,tc2_bolo_voie,tc2_horloge | 
|---|
| [649] | 206 | ,tc2_regul,tc2_auto_bolo,tc2_auto_dilu,tc2_dilution | 
|---|
|  | 207 | ,tc2_raz_fet,tc2_reset};        /* 13 codes: reste 3 disponibles*/ | 
|---|
| [637] | 208 |  | 
|---|
|  | 209 |  | 
|---|
|  | 210 | /*______________________________________________________________________________________________*/ | 
|---|
|  | 211 | /*      3eme mot:       6bit:                                                                   */ | 
|---|
|  | 212 |  | 
|---|
|  | 213 | /*      code2=dac-gain-voie     :       numero de bolo                                          */ | 
|---|
|  | 214 |  | 
|---|
|  | 215 | /*      code2=tc2_horloge       :                                                               */ | 
|---|
|  | 216 | /*              soit un code defini                                                             */ | 
|---|
| [649] | 217 | enum{tc3_commande,tc3_periode,tc3_nb_mesures,tc3_temp_mort,tc3_flag}; | 
|---|
| [637] | 218 |  | 
|---|
|  | 219 |  | 
|---|
|  | 220 | /*      code2=tc2_regul :                                                                       */ | 
|---|
|  | 221 |  | 
|---|
|  | 222 |  | 
|---|
|  | 223 | /*      code2=tc2_auto_bolo     :                                               */ | 
|---|
|  | 224 |  | 
|---|
|  | 225 |  | 
|---|
|  | 226 | /*      code2=tc2_auto_dilu     :                                               */ | 
|---|
|  | 227 | /*      les valeurs des parametres d'auto_dilu ne depassent pas 128             */ | 
|---|
|  | 228 |  | 
|---|
|  | 229 |  | 
|---|
| [649] | 230 | /*      code2=tc2_dilution      :       commandes setbit,clrbit                                                 */ | 
|---|
|  | 231 | enum{tc3_clr_bit_dil,tc3_set_bit_dil,tc3_fet_raz}; | 
|---|
| [637] | 232 |  | 
|---|
| [649] | 233 | /*      code2=tc2_reset :       commandes setbit,clrbit                                                 */ | 
|---|
|  | 234 | #define tc3_reset       13 | 
|---|
|  | 235 | #define tc4_reset       73 | 
|---|
| [637] | 236 |  | 
|---|
|  | 237 | /*______________________________________________________________________________*/ | 
|---|
|  | 238 | /*      4eme mot:       8bit:   valeur a ecrire                 */ | 
|---|
|  | 239 |  | 
|---|
|  | 240 |  | 
|---|
|  | 241 | /*======================================================================*/ | 
|---|
|  | 242 | /*  -------     codes  de  controle  pour  la  transmission    -----    */ | 
|---|
|  | 243 | /*=========================   télémesure    ============================*/ | 
|---|
|  | 244 | /*======================================================================*/ | 
|---|
|  | 245 |  | 
|---|
|  | 246 | /*   -------   codes de reconnaissance des paquets de télémesure        */ | 
|---|
|  | 247 |  | 
|---|
| [643] | 248 | #define         debut_block_mesure              0x45627491 | 
|---|
|  | 249 | #define         fin_block_mesure                0x83260432 | 
|---|
| [637] | 250 |  | 
|---|
|  | 251 |  | 
|---|
|  | 252 |  | 
|---|
|  | 253 |  | 
|---|
|  | 254 |  | 
|---|
|  | 255 | /*======================================================================*/ | 
|---|
|  | 256 | /*  ------------------------------------------------------------------  */ | 
|---|
|  | 257 | /*  ---------   Les  formats  des  blocks  type   ARCHEOPS      ------- */ | 
|---|
|  | 258 | /*  ------------------------------------------------------------------  */ | 
|---|
|  | 259 | /*======================================================================*/ | 
|---|
|  | 260 |  | 
|---|
|  | 261 |  | 
|---|
|  | 262 |  | 
|---|
|  | 263 | /*==============================================================================================*/ | 
|---|
|  | 264 |  | 
|---|
|  | 265 | /*      Le tableau est lut dans le desordre par le mac en lecture de la carte pci :             */ | 
|---|
|  | 266 |  | 
|---|
|  | 267 | /*      Les entiers long sont ecrits tels quels                                                 */ | 
|---|
|  | 268 | /*      Les short sont ecrits permuté 2 a 2 par le tansputer                                    */ | 
|---|
|  | 269 | /*      Les tables char sont ecrits permuté 4 / 4 par le transputer                             */ | 
|---|
|  | 270 | /*      A la lecture dans le mac, tout est bon                                                  */ | 
|---|
|  | 271 |  | 
|---|
|  | 272 |  | 
|---|
|  | 273 | /*  ---------    structures N° 0 :   parametres de mesure des bolometres        -------------   */ | 
|---|
|  | 274 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 275 |  | 
|---|
|  | 276 | typedef struct | 
|---|
|  | 277 | { | 
|---|
| [643] | 278 | int4            numero_nom_coef;        /*  le numero pour retrouver le nom et les coef */ | 
|---|
| [639] | 279 | int4            bolo_code_util;         /*  le code d'utilisation du bolo               */ | 
|---|
| [643] | 280 | int4            bolo_bebo;              /*  l'acquisition:  0 pour MLPA 10 pour BEBODIFF*/ | 
|---|
| [639] | 281 | int4            bolo_num;               /*  l'adresse hard du bolo                      */ | 
|---|
|  | 282 | int4            bolo_gain;              /*  le gain du preampli                         */ | 
|---|
|  | 283 | int4            bolo_capa;              /*  la valeur capa du modulateur                */ | 
|---|
|  | 284 | int4            bolo_diviseur;          /*  le diviseur de la compensation              */ | 
|---|
| [643] | 285 | } | 
|---|
|  | 286 | param_un_bolo; | 
|---|
|  | 287 |  | 
|---|
|  | 288 |  | 
|---|
|  | 289 | typedef struct | 
|---|
|  | 290 | { | 
|---|
|  | 291 | char            bolo_nom[32];           /*  le nom de chaque bolometre                  */ | 
|---|
| [639] | 292 | int4            coef[7];                /*  les coef pour le calcul de la température   */ | 
|---|
| [637] | 293 | } | 
|---|
| [643] | 294 | nom_et_coef_bolo; | 
|---|
|  | 295 |  | 
|---|
|  | 296 |  | 
|---|
|  | 297 |  | 
|---|
| [637] | 298 | /* code_util des bolos  */ | 
|---|
|  | 299 |  | 
|---|
| [657] | 300 | /*      bit 0   ->      bolo en service (fenetre ouverte sur le mac)                            */ | 
|---|
|  | 301 | /*      bit 1   ->      bolo transmis dans les donnees comprimees:  block_type_bolo_comprime    */ | 
|---|
|  | 302 | /*      bit 2   ->      courbe 1 periode transmise dans les     block_type_une_periode          */ | 
|---|
|  | 303 | /*      bit 3   ->      carte modofiées bebo pour       thermometre                             */ | 
|---|
|  | 304 |  | 
|---|
|  | 305 | #define         bolo_en_service                 1 | 
|---|
|  | 306 | #define         bolo_transmis_comprime          2 | 
|---|
|  | 307 | #define         bolo_transmis_un_per            4 | 
|---|
|  | 308 | #define         bolo_thermo_simplifie           8 | 
|---|
|  | 309 |  | 
|---|
|  | 310 | /*enum{bolo_hors_service,bolo_normal_transmis,bolo_normal_une_per,bolo_normal_non_transmis,bolo_thermo_simplifie};*/ | 
|---|
|  | 311 |  | 
|---|
| [637] | 312 |  | 
|---|
|  | 313 | typedef struct          /*              table des parametres de mesure bolometre                */ | 
|---|
|  | 314 | /*      cette table ne change pas (en principe) en cours de mesure      */ | 
|---|
|  | 315 | { | 
|---|
| [639] | 316 | int4            numero_version;                 /*  numero de version du header archeops.h      */ | 
|---|
|  | 317 | int4            n_max_bolo;                     /*  nombre maxi de bolos  (divisible par 4)     */ | 
|---|
|  | 318 | int4            n_per_block;                    /*  nombre de periodes entieres dans un block   */ | 
|---|
|  | 319 | int4            n_max_mes_per;                  /*  nb de points maxi dans une periode complete */ | 
|---|
| [637] | 320 |  | 
|---|
| [639] | 321 | int4            nb_bolo;                        /*  nombre de bolometres effectivement lut      */ | 
|---|
| [637] | 322 | param_un_bolo   bolo[nb_max_bolo]; | 
|---|
| [643] | 323 | nom_et_coef_bolo nom_coef[nb_max_nom_bolo];     /*  nombre de nom et coef bolo                  */ | 
|---|
| [637] | 324 | } | 
|---|
|  | 325 | param_bolo; | 
|---|
|  | 326 |  | 
|---|
|  | 327 |  | 
|---|
|  | 328 |  | 
|---|
|  | 329 |  | 
|---|
|  | 330 | /* | 
|---|
| [643] | 331 | int4            bolo_code_util[nb_max_bolo]; | 
|---|
| [637] | 332 | char            bolo_nom[nb_max_bolo][32]; | 
|---|
|  | 333 |  | 
|---|
| [643] | 334 | int4            bolo_bebo[nb_max_bolo]; | 
|---|
|  | 335 | int4            bolo_num[nb_max_bolo]; | 
|---|
|  | 336 | int4            bolo_gain[nb_max_bolo]; | 
|---|
| [637] | 337 |  | 
|---|
| [643] | 338 | int4            bolo_capa[nb_max_bolo]; | 
|---|
|  | 339 | int4            bolo_diviseur[nb_max_bolo]; | 
|---|
| [637] | 340 |  | 
|---|
| [643] | 341 | int4            coef[nb_max_bolo][7]; | 
|---|
| [637] | 342 |  | 
|---|
| [643] | 343 | int4            presence_bebo; | 
|---|
| [637] | 344 | } | 
|---|
|  | 345 | param_bolo; | 
|---|
|  | 346 | */ | 
|---|
|  | 347 |  | 
|---|
|  | 348 | typedef struct                          /*      La structure de transfert transputer vers mac   */ | 
|---|
|  | 349 | { | 
|---|
| [639] | 350 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 351 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 352 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 353 |  | 
|---|
|  | 354 | param_bolo      param;          /*      les parametres de mesure des bolometres         */ | 
|---|
| [649] | 355 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 356 | unsigned char ecc[((((sizeof( param_bolo)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 357 | #endif | 
|---|
| [639] | 358 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 359 | } | 
|---|
|  | 360 | block_type_param; | 
|---|
|  | 361 |  | 
|---|
|  | 362 |  | 
|---|
|  | 363 |  | 
|---|
|  | 364 |  | 
|---|
|  | 365 | /*  -------------------   structures N° 1 :   journal de bord        ---------------------      */ | 
|---|
|  | 366 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 367 | #define long_page       10 | 
|---|
|  | 368 | typedef struct | 
|---|
|  | 369 | { | 
|---|
| [639] | 370 | int4            code2;          /*      code de la ligne du journal                     */ | 
|---|
| [637] | 371 | /*      code idem code2 debut de block :                */ | 
|---|
|  | 372 | /*      contient un code de commande                    */ | 
|---|
|  | 373 | /*      et le numero du block lors de la télécommande   */ | 
|---|
|  | 374 | char            mot[8];         /*      contenu de la ligne du  journal                 */ | 
|---|
|  | 375 | } | 
|---|
|  | 376 | ligne_journal; | 
|---|
|  | 377 |  | 
|---|
|  | 378 |  | 
|---|
|  | 379 | typedef struct | 
|---|
|  | 380 | { | 
|---|
| [639] | 381 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 382 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 383 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 384 |  | 
|---|
|  | 385 | ligne_journal   jj[long_page];  /*      block de 10 lignes de journal                   */ | 
|---|
| [649] | 386 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 387 | unsigned char ecc[((((sizeof(ligne_journal)*long_page+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 388 | #endif | 
|---|
| [637] | 389 |  | 
|---|
| [639] | 390 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 391 | } | 
|---|
|  | 392 | block_type_journal; | 
|---|
|  | 393 |  | 
|---|
|  | 394 |  | 
|---|
|  | 395 | /*  ---------   structures N° 2 :  reglage_bolo , regul etc..   --------        */ | 
|---|
|  | 396 | /*  ------------------------------------------------------------------------------------------  */ | 
|---|
|  | 397 |  | 
|---|
|  | 398 |  | 
|---|
|  | 399 | /*  les definitions suivantes s'appliquent a une variable de type    reglage.bolo[bol]          */ | 
|---|
|  | 400 | #define         gainbrut(aa)    ((char)(((aa).mot1&0x1f))) | 
|---|
|  | 401 | #define         phase(aa)       ((char)(((aa).mot1&0x60)>>5)) | 
|---|
|  | 402 | #define         comm(aa)        ((char)(((aa).mot1&0x80)>>7)) | 
|---|
|  | 403 | #define         dac_V(aa)       ((int)(((aa).mot1&0xfff00)>>8)  ) | 
|---|
|  | 404 | #define         dac_I(aa)       ((int)(((aa).mot1&0xfff00000)>>20)) | 
|---|
|  | 405 |  | 
|---|
|  | 406 | #define         voie(aa)        ((char)(((aa).mot2&0xff))) | 
|---|
|  | 407 | #define         dac_T(aa)       ((int)(((aa).mot2&0xfff00)>>8)) | 
|---|
|  | 408 | #define         dac_L(aa)       ((int)(((aa).mot2&0xfff00000)>>20)) | 
|---|
|  | 409 |  | 
|---|
|  | 410 | /* | 
|---|
|  | 411 | #define         bolo_mot1(dacV,dacI,gainbrut,phase,comm)        ((gainbrut)&0x1f) | (((phase)&3)<<5) | (((comm)&1)<<7) | (((dacV)&0xfff)<<8) | (((dacI)&0xfff)<<20) | 
|---|
|  | 412 | #define         bolo_mot2(dacT,dacL,voie)                       ((voie)&0xff)     | (((dacT)&0xfff)<<8) | (((dacL)&0xfff)<<20) | 
|---|
|  | 413 | */ | 
|---|
|  | 414 |  | 
|---|
|  | 415 | #define         bolo_mot1(dacV,dacI,gainbrut,phase,comm)        (((long)(gainbrut))&0x1f) | ((((long)(phase))&3)<<5) | ((((long)(comm))&1)<<7) | ((((long)(dacV))&0xfff)<<8) | ((((long)(dacI))&0xfff)<<20) | 
|---|
|  | 416 | #define         bolo_mot2(dacT,dacL,voie)                       (((long)(voie))&0xff)     | ((((long)(dacT))&0xfff)<<8) | ((((long)(dacL))&0xfff)<<20) | 
|---|
|  | 417 |  | 
|---|
|  | 418 |  | 
|---|
|  | 419 | typedef struct | 
|---|
|  | 420 | { | 
|---|
| [639] | 421 | int4    mot1;           /*  dac1 = mot[11..0]; dac2=mot1[23..12]        */ | 
|---|
| [637] | 422 | /*  gain = mot1[27..24]; phase = mot1[31..28];  */ | 
|---|
| [639] | 423 | int4    mot2;           /*  dac3 = mot[11..0]; dac4=mot1[23..12]        */ | 
|---|
| [637] | 424 | /*  voie pour reglages auto  = mot2[31..24];    */ | 
|---|
|  | 425 | } | 
|---|
|  | 426 | reglage_un_bolo; | 
|---|
|  | 427 |  | 
|---|
|  | 428 |  | 
|---|
|  | 429 |  | 
|---|
|  | 430 | #ifdef programme        /***********   structure normale pour le mac   ****************/ | 
|---|
|  | 431 |  | 
|---|
|  | 432 | typedef struct | 
|---|
|  | 433 | { | 
|---|
|  | 434 | char    periode; | 
|---|
|  | 435 | char    nb_mesures; | 
|---|
|  | 436 | char    temp_mort; | 
|---|
|  | 437 | char    flag; | 
|---|
|  | 438 | } | 
|---|
|  | 439 | horloge; | 
|---|
|  | 440 |  | 
|---|
|  | 441 | typedef struct | 
|---|
|  | 442 | { | 
|---|
|  | 443 | char    mode;                   /*   on_off et deglitch                         */ | 
|---|
|  | 444 | char    num_bolo;               /*   numero du bolo utilisé,    */ | 
|---|
|  | 445 | char    voie_chauf;             /*   la voie de sortie chauffage                */ | 
|---|
|  | 446 | char    prop;                   /*   zero dans prop -> chauffage=0;             */ | 
|---|
|  | 447 | char    integ; | 
|---|
|  | 448 | char    deriv; | 
|---|
|  | 449 | short   chauffage;              /*      valeur effective du chauffage           */ | 
|---|
|  | 450 | } | 
|---|
| [643] | 451 | regul_bolo;                     /*  longueur 2 entiers int4                     */ | 
|---|
| [637] | 452 |  | 
|---|
|  | 453 | typedef struct | 
|---|
|  | 454 | { | 
|---|
|  | 455 | char    mode; | 
|---|
|  | 456 | char    gain; | 
|---|
|  | 457 | char    courant; | 
|---|
|  | 458 | char    delai; | 
|---|
|  | 459 | } | 
|---|
| [643] | 460 | auto_bolo;                      /*  longueur 1 entiers int4                     */ | 
|---|
| [637] | 461 |  | 
|---|
|  | 462 | typedef struct | 
|---|
|  | 463 | { | 
|---|
|  | 464 | char    vanne; | 
|---|
|  | 465 | char    helium; | 
|---|
|  | 466 | char    chauffage; | 
|---|
|  | 467 | char    piles; | 
|---|
|  | 468 | char    transmission; | 
|---|
|  | 469 | char    temps_max_vanne; | 
|---|
|  | 470 | char    xx7; | 
|---|
|  | 471 | char    xx8; | 
|---|
|  | 472 | } | 
|---|
| [643] | 473 | auto_dilu;                      /*  longueur 1 entiers int4             */ | 
|---|
| [637] | 474 |  | 
|---|
|  | 475 |  | 
|---|
|  | 476 |  | 
|---|
|  | 477 | #else           /***********  structure swappée pour le transputer   ****************/ | 
|---|
|  | 478 |  | 
|---|
|  | 479 | typedef struct | 
|---|
|  | 480 | { | 
|---|
|  | 481 | char    flag; | 
|---|
|  | 482 | char    temp_mort; | 
|---|
|  | 483 | char    nb_mesures; | 
|---|
|  | 484 | char    periode; | 
|---|
|  | 485 | } | 
|---|
|  | 486 | horloge; | 
|---|
|  | 487 |  | 
|---|
|  | 488 |  | 
|---|
|  | 489 | typedef struct | 
|---|
|  | 490 | { | 
|---|
|  | 491 | char    prop;                   /*   zero dans prop -> chauffage=0;             */ | 
|---|
|  | 492 | char    voie_chauf;             /*   la voie de sortie chauffage                */ | 
|---|
|  | 493 | char    num_bolo;               /*   numero du bolo utilisé,    */ | 
|---|
|  | 494 | char    mode;                   /*   on_off et deglitch                         */ | 
|---|
|  | 495 | short   chauffage;              /*      valeur effective du chauffage           */ | 
|---|
|  | 496 | char    deriv; | 
|---|
|  | 497 | char    integ; | 
|---|
|  | 498 | } | 
|---|
| [643] | 499 | regul_bolo;                     /*  longueur 2 entiers int4             */ | 
|---|
| [637] | 500 |  | 
|---|
|  | 501 |  | 
|---|
|  | 502 | typedef struct | 
|---|
|  | 503 | { | 
|---|
|  | 504 | char    delai; | 
|---|
|  | 505 | char    courant; | 
|---|
|  | 506 | char    gain; | 
|---|
|  | 507 | char    mode; | 
|---|
|  | 508 | } | 
|---|
| [643] | 509 | auto_bolo;                      /*  longueur 1 entiers int4             */ | 
|---|
| [637] | 510 |  | 
|---|
|  | 511 | typedef struct | 
|---|
|  | 512 | { | 
|---|
|  | 513 | char    piles; | 
|---|
|  | 514 | char    chauffage; | 
|---|
|  | 515 | char    helium;                 /* periode de mesure            */ | 
|---|
|  | 516 | char    vanne; | 
|---|
|  | 517 | char    xx8; | 
|---|
|  | 518 | char    xx7; | 
|---|
|  | 519 | char    temps_max_vanne; | 
|---|
|  | 520 | char    transmission; | 
|---|
|  | 521 | } | 
|---|
| [643] | 522 | auto_dilu;                      /*  longueur 1 entiers int4             */ | 
|---|
| [637] | 523 |  | 
|---|
|  | 524 |  | 
|---|
|  | 525 | #endif          /***********   fin des structures swappées       ****************/ | 
|---|
|  | 526 |  | 
|---|
| [649] | 527 | enum{regul_stop,regul_chauffage_null,regul_sans_deglitch,regul_avec_deglitch,stop_moteur,moteur_direct_p,moteur_regul_p,moteur_direct_m,moteur_regul_m}; | 
|---|
| [637] | 528 |  | 
|---|
|  | 529 | #define bit_piles_5V    1 | 
|---|
|  | 530 | #define bit_piles_15V   2 | 
|---|
|  | 531 | #define bit_piles_auto  4 | 
|---|
|  | 532 |  | 
|---|
| [643] | 533 | enum{vanne_zero,vanne_rien,vanne_ferme,vanne_ouvre,vanne_auto_pression,vanne_auto_P_T}; | 
|---|
|  | 534 | /*enum{trans_zero,trans_rien,trans_normal,trans_rapide,trans_lent};*/ | 
|---|
| [639] | 535 | enum{helium_zero,helium_continu,helium_40s,helium_400s}; | 
|---|
| [637] | 536 |  | 
|---|
|  | 537 |  | 
|---|
| [643] | 538 | typedef struct                                                  /*  int4 en mot de 32 bit       */ | 
|---|
| [637] | 539 | { | 
|---|
|  | 540 | horloge                 horloge;                        /*                      1       */ | 
|---|
|  | 541 | reglage_un_bolo         bolo[nb_max_bolo];              /*      18 * 2  =       36      */ | 
|---|
|  | 542 | auto_bolo               autom[nombre_de_voies];         /*      6  * 1          6       */ | 
|---|
|  | 543 | regul_bolo              regul[nombre_de_regul];         /*      4  * 2  =       8       */ | 
|---|
|  | 544 | auto_dilu               dilu;                           /*                      2       */ | 
|---|
|  | 545 | } | 
|---|
|  | 546 | reglage_bolo;                                           /*      total 58                */ | 
|---|
|  | 547 |  | 
|---|
|  | 548 |  | 
|---|
|  | 549 | typedef struct | 
|---|
|  | 550 | { | 
|---|
| [639] | 551 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 552 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 553 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 554 | reglage_bolo    reglage; | 
|---|
| [649] | 555 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 556 | unsigned char ecc[((((sizeof(reglage_bolo)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 557 | #endif | 
|---|
| [639] | 558 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 559 | } | 
|---|
|  | 560 | block_type_reglage; | 
|---|
|  | 561 |  | 
|---|
|  | 562 | /*  ---------------------   structures N° 3 :    etat de la dilution    ----------------------- */ | 
|---|
|  | 563 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 564 | typedef struct | 
|---|
|  | 565 | { | 
|---|
| [639] | 566 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 567 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 568 | int4            code2;          /*      code2 du block                                  */ | 
|---|
|  | 569 | int4            switch_dil; | 
|---|
|  | 570 | int4            ADC_dil[48];    /*      la lecture des 48 ADC de la carte DIL           */ | 
|---|
|  | 571 | int4            DAC_dil[4];     /*      les 4 dac de la carte dilution                  */ | 
|---|
|  | 572 | int4            DAC_sst[4];     /*      les 4 dac de la carte sst                       */ | 
|---|
|  | 573 | int4            temperature[4]; /*      valeurs lues sur cartes BEDIFF modifiees        */ | 
|---|
|  | 574 | /*      int4            gyro_dil[3][nb_per_block*2];    les gyros  (block gyros)                */ | 
|---|
|  | 575 | /*      int4            data_dil[50];    data brutes de la dilution                             */ | 
|---|
| [649] | 576 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 577 | unsigned char ecc[((((sizeof(int4)*64+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 578 | #endif | 
|---|
| [639] | 579 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 580 | } | 
|---|
|  | 581 | block_type_dilution; | 
|---|
|  | 582 |  | 
|---|
|  | 583 |  | 
|---|
|  | 584 | /*  ---------------------   structures N° 4 :     gps           ------------------------------- */ | 
|---|
|  | 585 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 586 |  | 
|---|
| [645] | 587 | #define GPS_DATA 80 | 
|---|
| [637] | 588 | typedef struct | 
|---|
|  | 589 | { | 
|---|
| [639] | 590 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 591 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 592 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 593 |  | 
|---|
| [645] | 594 | char            gps[GPS_DATA];  /*      les données GPS (une chaine maxi 80 cara)       */ | 
|---|
| [649] | 595 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 596 | unsigned char ecc[((((GPS_DATA+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 597 | #endif | 
|---|
| [637] | 598 |  | 
|---|
| [639] | 599 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 600 | } | 
|---|
|  | 601 | block_type_gps; | 
|---|
|  | 602 |  | 
|---|
|  | 603 |  | 
|---|
|  | 604 |  | 
|---|
|  | 605 | /*  ---------------------   structures N° 5 :   tous les bolos 1 periode        --------------- */ | 
|---|
|  | 606 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 607 | typedef struct | 
|---|
|  | 608 | { | 
|---|
| [639] | 609 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 610 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 611 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 612 |  | 
|---|
|  | 613 | short           bol_per[nb_max_bolo][nb_max_mes_per]; | 
|---|
| [649] | 614 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 615 | unsigned char ecc[((((sizeof(short)*nb_max_bolo*nb_max_mes_per+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 616 | #endif | 
|---|
| [637] | 617 |  | 
|---|
| [639] | 618 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 619 | } | 
|---|
|  | 620 | block_type_une_periode; | 
|---|
|  | 621 |  | 
|---|
|  | 622 | /*  ----------------   structures N° 6 :  signals de synchro (pour test au sol) --------------- */ | 
|---|
|  | 623 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 624 | typedef struct | 
|---|
|  | 625 | { | 
|---|
| [639] | 626 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 627 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 628 | int4            code2;          /*      code2 du block                                  */ | 
|---|
|  | 629 | char            synchro[nb_per_block*2][nb_sync]; | 
|---|
| [649] | 630 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 631 | unsigned char ecc[((((nb_per_block*nb_sync*2+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 632 | #endif | 
|---|
| [637] | 633 |  | 
|---|
| [639] | 634 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 635 | } | 
|---|
|  | 636 | block_type_synchro_sol; | 
|---|
|  | 637 |  | 
|---|
|  | 638 | /*  ---------------------   structures N° 7 : block de données de pointage sol      ----------- */ | 
|---|
|  | 639 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 640 | typedef struct | 
|---|
|  | 641 | { | 
|---|
| [639] | 642 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 643 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 644 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 645 | char            comment[1024]; | 
|---|
| [649] | 646 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 647 | unsigned char ecc[((((1024+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 648 | #endif | 
|---|
| [639] | 649 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 650 | } | 
|---|
|  | 651 | block_type_pointage_sol; | 
|---|
|  | 652 |  | 
|---|
|  | 653 |  | 
|---|
|  | 654 |  | 
|---|
|  | 655 | /*  -------------   structures N° 8 :   données brutes des bolometres    ---------------------- */ | 
|---|
|  | 656 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 657 | typedef struct | 
|---|
|  | 658 | { | 
|---|
| [639] | 659 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 660 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 661 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 662 | /*      pour chaque bolo, un vecteur 72 points          */ | 
|---|
| [639] | 663 | int4            data_bolo[nb_max_bolo][nb_per_block*2]; | 
|---|
| [637] | 664 | /*      data D.S.       (en mots de 32 bits)            */ | 
|---|
| [649] | 665 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 666 | unsigned char ecc[((((sizeof(int4)*nb_max_bolo*nb_per_block*2+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 667 | #endif | 
|---|
| [639] | 668 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 669 | } | 
|---|
|  | 670 | block_type_bolo; | 
|---|
|  | 671 |  | 
|---|
| [649] | 672 | /*  ---------------------   structures N° 9 :   données des gyroscopes  */ | 
|---|
| [637] | 673 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 674 | typedef struct | 
|---|
|  | 675 | { | 
|---|
| [639] | 676 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 677 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 678 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 679 | /* chaque gyro: un vecteur tde 72 valeurs               */ | 
|---|
| [643] | 680 | int4            gyro[3][nb_per_block*2]; | 
|---|
| [649] | 681 | #ifdef _ECC_LIB_H_ | 
|---|
|  | 682 | unsigned char ecc[((((sizeof(int4)*3*nb_per_block*2+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
|  | 683 | #endif | 
|---|
| [639] | 684 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 685 | } | 
|---|
|  | 686 | block_type_gyro; | 
|---|
|  | 687 |  | 
|---|
|  | 688 | /*  ---------------------   structures N° 10 :   données senseur stellaire        -----------   */ | 
|---|
|  | 689 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 690 | typedef struct | 
|---|
|  | 691 | { | 
|---|
| [639] | 692 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 693 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 694 | int4            code2;          /*      code2 du block                                  */ | 
|---|
|  | 695 | int4            sst[nb_per_block*2][18]; | 
|---|
| [637] | 696 | /* chaque mesure: un paquet de 18 mots de 32 bits       */ | 
|---|
| [649] | 697 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 698 | unsigned char ecc[((((sizeof(int4)*nb_per_block*2*18+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 699 | #endif | 
|---|
| [639] | 700 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 701 | } | 
|---|
|  | 702 | block_type_sst; | 
|---|
|  | 703 |  | 
|---|
|  | 704 | /*  ---------------------   structures N° 11 :    rien                    -----------           */ | 
|---|
|  | 705 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 706 | typedef struct | 
|---|
|  | 707 | { | 
|---|
| [639] | 708 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 709 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 710 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [649] | 711 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 712 | unsigned char ecc[((((SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 713 | #endif | 
|---|
| [639] | 714 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 715 | } | 
|---|
|  | 716 | block_type11; | 
|---|
|  | 717 |  | 
|---|
|  | 718 | /*  ---------------------   structures N° 12 :  data bolo apres compression sur 7 bit    ------ */ | 
|---|
| [657] | 719 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 720 | /*  --   longueur variable car nb_max_bolo est remplacé par  parametr.nb_bolo apres calcul  --- */ | 
|---|
| [652] | 721 | /*  --     ATTENTION   l'ECC  calcule  est donc faux  !!!!!!                             ------ */ | 
|---|
| [637] | 722 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 723 | typedef struct | 
|---|
|  | 724 | { | 
|---|
| [639] | 725 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 726 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 727 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 728 | /*      nombre de mots = nb valeurs/4 +1                */ | 
|---|
|  | 729 | /*      pour chaque bolo, un vecteur  19 mots           */ | 
|---|
| [652] | 730 | unsigned int4   data_bolo[nb_max_bolo][ (nb_per_block/2) +1 ]; | 
|---|
| [649] | 731 | #ifdef _ECC_LIB_H_ | 
|---|
| [652] | 732 | unsigned char ecc[((((sizeof(int4)*nb_max_bolo*((nb_per_block/2) +1)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 733 | #endif | 
|---|
| [637] | 734 |  | 
|---|
| [639] | 735 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 736 | } | 
|---|
|  | 737 | block_type_bolo_comprime; | 
|---|
|  | 738 |  | 
|---|
|  | 739 | /*  ---------------------   structures N° 13 :    block_type_gyro_comprime      -----------     */ | 
|---|
|  | 740 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 741 | typedef struct | 
|---|
|  | 742 | { | 
|---|
| [639] | 743 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 744 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 745 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 746 | /*      nombre de mots = nb valeurs/4 +1                */ | 
|---|
| [639] | 747 | unsigned int4   gyro[3][ (nb_per_block/2) +1 ]; | 
|---|
| [649] | 748 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 749 | unsigned char ecc[((((sizeof(int4)*3*((nb_per_block/2) +1)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 750 | #endif | 
|---|
| [639] | 751 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 752 | } | 
|---|
|  | 753 | block_type_gyro_comprime; | 
|---|
|  | 754 |  | 
|---|
|  | 755 | /*  ---------------------   structures N° 14 :    block_type_sst_comprime       -----------     */ | 
|---|
|  | 756 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 757 | typedef struct | 
|---|
|  | 758 | { | 
|---|
| [639] | 759 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 760 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 761 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 762 | /*      pour chaque diode, un vecteur  11 mots          */ | 
|---|
| [639] | 763 | unsigned int4   sst[nb_photo_diodes] [(nb_per_block*2/7) +1 ]; | 
|---|
| [649] | 764 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 765 | unsigned char ecc[((((sizeof(int4)*nb_photo_diodes*((nb_per_block*2/7) +1)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 766 | #endif | 
|---|
| [639] | 767 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 768 | } | 
|---|
|  | 769 | block_type_sst_comprime; | 
|---|
|  | 770 |  | 
|---|
|  | 771 |  | 
|---|
| [643] | 772 | /*  ---------------------   structures N° 15 : block_type_status_flash -------*/ | 
|---|
|  | 773 | /*  ----------------------------------------------------------------    */ | 
|---|
| [637] | 774 |  | 
|---|
| [643] | 775 | /* | 
|---|
|  | 776 | ** Quelque soit la commande, l'enregistreur renvoie toujours le meme type | 
|---|
|  | 777 | de bloc comprenant la commande, un mot d'erreur eventuel et le status. | 
|---|
| [637] | 778 |  | 
|---|
| [643] | 779 | ** L'enregistreur ne prend jamais l'initiative d'envoyer un bloc de status | 
|---|
|  | 780 | (sauf dans le cas ci-dessous). | 
|---|
| [637] | 781 |  | 
|---|
| [643] | 782 | ** Au reset, le controleur est un peu lent a demarrer (quelques secondes). | 
|---|
|  | 783 | Pour que tu puisse savoir quand il est pret, je propose de t'envoyer un | 
|---|
|  | 784 | bloc de type "block_type_status_flash" des que je suis pret (comme si tu | 
|---|
|  | 785 | avais envoye un bloc "block_type_cmd_flash" avec la commande | 
|---|
|  | 786 | "FLASH_STATUS_REQUEST" | 
|---|
| [637] | 787 |  | 
|---|
| [643] | 788 | */ | 
|---|
| [637] | 789 |  | 
|---|
| [643] | 790 | typedef struct {/* etat de l'enregistreur */ | 
|---|
|  | 791 | int4 nb_total_blocks ; | 
|---|
|  | 792 | int4 memoire_libre ; | 
|---|
|  | 793 | int4 nb_block_erreur ; | 
|---|
|  | 794 | } status_flash; | 
|---|
| [637] | 795 |  | 
|---|
| [643] | 796 | typedef struct { | 
|---|
|  | 797 | unsigned int4 debut ; | 
|---|
|  | 798 | unsigned int4 code1 ; | 
|---|
|  | 799 | unsigned int4 code2 ; | 
|---|
| [637] | 800 |  | 
|---|
| [643] | 801 | int4  commande; /* la commande a laquelle ce bloc repond      */ | 
|---|
|  | 802 | int4 erreur ;   /* Si la commande a induit une erreur */ | 
|---|
|  | 803 | status_flash status ; /* etat de l'enregistreur */ | 
|---|
| [649] | 804 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 805 | unsigned char ecc[((((sizeof(int4)*2 + sizeof(status_flash)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 806 | #endif | 
|---|
| [645] | 807 |  | 
|---|
| [643] | 808 | unsigned int4 fin ; /* code de reconnaissance de fin de block */ | 
|---|
|  | 809 | } block_type_status_flash ; | 
|---|
| [637] | 810 |  | 
|---|
| [643] | 811 | /*  ---------------------   structures N° 16 :    block_type_cmd_flash    ---------*/ | 
|---|
|  | 812 | /*  ------------------------------------------------------------------  */ | 
|---|
|  | 813 | typedef struct { | 
|---|
|  | 814 | unsigned int4 debut ; | 
|---|
|  | 815 | unsigned int4 code1 ; | 
|---|
|  | 816 | unsigned int4 code2 ; | 
|---|
|  | 817 |  | 
|---|
|  | 818 | int4  commande; /* type de commande a l'enregistreur flash */ | 
|---|
| [649] | 819 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 820 | unsigned char ecc[((((sizeof(int4)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 821 | #endif | 
|---|
| [643] | 822 |  | 
|---|
|  | 823 | int4  fin;      /* code de reconnaissance de fin de block */ | 
|---|
|  | 824 | } block_type_cmd_flash; | 
|---|
|  | 825 |  | 
|---|
|  | 826 | /* Commands from Transputer to Recorder */ | 
|---|
|  | 827 | enum { | 
|---|
|  | 828 | FLASH_STATUS_REQUEST, | 
|---|
|  | 829 | FLASH_EFFACE_TOUT1, FLASH_EFFACE_TOUT2, FLASH_EFFACE_TOUT3, | 
|---|
|  | 830 | FLASH_EFFACE_UTIL1, FLASH_EFFACE_UTIL2, FLASH_EFFACE_UTIL3 | 
|---|
|  | 831 | } ; | 
|---|
|  | 832 |  | 
|---|
|  | 833 | /* Errors from Recorder to Transputer. | 
|---|
|  | 834 | Pending question: what to do in case of FLASH_ERASE_END_ERROR ? | 
|---|
|  | 835 | */ | 
|---|
|  | 836 |  | 
|---|
|  | 837 | enum { | 
|---|
|  | 838 | FLASH_STATUS_OK,      /* Pas d'erreur */ | 
|---|
|  | 839 | FLASH_BAD_SEQUENCE,   /* Mauvaise sequence d'effacement */ | 
|---|
|  | 840 | FLASH_ERASE_START,    /* Debut d'effacement */ | 
|---|
|  | 841 | FLASH_ERASE_END_OK,   /* Fin d'effacement OK */ | 
|---|
|  | 842 | FLASH_ERASE_END_ERROR /* Erreur pendant l'effacement */ | 
|---|
|  | 843 | } ; | 
|---|
|  | 844 |  | 
|---|
|  | 845 |  | 
|---|
| [637] | 846 | /*  ---------------------   structures N° 17 : block brut de données ctb pour test      ------- */ | 
|---|
|  | 847 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 848 | typedef struct | 
|---|
|  | 849 | { | 
|---|
| [639] | 850 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 851 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 852 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [637] | 853 | #ifdef  transmet_data_brute | 
|---|
|  | 854 | char            data[nb_per_block*nb_max_mes_per*nb_byte_mot]; | 
|---|
| [649] | 855 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 856 | unsigned char ecc[((((nb_per_block*nb_max_mes_per*nb_byte_mot+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 857 | #endif | 
|---|
| [645] | 858 | #else | 
|---|
| [649] | 859 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 860 | unsigned char ecc[((((SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [637] | 861 | #endif | 
|---|
| [649] | 862 | #endif | 
|---|
| [639] | 863 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 864 | } | 
|---|
|  | 865 | block_type_data_brute; | 
|---|
|  | 866 |  | 
|---|
|  | 867 | /*  ---------------------   structures N° 18 : block  vide pour l'instant             -------   */ | 
|---|
|  | 868 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 869 | typedef struct | 
|---|
|  | 870 | { | 
|---|
| [639] | 871 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 872 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 873 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [649] | 874 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 875 | unsigned char ecc[((((SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 876 | #endif | 
|---|
| [639] | 877 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 878 | } | 
|---|
|  | 879 | block_type_18; | 
|---|
|  | 880 |  | 
|---|
|  | 881 | /*  ---------------------   structures N° 19 : block  vide pour l'instant             -------   */ | 
|---|
|  | 882 | /*  ------------------------------------------------------------------------------------------- */ | 
|---|
|  | 883 | typedef struct | 
|---|
|  | 884 | { | 
|---|
| [639] | 885 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 886 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 887 | int4            code2;          /*      code2 du block                                  */ | 
|---|
| [649] | 888 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 889 | unsigned char ecc[((((SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 890 | #endif | 
|---|
| [639] | 891 | int4            fin;            /*      code de reconnaissance de fin de block          */ | 
|---|
| [637] | 892 | } | 
|---|
|  | 893 | block_type_19; | 
|---|
|  | 894 |  | 
|---|
|  | 895 |  | 
|---|
|  | 896 |  | 
|---|
|  | 897 | /*  ---------   block  modele  (plus gros que tous les autres pour reservation memoire)   ----  */ | 
|---|
|  | 898 | /*  -----------------------------------------------------------------------------------------   */ | 
|---|
|  | 899 |  | 
|---|
|  | 900 | typedef struct                          /*      La structure de transfert transputer vers mac   */ | 
|---|
|  | 901 | { | 
|---|
| [639] | 902 | int4            debut;          /*      code de reconnaissance de debut de block        */ | 
|---|
|  | 903 | int4            code1;          /*      code1 du block                                  */ | 
|---|
|  | 904 | int4            code2;          /*      code2 du block                                  */ | 
|---|
|  | 905 | int4            mot[(taille_maxi_block_archeops)/4]; | 
|---|
| [649] | 906 | #ifdef _ECC_LIB_H_ | 
|---|
| [645] | 907 | unsigned char ecc[((((sizeof(int4)*(taille_maxi_block_archeops/4)+SIZE_HEAD)/ECC_DATA)+1)*ECC_SIZE)] ; | 
|---|
| [649] | 908 | #endif | 
|---|
| [639] | 909 | int4            fin;            /* code de reconnaissance de fin de block               */ | 
|---|
| [637] | 910 | } | 
|---|
|  | 911 | block_type_modele; | 
|---|
|  | 912 |  | 
|---|
|  | 913 |  | 
|---|
|  | 914 |  | 
|---|
|  | 915 |  | 
|---|
|  | 916 |  | 
|---|
|  | 917 | /*==============================================================================================*/ | 
|---|
|  | 918 | /*==============================================================================================*/ | 
|---|
|  | 919 | /*  --------------  définitions permettant de travailler sur les blocks Archeops   -----------  */ | 
|---|
|  | 920 | /*==============================================================================================*/ | 
|---|
|  | 921 | /*==============================================================================================*/ | 
|---|
|  | 922 |  | 
|---|
|  | 923 |  | 
|---|
|  | 924 |  | 
|---|
|  | 925 | enum    {block_param,block_journal,block_reglage,block_dilution, | 
|---|
|  | 926 | block_gps,block_une_periode,block_synchro_sol,block_pointage_sol, | 
|---|
|  | 927 | block_bolo,block_gyro,block_sst,block_11, | 
|---|
| [643] | 928 | block_bolo_comprime,block_gyro_comprime,block_sst_comprime,block_status_flash, | 
|---|
| [637] | 929 | block_cmd_flash,block_data_brute,block_18,block_19}; | 
|---|
|  | 930 |  | 
|---|
|  | 931 |  | 
|---|
|  | 932 | #define def_nom_block   char nom_block[nb_type_blocks][32]={"block_param","block_journal","block_reglage","block_dilution",\ | 
|---|
|  | 933 | "block_gps","block_une_periode","block_synchro_sol","block_pointage_sol",\ | 
|---|
|  | 934 | "block_bolo","block_gyro","block_sst","block_11",\ | 
|---|
| [643] | 935 | "block_bolo_comprime","block_gyro_comprime","block_sst_comprime","block_status_flash",\ | 
|---|
| [637] | 936 | "block_cmd_flash","block_data_brute","",""}; | 
|---|
|  | 937 |  | 
|---|
|  | 938 |  | 
|---|
|  | 939 | #define def_long_block  int long_block[nb_type_blocks]={sizeof(block_type_param),sizeof(block_type_journal),sizeof(block_type_reglage),sizeof(block_type_dilution),\ | 
|---|
|  | 940 | sizeof(block_type_gps),sizeof(block_type_une_periode),sizeof(block_type_synchro_sol),sizeof(block_type_pointage_sol),\ | 
|---|
|  | 941 | sizeof(block_type_bolo),sizeof(block_type_gyro),sizeof(block_type_sst),sizeof(block_type11),\ | 
|---|
| [643] | 942 | sizeof(block_type_bolo_comprime),sizeof(block_type_gyro_comprime),sizeof(block_type_sst_comprime),sizeof(block_type_status_flash),\ | 
|---|
| [637] | 943 | sizeof(block_type_cmd_flash),sizeof(block_type_data_brute),sizeof(block_type_18),sizeof(block_type_19)}; | 
|---|
|  | 944 |  | 
|---|
|  | 945 |  | 
|---|
|  | 946 |  | 
|---|
|  | 947 |  | 
|---|
|  | 948 |  | 
|---|
|  | 949 | /*   le code du block contient  8  bit de type                                                  */ | 
|---|
|  | 950 | /*                              24 bit pour le numero du block(horloge locale)                  */ | 
|---|
|  | 951 | /*                              12 bit pour la longueur du block  (en octet)                    */ | 
|---|
|  | 952 | /*                              16 bit pour la somme de test de la validité du block            */ | 
|---|
|  | 953 |  | 
|---|
|  | 954 | /*  les define suivants doivent etre utilisés pour tester le type des blocks et les verifier    */ | 
|---|
|  | 955 |  | 
|---|
|  | 956 |  | 
|---|
|  | 957 | #define longueur_block(_bk)     ( (int) ((_bk)->code1>>16)      & 0xffff ) | 
|---|
|  | 958 | #define somme_block(_bk)        ( (int)  (_bk)->code1           & 0xffff ) | 
|---|
|  | 959 |  | 
|---|
|  | 960 | #define type_block(_bk)         ( (int) ((_bk)->code2>>24)      & 0xff ) | 
|---|
|  | 961 | #define numero_block(_bk)       ( (int)  (_bk)->code2           & 0xffffff ) | 
|---|
|  | 962 |  | 
|---|
|  | 963 | /* ce define cree le mot de controle de somme des blocks et de les verifier a la reception      */ | 
|---|
|  | 964 |  | 
|---|
|  | 965 |  | 
|---|
|  | 966 | /*==============================================================================================*/ | 
|---|
|  | 967 | /*==============================================================================================*/ | 
|---|
|  | 968 | /*  -----------------  fonctions utilitaires de gestion des blocks Archeops   ----------------  */ | 
|---|
|  | 969 | /*==============================================================================================*/ | 
|---|
|  | 970 | /*==============================================================================================*/ | 
|---|
|  | 971 |  | 
|---|
|  | 972 |  | 
|---|
|  | 973 | /* -------------------------------------------------------------------------------------------- */ | 
|---|
|  | 974 | /* les fonctions suivantes sont des utilitaires permettant la gestion des blocks archeops       */ | 
|---|
|  | 975 | /* il faut inclure une seule fois le header archeops.h précéde de :                             */ | 
|---|
|  | 976 | /*                       #define utilitaires_de_block_archeops                                  */ | 
|---|
|  | 977 | /* -------------------------------------------------------------------------------------------- */ | 
|---|
|  | 978 |  | 
|---|
|  | 979 |  | 
|---|
|  | 980 | /* ----------------------------   prototypes des fonctions       ------------------------------ */ | 
|---|
|  | 981 | /* -------------------------------------------------------------------------------------------- */ | 
|---|
|  | 982 |  | 
|---|
|  | 983 |  | 
|---|
|  | 984 | /*      cette fonction calcule le code de somme pour le controle de parité des blocks           */ | 
|---|
|  | 985 |  | 
|---|
|  | 986 | int     calcul_somme_block(block_type_modele* blk,int longueur); | 
|---|
|  | 987 |  | 
|---|
|  | 988 |  | 
|---|
|  | 989 |  | 
|---|
|  | 990 |  | 
|---|
|  | 991 |  | 
|---|
|  | 992 | /*      cette fonction est a apeller lors de la création d'un block apres l'avoir rempli        */ | 
|---|
|  | 993 | /*      elle permet de creer tous les mots de controle du block                                 */ | 
|---|
|  | 994 |  | 
|---|
|  | 995 | void    valide_block(block_type_modele* blk,int type,int block_num); | 
|---|
|  | 996 |  | 
|---|
|  | 997 |  | 
|---|
|  | 998 |  | 
|---|
|  | 999 | /*      cette fonction est a apeller pour vérifier la validité d'un block                       */ | 
|---|
|  | 1000 | /*      elle retourne 0 si le block est correct et sinon, un code d'erreur                      */ | 
|---|
|  | 1001 | /*      la seconde fonction sort les erreurs a l'ecran                                          */ | 
|---|
|  | 1002 |  | 
|---|
|  | 1003 | int     verifie_block(block_type_modele* blk); | 
|---|
|  | 1004 | int     verifie_block_printf(block_type_modele* blk); | 
|---|
|  | 1005 |  | 
|---|
|  | 1006 | enum    {block_correct,block_type_inconnu,block_longueur_erreur,block_somme_erreur | 
|---|
|  | 1007 | ,block_debut_erreur,block_fin_erreur}; | 
|---|
|  | 1008 |  | 
|---|
|  | 1009 | /*      cette fonction transforme un char (sur 8 bit) en double avec une echelle logarythmique  */ | 
|---|
|  | 1010 | /*      elle est en particulier utilisée pour calculer les coef de la regul                     */ | 
|---|
|  | 1011 |  | 
|---|
|  | 1012 | double  val_double(char x); | 
|---|
|  | 1013 |  | 
|---|
| [643] | 1014 | /*      cette fonction transforme un char (sur 8 bit) en entier int4 (echelle logarythmique)    */ | 
|---|
| [637] | 1015 | /*      elle est en particulier utilisée pour fixer le courant sur les bolometres               */ | 
|---|
|  | 1016 |  | 
|---|
| [643] | 1017 | unsigned int4   val_long(char x); | 
|---|
| [637] | 1018 |  | 
|---|
|  | 1019 | int     new_val_dac(int a,char  code); | 
|---|
|  | 1020 |  | 
|---|
|  | 1021 |  | 
|---|