mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 18:17:59 +02:00
exceptions TCP (#31)
* WIP * first test * format * test frames * also 0: * WIP * WIP * first test * format * test frames * also 0: * test and less local * pass ret by value * level * WIP * WIP * cleaning up interface * removed ref * another * updated api version * cleanup * cleanup * WIP * fixes * fixed tests
This commit is contained in:

committed by
Dhanya Thattil

parent
a6144f658e
commit
1db7521cfa
@ -125,11 +125,6 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
template <typename T>
|
||||
void validate(T arg, T retval, std::string modename, numberMode hex);
|
||||
|
||||
/** Unrecognized Function */
|
||||
int M_nofunc(sls::ServerInterface2 & socket);
|
||||
|
||||
|
||||
|
||||
/** Execute command */
|
||||
int exec_command(sls::ServerInterface2 &socket);
|
||||
|
||||
@ -298,10 +293,6 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
/** set dbit offset */
|
||||
int set_dbit_offset(sls::ServerInterface2 &socket);
|
||||
|
||||
|
||||
int LogSocketCrash();
|
||||
void NullObjectError(int& ret, char* mess);
|
||||
|
||||
/** detector type */
|
||||
detectorType myDetectorType;
|
||||
|
||||
@ -390,6 +381,14 @@ protected:
|
||||
std::unique_ptr<sls::ServerSocket> server{nullptr};
|
||||
|
||||
private:
|
||||
int VerifyLock(int &ret, char *mess);
|
||||
int VerifyLockAndIdle(int &ret, char *mess, int fnum);
|
||||
void VerifyLock();
|
||||
void VerifyIdle(sls::ServerInterface2& socket);
|
||||
|
||||
slsReceiverImplementation* impl(){
|
||||
if (receiver!=nullptr){
|
||||
return receiver.get();
|
||||
}else{
|
||||
throw sls::SocketError("Receiver not set up. Please use rx_hostname first.\n");
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -571,7 +571,7 @@ void slsReceiverImplementation::setFilePath(const char c[]) {
|
||||
if(stat(c,&st) == 0)
|
||||
strcpy(filePath,c);
|
||||
else
|
||||
FILE_LOG(logERROR) << "FilePath does not exist: " << filePath;
|
||||
FILE_LOG(logERROR) << "FilePath does not exist: " << c;
|
||||
}
|
||||
FILE_LOG(logINFO) << "File path: " << filePath;
|
||||
}
|
||||
@ -1059,7 +1059,7 @@ int slsReceiverImplementation::setFifoDepth(const uint32_t i) {
|
||||
if (fifoDepth != i) {
|
||||
fifoDepth = i;
|
||||
if (SetupFifoStructure() == FAIL)
|
||||
return FAIL;
|
||||
throw sls::RuntimeError("Failed to setup fifo structure");
|
||||
}
|
||||
FILE_LOG(logINFO) << "Fifo Depth: " << i;
|
||||
return OK;
|
||||
|
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user