mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-06-06 01:50:40 +02:00
changes to includes clkdivider and flags in gui and modify the server for proper checks
This commit is contained in:
parent
584b9e6036
commit
271838b2b5
@ -18,7 +18,6 @@ using namespace std;
|
||||
|
||||
|
||||
/** Error flags */
|
||||
#define NUM_ERROR_FLAGS 32
|
||||
#define CRITICAL_ERROR_MASK 0xFFFFFFFF
|
||||
|
||||
#define CANNOT_CONNECT_TO_DETECTOR 0x8000000000000000ULL
|
||||
@ -50,6 +49,8 @@ using namespace std;
|
||||
#define RECEIVER_DYNAMIC_RANGE 0x0000000000000800ULL
|
||||
#define RECEIVER_TEN_GIGA 0x0000000000001000ULL
|
||||
#define ALLTIMBITS_NOT_SET 0x0000000000002000ULL
|
||||
#define COULD_NOT_SET_SPEED_PARAMETERS 0x0000000000004000ULL
|
||||
#define COULD_NOT_SET_READOUT_FLAGS 0x0000000000008000ULL
|
||||
|
||||
// 0x00000000FFFFFFFFULL
|
||||
/** @short class returning all error messages for error mask */
|
||||
@ -150,7 +151,11 @@ public:
|
||||
if(slsErrorMask&ALLTIMBITS_NOT_SET)
|
||||
retval.append("Could not set all trimbits to value.\n");
|
||||
|
||||
if(slsErrorMask&COULD_NOT_SET_SPEED_PARAMETERS)
|
||||
retval.append("Could not set the speed parameter value\n");
|
||||
|
||||
if(slsErrorMask&COULD_NOT_SET_READOUT_FLAGS)
|
||||
retval.append("Could not set the readout flag\n");
|
||||
|
||||
return retval;
|
||||
|
||||
|
Binary file not shown.
@ -745,7 +745,7 @@ int setDynamicRange(int dr){
|
||||
|
||||
enum readOutFlags setReadOutFlags(enum readOutFlags val){
|
||||
|
||||
enum readOutFlags retval;
|
||||
enum readOutFlags retval = GET_READOUT_FLAGS;
|
||||
if(val!=GET_READOUT_FLAGS){
|
||||
|
||||
|
||||
|
@ -4262,6 +4262,7 @@ int slsDetector::setSpeed(speedVariable sp, int value) {
|
||||
if (ret==FAIL) {
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
setErrorMask((getErrorMask())|(COULD_NOT_SET_SPEED_PARAMETERS));
|
||||
} else {
|
||||
controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
}
|
||||
@ -4530,6 +4531,7 @@ int slsDetector::setReadOutFlags(readOutFlags flag){
|
||||
if (ret==FAIL) {
|
||||
controlSocket->ReceiveDataOnly(mess,sizeof(mess));
|
||||
std::cout<< "Detector returned error: " << mess << std::endl;
|
||||
setErrorMask((getErrorMask())|(COULD_NOT_SET_READOUT_FLAGS));
|
||||
} else {
|
||||
controlSocket->ReceiveDataOnly(&retval,sizeof(retval));
|
||||
thisDetector->roFlags=retval;
|
||||
|
@ -2779,9 +2779,10 @@ int set_readout_flags(int file_des) {
|
||||
#endif
|
||||
|
||||
if (ret==OK) {
|
||||
if (retval == -1) {
|
||||
if ((retval == -1) || ((arg!=-1)&&((retval&arg)!=arg))){
|
||||
cprintf(RED,"arg:0x%x, retval:0x%x retval&arg:0x%x\n",(int)arg,(int)retval,retval&arg);
|
||||
ret=FAIL;
|
||||
sprintf(mess,"Could not change readout flag: should be %d but is %d\n", arg, retval);
|
||||
sprintf(mess,"Could not change readout flag: should be 0x%x but is 0x%x\n", arg, retval);
|
||||
cprintf(RED, "%s",mess);
|
||||
}else if (differentClients)
|
||||
ret=FORCE_UPDATE;
|
||||
|
Loading…
x
Reference in New Issue
Block a user