]> jspc29.x-matter.uni-frankfurt.de Git - daqdata.git/commitdiff
A few new helper functions -- mm
authorhadaq <hadaq>
Wed, 16 Oct 2002 07:25:56 +0000 (07:25 +0000)
committerhadaq <hadaq>
Wed, 16 Oct 2002 07:25:56 +0000 (07:25 +0000)
hadaq/subevt.h

index bfd8edc0ed8a615b3f84356a1e25cb78c2f2a01e..ee2da40c37b8947c049c17aae0a5d0f03ded7eb7 100644 (file)
@@ -86,12 +86,12 @@ static uint32_t SubEvt_id(const void *my)
 
 static uint32_t SubEvt_pureId(const void *my)
 {
-        return SubEvt_hdrValue(my, SubEvtIdx_id) & 0x7fffffffU;
+        return SubEvt_id(my) & 0x7fffffffUL;
 }
 
 static int SubEvt_dataError(const void *my)
 {
-        return (SubEvt_hdrValue(my, SubEvtIdx_id) & 0x80000000) != 0;
+        return (SubEvt_id(my) & 0x80000000UL) != 0;
 }
 
 static void SubEvt_setId(void *my, uint32_t id)
@@ -99,6 +99,14 @@ static void SubEvt_setId(void *my, uint32_t id)
         SubEvt_setHdrValue(my, SubEvtIdx_id, id);
 }
 
+static int SubEvt_setDataError(const void *my) {
+               SubEvt_setId(my, SubEvt_id(my) | 0x80000000UL);
+}
+
+static int SubEvt_clrDataError(const void *my) {
+               SubEvt_setId(my, SubEvt_id(my) & ~0x80000000UL);
+}
+
 static uint32_t SubEvt_trigNr(const void *my)
 {
         return SubEvt_hdrValue(my, SubEvtIdx_trigNr);