From: hades Date: Wed, 1 Sep 1999 12:03:55 +0000 (+0000) Subject: trigNr consists of software trigNr (24bit) and Hardware trigTag (8bit) X-Git-Url: https://jspc29.x-matter.uni-frankfurt.de/git/?a=commitdiff_plain;h=2ac6c164e9951474367bbbd965e7c5bf87c3463b;p=daqdata.git trigNr consists of software trigNr (24bit) and Hardware trigTag (8bit) --- diff --git a/hadaq/hwsoft.c b/hadaq/hwsoft.c index b6cf60a..e317522 100644 --- a/hadaq/hwsoft.c +++ b/hadaq/hwsoft.c @@ -49,19 +49,22 @@ void Hardware_waitForTrigger(const Hardware *my, void *subEvt) { static int nextId = SubEvtId_trigCode; struct timespec tS, *t = &tS; - static UInt4 trigNr = 0; + static unsigned long trigNr = 0; + static UInt1 trigTag = 0; switch (nextId) { case SubEvtId_trigCode: +#if 1 t->tv_sec = 0; t->tv_nsec = 100000000; nanosleep(t, NULL); +#endif SubEvt_setSize(subEvt, SubEvt_hdrSize()); SubEvt_setDecoding(subEvt, SubEvtDecoding_32bitData); SubEvt_setId(subEvt, SubEvtId_trigCode); - SubEvt_setTrigNr(subEvt, trigNr); + SubEvt_setTrigNr(subEvt, trigNr << 8 | trigTag); nextId = SubEvtId_test1; break; @@ -69,7 +72,9 @@ void Hardware_waitForTrigger(const Hardware *my, void *subEvt) SubEvt_setSize(subEvt, SubEvt_hdrSize()); SubEvt_setDecoding(subEvt, SubEvtDecoding_32bitData); SubEvt_setId(subEvt, SubEvtId_test1); - SubEvt_setTrigNr(subEvt, trigNr++); + SubEvt_setTrigNr(subEvt, trigNr << 8 | trigTag); + trigNr++; + trigTag++; nextId = SubEvtId_trigCode; break;