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:
l_maliakal_d
2012-01-06 10:11:56 +00:00
parent 1770045bce
commit 77d21d16f9
2 changed files with 27 additions and 4 deletions

View File

@ -312,9 +312,9 @@ typedef struct sharedSlsDetector {
/*extra gotthard members*/
/** is the ip address of the client for gotthard; read from configuration file **/
char clientIPAddress[MAX_STR_LENGTH];
char clientIP[MAX_STR_LENGTH];
/** is the mac address of the client for gotthard; read from configuration file **/
char clientMacAddress[MAX_STR_LENGTH];
char clientMAC[MAX_STR_LENGTH];
} sharedSlsDetector;
@ -442,6 +442,16 @@ typedef struct sharedSlsDetector {
int disconnectStop();
/** returns the client IP address for gotthard \sa sharedSlsDetector */
char* getClientIP() {return thisDetector->clientIP;};
/** returns the client MAC address for gotthard \sa sharedSlsDetector */
char* getClientMAC() {return thisDetector->clientMAC;};
/** sets the client IP address for gotthard \sa sharedSlsDetector */
char* setClientIP(string clientIP) {sprintf(thisDetector->clientIP,clientIP.c_str()); return thisDetector->clientIP;};
/** sets the client MAC address for gotthard \sa sharedSlsDetector */
char* setClientMAC(string clientMAC) {sprintf(thisDetector->clientMAC,clientMAC.c_str());return thisDetector->clientMAC;};
/* I/O */
/** returns the detector trimbit/settings directory \sa sharedSlsDetector */
char* getSettingsDir() {return thisDetector->settingsDir;};