-static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/subevt.c,v 6.13 2010-06-14 14:37:09 hadaq Exp $";
+static char *rcsId = "$Header: /misc/hadesprojects/daq/cvsroot/eventbuilder/hadaq/subevt.c,v 6.14 2010-06-16 14:45:05 hadaq Exp $";
#include <stdio.h>
#include <stdlib.h>
return val;
}
+uint32_t SubEvt_debugWord(const void *my)
+{
+ unsigned i;
+ uint32_t val;
+ unsigned wordNumber = -1;
+
+ if (SubEvt_id(my) == 0x00008300UL || SubEvt_id(my) == 0x00008310UL || SubEvt_id(my) == 0x00008320UL) {
+ wordNumber = 2;
+ }
+
+ if (SubEvt_decoding(my) == SubEvtDecoding_32bitData) {
+ i = SubEvt_dataSize(my) / sizeof(uint32_t) - 1;
+ } else if (SubEvt_decoding(my) == SubEvtDecoding_16bitData) {
+ i = SubEvt_dataSize(my) / sizeof(uint16_t) - 1;
+ } else if (SubEvt_decoding(my) == SubEvtDecoding_8bitData) {
+ i = SubEvt_dataSize(my) / sizeof(uint8_t) - 1;
+ } else {
+ fprintf(stderr, " Unknown decoding: %i\n", SubEvt_decoding(my));
+ }
+
+ if (wordNumber == -1) {
+ val = 0;
+ } else if (i > wordNumber) {
+ val = SubEvt_dataValue(my, wordNumber - 1);
+ } else {
+ val = 0;
+ }
+
+ return val;
+}
+
char *SubEvt_2charP(const void *my)
{
static char buf[132];