mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-12 04:47:14 +02:00
WIP
This commit is contained in:
@ -63,10 +63,10 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
std::string getDetectorHostname() const;
|
||||
|
||||
/*
|
||||
* Get flipped data across 'axis'
|
||||
* @return if data is flipped across 'axis'
|
||||
* Get flipped data across x axis
|
||||
* @return if data is flipped across x axis
|
||||
*/
|
||||
int getFlippedData(int axis = 0) const;
|
||||
int getFlippedDataX() const;
|
||||
|
||||
/**
|
||||
* Get Gap Pixels Enable (eiger specific)
|
||||
@ -390,10 +390,10 @@ class slsReceiverImplementation : private virtual slsDetectorDefs {
|
||||
void setMultiDetectorSize(const int *size);
|
||||
|
||||
/*
|
||||
* Get flipped data across 'axis'
|
||||
* @return if data is flipped across 'axis'
|
||||
* Get flipped data across x axis
|
||||
* @return if data is flipped across x axis
|
||||
*/
|
||||
void setFlippedData(int axis = 0, int enable = -1);
|
||||
void setFlippedDataX(int enable = -1);
|
||||
|
||||
/**
|
||||
* Set Gap Pixels Enable (eiger specific)
|
||||
|
@ -148,16 +148,9 @@ std::string slsReceiverImplementation::getDetectorHostname() const {
|
||||
return std::string(detHostname);
|
||||
}
|
||||
|
||||
int slsReceiverImplementation::getFlippedData(int axis) const {
|
||||
int slsReceiverImplementation::getFlippedDataX() const {
|
||||
FILE_LOG(logDEBUG3) << __SHORT_AT__ << " called";
|
||||
switch(axis) {
|
||||
case 0:
|
||||
return flippedDataX;
|
||||
case 1:
|
||||
return 0;
|
||||
default:
|
||||
return -1;
|
||||
}
|
||||
return flippedDataX;
|
||||
}
|
||||
|
||||
bool slsReceiverImplementation::getGapPixelsEnable() const {
|
||||
@ -482,10 +475,8 @@ void slsReceiverImplementation::setMultiDetectorSize(const int *size) {
|
||||
FILE_LOG(logINFO) << log_message;
|
||||
}
|
||||
|
||||
void slsReceiverImplementation::setFlippedData(int axis, int enable) {
|
||||
void slsReceiverImplementation::setFlippedDataX(int enable) {
|
||||
FILE_LOG(logDEBUG3) << __SHORT_AT__ << " called";
|
||||
if (axis != 0)
|
||||
return;
|
||||
flippedDataX = (enable == 0) ? 0 : 1;
|
||||
|
||||
if (!quadEnable) {
|
||||
|
@ -976,19 +976,18 @@ int slsReceiverTCPIPInterface::set_streaming_timer(Interface &socket) {
|
||||
int slsReceiverTCPIPInterface::set_flipped_data(Interface &socket) {
|
||||
// TODO! Why 2 args?
|
||||
memset(mess, 0, sizeof(mess));
|
||||
int args[2]{0, -1};
|
||||
socket.Receive(args);
|
||||
auto arg = socket.Receive<int>();
|
||||
|
||||
if (myDetectorType != EIGER)
|
||||
functionNotImplemented();
|
||||
|
||||
if (args[1] >= 0) {
|
||||
if (arg >= 0) {
|
||||
VerifyIdle(socket);
|
||||
FILE_LOG(logDEBUG1) << "Setting flipped data:" << args[1];
|
||||
impl()->setFlippedData(args[0], args[1]);
|
||||
FILE_LOG(logDEBUG1) << "Setting flipped data:" << arg;
|
||||
impl()->setFlippedDataX(arg);
|
||||
}
|
||||
int retval = impl()->getFlippedData(args[0]);
|
||||
validate(args[1], retval, std::string("set flipped data"), DEC);
|
||||
int retval = impl()->getFlippedDataX();
|
||||
validate(arg, retval, std::string("set flipped data"), DEC);
|
||||
FILE_LOG(logDEBUG1) << "Flipped Data:" << retval;
|
||||
return socket.sendResult(retval);
|
||||
}
|
||||
|
Reference in New Issue
Block a user