Versioning (#568)

- removed getClientServerAPIVersion in server (not used)
- removed rxr side (clientversion compatibility check), removed enum as well as it is now done on the client side.
- versionAPI.h
   - GITBRANCH changed to RELEASE
   - dates for all API changed to "sem_version date". Scripts to compile servers modified for this. Empty "branch" name will end up with developer for sem_version.

- Version class with constructor taking in the long version (APILIB date). Other member functions including concise(to get sem_version for new releases and date for old releases), 
  
- bypassing initial tests, also now bypasses the client-rxr compatibility check (at rx_hostname command)

- previously, compatibility between client-det was ensuring both had the same detector API (eg. same APIJUNGFRAU)
   - Now, compatibility only checks APILIB (client side) and detector API(eg. APIJUNGFRAU) (detector side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. 
   - If server is from an older release, it will compare dates like previous implementation (APIJUNGFRAU from both client and det)
 
- - previously, compatibility between client-rxr was ensuring both had the same APIRECEIVER
   - Now, compatibility only checks APILIB (client side) and APIRECEIVER (rxr side) have same major version. It only does backward compatibility test. Rest is upto user to ensure. 
   - If rxr is from an older release, it will compare dates like previous implementation (APIRECEIVER from both client and rxr)

- removed APIGUI, evalVersionVariables.sh, genVersionHeader.sh (not needed or not used)

- clientVersion, rxrversion and detectorserverversion all return strings and not integers (in hex) anymore. Depending if it has semantic versioning, it will print that or the date if it is too old.

- fixed in python (strings for versions)
- check_version function in detector server changed to "initial checks" as it only checks server-firmware compatibility and initial server checks. Client compatibilities are moved to client side.
- --version gives sem_version and date? Is date needed as well. The clientversion, detserverversion and rxrversion API gives only sem_version (no date)
- - formatting
This commit is contained in:
Dhanya Thattil
2022-11-09 11:13:09 +01:00
committed by GitHub
parent b150db0fb3
commit 05f657c106
56 changed files with 609 additions and 414 deletions

View File

@ -277,21 +277,20 @@ std::string CmdProxy::Versions(int action) {
auto t = det->getFirmwareVersion(std::vector<int>{det_id});
os << "\nDetector Type: " << OutString(det->getDetectorType())
<< "\nPackage Version: " << det->getPackageVersion() << std::hex
<< "\nClient Version: 0x" << det->getClientVersion();
<< "\nClient Version: " << det->getClientVersion();
if (det->getDetectorType().squash() == defs::EIGER) {
os << "\nFirmware Version: " << OutString(t);
} else {
os << "\nFirmware Version: " << OutStringHex(t);
}
os << "\nDetector Server Version: "
<< OutStringHex(
<< OutString(
det->getDetectorServerVersion(std::vector<int>{det_id}));
os << "\nDetector Server Version: "
os << "\nDetector Kernel Version: "
<< OutString(det->getKernelVersion({std::vector<int>{det_id}}));
if (det->getUseReceiverFlag().squash(true)) {
os << "\nReceiver Version: "
<< OutStringHex(
det->getReceiverVersion(std::vector<int>{det_id}));
<< OutString(det->getReceiverVersion(std::vector<int>{det_id}));
}
os << std::dec << '\n';
} else if (action == defs::PUT_ACTION) {
@ -324,12 +323,12 @@ std::string CmdProxy::ClientVersion(int action) {
std::ostringstream os;
os << cmd << ' ';
if (action == defs::HELP_ACTION) {
os << "\n\tClient software version in format [0xYYMMDD]." << '\n';
os << "\n\tClient software version" << '\n';
} else if (action == defs::GET_ACTION) {
if (!args.empty()) {
WrongNumberOfParameters(0);
}
os << ToStringHex(det->getClientVersion()) << '\n';
os << det->getClientVersion() << '\n';
} else if (action == defs::PUT_ACTION) {
throw RuntimeError("cannot put");
} else {
@ -2563,8 +2562,7 @@ std::string CmdProxy::AdcVpp(int action) {
if (action == defs::HELP_ACTION) {
os << "[dac or mV value][(optional unit) mV] \n\t[Ctb][Moench] Vpp of "
"ADC.\n\t 0 -> 1V ; 1 -> 1.14V ; 2 -> 1.33V ; 3 -> 1.6V ; 4 -> "
"2V. "
"\n\tAdvanced User function!\n"
"2V. \n\tAdvanced User function!\n"
<< '\n';
return os.str();
}