mirror of
https://github.com/slsdetectorgroup/slsDetectorPackage.git
synced 2025-04-23 06:50:02 +02:00
gotthard server: check client api version done
This commit is contained in:
parent
34b659fa15
commit
ecc970bc73
@ -2,4 +2,4 @@
|
||||
#define APIRECEIVER 0x180517
|
||||
#define APIEIGER 0x180523
|
||||
#define APIJUNGFRAU 0x180523
|
||||
#define APIGOTTHARD 0x20170101
|
||||
#define APIGOTTHARD 0x180529
|
||||
|
@ -1,9 +1,9 @@
|
||||
Path: slsDetectorsPackage/slsDetectorSoftware/gotthardDetectorServer
|
||||
URL: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repository Root: origin git@github.com:slsdetectorgroup/slsDetectorPackage.git
|
||||
Repsitory UUID: 3f6120628938fb0820908fb82574418039a3b352
|
||||
Revision: 230
|
||||
Branch: developer
|
||||
Repsitory UUID: 34b659fa1549f13575012a50183b0ec8f4c82ec4
|
||||
Revision: 234
|
||||
Branch: gotthardversioning
|
||||
Last Changed Author: Dhanya_Thattil
|
||||
Last Changed Rev: 3829
|
||||
Last Changed Date: 2018-05-22 13:58:08.000000002 +0200 ./mcb_funcs.c
|
||||
Last Changed Rev: 3849
|
||||
Last Changed Date: 2018-05-29 12:09:14.000000002 +0200 ./server_funcs.c
|
||||
|
@ -1,6 +1,6 @@
|
||||
#define GITURL "git@github.com:slsdetectorgroup/slsDetectorPackage.git"
|
||||
#define GITREPUUID "3f6120628938fb0820908fb82574418039a3b352"
|
||||
#define GITREPUUID "34b659fa1549f13575012a50183b0ec8f4c82ec4"
|
||||
#define GITAUTH "Dhanya_Thattil"
|
||||
#define GITREV 0x3829
|
||||
#define GITDATE 0x20180522
|
||||
#define GITBRANCH "developer"
|
||||
#define GITREV 0x3849
|
||||
#define GITDATE 0x20180529
|
||||
#define GITBRANCH "gotthardversioning"
|
||||
|
Binary file not shown.
@ -11,6 +11,7 @@
|
||||
#include "registers_g.h"
|
||||
#include "gitInfoGotthard.h"
|
||||
#include "AD9257.h" // include "commonServerFunctions.h"
|
||||
#include "versionAPI.h"
|
||||
|
||||
#define FIFO_DATA_REG_OFF 0x50<<11
|
||||
#define CONTROL_REG 0x24<<11
|
||||
@ -55,8 +56,6 @@ char mess[MAX_STR_LENGTH];
|
||||
|
||||
int digitalTestBit = 0;
|
||||
|
||||
int isControlServer = 0;
|
||||
|
||||
|
||||
int init_detector( int b) {
|
||||
|
||||
@ -72,7 +71,6 @@ int init_detector( int b) {
|
||||
}
|
||||
|
||||
if (b) {
|
||||
isControlServer = 1;
|
||||
#ifdef PROPIXD
|
||||
printf("***This is a PROPIX detector***\n");
|
||||
#else
|
||||
@ -596,6 +594,8 @@ int get_id(int file_des) {
|
||||
case DETECTOR_SOFTWARE_VERSION:
|
||||
retval = (GITDATE & 0xFFFFFF);
|
||||
break;
|
||||
case CLIENT_SOFTWARE_API_VERSION:
|
||||
return APIGOTTHARD;
|
||||
default:
|
||||
printf("Required unknown id %d \n", arg);
|
||||
ret=FAIL;
|
||||
@ -3165,41 +3165,13 @@ int check_version(int file_des) {
|
||||
|
||||
|
||||
// execute action
|
||||
#ifdef MCB_FUNCS
|
||||
|
||||
// check software- firmware compatibility and basic tests
|
||||
if (isControlServer) {
|
||||
#ifdef VERBOSE
|
||||
printf("Checking software-firmware compatibility and basic test result\n");
|
||||
#endif
|
||||
// check if firmware check is done
|
||||
if (!isFirmwareCheckDone()) {
|
||||
usleep(3 * 1000 * 1000);
|
||||
if (!isFirmwareCheckDone()) {
|
||||
ret = FAIL;
|
||||
strcpy(mess,"Firmware Software Compatibility Check (Server Initialization) "
|
||||
"still not done done in server. Unexpected.\n");
|
||||
cprintf(RED, "Warning: %s", mess);
|
||||
}
|
||||
}
|
||||
// check firmware check result
|
||||
if (ret == OK) {
|
||||
char* firmware_message = NULL;
|
||||
if (getFirmwareCheckResult(&firmware_message) == FAIL) {
|
||||
ret = FAIL;
|
||||
strcpy(mess, firmware_message);
|
||||
cprintf(RED, "Warning: %s", mess);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (ret == OK) {
|
||||
#ifdef VERBOSE
|
||||
printf("Checking versioning compatibility with value %d\n",arg);
|
||||
#endif
|
||||
int64_t client_requiredVersion = arg;
|
||||
int64_t det_apiVersion = getDetectorId(CLIENT_SOFTWARE_API_VERSION);
|
||||
int64_t det_version = getDetectorId(DETECTOR_SOFTWARE_VERSION);
|
||||
int64_t det_apiVersion = APIGOTTHARD;
|
||||
int64_t det_version = (GITDATE & 0xFFFFFF);
|
||||
|
||||
// old client
|
||||
if (det_apiVersion > client_requiredVersion) {
|
||||
@ -3221,7 +3193,7 @@ int check_version(int file_des) {
|
||||
cprintf(RED, "Warning: %s", mess);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
// ret could be swapped during sendData
|
||||
|
Loading…
x
Reference in New Issue
Block a user