mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 21:07:13 +02:00
wip
This commit is contained in:
@ -1494,6 +1494,43 @@ TEST_CASE("dbitpipeline", "[.cmd]") {
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("partialread", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
auto det_type = det.getDetectorType().squash();
|
||||
if (det_type == defs::EIGER || det_type == defs::JUNGFRAU) {
|
||||
auto prev_val = det.getPartialReadout();
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("partialread", {"256"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "partialread 256\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("partialread", {}, -1, GET, oss);
|
||||
REQUIRE(oss.str() == "partialread 256\n");
|
||||
}
|
||||
{
|
||||
std::ostringstream oss;
|
||||
proxy.Call("partialread", {"16"}, -1, PUT, oss);
|
||||
REQUIRE(oss.str() == "partialread 16\n");
|
||||
}
|
||||
if (det_type == defs::JUNGFRAU) {
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"7"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"20"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"44"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"513"}, -1, PUT));
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"1"}, -1, PUT));
|
||||
}
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {"0"}, -1, PUT));
|
||||
for (int i = 0; i != det.size(); ++i) {
|
||||
det.setPartialReadout(prev_val[i], {i});
|
||||
}
|
||||
} else {
|
||||
REQUIRE_THROWS(proxy.Call("partialread", {}, -1, GET));
|
||||
}
|
||||
}
|
||||
|
||||
TEST_CASE("currentsource", "[.cmd]") {
|
||||
Detector det;
|
||||
CmdProxy proxy(&det);
|
||||
|
Reference in New Issue
Block a user