]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
removed half-sector bug reported by Jurek, maximal length of ipc-subevent unknown, mt
authorhadaq <hadaq>
Tue, 1 Oct 2002 10:36:33 +0000 (10:36 +0000)
committerhadaq <hadaq>
Tue, 1 Oct 2002 10:36:33 +0000 (10:36 +0000)
hadaq/hwship.c

index ff626a48890da736b7b0f41f045bf95c2af63cd7..854ef9982d0a6b2666002bc10afda797eceb765d 100644 (file)
@@ -1,4 +1,4 @@
-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwship.c,v 6.21 2002-10-01 09:07:26 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/Attic/hwship.c,v 6.22 2002-10-01 10:36:33 hadaq Exp $";
 
 #include <assert.h>
 #include <string.h>
@@ -92,14 +92,15 @@ int HwShip_readSubEvt(HwShip *my, void *subEvt)
   my->currAddr = lastAddr;
 
   /* skip empty subevent, nobody will realize this */
-#if 0
+#if 1
   if (size <= SHIP_NODATASIZE) return 1;
 #endif 
 
   /* copy one sub evt from RC to memory */
   *data++ = size;
   i=0;
-  while (  ( (currAddr+=4) < lastAddr) && ( i < 400 ) ) {
+  /* we are not sure what the maximum number of words is allowed in the ipcs*/
+  while (  ( (currAddr+=4) < lastAddr) && ( i < 0x1600 ) ) {
        *data++ = LVme_getL(my->lvme, currAddr);
        i++;
   }
@@ -107,10 +108,10 @@ int HwShip_readSubEvt(HwShip *my, void *subEvt)
   if(size > 0x1900) {
     syslog(LOG_ERR,"Error, size too large: %.8x", size);
 
-    tempPtr = data-400;
+    tempPtr = data-0x1600;
   
     str[0] = 0;
-    for(i=0;i < 400; i++) {
+    for(i=0;i < 100; i++) {
       sprintf(buff, "%.8x   ", tempPtr[i]);
       strcpy((char *) ((unsigned int)str + strlen(str)) , buff);
       if( ((i+1)%4) == 0) {
@@ -122,15 +123,9 @@ int HwShip_readSubEvt(HwShip *my, void *subEvt)
       syslog(LOG_ERR, str);
       str[0] = 0;
     }
-    
-
-
-
   }
 
 
-
-
 #ifndef NDEBUG
        syslog(LOG_DEBUG, "subEvt: %s", SubEvt_2charP(subEvt));
 #endif