Minimal shared memory for receiver

This commit is contained in:
Dhanya Thattil
2020-03-19 02:01:32 -04:00
committed by GitHub
parent 8ab742c2b7
commit 4813b5567a
24 changed files with 1045 additions and 1117 deletions

View File

@ -70,7 +70,19 @@ int ClientSocket::sendCommandThenRead(int fnum, const void *args,
void ClientSocket::readReply(int &ret, void *retval, size_t retval_size) {
Receive(&ret, sizeof(ret));
try {
Receive(&ret, sizeof(ret));
}
// debugging
catch (sls::SocketError &e) {
if (socketType == "Receiver") {
throw ReceiverError("Receiver returned: " + std::string(e.what()));
} else if (socketType == "Detector") {
throw DetectorError("Detector returned: " + std::string(e.what()));
} else {
throw GuiError(e.what());
}
}
if (ret == slsDetectorDefs::FAIL) {
char mess[MAX_STR_LENGTH]{};
// get error message