mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-05-03 19:30:04 +02:00
somewhere
This commit is contained in:
parent
1e94ec0c6a
commit
300b014f73
@ -285,7 +285,7 @@ class UDPBaseImplementation : protected virtual slsReceiverDefs, public UDPInter
|
|||||||
/**
|
/**
|
||||||
* Set File Path
|
* Set File Path
|
||||||
* Checks for file directory existence before setting file path,
|
* Checks for file directory existence before setting file path,
|
||||||
* If it doesn't exist, it will set it blank
|
* If it exists, it sets it
|
||||||
* @param c file path (max of 1000 characters)
|
* @param c file path (max of 1000 characters)
|
||||||
*/
|
*/
|
||||||
void setFilePath(const char c[]);
|
void setFilePath(const char c[]);
|
||||||
|
@ -122,7 +122,8 @@ public:
|
|||||||
GET_FILE_FORMAT=-1,/**< the receiver will return its file format */
|
GET_FILE_FORMAT=-1,/**< the receiver will return its file format */
|
||||||
BINARY, /**< binary format */
|
BINARY, /**< binary format */
|
||||||
ASCII, /**< ascii format */
|
ASCII, /**< ascii format */
|
||||||
HDF5 /**< hdf5 format */
|
HDF5, /**< hdf5 format */
|
||||||
|
NUM_FILE_FORMATS
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -269,17 +269,15 @@ void UDPBaseImplementation::setFileName(const char c[]){
|
|||||||
void UDPBaseImplementation::setFilePath(const char c[]){
|
void UDPBaseImplementation::setFilePath(const char c[]){
|
||||||
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
FILE_LOG(logDEBUG) << __AT__ << " starting";
|
||||||
|
|
||||||
|
|
||||||
if(strlen(c)){
|
if(strlen(c)){
|
||||||
//check if filepath exists
|
//check if filepath exists
|
||||||
struct stat st;
|
struct stat st;
|
||||||
if(stat(c,&st) == 0)
|
if(stat(c,&st) == 0)
|
||||||
strcpy(filePath,c);
|
strcpy(filePath,c);
|
||||||
else{
|
else
|
||||||
strcpy(filePath,"");
|
|
||||||
FILE_LOG(logWARNING) << "FilePath does not exist: " << filePath;
|
FILE_LOG(logWARNING) << "FilePath does not exist: " << filePath;
|
||||||
}
|
}
|
||||||
strcpy(filePath, c);
|
|
||||||
}
|
|
||||||
FILE_LOG(logDEBUG) << "Info: File path: " << filePath;
|
FILE_LOG(logDEBUG) << "Info: File path: " << filePath;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -530,7 +530,7 @@ int slsReceiverTCPIPInterface::set_file_dir() {
|
|||||||
else{
|
else{
|
||||||
receiverBase->setFilePath(fPath);
|
receiverBase->setFilePath(fPath);
|
||||||
retval = receiverBase->getFilePath();
|
retval = receiverBase->getFilePath();
|
||||||
if(retval == NULL){
|
if (retval == NULL || (strlen(fPath) && strcasecmp(fPath, retval))) {
|
||||||
ret = FAIL;
|
ret = FAIL;
|
||||||
strcpy(mess,"receiver file path does not exist\n");
|
strcpy(mess,"receiver file path does not exist\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user