mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-22 01:27:59 +02:00
all tests pased
This commit is contained in:
@ -623,6 +623,27 @@ TEST_CASE("rx_roi", "[.cmdcall]") {
|
|||||||
"rx_roi", {"[5, 10, 20, 30];[25, 28, " + stringMin + ", " + stringMax + "]"}, -1, PUT, oss));
|
"rx_roi", {"[5, 10, 20, 30];[25, 28, " + stringMin + ", " + stringMax + "]"}, -1, PUT, oss));
|
||||||
REQUIRE(oss.str() ==
|
REQUIRE(oss.str() ==
|
||||||
"rx_roi [[5, 10, 20, 30], [25, 28, " + stringMin + ", " + stringMax + "]]\n");
|
"rx_roi [[5, 10, 20, 30], [25, 28, " + stringMin + ", " + stringMax + "]]\n");
|
||||||
|
|
||||||
|
// verify individual roi
|
||||||
|
if (det_type == defs::JUNGFRAU) {
|
||||||
|
std::ostringstream oss, oss1;
|
||||||
|
REQUIRE_NOTHROW(caller.call(
|
||||||
|
"rx_roi", {"[100,500,100,400]"}, -1, PUT, oss));
|
||||||
|
REQUIRE(oss.str() == "rx_roi [[100, 500, 100, 400]]\n");
|
||||||
|
REQUIRE_NOTHROW(
|
||||||
|
caller.call("rx_roi", {}, 0, GET, oss1));
|
||||||
|
REQUIRE(oss1.str() == "rx_roi [[[100, 500, 100, 255], "
|
||||||
|
"[100, 500, 256, 400]]]\n");
|
||||||
|
} else {
|
||||||
|
std::ostringstream oss, oss1;
|
||||||
|
REQUIRE_NOTHROW(caller.call(
|
||||||
|
"rx_roi", {"[100,200,100,300]"}, -1, PUT, oss));
|
||||||
|
REQUIRE(oss.str() == "rx_roi [[100, 200, 100, 300]]\n");
|
||||||
|
REQUIRE_NOTHROW(
|
||||||
|
caller.call("rx_roi", {}, 0, GET, oss1));
|
||||||
|
REQUIRE(oss1.str() == "rx_roi [[[100, 200, 100, 199], "
|
||||||
|
"[100, 200, 200, 300]]]\n");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1716,13 +1716,11 @@ int ClientInterface::set_receiver_roi(Interface &socket) {
|
|||||||
|
|
||||||
int ClientInterface::set_receiver_roi_metadata(Interface &socket) {
|
int ClientInterface::set_receiver_roi_metadata(Interface &socket) {
|
||||||
auto roiSize = socket.Receive<int>();
|
auto roiSize = socket.Receive<int>();
|
||||||
if (roiSize <= 0) {
|
|
||||||
throw RuntimeError("Invalid number of ReceiverROI metadata: " +
|
|
||||||
std::to_string(roiSize));
|
|
||||||
}
|
|
||||||
LOG(logDEBUG) << "Number of ReceiverROI metadata: " << roiSize;
|
LOG(logDEBUG) << "Number of ReceiverROI metadata: " << roiSize;
|
||||||
std::vector<ROI> rois(roiSize);
|
std::vector<ROI> rois(roiSize);
|
||||||
socket.Receive(rois);
|
if (roiSize > 0) {
|
||||||
|
socket.Receive(rois);
|
||||||
|
}
|
||||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD)
|
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD)
|
||||||
functionNotImplemented();
|
functionNotImplemented();
|
||||||
verifyIdle(socket);
|
verifyIdle(socket);
|
||||||
|
Reference in New Issue
Block a user