mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-23 01:58:00 +02:00
added functionality to set additional json header key value pairs for prototype ctb, server fixed for eiger compile from ctb integration
This commit is contained in:
@ -1934,6 +1934,29 @@ std::string multiSlsDetector::getAdditionalJsonHeader(int detPos) {
|
||||
return sls::concatenateIfDifferent(r);
|
||||
}
|
||||
|
||||
std::string multiSlsDetector::setAdditionalJsonParameter(const std::string& key, const std::string& value, int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
return detectors[detPos]->setAdditionalJsonParameter(key, value);
|
||||
}
|
||||
|
||||
// multi
|
||||
auto r = parallelCall(&slsDetector::setAdditionalJsonParameter, key, value);
|
||||
return sls::concatenateIfDifferent(r);
|
||||
}
|
||||
|
||||
std::string multiSlsDetector::getAdditionalJsonParameter(const std::string& key, int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
return detectors[detPos]->getAdditionalJsonParameter(key);
|
||||
}
|
||||
|
||||
// multi
|
||||
auto r = serialCall(&slsDetector::getAdditionalJsonParameter, key);
|
||||
return sls::concatenateIfDifferent(r);
|
||||
}
|
||||
|
||||
|
||||
int multiSlsDetector::setReceiverUDPSocketBufferSize(int udpsockbufsize, int detPos) {
|
||||
// single
|
||||
if (detPos >= 0) {
|
||||
|
@ -1057,17 +1057,36 @@ class multiSlsDetector : public virtual slsDetectorDefs,
|
||||
* Sets the additional json header
|
||||
* @param jsonheader additional json header
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns additional json header, returns "none" if default setting and no custom ip set
|
||||
* @returns additional json header, default is empty
|
||||
*/
|
||||
std::string setAdditionalJsonHeader(const std::string& jsonheader, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Returns the additional json header
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the additional json header, returns "none" if default setting and no custom ip set
|
||||
* @returns the additional json header, default is empty
|
||||
*/
|
||||
std::string getAdditionalJsonHeader(int detPos = -1);
|
||||
|
||||
/**
|
||||
* Sets the value for the additional json header parameter if found, else append it
|
||||
* @param key additional json header parameter
|
||||
* @param value additional json header parameter value (cannot be empty)
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the additional json header parameter value,
|
||||
* empty if no parameter found in additional json header
|
||||
*/
|
||||
std::string setAdditionalJsonParameter(const std::string& key, const std::string& value, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Returns the additional json header parameter value
|
||||
* @param key additional json header parameter
|
||||
* @param detPos -1 for all detectors in list or specific detector position
|
||||
* @returns the additional json header parameter value,
|
||||
* empty if no parameter found in additional json header
|
||||
*/
|
||||
std::string getAdditionalJsonParameter(const std::string& key, int detPos = -1);
|
||||
|
||||
/**
|
||||
* Sets the receiver UDP socket buffer size
|
||||
* @param udpsockbufsize additional json header
|
||||
|
Reference in New Issue
Block a user