x y z and id are written to the udp header for eiger

This commit is contained in:
Dhanya Maliakal
2017-09-26 16:39:02 +02:00
parent 663fd557ff
commit 986826cbe9
13 changed files with 135 additions and 32 deletions

View File

@ -152,7 +152,7 @@ long int calcChecksum(int sourceip, int destip);
#ifndef MYTHEND
int configureMAC(uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t sourceip, uint32_t udpport, uint32_t udpport2, int ival);
#endif
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(EIGERD)
int setDetectorPosition(int pos[]);
#endif

View File

@ -10,6 +10,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <string.h>
extern int sockfd;

View File

@ -3408,7 +3408,7 @@ int configure_mac(int file_des) {
char arg[6][50];
memset(arg,0,sizeof(arg));
n = receiveData(file_des,arg,sizeof(arg),OTHER);
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(EIGERD)
int pos[3]={0,0,0};
n = receiveData(file_des,pos,sizeof(pos),INT32);
#endif
@ -3461,7 +3461,7 @@ int configure_mac(int file_des) {
printf("\n");
printf("Configuring MAC of module %d at port %x\n", imod, udpport);
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(EIGERD)
printf("Position: [%d,%d,%d]\n", pos[0],pos[1],pos[2]);
#endif
#endif
@ -3481,7 +3481,7 @@ int configure_mac(int file_des) {
}
else {
printf("Configure MAC successful\n");
#ifdef JUNGFRAUD
#if defined(JUNGFRAUD) || defined(EIGERD)
ret = setDetectorPosition(pos);
if (ret == FAIL) {
sprintf(mess,"could not set detector position\n");