mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-10 12:08:41 +01:00
get rx_roi from metadata from rxr, cant reconstruct. fixed clear roi should give 1 roi min
This commit is contained in:
@@ -220,6 +220,7 @@ int ClientInterface::functionTable(){
|
||||
flist[F_RECEIVER_SET_COLUMN] = &ClientInterface::set_column;
|
||||
flist[F_GET_RECEIVER_DBIT_REORDER] = &ClientInterface::get_dbit_reorder;
|
||||
flist[F_SET_RECEIVER_DBIT_REORDER] = &ClientInterface::set_dbit_reorder;
|
||||
flist[F_RECEIVER_GET_ROI_METADATA] = &ClientInterface::get_roi_metadata;
|
||||
|
||||
|
||||
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
|
||||
@@ -1838,4 +1839,16 @@ int ClientInterface::set_dbit_reorder(Interface &socket) {
|
||||
return socket.Send(OK);
|
||||
}
|
||||
|
||||
int ClientInterface::get_roi_metadata(Interface &socket) {
|
||||
if (detType == CHIPTESTBOARD || detType == XILINX_CHIPTESTBOARD)
|
||||
functionNotImplemented();
|
||||
auto retvals = impl()->getMultiROIMetadata();
|
||||
LOG(logINFORED) << "Receiver ROI metadata retval:" << ToString(retvals);
|
||||
auto size = static_cast<int>(retvals.size());
|
||||
socket.Send(size);
|
||||
if (size > 0)
|
||||
socket.Send(retvals);
|
||||
return OK;
|
||||
}
|
||||
|
||||
} // namespace sls
|
||||
|
||||
@@ -166,6 +166,7 @@ class ClientInterface : private virtual slsDetectorDefs {
|
||||
int set_column(ServerInterface &socket);
|
||||
int get_dbit_reorder(ServerInterface &socket);
|
||||
int set_dbit_reorder(ServerInterface &socket);
|
||||
int get_roi_metadata(ServerInterface &socket);
|
||||
|
||||
Implementation *impl() {
|
||||
if (receiver != nullptr) {
|
||||
|
||||
@@ -450,6 +450,10 @@ void Implementation::setMultiROIMetadata(
|
||||
LOG(logINFO) << "Multi ROI Metadata: " << ToString(multiRoiMetadata);
|
||||
}
|
||||
|
||||
std::vector<slsDetectorDefs::ROI> Implementation::getMultiROIMetadata() const {
|
||||
return multiRoiMetadata;
|
||||
}
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
* File Parameters *
|
||||
|
||||
@@ -61,6 +61,7 @@ class Implementation : private virtual slsDetectorDefs {
|
||||
std::vector<defs::ROI> getPortROIs() const;
|
||||
void setPortROIs(const std::vector<defs::ROI> &args);
|
||||
void setMultiROIMetadata(const std::vector<slsDetectorDefs::ROI> &args);
|
||||
std::vector<slsDetectorDefs::ROI> getMultiROIMetadata() const;
|
||||
|
||||
/**************************************************
|
||||
* *
|
||||
|
||||
Reference in New Issue
Block a user