added receiver mac to be compatible with aldos receiver

git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@417 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
l_maliakal_d
2012-12-20 11:11:53 +00:00
parent 83342b6d5b
commit 6f793abca8
9 changed files with 54 additions and 22 deletions

View File

@ -4461,6 +4461,8 @@ char* slsDetector::setNetworkParameter(networkParameter index, string value) {
return setReceiver(value);
case RECEIVER_UDP_IP:
return setReceiverUDPIP(value);
case RECEIVER_UDP_MAC:
return setReceiverUDPMAC(value);
case RECEIVER_UDP_PORT:
sscanf(value.c_str(),"%d",&i);
sprintf(answer,"%d",setReceiverUDPPort(i));
@ -4488,6 +4490,9 @@ char* slsDetector::getNetworkParameter(networkParameter index) {
case RECEIVER_UDP_IP:
return getReceiverUDPIP();
break;
case RECEIVER_UDP_MAC:
return getReceiverUDPMAC();
break;
case RECEIVER_UDP_PORT:
return getReceiverUDPPort();
break;
@ -4571,6 +4576,21 @@ char* slsDetector::setReceiverUDPIP(string udpip){
char* slsDetector::setReceiverUDPMAC(string udpmac){
if(udpmac.length()==17){
if((udpmac[2]==':')&&(udpmac[5]==':')&&(udpmac[8]==':')&&
(udpmac[11]==':')&&(udpmac[14]==':'))
strcpy(thisDetector->receiverUDPMAC,udpmac.c_str());
else
return("receiver udp mac address should be in xx:xx:xx:xx:xx:xx format");
}
else
return("receiver udp mac address should be in xx:xx:xx:xx:xx:xx format");
return thisDetector->receiverUDPMAC;
}
int slsDetector::setReceiverUDPPort(int udpport){
thisDetector->receiverUDPPort = udpport;