mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2026-02-16 02:58:40 +01:00
Quad (#39)
* making quad work in developer branch * binary added * minor changes * bug fix to set quad to 0 when more than 1 detector
This commit is contained in:
@@ -200,6 +200,8 @@ int slsReceiverTCPIPInterface::function_table(){
|
||||
flist[F_SET_RECEIVER_DBIT_LIST] = &slsReceiverTCPIPInterface::set_dbit_list;
|
||||
flist[F_GET_RECEIVER_DBIT_LIST] = &slsReceiverTCPIPInterface::get_dbit_list;
|
||||
flist[F_RECEIVER_DBIT_OFFSET] = &slsReceiverTCPIPInterface::set_dbit_offset;
|
||||
flist[F_SET_RECEIVER_QUAD] = &slsReceiverTCPIPInterface::set_quad_type;
|
||||
|
||||
|
||||
for (int i = NUM_DET_FUNCTIONS + 1; i < NUM_REC_FUNCTIONS ; i++) {
|
||||
FILE_LOG(logDEBUG1) << "function fnum: " << i << " (" <<
|
||||
@@ -1306,3 +1308,16 @@ int slsReceiverTCPIPInterface::set_dbit_offset(Interface &socket) {
|
||||
FILE_LOG(logDEBUG1) << "Dbit offset retval: " << retval;
|
||||
return socket.sendResult(retval);
|
||||
}
|
||||
|
||||
int slsReceiverTCPIPInterface::set_quad_type(Interface &socket) {
|
||||
auto quadEnable = socket.Receive<int>();
|
||||
if (quadEnable >= 0) {
|
||||
VerifyIdle(socket);
|
||||
FILE_LOG(logDEBUG1) << "Setting quad:" << quadEnable;
|
||||
impl()->setQuad(quadEnable == 0 ? false : true);
|
||||
}
|
||||
int retval = impl()->getQuad() ? 1 : 0;
|
||||
validate(quadEnable, retval, "set quad", DEC);
|
||||
FILE_LOG(logDEBUG1) << "quad retval:" << retval;
|
||||
return socket.Send(OK);
|
||||
}
|
||||
Reference in New Issue
Block a user