]> jspc29.x-matter.uni-frankfurt.de Git - trbnettools.git/commitdiff
error code update
authorhadaq <hadaq>
Mon, 11 Jan 2010 10:59:40 +0000 (10:59 +0000)
committerhadaq <hadaq>
Mon, 11 Jan 2010 10:59:40 +0000 (10:59 +0000)
libtrbnet/trberror.c
libtrbnet/trbnet.c

index e1381fc8c4649fed550e69d7cd002d23f076a2db..47806f3226c96cb8d02ebeffe3825d375c8ee717 100644 (file)
@@ -80,30 +80,22 @@ const char* trb_strterm(TRB_TERM term)
     "Ch0_TrigMissing: timing trigger missing",       /* status */
     "",
     "",
-    "",
-    "",
-    "",
-    "",
-    "Ch0_BufferHalfFull: data-buffers half full",    /* status */
+    "Ch0_BuffersHalfFull: data-buffers half full",   /* status */
     "Ch0_BuffersFull: data-buffers almost full",     /* status */
     "Ch0_NotConfigured: endpoint is not configured", /* status */
-    "", "", "", "", ""
+    "", "", "", "", "", "", "", "", ""
   };
   
   static const char ch1StatusBits[16][64] = {  
-    "Ch1_TrigNum: trigger number mismatch",          /* status */
+    "Ch1_EvtNum: data stream event number mismatch", /* status */
     "Ch1_TrigCode: trigger code / random mismatch",  /* status */
-    "Ch1_Length: wrong length",                      /* status */
+    "Ch1_Length: invalid length",                    /* status */
     "Ch1_NoAnswer: answer missing",                  /* status */
-    "",                                              
-    "",                                              
-    "",                                              
-    "",                                              
-    "Ch1_NotFound: sent trigger number mismatch",    /* status */
+    "Ch1_NotFound: requested event number mismatch", /* status */
     "Ch1_DataMissing: parts of the data are missing",/* status */ 
     "Ch1_Sync: serious sync problem detected",       /* status */
     "Ch1_EvtBroken: event data corrupted",           /* status */
-    "", "", "", ""
+    "", "", "", "", "", "", "", ""
   };
 
   static const char ch2StatusBits[16][64] = {
index 3bb63da2dc7d74c2df5b970197e9ba56a8fea369..5739c1a457b7144b37bbabc94dc221defc6b7f48 100644 (file)
@@ -1,4 +1,4 @@
-const char trbnet_version[] = "$Revision: 2.55 $";
+const char trbnet_version[] = "$Revision: 2.56 $";
 
 #include <stdio.h>
 #include <stdlib.h>
@@ -164,31 +164,37 @@ typedef enum {
   Status_C_WordMiss = 2,                 /* word missing,        */
   Status_C_Checksum = 3,                 /* checksum error,      */
   Status_C_DontKnow = 4,                 /* dont understand,     */
-  Status_C_BufferMatch = 5               /* buffer mismatch      */
+  Status_C_BufferMisMatch = 5,           /* buffer mismatch      */
+  Status_C_AnswerMissing = 6            /* answer missing        */
 } Status_Common;
 
 typedef enum {
   Status_Ch0_TrigCtr = 0,                /* trigger counter mismatch */
+  Status_Ch0_TrigMiss = 1,               /* timing trigger missing   */
   Status_Ch0_BufferHalfFull = 4,         /* buffers half full        */
-  Status_Ch0_BuffersFull = 5             /* buffers almost full      */
+  Status_Ch0_BuffersFull = 5,            /* buffers almost full      */
+  Status_Ch0_NotConfig = 6               /* not configured           */
 } Status_CH0;
 
 typedef enum {
-  Status_Ch1_TrigNum = 0,                /* trigger number mismatch         */
+  Status_Ch1_EvtNum = 0,                 /* event number mismatch           */
   Status_Ch1_TrigCode = 1,               /* trigger code / random mismatch  */
   Status_Ch1_Length  = 2,                /* wrong length                    */
   Status_Ch1_NoAnswer = 3,               /* answer missing                  */
-  Status_Ch1_NotFound = 8                /* not found                       */
+  Status_Ch1_NotFound = 4,               /* not found                       */
+  Status_Ch1_DataMiss = 5,               /* data missing                    */
+  Status_Ch1_Sync = 6,                   /* sync error                      */
+  Status_Ch1_EvtBroken = 7               /* event broken                    */
 } Status_CH1;
 
 typedef enum {
-  Status_Ch2_NONE = 0
+  Status_Ch2_None = -1
 } Status_CH2;
 
 typedef enum {
   Status_Ch3_Address = 0,                /* unknown address             */
-  Status_Ch3_TimeOut = 4,                /* timeout                     */
-  Status_Ch3_NoData = 5                  /* nomoredata                  */
+  Status_Ch3_TimeOut = 1,                /* timeout                     */
+  Status_Ch3_NoData = 2                  /* nomoredata                  */
 } Status_CH3;
 
 /* ------ Internal Functions for FPGA access ------------------------------ */
@@ -896,7 +902,7 @@ static int trb_fifo_read(uint8_t channel,
       return -1;
     }
 
-    if ((trb_term.status_common & 0x003e) != 0) {
+    if ((trb_term.status_common & 0x007e) != 0) {
       trb_errno = TRB_STATUS_ERROR;
       return -1;
     }