mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-19 16:27:13 +02:00
wip
This commit is contained in:
@ -1560,7 +1560,7 @@ std::string CmdProxy::DataStream(int action) {
|
||||
os << cmd << ' ';
|
||||
bool left = true;
|
||||
if (action == defs::HELP_ACTION) {
|
||||
os << "[0, 1] [left|right]\n\t[Eiger] Enables or disables data "
|
||||
os << "[left|right] [0, 1]\n\t[Eiger] Enables or disables data "
|
||||
"streaming from left or/and right side of detector. 1 (enabled) "
|
||||
"by default."
|
||||
<< '\n';
|
||||
@ -1582,16 +1582,16 @@ std::string CmdProxy::DataStream(int action) {
|
||||
if (args.size() != 2) {
|
||||
WrongNumberOfParameters(2);
|
||||
}
|
||||
if (args[1] == "left") {
|
||||
if (args[0] == "left") {
|
||||
left = true;
|
||||
} else if (args[1] == "right") {
|
||||
} else if (args[0] == "right") {
|
||||
left = false;
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown data argument " + args[1]);
|
||||
throw sls::RuntimeError("Unknown data argument " + args[0]);
|
||||
}
|
||||
det->setDataStream(left, StringTo<bool>(args[0]),
|
||||
det->setDataStream(left, StringTo<bool>(args[1]),
|
||||
std::vector<int>{det_id});
|
||||
os << args.front() << '\n';
|
||||
os << args << '\n';
|
||||
} else {
|
||||
throw sls::RuntimeError("Unknown action");
|
||||
}
|
||||
|
@ -1373,9 +1373,9 @@ Result<bool> Detector::getDataStream(const bool left, Positions pos) const {
|
||||
return pimpl->Parallel(&Module::getDataStream, pos, left);
|
||||
}
|
||||
|
||||
void Detector::setDataStream(const bool enable, const bool left,
|
||||
void Detector::setDataStream(const bool left, const bool enable,
|
||||
Positions pos) {
|
||||
pimpl->Parallel(&Module::setDataStream, pos, enable, left);
|
||||
pimpl->Parallel(&Module::setDataStream, pos, left, enable);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
|
@ -1511,9 +1511,9 @@ bool Module::getDataStream(const bool left) const {
|
||||
return sendToDetector<int>(F_GET_DATASTREAM, static_cast<int>(left));
|
||||
}
|
||||
|
||||
void Module::setDataStream(const bool enable, const bool left) {
|
||||
int args[]{static_cast<int>(enable), static_cast<int>(left)};
|
||||
sendToDetector(F_GET_DATASTREAM, args, nullptr);
|
||||
void Module::setDataStream(const bool left, const bool enable) {
|
||||
int args[]{static_cast<int>(left), static_cast<int>(enable)};
|
||||
sendToDetector(F_SET_DATASTREAM, args, nullptr);
|
||||
}
|
||||
|
||||
// Jungfrau Specific
|
||||
|
@ -344,7 +344,7 @@ class Module : public virtual slsDetectorDefs {
|
||||
bool getQuad() const;
|
||||
void setQuad(const bool enable);
|
||||
bool getDataStream(const bool left) const;
|
||||
void setDataStream(const bool enable, const bool left);
|
||||
void setDataStream(const bool left, const bool enable);
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
|
Reference in New Issue
Block a user