/[PAMELA software]/yoda/techmodel/forroutines/calorimeter/fillin.c
ViewVC logotype

Contents of /yoda/techmodel/forroutines/calorimeter/fillin.c

Parent Directory Parent Directory | Revision Log Revision Log


Revision 3.0 - (show annotations) (download)
Fri Mar 4 15:54:11 2005 UTC (19 years, 10 months ago) by kusanagi
Branch: MAIN
Changes since 2.4: +0 -0 lines
File MIME type: text/plain
Error proof version.
Implemented all detectors packets plus all the main telemetries packets.
Missing all the Init and Alarm packets.
Disabled CRC control on VarDump, ArrDump, TabDump for CPU debugging needs
(the data formats seems correct even if CRC get wrong)

1 /***************************************************************
2 *
3 * change the buffer from bytes to words to read the calorimeter
4 *
5 ***************************************************************/
6 //
7 // Version 1.00 (2005-02-23)
8 //
9 // Changelog:
10 //
11 // calpulse didn't work, fixed hoping wihtout troubles in the other routines
12 //
13 /*
14 * include needed system headers
15 */
16 #include <stdio.h> /* include standard i/o library */
17 #include <stdlib.h> /* include standard library */
18 #include <string.h> /* include string library */
19 #include <unistd.h> /* include unix standard library */
20 #include <sys/types.h> /* */
21 #include <sys/stat.h> /* */
22 #include <fcntl.h> /* */
23 #include <errno.h> /* error simbol definitions */
24 #include <time.h> /* system time definitions */
25 #include <math.h> /* math library */
26
27 void fillin_(int *m, int *lunga, int *lleng, int *lung, int *pari, short int *vect, char *vecta)
28 {
29 int i = 1;
30 int mleng;
31 char tempv[*lung];
32 char tempv2[*lung];
33 memcpy(&tempv, &*vecta+*m-1, *lung-*m+1);
34 while ( i <= *lung ) {
35 if ( i < *lung+1 ) {
36 tempv2[i-1]=tempv[i];
37 tempv2[i]=tempv[i-1];
38 };
39 i = i + 2;
40 };
41 *lleng = 0;
42 memcpy(&*vect, &tempv2, (*lunga-*lleng)*2);
43 }
44
45
46
47
48
49
50
51
52
53

  ViewVC Help
Powered by ViewVC 1.1.23