* 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:
Dhanya Thattil
2019-07-22 16:41:03 +02:00
committed by GitHub
parent 0fa63f8be2
commit e7a76ccea1
23 changed files with 432 additions and 70 deletions

View File

@@ -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);
}