mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-01 02:10:05 +02:00
compile for servers too
This commit is contained in:
parent
d9b2a90651
commit
0eb204bfd3
@ -22,6 +22,7 @@ add_executable(ctbDetectorServer_virtual
|
|||||||
include_directories(
|
include_directories(
|
||||||
../slsDetectorServer/include
|
../slsDetectorServer/include
|
||||||
../../slsSupportLib/include
|
../../slsSupportLib/include
|
||||||
|
../../slsDetectorSoftware/include/sls/
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(ctbDetectorServer_virtual
|
target_include_directories(ctbDetectorServer_virtual
|
||||||
|
@ -2,10 +2,11 @@ current_dir = $(shell pwd)
|
|||||||
main_inc = ../slsDetectorServer/include/
|
main_inc = ../slsDetectorServer/include/
|
||||||
main_src = ../slsDetectorServer/src/
|
main_src = ../slsDetectorServer/src/
|
||||||
support_lib = ../../slsSupportLib/include/
|
support_lib = ../../slsSupportLib/include/
|
||||||
|
det_lib = ../../slsDetectorSoftware/include/sls/
|
||||||
|
|
||||||
CROSS = bfin-uclinux-
|
CROSS = bfin-uclinux-
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS)gcc
|
||||||
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
CFLAGS += -Wall -std=gnu99 -DCHIPTESTBOARDD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
||||||
LDLIBS += -lm -lrt -pthread
|
LDLIBS += -lm -lrt -pthread
|
||||||
PROGS = ctbDetectorServer
|
PROGS = ctbDetectorServer
|
||||||
DESTDIR ?= bin
|
DESTDIR ?= bin
|
||||||
|
@ -20,6 +20,7 @@ add_executable(moenchDetectorServer_virtual
|
|||||||
include_directories(
|
include_directories(
|
||||||
../slsDetectorServer/include
|
../slsDetectorServer/include
|
||||||
../../slsSupportLib/include
|
../../slsSupportLib/include
|
||||||
|
../../slsDetectorSoftware/include/sls/
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(moenchDetectorServer_virtual
|
target_include_directories(moenchDetectorServer_virtual
|
||||||
|
@ -2,10 +2,11 @@ current_dir = $(shell pwd)
|
|||||||
main_inc = ../slsDetectorServer/include/
|
main_inc = ../slsDetectorServer/include/
|
||||||
main_src = ../slsDetectorServer/src/
|
main_src = ../slsDetectorServer/src/
|
||||||
support_lib = ../../slsSupportLib/include/
|
support_lib = ../../slsSupportLib/include/
|
||||||
|
det_lib = ../../slsDetectorSoftware/include/sls/
|
||||||
|
|
||||||
CROSS = bfin-uclinux-
|
CROSS = bfin-uclinux-
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS)gcc
|
||||||
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
CFLAGS += -Wall -std=gnu99 -DMOENCHD -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir)#-DVERBOSEI #-DVERBOSE
|
||||||
LDLIBS += -lm -lrt -pthread
|
LDLIBS += -lm -lrt -pthread
|
||||||
PROGS = moenchDetectorServer
|
PROGS = moenchDetectorServer
|
||||||
DESTDIR ?= bin
|
DESTDIR ?= bin
|
||||||
|
@ -17,6 +17,7 @@ add_executable(mythen3DetectorServer_virtual
|
|||||||
include_directories(
|
include_directories(
|
||||||
../slsDetectorServer/include
|
../slsDetectorServer/include
|
||||||
../../slsSupportLib/include
|
../../slsSupportLib/include
|
||||||
|
../../slsDetectorSoftware/include/sls/
|
||||||
)
|
)
|
||||||
|
|
||||||
target_include_directories(mythen3DetectorServer_virtual
|
target_include_directories(mythen3DetectorServer_virtual
|
||||||
|
@ -2,10 +2,11 @@ current_dir = $(shell pwd)
|
|||||||
main_inc = ../slsDetectorServer/include/
|
main_inc = ../slsDetectorServer/include/
|
||||||
main_src = ../slsDetectorServer/src/
|
main_src = ../slsDetectorServer/src/
|
||||||
support_lib = ../../slsSupportLib/include/
|
support_lib = ../../slsSupportLib/include/
|
||||||
|
det_lib = ../../slsDetectorSoftware/include/sls/
|
||||||
|
|
||||||
CROSS = nios2-buildroot-linux-gnu-
|
CROSS = nios2-buildroot-linux-gnu-
|
||||||
CC = $(CROSS)gcc
|
CC = $(CROSS)gcc
|
||||||
CFLAGS += -Wall -std=gnu99 -DMYTHEN3D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
CFLAGS += -Wall -std=gnu99 -DMYTHEN3D -DSTOP_SERVER -I$(main_inc) -I$(support_lib) -I$(det_lib) -I$(current_dir) #-DDEBUG1 #-DVERBOSEI #-DVERBOSE
|
||||||
LDLIBS += -lm -lrt -pthread
|
LDLIBS += -lm -lrt -pthread
|
||||||
PROGS = mythen3DetectorServer
|
PROGS = mythen3DetectorServer
|
||||||
DESTDIR ?= bin
|
DESTDIR ?= bin
|
||||||
|
@ -5,6 +5,10 @@
|
|||||||
#include "sls/sls_detector_funcs.h"
|
#include "sls/sls_detector_funcs.h"
|
||||||
#include "slsDetectorFunctionList.h"
|
#include "slsDetectorFunctionList.h"
|
||||||
|
|
||||||
|
#if defined(CHIPTESTBOARDD) || defined(MOENCHD) || defined(MYTHEN3D)
|
||||||
|
#include "Pattern.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
#include <arpa/inet.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
@ -7532,6 +7536,10 @@ int set_pattern(int file_des) {
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
|
|
||||||
|
#if !defined(CHIPTESTBOARDD) && !defined(MOENCHD) && !defined(MYTHEN3D)
|
||||||
|
functionNotImplemented();
|
||||||
|
#else
|
||||||
|
|
||||||
patternParameters *pat = malloc(sizeof(patternParameters));
|
patternParameters *pat = malloc(sizeof(patternParameters));
|
||||||
memset(pat, 0, sizeof(patternParameters));
|
memset(pat, 0, sizeof(patternParameters));
|
||||||
|
|
||||||
@ -7542,9 +7550,6 @@ int set_pattern(int file_des) {
|
|||||||
return printSocketReadError();
|
return printSocketReadError();
|
||||||
}
|
}
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MOENCHD) && !defined(MYTHEN3D)
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
LOG(logINFO, ("Setting Pattern from structure\n"));
|
LOG(logINFO, ("Setting Pattern from structure\n"));
|
||||||
LOG(logINFO,
|
LOG(logINFO,
|
||||||
@ -7622,9 +7627,10 @@ int set_pattern(int file_des) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
if (pat != NULL)
|
if (pat != NULL)
|
||||||
free(pat);
|
free(pat);
|
||||||
|
#endif
|
||||||
|
|
||||||
return Server_SendResult(file_des, INT32, NULL, 0);
|
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7632,12 +7638,14 @@ int get_pattern(int file_des) {
|
|||||||
ret = OK;
|
ret = OK;
|
||||||
memset(mess, 0, sizeof(mess));
|
memset(mess, 0, sizeof(mess));
|
||||||
|
|
||||||
|
#if !defined(CHIPTESTBOARDD) && !defined(MOENCHD) && !defined(MYTHEN3D)
|
||||||
|
functionNotImplemented();
|
||||||
|
return Server_SendResult(file_des, INT32, NULL, 0);
|
||||||
|
#else
|
||||||
|
|
||||||
patternParameters *pat = malloc(sizeof(patternParameters));
|
patternParameters *pat = malloc(sizeof(patternParameters));
|
||||||
memset(pat, 0, sizeof(patternParameters));
|
memset(pat, 0, sizeof(patternParameters));
|
||||||
|
|
||||||
#if !defined(CHIPTESTBOARDD) && !defined(MOENCHD) && !defined(MYTHEN3D)
|
|
||||||
functionNotImplemented();
|
|
||||||
#else
|
|
||||||
if (Server_VerifyLock() == OK) {
|
if (Server_VerifyLock() == OK) {
|
||||||
LOG(logINFO, ("Getting Pattern from structure\n"));
|
LOG(logINFO, ("Getting Pattern from structure\n"));
|
||||||
|
|
||||||
@ -7732,13 +7740,14 @@ int get_pattern(int file_des) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
// ignoring endianness for eiger
|
// ignoring endianness for eiger
|
||||||
int ret =
|
int ret =
|
||||||
Server_SendResult(file_des, INT32, pat, sizeof(patternParameters));
|
Server_SendResult(file_des, INT32, pat, sizeof(patternParameters));
|
||||||
if (pat != NULL)
|
if (pat != NULL)
|
||||||
free(pat);
|
free(pat);
|
||||||
return ret;
|
return ret;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int get_scan(int file_des) {
|
int get_scan(int file_des) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user