mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-17 23:37:14 +02:00
connected command to execute command in receiver pc
This commit is contained in:
@ -5990,6 +5990,30 @@ int slsDetector::exitReceiver() {
|
||||
|
||||
}
|
||||
|
||||
int slsDetector::execReceiverCommand(std::string cmd) {
|
||||
|
||||
int fnum=F_EXEC_RECEIVER_COMMAND;
|
||||
int ret=FAIL;
|
||||
char arg[MAX_STR_LENGTH];
|
||||
memset(arg,0,sizeof(arg));
|
||||
char retval[MAX_STR_LENGTH];
|
||||
memset(retval,0, sizeof(retval));
|
||||
|
||||
strcpy(arg,cmd.c_str());
|
||||
|
||||
if (thisDetector->receiverOnlineFlag==ONLINE_FLAG) {
|
||||
#ifdef VERBOSE
|
||||
std::cout << "Sending to receiver the command: " << arg << std::endl;
|
||||
#endif
|
||||
if (connectData() == OK){
|
||||
ret=thisReceiver->SendString(fnum,retval,arg);
|
||||
disconnectData();
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
int slsDetector::updateReceiverNoWait() {
|
||||
|
||||
@ -7506,3 +7530,5 @@ int slsDetector::writeSettingsFile(std::string fname, sls_detector_module mod,
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user