mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 07:17:13 +02:00
added the set & get functions for clientIP and clientMAC
git-svn-id: file:///afs/psi.ch/project/sls_det_software/svn/slsDetectorSoftware@76 951219d9-93cf-4727-9268-0efd64621fa3
This commit is contained in:
@ -357,9 +357,9 @@ int slsDetector::initializeDetectorSize(detectorType type) {
|
||||
strcpy(thisDetector->hostname,DEFAULT_HOSTNAME);
|
||||
|
||||
/** set client ip address */
|
||||
strcpy(thisDetector->clientIPAddress,"none");
|
||||
strcpy(thisDetector->clientIP,"none");
|
||||
/** set client mac address */
|
||||
strcpy(thisDetector->clientMacAddress,"none");
|
||||
strcpy(thisDetector->clientMAC,"none");
|
||||
|
||||
/** sets onlineFlag to OFFLINE_FLAG */
|
||||
thisDetector->onlineFlag=OFFLINE_FLAG;
|
||||
@ -5460,6 +5460,18 @@ string slsDetector::executeLine(int narg, char *args[], int action) {
|
||||
sprintf(answer,form,answer,oen[ie]);
|
||||
}
|
||||
return string(answer);
|
||||
}else if (var=="clientip") {
|
||||
if (action==PUT_ACTION) {
|
||||
sval=string(args[1]);
|
||||
return string(setClientIP(sval));
|
||||
} else
|
||||
return getClientIP();
|
||||
} else if (var=="clientmac") {
|
||||
if (action==PUT_ACTION) {
|
||||
sval=string(args[1]);
|
||||
return string(setClientMAC(sval));
|
||||
} else
|
||||
return getClientMAC();
|
||||
}
|
||||
|
||||
|
||||
@ -5473,6 +5485,7 @@ string slsDetector::executeLine(int narg, char *args[], int action) {
|
||||
|
||||
|
||||
|
||||
|
||||
if (setOnline())
|
||||
setTCPSocket();
|
||||
|
||||
|
Reference in New Issue
Block a user