source: Sophya/trunk/Poubelle/archediab.old/archeops.c@ 651

Last change on this file since 651 was 651, checked in by ansari, 26 years ago

archediab 29

File size: 24.6 KB
RevLine 
[649]1
2
3#include "manip.h"
4
[637]5#include "archeops.h"
6
7
[639]8
[649]9/* sauve vol trapani 2eme config de vol */
[637]10
11
[649]12
13/********** coefficients pour les mesures bolo **********************************/
14
15/* toutes les puissances en pW */
16
17/* -1- loi de reponse thermique des bolos avec R en ohms et T en Kelvin */
18
19/* */
20
21/* T = coef2 * ( ln ( R / coef1) ** ( -1 / coef0 ) */
22
23/* */
24
25/* -2- fuite thermique du bolo coef 3,4 */
26
27/* */
28
29/* Ptot = coef3 * ( (10*Tb) ** coef4 - (10*Tcryo) ** coef4 ) */
30
31/* */
32
33/* -3- calcul empirique de Pciel et de tau coef 5,6 */
34
35/* */
36
37/* Pciel = coef5 - Pelec coef5= I * Ai (tables xavier) */
38
39/* tau = - ln ( 1 + Pciel / coef6 ) coef6= I * Bi (tables xavier) */
40
41/* */
42
43/* Pour les thermometres 1 à 4 (germanium et carbone Allan-Bradley) */
44
45/* les coefficients sont utilisés differemment, ils permettent de convertir */
46
47/* R vers T ( c(6) est un offset sur la mesure de R par rapport aux mesures 4 fils)*/
48
49/* llR= log(log(R - c(6))-c(0)) */
50
51/* T = exp(c(1) + c(2)* llR + c(3)* llR* llR + c(4)* llR* llR* llR + */
52
53/* c(5)* llR* llR* llR* llR) */
54
55/* */
56
57/* version vol Trapani */
58
59/* on corrige le biais de temperature coef2=1.1 old, coef3=old/1.1^coef4 */
60
61/* */
62
63/* */
64
65/* */
66
67/* */
68
69/* */
70
71/****************************************************************************************/
72
73
74
75
76
[637]77/**************************************************************************************/
[649]78
[637]79/* */
[649]80
[637]81/* pour les MLPA : gain = 100 diviseur = 101 ou 330 */
[649]82
[637]83/* pour les bebodiff : gain = diviseur = 100Kohm / R preampli */
[649]84
[637]85/* pour les bebodiff : la capa est corrigee d'un facteur 0.868 */
[649]86
[637]87/* pour les cartes modifiees : mettre diviseur=0 */
[649]88
[637]89/* et capa = la resistance de chage en Megohm */
[649]90
[637]91/* */
[649]92
[637]93/**************************************************************************************/
94
95
[649]96
97
98
[645]99/* numero_nom, on/off , 0 = MLPA , N° bolo , gain_pa , capa*1000 , diviseur , coef*10000 */
[649]100
[639]101/* , 0 ou 1 , 2..8 = BEBO , hard , , 4700 , 333 , */
[649]102
[639]103/* 10 = Bediff , , , */
[637]104
[649]105
106
[639]107/* pour les bediff (code 10) le n° de bolo est N° de bebo*8 + numero dans la bebo */
[649]108
[639]109/* soit : 1 2 3 4 5 6 .. 9 10 11 12 13 14 .. 17 18 19 20 21 22 .. etc */
[637]110
111
[649]112
113
114
[637]115/*debut_param*/
[649]116
[637]117/*---------------------------------- fenetre : -----------------------------------*/
118
119
[649]120
121/* ------------------------ configuration de vol 5 juillet 99-----------------------------*/
122
[651]123/* ---------------------- modifié les indices de bolo le 15 septembre 1999-------------------*/
124
[649]125param_bolo parametr={28,24,36,88,18,
126
127
128
[639]129{
[637]130
[651]131{ 11 , 2,10, 1 , 200, 22000 , 200 }, /* 0 */
[637]132
[649]133{ 9 , 1,10, 2 , 200, 22000 , 200 },
[637]134
[649]135{ 8 , 1,10, 3 , 200, 22000 , 200 },
[637]136
[649]137{ 14 , 2,10, 4 , 200, 22000 , 200 },
[643]138
139
[649]140
[651]141{ 5 , 1,10, 5 ,1000, 4700 , 1000 }, /* 4 */
[649]142
143{ 0 , 2,10, 6 ,1000, 4700 , 1000 },
144
145{ 10 , 1,10, 9 ,1000, 4700 , 1000 },
146
147{ 0 , 2,10,10, 1000, 4700 , 1000 },
148
149
150
[651]151{ 2 , 1,10,11, 1000, 4700 , 1000 }, /* 8 */
[649]152
153{ 4 , 1,10,12, 1000, 4700 , 1000 },
154
155{ 7 , 2,10,13, 1000, 4700 , 1000 },
156
157{ 1 , 1,10,14, 1000, 4700 , 1000 },
158
159
160
[651]161{ 13 , 1,10,17, 1000, 4700 , 1000 }, /* 12 */
[649]162
163{ 3 , 1,10,18, 1000, 4700 , 1000 },
164
165{ 12 , 1,10,19, 1000, 4700 , 1000 },
166
167{ 6 , 1,10,20, 1000, 4700 , 1000 },
168
169
170
[651]171{ 15 , 1,10,21, 200, 22000 , 200 }, /* 16 */
[649]172
173{ 16 , 1,10,22, 200, 22000 , 200 },
174
175{ 17 , 1,10,25, 500, 22000 , 500 },
176
177{ 18 , 2,10,26, 500, 22000 , 500 },
178
179
180
[651]181{ 20 , 3,10,27, 1000, 22000 , 0 }, /* 20 */
[649]182
183{ 21 , 3,10,28, 1000, 1000 , 0 },
184
185{ 22 , 3,10,29, 1000, 1000 , 0 },
186
187{ 23 , 3,10,30, 1000, 1000 , 0 },
188
189
190
[643]191},
[649]192
[643]193{
194
[649]195{ "Niente " , { 5000 , 0 , 0, 0,0,0,0} }, /* 0 */
196
197{ "ch1-bolo1" , { 5000 , 600000 , 154000, 63039, 25000, 0, 0} }, /* 1 */
198
199{ "ch1-bolo2" , { 5000 , 600000 , 154000, 47279, 25000, 0, 0} },
200
201{ "ch1-bolo3" , { 5000 , 600000 , 154000, 51219, 25000, 0, 0} },
202
203{ "ch2-bolo4" , { 5000 , 600000 , 154000, 70919, 25000, 0, 0} },
204
205{ "ch2-bolo5" , { 5000 , 600000 , 154000, 78799, 25000, 0, 0} },
206
207{ "ch3-bolo6" , { 5000 , 600000 , 154000, 86678, 25000, 0, 0} },
208
209
210
211{ "Dum100mK1" , { 5000 , 588000 , 125000, 0,0,0,0} }, /* 7 */
212
[645]213{ "Dum100mK2" , { 5000 , 588000 , 125000, 0,0,0,0} },
[643]214
[649]215/*{ "Dum100mK3" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
216
217{ "Dum100mK4" , { 5000 , 1361800 , 125000, 0,0,0,0} }, /* 9 */
218
219/*{ "Dum100mK5" , { 5000 , 1361800 , 125000, 0,0,0,0} }, */
220
221{ "Dum100mK6" , { 5000 , 1361800 , 125000, 0,0,0,0} },
222
223
224
225{ "Lou100mK1" , { 5000 , 5680000 , 560000, 0,0,0,0} }, /* 11 */
226
[645]227{ "Lou100mK2" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]228
[649]229{ "Lou100mK3" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]230
[649]231{ "Lou100mK4" , { 5000 , 5680000 , 560000, 0,0,0,0} },
[643]232
233
[649]234
235{ "Lou1.6K5 " , { 5000 , 0 , 0, 0,0,0,0} }, /* 15 */
236
237{ "Lou1.6K6 " , { 5000 , 0 , 0, 0,0,0,0} },
238
239{ "Lou10K7 " , { 5000 , 0 , 0, 0,0,0,0} },
240
241{ "Lou10K8 " , { 5000 , 0 , 0, 0,0,0,0} },
242
243
244
245{ "R10MOhm " , { 5000 , 0 , 0, 0,0,0,0} }, /* 19 */
246
247
248
249/* La germanium doit toujours etre en premier par rapport aux autres thermos absolus */
250
251{ "germanium" , { 0 , 30719 , -910 , -16389 , 2927 , 0, 0} }, /* 20 */
252
253{ "therm_4k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 52500} },
254
255{ "therm_1.6k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 566700} },
256
257{ "therm_10k" , { 45000 , 28907 , -16028 , -1327 , 1472 , 872, 138100} },
258
259
260
[637]261}
[643]262
[649]263
264
[637]265};
[649]266
[637]267/*fin_param*/
268
[649]269
270
[645]271/* Definition Mai-Juin 1999
[649]272
[645]273{
[649]274
[645]275{ "v1-bedif1" , 1,10,1 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
[649]276
[645]277{ "v1-bedif2" , 1,10,2 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
[649]278
[645]279{ "v1-bedif3" , 1,10,3 , 200, 22000 , 200, { 500 , 136180 , 9010,0,0,0,0} },
[649]280
[645]281{ "v1-bedif4" , 1,10,4 , 200, 22000 , 200, { 5000 , 123100 , 334200,0,0,0,0} },
[649]282
[645]283{ "v1-bedif5" , 1,10,5 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]284
[645]285{ "v1-bedif6" , 1,10,6 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]286
[649]287
288
[645]289{ "v1-bedif7" , 1,10,9 , 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]290
[645]291{ "v1-bedif8" , 1,10,10, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]292
[645]293{ "v1-bedif9" , 1,10,11, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]294
[645]295{ "v1-bedif10" , 1,10,12, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]296
[645]297{ "v1-bedif11" , 1,10,13, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]298
[645]299{ "v1-bedif12" , 1,10,14, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[637]300
[649]301
302
[645]303{ "v1-bedif13" , 1,10,17, 1000, 100000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]304
[645]305{ "v1-bedif14" , 1,10,18, 1000, 470000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]306
[645]307{ "bedif15" , 1,10,19, 1000, 470000 , 1000, { 500 , 58800 , 12500,0,0,0,0} },
[649]308
[645]309{ "bedif16" , 1,10,20, 1000,2200000 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]310
[645]311{ "bedif17" , 1,10,21, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]312
[645]313{ "bedif18" , 1,10,22, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
314
[649]315
316
[645]317{ "v1-bedif19" , 2,10,25, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]318
[645]319{ "v1-bedif20" , 2,10,26, 1000, 4700 , 1000, { 5000 , 123100 , 334200,0,0,0,0} },
[649]320
[645]321{ "germanium" , 3,10,27, 1000, 22000 , 0, { 3500 , 17100 , 646500,0,0,0,0} },
[649]322
[645]323{ "therm_4k" , 3,10,28, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
[649]324
[645]325{ "therm_1.6k" , 3,10,29, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
[649]326
[645]327{ "therm_10k" , 3,10,30, 1000, 1000 , 0, {12000 ,1804000 , 72800,0,0,0,0} },
328
[649]329
330
[645]331}*/
332
[649]333
334
[637]335/* bolos campagne 1998-1999 */
[649]336
[637]337/*
[649]338
[637]339reg_NbSi.J, 1, 0, 1, 100, 4.7, 333, .5 ,519.6 , 8.286
[649]340
[637]341v1-231...L, 1, 0, 2, 100, 4.7, 333, .5 , 1.7 , 32.41 , 0.333 , 10 , 20.30 , 11.41
[649]342
[637]343v1-232...N, 1, 0, 3, 100, 4.7, 333,
[649]344
[637]345v1-237...E, 1, 0, 4, 100, 4.7, 333,
346
[649]347
348
[637]349reg_JamieO, 1, 0, 5, 100, 4.7, 101,
350
[649]351
352
[637]353V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
[649]354
[637]355V2-230...B, 1, 0, 7, 100, 4.7, 333, .5 , 8.26 , 26.61 , 5.10 , 7 , 9.354 , 1.026
[649]356
[637]357V2-205...Q, 1, 0, 8, 100, 4.7, 333, .518 , 81 , 25.2
[649]358
[637]359V2-208...P, 1, 0, 9, 100, 4.7, 333, .5 , 12.31 , 33.42 , 0.627 , 6.5 , 8.113 , 2.958
360
[649]361
362
[637]363*/
[649]364
[637]365/*bolos campagne 1997-1998 */
[649]366
[637]367/*
368
[649]369
370
[637]371v1-208...J, 1, 0, 1, 100, 4.7, 333, .5 , 12.31 , 33.42
[649]372
[637]373v1-232...L, 1, 0, 2, 100, 4.7, 333,
[649]374
[637]375v1-205...N, 1, 0, 3, 100, 4.7, 333, .518 , 81 , 25.2
[649]376
[637]377v1-NbSi..E, 1, 0, 4, 100, 4.7, 333, .5 ,519.6 , 8.286
[649]378
[637]379Jamie....O, 1, 0, 5, 100, 4.7, 101,
[649]380
[637]381V2-NbSi..H, 1, 0, 6, 100, 4.7, 101, .5 ,433.8 , 9.25
[649]382
[637]383V2-224...B, 1, 0, 7, 100, 4.7, 333, .5 ,3.43 , 26.6
[649]384
[637]385V2-230...Q, 1, 0, 8, 100, 4.7, 333, .5 , 8.26 , 26.61
[649]386
[637]387V2-231...P, 1, 0, 9, 100, 4.7, 333, .5 , 1.7 , 32.41
388
[649]389
390
[637]391*/
392
393
[649]394
395
396
[643]397int mode_transmission_telemesure[nb_modes_telemesure][nb_type_blocks]= {
[637]398
[649]399
400
[643]401/* enregisteur de bord flash : plafond standard nominal */
[637]402
[649]403/* 0*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[637]404
[643]405
[649]406
407/* 1*/ { 0,10,10, 1, 10, 3, 0, 0, 0, 1, 0, 0, 1, 0, 4,2500, 0, 0, 0, 0},
408
409
410
411/* 2*/ { 0,10,05,01, 10,06, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
412
413
414
[643]415/* 3*/ { 0,10, 1,25, 10, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0},
416
[649]417
418
[643]419/* 4*/ { 0,10,15,50, 10,25, 0, 0, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
420
[649]421
422
[643]423/* 5*/ { 0,10,15,50, 10,25, 0, 0, 0, 0, 1, 0, 0, 0, 0,2500, 0, 0, 0, 0},
424
[649]425
426
[643]427/* 6*/ { 0,10,15,50, 10,50, 0, 0, 0, 1, 0, 0, 1, 0, 2,2500, 0, 0, 0, 0},
428
429
430
[649]431/* 7*/ { 0,10,15,50,100,50, 1, 1, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0},
[643]432
[649]433
434
435/* 8*/ { 0,10,15,50,100,50, 1, 1, 1, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0},
436
437
438
439/* 9*/ { 0,10, 1, 1,100, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0,2500, 0, 0, 0, 0}
440
441
442
[643]443 };
444
445
446
[649]447
448
449
450
[643]451int mode_transmission_flash[nb_modes_flash][nb_type_blocks]= {
452
453
[649]454
455
456
[643]457/* enregisteur de bord flash : nominal */
[649]458
[643]459/* 0*/ { 0,50,15,25, 10,25, 0, 0, 0, 1, 0, 0, 1, 0, 1,2500, 0, 0, 0, 0} ,
460
[649]461
462
[643]463/* enregisteur de bord flash : minimum */
[649]464
[643]465/* 1*/ { 0,50,50,50,50,100, 0, 0, 0, 0, 0, 0, 0, 0, 0,2500, 0, 0, 0, 0} ,
466
[649]467
468
[643]469/* enregisteur de bord flash : rien */
[649]470
[643]471/* 2*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0} };
472
473
474
475
476
477
478
479
480
[649]481/*debut_nom_reglage*/
[643]482
[649]483/* 0->1 - demarrage par defaut - Nominal*/
[643]484
[649]485/* 1->2 - idem*/
[643]486
[649]487/* 2->3 - faible courant*/
[643]488
[649]489/* 3->4 - fort courant*/
[643]490
[649]491/* 4->5 - non fffdéfini*/
[643]492
[649]493/* 5->6 - non défini*/
[643]494
[649]495/* 6->7 - non défini*/
[643]496
[649]497/* 7->8 - non défini*/
[643]498
[637]499/*fin_nom_reglage*/
500
501
502
503
504
505
506
[639]507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
[649]552
553
554
555
556
557
558
559
560
561
562
563
564
[637]565reglage_bolo reglage_standard[8]={{
566
567
[649]568
569
570
[637]571/*debut reglage 0 */
[649]572
[639]573#ifdef programme
[649]574
575{32,76,8,1},{
576
[639]577{20,0}
[649]578
579,{1311522837,256000}
580
581,{1048576021,256004}
582
[637]583,{20,0}
[649]584
585,{1048576021,256001}
586
[637]587,{20,0}
[649]588
589,{262144021,128003}
590
[639]591,{20,0}
[649]592
593,{262144021,128001}
594
595,{262144021,128001}
596
[639]597,{20,0}
[649]598
599,{1048576021,256257}
600
601,{1048576021,256003}
602
603,{262144021,128001}
604
605,{262144789,128001}
606
607,{262144021,128001}
608
609,{100663317,256002}
610
611,{100716053,155650}
612
613,{1048576277,256003}
614
[639]615,{20,0}
[649]616
617,{1024021,0}
618
619,{262165,0}
620
621,{65557,0}
622
623,{1024020,0}
624
[637]625},{
[649]626
627{1,21,16,4}
628
629,{1,21,13,4}
630
631,{1,21,20,4}
632
633,{1,21,20,4}
634
635,{0,21,0,4}
636
637,{0,21,0,4}
638
[637]639},{
[649]640
641{3,1,21,24,21,24,0}
642
[637]643,{0,1,9,1,0,0,0}
[649]644
[637]645,{0,1,9,1,0,0,0}
[649]646
647,{6,1,9,34,30,0,65326}
648
649},{5,3,129,108,0,126,104,88}
650
[639]651#else
[649]652
653{1,8,76,32},{
654
[639]655{20,0}
[649]656
657,{1311522837,256000}
658
659,{1048576021,256004}
660
[639]661,{20,0}
[649]662
663,{1048576021,256001}
664
[639]665,{20,0}
[649]666
667,{262144021,128003}
668
[639]669,{20,0}
[649]670
671,{262144021,128001}
672
673,{262144021,128001}
674
[639]675,{20,0}
[649]676
677,{1048576021,256257}
678
679,{1048576021,256003}
680
681,{262144021,128001}
682
683,{262144789,128001}
684
685,{262144021,128001}
686
687,{100663317,256002}
688
689,{100716053,155650}
690
691,{1048576277,256003}
692
[639]693,{20,0}
[649]694
695,{1024021,0}
696
697,{262165,0}
698
699,{65557,0}
700
701,{1024020,0}
702
[639]703},{
[649]704
705{4,16,21,1}
706
707,{4,13,21,1}
708
709,{4,20,21,1}
710
711,{4,20,21,1}
712
713,{4,0,21,0}
714
715,{4,0,21,0}
716
[639]717},{
[649]718
719{24,21,1,3,0,24,21}
720
[639]721,{1,9,1,0,0,0,0}
[649]722
[639]723,{1,9,1,0,0,0,0}
[649]724
725,{34,9,1,6,65326,0,30}
726
727},{108,129,3,5,88,104,126,0}
728
[639]729#endif
[649]730
[637]731/*fin_reglage*/
732
[649]733
734
735
736
[637]737},{
738
[649]739
740
[637]741/*debut reglage 1 */
[649]742
[639]743#ifdef programme
[649]744
745{32,76,8,1},{
746
[639]747{20,0}
[649]748
749,{1311522837,256000}
750
751,{1048576021,256004}
752
[637]753,{20,0}
[649]754
755,{1048576021,256001}
756
[637]757,{20,0}
[649]758
759,{262144021,128003}
760
[639]761,{20,0}
[649]762
763,{262144021,128001}
764
765,{262144021,128001}
766
[639]767,{20,0}
[649]768
769,{1048576021,256257}
770
771,{1048576021,256003}
772
773,{262144021,128001}
774
775,{262144789,128001}
776
777,{262144021,128001}
778
779,{100663317,256002}
780
781,{100716053,155650}
782
783,{1048576277,256003}
784
[639]785,{20,0}
[649]786
787,{1024021,0}
788
789,{262165,0}
790
791,{65557,0}
792
793,{1024020,0}
794
[637]795},{
[649]796
797{1,21,16,4}
798
799,{1,21,13,4}
800
801,{1,21,20,4}
802
803,{1,21,20,4}
804
805,{0,21,0,4}
806
807,{0,21,0,4}
808
[637]809},{
[649]810
811{3,1,21,24,21,24,0}
812
[637]813,{0,1,9,1,0,0,0}
[649]814
[637]815,{0,1,9,1,0,0,0}
[649]816
817,{6,1,9,34,30,0,65326}
818
819},{5,3,129,108,0,126,104,88}
820
[639]821#else
[649]822
823{1,8,76,32},{
824
[639]825{20,0}
[649]826
827,{1311522837,256000}
828
829,{1048576021,256004}
830
[639]831,{20,0}
[649]832
833,{1048576021,256001}
834
[639]835,{20,0}
[649]836
837,{262144021,128003}
838
[639]839,{20,0}
[649]840
841,{262144021,128001}
842
843,{262144021,128001}
844
[639]845,{20,0}
[649]846
847,{1048576021,256257}
848
849,{1048576021,256003}
850
851,{262144021,128001}
852
853,{262144789,128001}
854
855,{262144021,128001}
856
857,{100663317,256002}
858
859,{100716053,155650}
860
861,{1048576277,256003}
862
[639]863,{20,0}
[649]864
865,{1024021,0}
866
867,{262165,0}
868
869,{65557,0}
870
871,{1024020,0}
872
[639]873},{
[649]874
875{4,16,21,1}
876
877,{4,13,21,1}
878
879,{4,20,21,1}
880
881,{4,20,21,1}
882
883,{4,0,21,0}
884
885,{4,0,21,0}
886
[639]887},{
[649]888
889{24,21,1,3,0,24,21}
890
[639]891,{1,9,1,0,0,0,0}
[649]892
[639]893,{1,9,1,0,0,0,0}
[649]894
895,{34,9,1,6,65326,0,30}
896
897},{108,129,3,5,88,104,126,0}
898
[639]899#endif
[649]900
[637]901/*fin_reglage*/
902
[649]903
904
[637]905},{
906
[649]907
908
[637]909/*debut reglage 2 */
[649]910
[639]911#ifdef programme
[649]912
913{32,76,8,1},{
914
915{20,0}
916
917,{100721941,256000}
918
919,{1048607509,256004}
920
921,{20,0}
922
923,{1048586773,256003}
924
925,{20,0}
926
927,{50335509,128001}
928
929,{20,0}
930
931,{50331669,128001}
932
933,{50336789,128001}
934
935,{20,0}
936
937,{1048622101,256259}
938
939,{1048635413,256003}
940
941,{50331669,128001}
942
943,{50352661,128001}
944
945,{50337813,128001}
946
947,{100665109,256002}
948
949,{100664597,155650}
950
951,{1048600341,256003}
952
953,{20,0}
954
955,{1024021,0}
956
957,{65557,0}
958
959,{65557,0}
960
961,{262165,0}
962
[637]963},{
[649]964
965{1,21,11,4}
966
967,{1,21,13,4}
968
969,{1,21,20,4}
970
971,{1,21,20,4}
972
973,{0,20,0,1}
974
975,{0,20,0,1}
976
[637]977},{
[649]978
979{3,1,21,24,21,24,0}
980
981,{0,1,9,1,0,0,0}
982
983,{0,1,9,1,0,0,0}
984
985,{6,17,0,34,30,0,65386}
986
987},{5,3,129,108,0,126,104,88}
988
[639]989#else
[649]990
991{1,8,76,32},{
992
993{20,0}
994
995,{100721941,256000}
996
997,{1048607509,256004}
998
999,{20,0}
1000
1001,{1048586773,256003}
1002
1003,{20,0}
1004
1005,{50335509,128001}
1006
1007,{20,0}
1008
1009,{50331669,128001}
1010
1011,{50336789,128001}
1012
1013,{20,0}
1014
1015,{1048622101,256259}
1016
1017,{1048635413,256003}
1018
1019,{50331669,128001}
1020
1021,{50352661,128001}
1022
1023,{50337813,128001}
1024
1025,{100665109,256002}
1026
1027,{100664597,155650}
1028
1029,{1048600341,256003}
1030
1031,{20,0}
1032
1033,{1024021,0}
1034
1035,{65557,0}
1036
1037,{65557,0}
1038
1039,{262165,0}
1040
[639]1041},{
[649]1042
1043{4,11,21,1}
1044
1045,{4,13,21,1}
1046
1047,{4,20,21,1}
1048
1049,{4,20,21,1}
1050
1051,{1,0,20,0}
1052
1053,{1,0,20,0}
1054
[639]1055},{
[649]1056
1057{24,21,1,3,0,24,21}
1058
1059,{1,9,1,0,0,0,0}
1060
1061,{1,9,1,0,0,0,0}
1062
1063,{34,0,17,6,65386,0,30}
1064
1065},{108,129,3,5,88,104,126,0}
1066
[639]1067#endif
[649]1068
[637]1069/*fin_reglage*/
1070
[649]1071
1072
[637]1073},{
1074
[649]1075
1076
[637]1077/*debut reglage 3 */
[649]1078
[639]1079#ifdef programme
[649]1080
1081{32,76,8,1},{
1082
[639]1083{20,0}
[649]1084
1085,{100721941,256000}
1086
1087,{1048607509,256004}
1088
[637]1089,{20,0}
[649]1090
1091,{1048586773,256003}
1092
[637]1093,{20,0}
[649]1094
1095,{524291861,128001}
1096
[639]1097,{20,0}
[649]1098
1099,{524288021,128001}
1100
1101,{524293141,128001}
1102
[639]1103,{20,0}
[649]1104
1105,{1048622101,256259}
1106
1107,{1048635413,256003}
1108
1109,{524288021,128001}
1110
1111,{524309013,128001}
1112
1113,{524294165,128001}
1114
1115,{100665109,256002}
1116
1117,{100664597,155650}
1118
1119,{1048600341,256003}
1120
[639]1121,{20,0}
[649]1122
1123,{1024021,0}
1124
1125,{65557,0}
1126
1127,{65557,0}
1128
1129,{65557,0}
1130
[637]1131},{
[649]1132
1133{1,21,18,4}
1134
1135,{1,21,13,4}
1136
1137,{1,21,20,4}
1138
1139,{1,21,20,4}
1140
1141,{0,20,0,1}
1142
1143,{0,20,0,1}
1144
[637]1145},{
[649]1146
1147{3,1,21,24,21,24,0}
1148
[639]1149,{0,1,9,1,0,0,0}
[649]1150
[639]1151,{0,1,9,1,0,0,0}
[649]1152
1153,{6,17,0,34,30,0,65386}
1154
1155},{5,3,129,108,0,126,104,88}
1156
[639]1157#else
[649]1158
1159{1,8,76,32},{
1160
[639]1161{20,0}
[649]1162
1163,{100721941,256000}
1164
1165,{1048607509,256004}
1166
[639]1167,{20,0}
[649]1168
1169,{1048586773,256003}
1170
[639]1171,{20,0}
[649]1172
1173,{524291861,128001}
1174
[639]1175,{20,0}
[649]1176
1177,{524288021,128001}
1178
1179,{524293141,128001}
1180
[639]1181,{20,0}
[649]1182
1183,{1048622101,256259}
1184
1185,{1048635413,256003}
1186
1187,{524288021,128001}
1188
1189,{524309013,128001}
1190
1191,{524294165,128001}
1192
1193,{100665109,256002}
1194
1195,{100664597,155650}
1196
1197,{1048600341,256003}
1198
[639]1199,{20,0}
[649]1200
1201,{1024021,0}
1202
1203,{65557,0}
1204
1205,{65557,0}
1206
1207,{65557,0}
1208
[639]1209},{
[649]1210
1211{4,18,21,1}
1212
1213,{4,13,21,1}
1214
1215,{4,20,21,1}
1216
1217,{4,20,21,1}
1218
1219,{1,0,20,0}
1220
1221,{1,0,20,0}
1222
[639]1223},{
[649]1224
1225{24,21,1,3,0,24,21}
1226
[639]1227,{1,9,1,0,0,0,0}
[649]1228
[639]1229,{1,9,1,0,0,0,0}
[649]1230
1231,{34,0,17,6,65386,0,30}
1232
1233},{108,129,3,5,88,104,126,0}
1234
[639]1235#endif
[649]1236
[637]1237/*fin_reglage*/
1238
[649]1239
1240
[637]1241},{
1242
[649]1243
1244
[637]1245/*debut reglage 4 */
[649]1246
[639]1247#ifdef programme
[649]1248
1249{39,62,9,1},{
1250
[639]1251{20,0}
[649]1252
1253,{-100659180,229382}
1254
1255,{-100659436,294918}
1256
[637]1257,{20,0}
[649]1258
1259,{-100663276,221189}
1260
1261,{-100663276,5}
1262
1263,{-100659436,245762}
1264
1265,{-100663276,5}
1266
1267,{-100658154,245761}
1268
1269,{-100658156,253954}
1270
[637]1271,{20,0}
[649]1272
1273,{-100663276,204805}
1274
1275,{-100663276,16389}
1276
1277,{-100656874,1}
1278
1279,{-100656874,16385}
1280
1281,{-100663276,3}
1282
1283,{-100506347,6}
1284
1285,{-100509675,6}
1286
1287,{-100372972,6}
1288
1289,{2097174,0}
1290
[639]1291,{1024022,0}
[649]1292
1293,{16406,0}
1294
1295,{4117,0}
1296
1297,{262164,0}
1298
[639]1299},{
[649]1300
1301{2,22,24,1}
1302
1303,{1,20,24,4}
1304
1305,{0,20,24,4}
1306
1307,{0,20,24,3}
1308
1309,{0,20,24,4}
1310
1311,{0,20,24,4}
1312
[639]1313},{
[649]1314
[639]1315{0,1,9,1,0,0,0}
[649]1316
[639]1317,{0,1,9,1,0,0,0}
[649]1318
[639]1319,{0,1,9,1,0,0,0}
[649]1320
[639]1321,{0,1,9,1,0,0,0}
[649]1322
1323},{2,3,129,108,2,126,104,88}
1324
[639]1325#else
[649]1326
1327{1,9,62,39},{
1328
[639]1329{20,0}
[649]1330
1331,{-100659180,229382}
1332
1333,{-100659436,294918}
1334
[639]1335,{20,0}
[649]1336
1337,{-100663276,221189}
1338
1339,{-100663276,5}
1340
1341,{-100659436,245762}
1342
1343,{-100663276,5}
1344
1345,{-100658154,245761}
1346
1347,{-100658156,253954}
1348
[639]1349,{20,0}
[649]1350
1351,{-100663276,204805}
1352
1353,{-100663276,16389}
1354
1355,{-100656874,1}
1356
1357,{-100656874,16385}
1358
1359,{-100663276,3}
1360
1361,{-100506347,6}
1362
1363,{-100509675,6}
1364
1365,{-100372972,6}
1366
1367,{2097174,0}
1368
[639]1369,{1024022,0}
[649]1370
1371,{16406,0}
1372
1373,{4117,0}
1374
1375,{262164,0}
1376
[639]1377},{
[649]1378
1379{1,24,22,2}
1380
1381,{4,24,20,1}
1382
1383,{4,24,20,0}
1384
1385,{3,24,20,0}
1386
1387,{4,24,20,0}
1388
1389,{4,24,20,0}
1390
[639]1391},{
[649]1392
[639]1393{1,9,1,0,0,0,0}
[649]1394
[639]1395,{1,9,1,0,0,0,0}
[649]1396
[639]1397,{1,9,1,0,0,0,0}
[649]1398
[639]1399,{1,9,1,0,0,0,0}
[649]1400
1401},{108,129,3,2,88,104,126,2}
1402
[639]1403#endif
[649]1404
[639]1405/*fin_reglage*/
1406
[649]1407
1408
[639]1409},{
1410
[649]1411
1412
[639]1413/*debut reglage 5 */
[649]1414
[639]1415#ifdef programme
[649]1416
1417{39,68,9,1},{
1418
1419{20,0}
1420
1421,{1048982293,229382}
1422
1423,{1049128469,253958}
1424
1425,{20,0}
1426
1427,{1048966677,245765}
1428
1429,{20,0}
1430
1431,{262157846,245762}
1432
1433,{1048919829,5}
1434
1435,{262156054,245761}
1436
1437,{262154006,253954}
1438
1439,{20,0}
1440
1441,{1049123349,229381}
1442
1443,{1049157141,237573}
1444
1445,{262154262,1}
1446
1447,{262158614,16385}
1448
1449,{262149654,3}
1450
1451,{262750740,237572}
1452
1453,{262606612,122884}
1454
1455,{-1174095083,139270}
1456
1457,{20,0}
1458
1459,{16406,0}
1460
1461,{16406,0}
1462
1463,{4117,0}
1464
1465,{262164,0}
1466
[637]1467},{
[649]1468
1469{1,22,16,1}
1470
1471,{1,22,16,4}
1472
1473,{1,22,16,4}
1474
1475,{1,20,16,3}
1476
1477,{1,21,20,4}
1478
1479,{1,21,20,4}
1480
[637]1481},{
[649]1482
1483{0,1,9,1,0,0,0}
1484
1485,{0,1,9,1,0,0,0}
1486
1487,{0,1,9,1,0,0,0}
1488
1489,{0,1,9,1,0,0,0}
1490
1491},{2,3,129,108,3,126,104,88}
1492
[639]1493#else
[649]1494
1495{1,9,68,39},{
1496
1497{20,0}
1498
1499,{1048982293,229382}
1500
1501,{1049128469,253958}
1502
1503,{20,0}
1504
1505,{1048966677,245765}
1506
1507,{20,0}
1508
1509,{262157846,245762}
1510
1511,{1048919829,5}
1512
1513,{262156054,245761}
1514
1515,{262154006,253954}
1516
1517,{20,0}
1518
1519,{1049123349,229381}
1520
1521,{1049157141,237573}
1522
1523,{262154262,1}
1524
1525,{262158614,16385}
1526
1527,{262149654,3}
1528
1529,{262750740,237572}
1530
1531,{262606612,122884}
1532
1533,{-1174095083,139270}
1534
1535,{20,0}
1536
1537,{16406,0}
1538
1539,{16406,0}
1540
1541,{4117,0}
1542
1543,{262164,0}
1544
[639]1545},{
[649]1546
1547{1,16,22,1}
1548
1549,{4,16,22,1}
1550
1551,{4,16,22,1}
1552
1553,{3,16,20,1}
1554
1555,{4,20,21,1}
1556
1557,{4,20,21,1}
1558
[639]1559},{
[649]1560
1561{1,9,1,0,0,0,0}
1562
1563,{1,9,1,0,0,0,0}
1564
1565,{1,9,1,0,0,0,0}
1566
1567,{1,9,1,0,0,0,0}
1568
1569},{108,129,3,2,88,104,126,3}
1570
[639]1571#endif
[649]1572
[637]1573/*fin_reglage*/
1574
[649]1575
1576
[637]1577},{
1578
[649]1579
1580
[639]1581/*debut reglage 6 */
[649]1582
[639]1583#ifdef programme
[649]1584
[643]1585{197,191,175,185},{
[649]1586
[639]1587{0,0}
[649]1588
[637]1589,{0,0}
[649]1590
[637]1591,{0,0}
[649]1592
[637]1593,{0,0}
[649]1594
[637]1595,{0,0}
[649]1596
[637]1597,{0,0}
[649]1598
[637]1599,{0,0}
[649]1600
[639]1601,{0,0}
[649]1602
[639]1603,{0,0}
[649]1604
[639]1605,{0,0}
[649]1606
[639]1607,{0,0}
[649]1608
[639]1609,{0,0}
[649]1610
[639]1611,{0,0}
[649]1612
[639]1613,{0,0}
[649]1614
[639]1615,{0,0}
[649]1616
[639]1617,{0,0}
[649]1618
[639]1619,{0,0}
[649]1620
[639]1621,{0,0}
[649]1622
[639]1623,{0,0}
[649]1624
[639]1625,{0,0}
[649]1626
[639]1627,{0,0}
[649]1628
[639]1629,{0,0}
[649]1630
[639]1631,{0,0}
[649]1632
[639]1633,{0,0}
[649]1634
[637]1635},{
[649]1636
[639]1637{106,98,93,71}
[649]1638
[639]1639,{66,74,87,66}
[649]1640
[639]1641,{48,46,38,33}
[649]1642
[639]1643,{40,41,33,26}
[649]1644
[639]1645,{25,29,40,57}
[649]1646
[639]1647,{63,62,71,80}
[649]1648
[637]1649},{
[649]1650
[639]1651{83,79,75,75,92,112,31100}
[649]1652
[639]1653,{125,126,117,113,107,94,20315}
[649]1654
[639]1655,{108,116,122,124,117,120,32117}
[649]1656
[639]1657,{110,99,94,98,107,93,17217}
[649]1658
[639]1659},{88,82,94,108,111,126,104,88}
[649]1660
[639]1661#else
[649]1662
[643]1663{185,175,191,197},{
[649]1664
[639]1665{0,0}
[649]1666
[639]1667,{0,0}
[649]1668
[639]1669,{0,0}
[649]1670
[639]1671,{0,0}
[649]1672
[639]1673,{0,0}
[649]1674
[639]1675,{0,0}
[649]1676
[639]1677,{0,0}
[649]1678
[639]1679,{0,0}
[649]1680
[639]1681,{0,0}
[649]1682
[639]1683,{0,0}
[649]1684
[639]1685,{0,0}
[649]1686
[639]1687,{0,0}
[649]1688
[639]1689,{0,0}
[649]1690
[639]1691,{0,0}
[649]1692
[639]1693,{0,0}
[649]1694
[639]1695,{0,0}
[649]1696
[639]1697,{0,0}
[649]1698
[639]1699,{0,0}
[649]1700
[639]1701,{0,0}
[649]1702
[639]1703,{0,0}
[649]1704
[639]1705,{0,0}
[649]1706
[639]1707,{0,0}
[649]1708
[639]1709,{0,0}
[649]1710
[639]1711,{0,0}
[649]1712
[639]1713},{
[649]1714
[639]1715{71,93,98,106}
[649]1716
[639]1717,{66,87,74,66}
[649]1718
[639]1719,{33,38,46,48}
[649]1720
[639]1721,{26,33,41,40}
[649]1722
[639]1723,{57,40,29,25}
[649]1724
[639]1725,{80,71,62,63}
[649]1726
[639]1727},{
[649]1728
[639]1729{75,75,79,83,31100,112,92}
[649]1730
[639]1731,{113,117,126,125,20315,94,107}
[649]1732
[639]1733,{124,122,116,108,32117,120,117}
[649]1734
[639]1735,{98,94,99,110,17217,93,107}
[649]1736
[639]1737},{108,94,82,88,88,104,126,111}
[649]1738
[639]1739#endif
[649]1740
[637]1741/*fin_reglage*/
1742
[649]1743
1744
[637]1745},{
1746
[649]1747
1748
[637]1749/*debut reglage 7 */
[649]1750
[639]1751#ifdef programme
[649]1752
[643]1753{197,191,175,185},{
[649]1754
[639]1755{0,0}
[649]1756
[639]1757,{0,0}
[649]1758
[639]1759,{0,0}
[649]1760
[639]1761,{0,0}
[649]1762
[639]1763,{0,0}
[649]1764
[639]1765,{0,0}
[649]1766
[639]1767,{0,0}
[649]1768
[639]1769,{0,0}
[649]1770
[639]1771,{0,0}
[649]1772
[639]1773,{0,0}
[649]1774
[639]1775,{0,0}
[649]1776
[639]1777,{0,0}
[649]1778
[639]1779,{0,0}
[649]1780
[639]1781,{0,0}
[649]1782
[639]1783,{0,0}
[649]1784
[639]1785,{0,0}
[649]1786
[639]1787,{0,0}
[649]1788
[639]1789,{0,0}
[649]1790
[639]1791,{0,0}
[649]1792
[639]1793,{0,0}
[649]1794
[639]1795,{0,0}
[649]1796
[639]1797,{0,0}
[649]1798
[639]1799,{0,0}
[649]1800
[639]1801,{0,0}
[649]1802
[639]1803},{
[649]1804
[639]1805{106,98,93,71}
[649]1806
[639]1807,{66,74,87,66}
[649]1808
[639]1809,{48,46,38,33}
[649]1810
[639]1811,{40,41,33,26}
[649]1812
[639]1813,{25,29,40,57}
[649]1814
[639]1815,{63,62,71,80}
[649]1816
[639]1817},{
[649]1818
[639]1819{83,79,75,75,92,112,31100}
[649]1820
[639]1821,{125,126,117,113,107,94,20315}
[649]1822
[639]1823,{108,116,122,124,117,120,32117}
[649]1824
[639]1825,{110,99,94,98,107,93,17217}
[649]1826
[639]1827},{88,82,94,108,111,126,104,88}
[649]1828
[639]1829#else
[649]1830
[643]1831{185,175,191,197},{
[649]1832
[639]1833{0,0}
[649]1834
[639]1835,{0,0}
[649]1836
[639]1837,{0,0}
[649]1838
[639]1839,{0,0}
[649]1840
[639]1841,{0,0}
[649]1842
[639]1843,{0,0}
[649]1844
[639]1845,{0,0}
[649]1846
[639]1847,{0,0}
[649]1848
[639]1849,{0,0}
[649]1850
[639]1851,{0,0}
[649]1852
[639]1853,{0,0}
[649]1854
[639]1855,{0,0}
[649]1856
[639]1857,{0,0}
[649]1858
[639]1859,{0,0}
[649]1860
[639]1861,{0,0}
[649]1862
[639]1863,{0,0}
[649]1864
[639]1865,{0,0}
[649]1866
[639]1867,{0,0}
[649]1868
[639]1869,{0,0}
[649]1870
[639]1871,{0,0}
[649]1872
[639]1873,{0,0}
[649]1874
[639]1875,{0,0}
[649]1876
[639]1877,{0,0}
[649]1878
[639]1879,{0,0}
[649]1880
[639]1881},{
[649]1882
[639]1883{71,93,98,106}
[649]1884
[639]1885,{66,87,74,66}
[649]1886
[639]1887,{33,38,46,48}
[649]1888
[639]1889,{26,33,41,40}
[649]1890
[639]1891,{57,40,29,25}
[649]1892
[639]1893,{80,71,62,63}
[649]1894
[639]1895},{
[649]1896
[639]1897{75,75,79,83,31100,112,92}
[649]1898
[639]1899,{113,117,126,125,20315,94,107}
[649]1900
[639]1901,{124,122,116,108,32117,120,117}
[649]1902
[639]1903,{98,94,99,110,17217,93,107}
[649]1904
[639]1905},{108,94,82,88,88,104,126,111}
[649]1906
[639]1907#endif
[649]1908
[637]1909/*fin_reglage*/
1910
[649]1911
1912
[637]1913} };
1914
[649]1915
1916
1917
[637]1918
1919
1920
[649]1921
1922
[637]1923int calcul_somme_block(block_type_modele* blk,int longueur)
[649]1924
[637]1925{
[649]1926
[637]1927int i,so=0;;
[649]1928
[637]1929for(i=0;i<(longueur/4-4);i++) so^=(int)blk->mot[i];
[649]1930
[637]1931/* somme sur tous les mots internes : on exclus le dbut, les codes et la fin */
[649]1932
[637]1933return((so^(so>>16))&0xffff);
[649]1934
[637]1935}
1936
1937
1938
1939
[649]1940
1941
1942
1943
1944
[637]1945void valide_block(block_type_modele* blk,int type,int block_num)
[649]1946
[637]1947{
[649]1948
[637]1949int somme,longueur;
[649]1950
[637]1951def_long_block
[649]1952
[637]1953longueur=long_block[type];
[649]1954
[637]1955/*printf("valide block adresse %x type %d numblock %d longueur=%d \n" */
[649]1956
[637]1957/* ,(unsigned)blk,type,block_num,longueur);*/
[649]1958
[637]1959blk->debut = debut_block_mesure;
[649]1960
1961somme=0;blk->code1 = (((long)longueur)<<16) | somme;
1962
[637]1963blk->code2 = (((long)block_num) & 0xffffff ) | ( (((long)type)<<24)&0xff000000 );
1964
[649]1965
1966
[637]1967blk->mot[longueur/4-4] = fin_block_mesure;
[649]1968
1969
1970
1971#if defined(_ECC_LIB_H_)
1972
1973{
1974
1975int place_ecc;
1976
1977place_ecc=(longueur-4-ECC_SIZE-SIZE_HEAD-((longueur-4-SIZE_HEAD)/ECC_TOTAL)*ECC_SIZE)/4;
1978
1979SetEcc( blk, (unsigned char *) &(blk->mot[place_ecc] ) ) ;
1980
1981}
1982
1983#endif
1984
1985
1986
[637]1987somme=calcul_somme_block(blk,longueur);
[649]1988
[637]1989blk->code1 = (((long)longueur)<<16) | somme;
[649]1990
1991/* l'ecc est faux car on a change la somme: mettre la somme a zero avant de tester ecc */
1992
[637]1993}
1994
1995
1996
[649]1997/* Quand on est sur une machine swappee, on ne cherche pas a verifier */
[637]1998
[649]1999/* le checksum, puisqu'on a modifie les blocs, sans swapper par exemple */
2000
2001/* les chars des noms de bolometres et des chaines GPS... */
2002
2003#ifdef __alpha
2004
2005#define SWAP
2006
2007#endif
2008
2009#if defined(Linux) || defined(linux)
2010
2011#define SWAP
2012
2013#endif
2014
2015
2016
2017
2018
2019
2020
[637]2021int verifie_block(block_type_modele* blk)
[649]2022
[637]2023{
[649]2024
[637]2025int type,lg,som;
[649]2026
[637]2027def_long_block
[649]2028
[637]2029if(blk->debut != debut_block_mesure) return(block_debut_erreur);
[649]2030
[637]2031type=type_block(blk); if( (type<0) ||(type>=nb_type_blocks) ) return(block_type_inconnu);
[649]2032
[637]2033lg=longueur_block(blk); if( lg != long_block[type] ) return(block_longueur_erreur);
[649]2034
[637]2035if( blk->mot[(lg/4)-4] != fin_block_mesure) return(block_fin_erreur);
[649]2036
2037#ifndef SWAP
2038
[637]2039som=calcul_somme_block(blk,lg); if( som!= somme_block(blk)) return(block_somme_erreur);
[649]2040
2041#endif
2042
[637]2043return(block_correct);
[649]2044
[637]2045}
2046
2047
[649]2048
2049
2050
[637]2051int verifie_block_printf(block_type_modele* blk)
[649]2052
[637]2053{
[649]2054
[637]2055int type,lg,som;
[649]2056
[637]2057def_long_block
[649]2058
[637]2059def_nom_block
[649]2060
[637]2061if(blk->debut != debut_block_mesure)
[649]2062
[637]2063 {
[649]2064
[637]2065 printf(" erreur dans le code debut de block \n");
[649]2066
[637]2067 return(block_debut_erreur);
[649]2068
[637]2069 }
2070
[649]2071
2072
[637]2073type=type_block(blk);
[649]2074
[637]2075if( (type<0) || (type>nb_type_blocks) )
[649]2076
[637]2077 {
[649]2078
[637]2079 printf(" block de type %d inconnu\n",type);
[649]2080
[637]2081 return(block_type_inconnu);
[649]2082
[637]2083 }
2084
[649]2085
2086
[637]2087lg=longueur_block(blk);
[649]2088
[637]2089if( lg!=long_block[type] )
[649]2090
[637]2091 {
[649]2092
[637]2093 printf(" block type %s erreur de longueur (nominal=%d , dans le block=%d \n"
[649]2094
[637]2095 ,nom_block[type],long_block[type],lg);
[649]2096
[637]2097 return(block_longueur_erreur);
[649]2098
[637]2099 }
2100
[649]2101
2102
[637]2103som=calcul_somme_block(blk,lg);
[649]2104
[637]2105if( som!=somme_block(blk) )
[649]2106
[637]2107 {
[649]2108
[637]2109 printf(" block type %s : erreur de somme (calculee=%d , dans le block=%d \n"
[649]2110
[637]2111 ,nom_block[type],som,somme_block(blk) );
[649]2112
[637]2113 return(block_somme_erreur);
[649]2114
[637]2115 }
[649]2116
[637]2117
[649]2118
[637]2119if(blk->mot[(lg/4)-4] != fin_block_mesure)
[649]2120
[637]2121 {
[649]2122
[637]2123 printf(" block type %s erreur de code fin de block : trouve %x au lieu de %x \n"
[649]2124
[637]2125 ,nom_block[type],(int)blk->mot[(lg/4)-4],fin_block_mesure);
[649]2126
[637]2127 return(block_fin_erreur);
[649]2128
[637]2129 }
2130
[649]2131
2132
[637]2133return(block_correct);
[649]2134
[637]2135}
2136
2137
2138
2139
2140
[649]2141
2142
2143
2144
2145
2146
Note: See TracBrowser for help on using the repository browser.