mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 23:10:02 +02:00
udp virtual of gotthard2
This commit is contained in:
parent
3b2feba3b2
commit
298e1dd1fe
@ -273,6 +273,23 @@ int64_t getTimeLeft(enum timerIndex ind){
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
int configureMAC(uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t sourceip, uint32_t udpport) {
|
||||
#ifdef VIRTUAL
|
||||
char cDestIp[MAX_STR_LENGTH];
|
||||
memset(cDestIp, 0, MAX_STR_LENGTH);
|
||||
sprintf(cDestIp, "%d.%d.%d.%d", (destip>>24)&0xff,(destip>>16)&0xff,(destip>>8)&0xff,(destip)&0xff);
|
||||
FILE_LOG(logINFO, ("1G UDP: Destination (IP: %s, port:%d)\n", cDestIp, udpport));
|
||||
if (setUDPDestinationDetails(0, cDestIp, udpport) == FAIL) {
|
||||
FILE_LOG(logERROR, ("could not set udp destination IP and port\n"));
|
||||
return FAIL;
|
||||
}
|
||||
return OK;
|
||||
#endif
|
||||
return OK;
|
||||
}
|
||||
|
||||
|
||||
int startStateMachine(){
|
||||
#ifdef VIRTUAL
|
||||
// create udp socket
|
||||
|
@ -255,7 +255,7 @@ int configureMAC(int numInterfaces, int selInterface,
|
||||
uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t sourceip, uint32_t udpport,
|
||||
uint32_t destip2, uint64_t destmac2, uint64_t sourcemac2, uint32_t sourceip2, uint32_t udpport2);
|
||||
#else
|
||||
#if !defined(MYTHEN3D) && !defined(GOTTHARD2D)
|
||||
#ifndef MYTHEN3D
|
||||
int configureMAC(uint32_t destip, uint64_t destmac, uint64_t sourcemac, uint32_t sourceip, uint32_t udpport);
|
||||
#endif
|
||||
#endif
|
||||
|
@ -2321,7 +2321,7 @@ int configure_mac(int file_des) {
|
||||
if (receiveData(file_des, args, sizeof(args), OTHER) < 0)
|
||||
return printSocketReadError();
|
||||
|
||||
#if defined(MYTHEN3D) || defined(GOTTHARD2D)
|
||||
#if defined(MYTHEN3D)
|
||||
functionNotImplemented();
|
||||
#else
|
||||
FILE_LOG(logDEBUG1, ("\n Configuring MAC\n"));
|
||||
@ -2442,7 +2442,7 @@ int configure_mac(int file_des) {
|
||||
if (status != IDLE && status != RUN_FINISHED && status != STOPPED) {
|
||||
if (status == RUNNING)
|
||||
stopStateMachine();
|
||||
#ifndef EIGERD
|
||||
#if !defined(EIGERD) && !defined(GOTTHARD2D)
|
||||
cleanFifos();
|
||||
#endif
|
||||
status = getRunStatus();
|
||||
|
@ -9,5 +9,5 @@
|
||||
#define APIJUNGFRAU 0x190821
|
||||
#define APIEIGER 0x190821
|
||||
#define APIMYTHEN3 0x190822
|
||||
#define APIGOTTHARD2 0x190826
|
||||
|
||||
#define APIGOTTHARD2 0x190826
|
||||
|
Loading…
x
Reference in New Issue
Block a user