mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-13 05:17:13 +02:00
rxr: removed char array memebers in rxrimplementation
This commit is contained in:
@ -35,7 +35,7 @@ class BinaryFile : private virtual slsDetectorDefs, public File, public BinaryFi
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
BinaryFile(int ind, uint32_t* maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* nd, std::string* fname, std::string* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode);
|
||||
|
||||
|
@ -40,7 +40,7 @@ class BinaryFileStatic {
|
||||
* @param unitindex unit index
|
||||
* @returns complete file name created
|
||||
*/
|
||||
static std::string CreateFileName(char *fpath, char *fprefix,
|
||||
static std::string CreateFileName(std::string fpath, std::string fprefix,
|
||||
uint64_t findex, uint64_t subfindex,
|
||||
int dindex, int numunits = 1,
|
||||
int unitindex = 0) {
|
||||
@ -58,7 +58,7 @@ class BinaryFileStatic {
|
||||
* @param findex file index
|
||||
* @returns master file name
|
||||
*/
|
||||
static std::string CreateMasterFileName(char *fpath, char *fnameprefix,
|
||||
static std::string CreateMasterFileName(std::string fpath, std::string fnameprefix,
|
||||
uint64_t findex) {
|
||||
std::ostringstream os;
|
||||
os << fpath << "/" << fnameprefix << "_master"
|
||||
|
@ -147,8 +147,8 @@ class DataProcessor : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* @param portno pointer to udp port number
|
||||
* @param g address of GeneralData (Detector Data) pointer
|
||||
*/
|
||||
void SetupFileWriter(bool fwe, int* nd, uint32_t* maxf, char* fname,
|
||||
char* fpath, uint64_t* findex,
|
||||
void SetupFileWriter(bool fwe, int* nd, uint32_t* maxf, std::string* fname,
|
||||
std::string* fpath, uint64_t* findex,
|
||||
bool* owenable, int* dindex, int* nunits, uint64_t* nf, uint32_t* dr,
|
||||
uint32_t* portno, GeneralData* g = nullptr);
|
||||
|
||||
|
@ -35,7 +35,7 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
|
||||
* @param qe pointer to quad Enable
|
||||
*/
|
||||
DataStreamer(int ind, Fifo* f, uint32_t* dr, ROI* r,
|
||||
uint64_t* fi, int fd, char* ajh, int* nd, bool* gpEnable, bool* qe);
|
||||
uint64_t* fi, int fd, std::string* ajh, int* nd, bool* gpEnable, bool* qe);
|
||||
|
||||
/**
|
||||
* Destructor
|
||||
@ -197,7 +197,7 @@ class DataStreamer : private virtual slsDetectorDefs, public ThreadObject {
|
||||
int flippedDataX;
|
||||
|
||||
/** additional json header */
|
||||
char* additionJsonHeader;
|
||||
std::string* additionJsonHeader;
|
||||
|
||||
/** Aquisition Started flag */
|
||||
bool startedFlag;
|
||||
|
@ -36,7 +36,7 @@ class File : private virtual slsDetectorDefs {
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
File(int ind, uint32_t* maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* nd, std::string* fname, std::string* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
bool* smode);
|
||||
|
||||
@ -78,7 +78,7 @@ class File : private virtual slsDetectorDefs {
|
||||
* @param dr pointer to dynamic range
|
||||
* @param portno pointer to dynamic range
|
||||
*/
|
||||
void GetMemberPointerValues(int* nd, uint32_t*& maxf, char*& fname, char*& fpath,
|
||||
void GetMemberPointerValues(int* nd, uint32_t*& maxf, std::string*& fname, std::string*& fpath,
|
||||
uint64_t*& findex, bool*& owenable,
|
||||
int*& dindex, int*& nunits, uint64_t*& nf, uint32_t*& dr, uint32_t*& portno);
|
||||
|
||||
@ -161,10 +161,10 @@ class File : private virtual slsDetectorDefs {
|
||||
int numDetY;
|
||||
|
||||
/** File Name Prefix */
|
||||
char* fileNamePrefix;
|
||||
std::string* fileNamePrefix;
|
||||
|
||||
/** File Path */
|
||||
char* filePath;
|
||||
std::string* filePath;
|
||||
|
||||
/** File Index */
|
||||
uint64_t* fileIndex;
|
||||
|
@ -42,7 +42,7 @@ class HDF5File : private virtual slsDetectorDefs, public File, public HDF5FileSt
|
||||
* @param smode pointer to silent mode
|
||||
*/
|
||||
HDF5File(int ind, uint32_t* maxf,
|
||||
int* nd, char* fname, char* fpath, uint64_t* findex, bool* owenable,
|
||||
int* nd, std::string* fname, std::string* fpath, uint64_t* findex, bool* owenable,
|
||||
int* dindex, int* nunits, uint64_t* nf, uint32_t* dr, uint32_t* portno,
|
||||
uint32_t nx, uint32_t ny,
|
||||
bool* smode);
|
||||
|
@ -46,7 +46,7 @@ public:
|
||||
* @param unitindex unit index
|
||||
* @returns complete file name created
|
||||
*/
|
||||
static std::string CreateFileName(char *fpath, char *fprefix,
|
||||
static std::string CreateFileName(std::string fpath, std::string fprefix,
|
||||
uint64_t findex, uint64_t subfindex,
|
||||
int dindex, int numunits = 1,
|
||||
int unitindex = 0) {
|
||||
@ -64,7 +64,7 @@ public:
|
||||
* @param findex file index
|
||||
* @returns master file name
|
||||
*/
|
||||
static std::string CreateMasterFileName(char* fpath, char* fnameprefix, uint64_t findex)
|
||||
static std::string CreateMasterFileName(std::string fpath, std::string fnameprefix, uint64_t findex)
|
||||
{
|
||||
std::ostringstream os;
|
||||
os << fpath << "/" << fnameprefix << "_master"
|
||||
@ -80,7 +80,7 @@ public:
|
||||
* @param findex file index
|
||||
* @returns virtual file name
|
||||
*/
|
||||
static std::string CreateVirtualFileName(char* fpath, char* fnameprefix, uint64_t findex)
|
||||
static std::string CreateVirtualFileName(std::string fpath, std::string fnameprefix, uint64_t findex)
|
||||
{
|
||||
std::ostringstream osfn;
|
||||
osfn << fpath << "/" << fnameprefix;
|
||||
@ -584,7 +584,7 @@ public:
|
||||
static int CreateVirtualDataFile(
|
||||
std::string virtualFileName,
|
||||
hid_t& fd, std::string masterFileName,
|
||||
char* fpath, char* fnameprefix, uint64_t findex, bool frindexenable,
|
||||
std::string fpath, std::string fnameprefix, uint64_t findex, bool frindexenable,
|
||||
int dindex, int numunits,
|
||||
uint32_t maxFramesPerFile, uint64_t numf,
|
||||
std::string srcDataseName, DataType dataType,
|
||||
|
@ -65,7 +65,7 @@ class slsReceiver : private virtual slsDetectorDefs {
|
||||
* we write depending on file write enable
|
||||
* users get data to write depending on call backs registered
|
||||
*/
|
||||
void registerCallBackStartAcquisition(int (*func)(char*, char*, uint64_t, uint32_t, void*),void *arg);
|
||||
void registerCallBackStartAcquisition(int (*func)(std::string, std::string, uint64_t, uint32_t, void*),void *arg);
|
||||
|
||||
/**
|
||||
* Call back for acquisition finished
|
||||
|
@ -60,7 +60,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
|
||||
/*
|
||||
* Get detector hostname
|
||||
* @return hostname (max of 1000 characters)
|
||||
* @return hostname
|
||||
*/
|
||||
std::string getDetectorHostname() const;
|
||||
|
||||
@ -376,7 +376,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
* Sets detector hostname
|
||||
* @param c detector hostname
|
||||
*/
|
||||
void setDetectorHostname(const char *c);
|
||||
void setDetectorHostname(const std::string& c);
|
||||
|
||||
/*
|
||||
* Set multi detector size
|
||||
@ -428,17 +428,17 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
* Set File Name Prefix (without frame index, file index and extension
|
||||
* (_d0_f000000000000_8.raw)) Does not check for file existence since it is
|
||||
* created only at startReceiver
|
||||
* @param c file name (max of 1000 characters)
|
||||
* @param c file name
|
||||
*/
|
||||
void setFileName(const char c[]);
|
||||
void setFileName(const std::string& c);
|
||||
|
||||
/**
|
||||
* Set File Path
|
||||
* Checks for file directory existence before setting file path,
|
||||
* If it exists, it sets it
|
||||
* @param c file path (max of 1000 characters)
|
||||
* @param c file path
|
||||
*/
|
||||
void setFilePath(const char c[]);
|
||||
void setFilePath(const std::string& c);
|
||||
|
||||
/**
|
||||
* Set File Index of acquisition
|
||||
@ -570,7 +570,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
/**
|
||||
* Set additional json header
|
||||
*/
|
||||
void setAdditionalJsonHeader(const char *c);
|
||||
void setAdditionalJsonHeader(const std::string& c);
|
||||
|
||||
/**
|
||||
* Set Acquisition Period
|
||||
@ -708,7 +708,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
* @param c error message if FAIL
|
||||
* @return OK or FAIL
|
||||
*/
|
||||
int startReceiver(char *c = NULL);
|
||||
int startReceiver(std::string& err);
|
||||
|
||||
/**
|
||||
* Stop Listening for Packets
|
||||
@ -760,7 +760,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
* we write depending on file write enable
|
||||
* users get data to write depending on call backs registered
|
||||
*/
|
||||
void registerCallBackStartAcquisition(int (*func)(char *, char *, uint64_t,
|
||||
void registerCallBackStartAcquisition(int (*func)(std::string, std::string, uint64_t,
|
||||
uint32_t, void *),
|
||||
void *arg);
|
||||
|
||||
@ -860,7 +860,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
/*Detector Readout ID*/
|
||||
int detID;
|
||||
/** detector hostname */
|
||||
char detHostname[MAX_STR_LENGTH];
|
||||
std::string detHostname;
|
||||
/** Acquisition Period */
|
||||
uint64_t acquisitionPeriod;
|
||||
/** Acquisition Time */
|
||||
@ -932,10 +932,10 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
/** File format */
|
||||
fileFormat fileFormatType;
|
||||
/** File Name without frame index, file index and extension
|
||||
* (_d0_f000000000000_8.raw)*/
|
||||
char fileName[MAX_STR_LENGTH];
|
||||
* (_d0_f0_8.raw)*/
|
||||
std::string fileName;
|
||||
/** File Path */
|
||||
char filePath[MAX_STR_LENGTH];
|
||||
std::string filePath;
|
||||
/** File Index */
|
||||
uint64_t fileIndex;
|
||||
/** Frames per file (0 means infinite) */
|
||||
@ -963,7 +963,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
/** streaming port */
|
||||
sls::IpAddr streamingSrcIP;
|
||||
/** additional json header */
|
||||
char additionalJsonHeader[MAX_STR_LENGTH];
|
||||
std::string additionalJsonHeader;
|
||||
|
||||
//** class objects ***
|
||||
/** General Data Properties */
|
||||
@ -990,7 +990,7 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
* we write depending on file write enable
|
||||
* users get data to write depending on call backs registered
|
||||
*/
|
||||
int (*startAcquisitionCallBack)(char *, char *, uint64_t, uint32_t, void *);
|
||||
int (*startAcquisitionCallBack)(std::string, std::string, uint64_t, uint32_t, void *);
|
||||
void *pStartAcquisition;
|
||||
/**
|
||||
* Call back for acquisition finished
|
||||
|
@ -60,7 +60,7 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
* we write depending on file write enable
|
||||
* users get data to write depending on call backs registered
|
||||
*/
|
||||
void registerCallBackStartAcquisition(int (*func)(char *, char *, uint64_t,
|
||||
void registerCallBackStartAcquisition(int (*func)(std::string, std::string, uint64_t,
|
||||
uint32_t, void *),
|
||||
void *arg);
|
||||
|
||||
@ -338,9 +338,6 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
int (slsReceiverTCPIPInterface::*flist[NUM_REC_FUNCTIONS])(
|
||||
sls::ServerInterface2 &socket);
|
||||
|
||||
/** Message */
|
||||
char mess[MAX_STR_LENGTH]{};
|
||||
|
||||
/** success/failure */
|
||||
int ret{OK};
|
||||
|
||||
@ -375,7 +372,7 @@ class slsReceiverTCPIPInterface : private virtual slsDetectorDefs {
|
||||
* we write depending on file write enable
|
||||
* users get data to write depending on call backs registered
|
||||
*/
|
||||
int (*startAcquisitionCallBack)(char *, char *, uint64_t, uint32_t,
|
||||
int (*startAcquisitionCallBack)(std::string, std::string, uint64_t, uint32_t,
|
||||
void *) = nullptr;
|
||||
void *pStartAcquisition{nullptr};
|
||||
|
||||
|
@ -55,7 +55,7 @@ public:
|
||||
\param arg argument
|
||||
\return value is insignificant at the moment, we write depending on file write enable, users get data to write depending on call backs registered
|
||||
*/
|
||||
void registerCallBackStartAcquisition(int (*func)(char* filepath, char* filename, uint64_t fileindex, uint32_t datasize, void*),void *arg);
|
||||
void registerCallBackStartAcquisition(int (*func)(std::string filepath, std::string filename, uint64_t fileindex, uint32_t datasize, void*),void *arg);
|
||||
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user