mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 10:07:59 +02:00
moved updateDetector/Receiver
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@ -470,16 +470,6 @@ public:
|
||||
*/
|
||||
std::string checkOnline();
|
||||
|
||||
|
||||
/**
|
||||
* Set/Gets TCP Port of detector or receiver
|
||||
* @param t port type
|
||||
* @param num port number (-1 gets)
|
||||
* @returns port number
|
||||
*/
|
||||
int setPort(portType index, int num=-1);
|
||||
|
||||
|
||||
int setControlPort(int port_number);
|
||||
|
||||
/**
|
||||
@ -496,6 +486,8 @@ public:
|
||||
*/
|
||||
int getStopPort() const;
|
||||
|
||||
int setReceiverPort(int port_number);
|
||||
|
||||
/**
|
||||
* Returns the receiver TCP port \sa sharedSlsDetector
|
||||
* @returns the receiver TCP port
|
||||
|
@ -2919,9 +2919,7 @@ std::string slsDetectorCommand::cmdPort(int narg, char *args[], int action, int
|
||||
if (action == HELP_ACTION)
|
||||
return helpPort(action);
|
||||
int val; //ret,
|
||||
char ans[1000];
|
||||
portType index;
|
||||
|
||||
char ans[MAX_STR_LENGTH];
|
||||
if (action == PUT_ACTION) {
|
||||
if (sscanf(args[1], "%d", &val))
|
||||
;
|
||||
@ -2929,20 +2927,22 @@ std::string slsDetectorCommand::cmdPort(int narg, char *args[], int action, int
|
||||
return std::string("could not scan port number") + std::string(args[1]);
|
||||
}
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG, detPos);
|
||||
if (cmd == "port") {
|
||||
index = CONTROL_PORT;
|
||||
if (action == PUT_ACTION)
|
||||
myDet->setControlPort(val, detPos);
|
||||
sprintf(ans, "%d", myDet->setControlPort(-1, detPos));
|
||||
} else if (cmd == "rx_tcpport") {
|
||||
index = DATA_PORT;
|
||||
if (action == PUT_ACTION)
|
||||
myDet->setReceiverPort(val, detPos);
|
||||
sprintf(ans, "%d", myDet->setReceiverPort(-1, detPos));
|
||||
} else if (cmd == "stopport") {
|
||||
index = STOP_PORT;
|
||||
if (action == PUT_ACTION)
|
||||
myDet->setStopPort(val, detPos);
|
||||
sprintf(ans, "%d", myDet->setStopPort(-1, detPos));
|
||||
} else
|
||||
return std::string("unknown port type ") + cmd;
|
||||
|
||||
myDet->setOnline(ONLINE_FLAG, detPos);
|
||||
if (action == PUT_ACTION)
|
||||
myDet->setPort(index, val, detPos);
|
||||
|
||||
sprintf(ans, "%d", myDet->setPort(index, -1, detPos));
|
||||
return std::string(ans);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user