mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 17:47:59 +02:00
udp virtual of gotthard2
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user