From 702cba252bb241a4edd592f6c6d66905381aa532 Mon Sep 17 00:00:00 2001 From: Xavier Elattaoui <xavier.elattaoui@synchrotron-soleil.fr> Date: Wed, 21 Jun 2017 09:58:07 +0000 Subject: [PATCH] Release preparation: VC12 vs Tango9.2.5 compilation fixed (helpers/Xstring.h instead of Xstring.h). --- pom.xml | 2 +- src/AbstractElectrometerClass.cpp | 2 +- src/KeithleyDDCProtocol.cpp | 2 +- src/KeithleySCPIProtocol.cpp | 4 +- src/Keithley_485.cpp | 2 +- src/Keithley_486.cpp | 2 +- src/Keithley_487.cpp | 2 +- src/Keithley_617.cpp | 2 +- src/Keithley_6485.cpp | 2 +- src/Keithley_6487.cpp | 2 +- src/Keithley_6512.cpp | 2 +- src/Keithley_6514.cpp | 2 +- src/Keithley_6517.cpp | 2 +- src/N_PhotoConducteur.cpp | 8 ++-- src/N_PhotoVoltaique.cpp | 12 +++--- src/NovelecProtocol.cpp | 2 +- src/Novelec_MCCE2.cpp | 64 +++++++++++++++---------------- 17 files changed, 57 insertions(+), 57 deletions(-) diff --git a/pom.xml b/pom.xml index d93cdd6..af1b3c2 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ </parent> <groupId>fr.soleil.lib</groupId> <artifactId>Electrometers-${aol}-${library}-${mode}</artifactId> - <version>2.5.23-SNAPSHOT</version> + <version>2.5.23</version> <packaging>nar</packaging> <name>Electrometers library</name> <description>Electrometers library</description> diff --git a/src/AbstractElectrometerClass.cpp b/src/AbstractElectrometerClass.cpp index 6695583..46dc216 100644 --- a/src/AbstractElectrometerClass.cpp +++ b/src/AbstractElectrometerClass.cpp @@ -136,7 +136,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "AbstractElectrometerClass.h" #include "ElectrometerException.h" diff --git a/src/KeithleyDDCProtocol.cpp b/src/KeithleyDDCProtocol.cpp index 443bdbb..53377f7 100644 --- a/src/KeithleyDDCProtocol.cpp +++ b/src/KeithleyDDCProtocol.cpp @@ -17,7 +17,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "KeithleyDDCProtocol.h" // ============================================================================ diff --git a/src/KeithleySCPIProtocol.cpp b/src/KeithleySCPIProtocol.cpp index c2a84a3..a38faa6 100644 --- a/src/KeithleySCPIProtocol.cpp +++ b/src/KeithleySCPIProtocol.cpp @@ -17,7 +17,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #ifndef WIN32 # include <unistd.h> #endif @@ -676,7 +676,7 @@ std::string dataStr(""); std::vector<double> argout; std::string::size_type posBeg; std::string::size_type posEnd; - + //- posBeg = 0; posEnd = datalist.find(',', posBeg); diff --git a/src/Keithley_485.cpp b/src/Keithley_485.cpp index 5a514d6..09cd71e 100644 --- a/src/Keithley_485.cpp +++ b/src/Keithley_485.cpp @@ -18,7 +18,7 @@ #include <stdexcept> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "KeithleyDDCProtocol.h" #include "Keithley_485.h" diff --git a/src/Keithley_486.cpp b/src/Keithley_486.cpp index ba2dcbe..1aaf3a3 100644 --- a/src/Keithley_486.cpp +++ b/src/Keithley_486.cpp @@ -19,7 +19,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_486.h" #include "KeithleyDDCProtocol.h" diff --git a/src/Keithley_487.cpp b/src/Keithley_487.cpp index fd0f17f..0d4a9b6 100644 --- a/src/Keithley_487.cpp +++ b/src/Keithley_487.cpp @@ -19,7 +19,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_487.h" #include "KeithleyDDCProtocol.h" diff --git a/src/Keithley_617.cpp b/src/Keithley_617.cpp index dc70d18..d9592c6 100644 --- a/src/Keithley_617.cpp +++ b/src/Keithley_617.cpp @@ -18,7 +18,7 @@ #include <stdexcept> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_617.h" #include "KeithleyDDCProtocol.h" diff --git a/src/Keithley_6485.cpp b/src/Keithley_6485.cpp index 5088fec..6c48266 100644 --- a/src/Keithley_6485.cpp +++ b/src/Keithley_6485.cpp @@ -18,7 +18,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_6485.h" #include "KeithleySCPIProtocol.h" /* diff --git a/src/Keithley_6487.cpp b/src/Keithley_6487.cpp index 95e4995..f68e87a 100644 --- a/src/Keithley_6487.cpp +++ b/src/Keithley_6487.cpp @@ -18,7 +18,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_6487.h" #include "KeithleySCPIProtocol.h" /* diff --git a/src/Keithley_6512.cpp b/src/Keithley_6512.cpp index 8919229..3955dfa 100644 --- a/src/Keithley_6512.cpp +++ b/src/Keithley_6512.cpp @@ -18,7 +18,7 @@ #include <stdexcept> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_6512.h" #include "KeithleyDDCProtocol.h" diff --git a/src/Keithley_6514.cpp b/src/Keithley_6514.cpp index 6d56793..a2bcd40 100644 --- a/src/Keithley_6514.cpp +++ b/src/Keithley_6514.cpp @@ -18,7 +18,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include <tango.h> //- Tango exceptions #include "Keithley_6514.h" #include "KeithleySCPIProtocol.h" diff --git a/src/Keithley_6517.cpp b/src/Keithley_6517.cpp index d65dd9a..61e9024 100644 --- a/src/Keithley_6517.cpp +++ b/src/Keithley_6517.cpp @@ -18,7 +18,7 @@ #include <sstream> #include <string> #include <math.h> //- for ceil -#include <Xstring.h> +#include <helpers/Xstring.h> #include "Keithley_6517.h" #include "KeithleySCPIProtocol.h" /* diff --git a/src/N_PhotoConducteur.cpp b/src/N_PhotoConducteur.cpp index e8d2895..30d811e 100644 --- a/src/N_PhotoConducteur.cpp +++ b/src/N_PhotoConducteur.cpp @@ -18,7 +18,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "N_PhotoConducteur.h" #include "NovelecProtocol.h" /* @@ -75,7 +75,7 @@ std::stringstream cmd_to_send; //- build and send the command cmd_to_send << _range; - + _electrometerProtocol->set_range(cmd_to_send.str()); } @@ -104,7 +104,7 @@ std::stringstream cmd_to_send; //- build and send the command // _rangeStr = NType1_rangeValue[_range]; cmd_to_send << _range; - + _electrometerProtocol->set_range(cmd_to_send.str()); } @@ -161,7 +161,7 @@ std::stringstream range_cmd_to_send; "N_PhotoConducteur::set_ElectroMeterRange( )."); //- it is OK range_cmd_to_send << _range; - + _electrometerProtocol->set_range(range_cmd_to_send.str()); } diff --git a/src/N_PhotoVoltaique.cpp b/src/N_PhotoVoltaique.cpp index 65276bf..7460499 100644 --- a/src/N_PhotoVoltaique.cpp +++ b/src/N_PhotoVoltaique.cpp @@ -18,7 +18,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "N_PhotoVoltaique.h" #include "NovelecProtocol.h" /* @@ -66,7 +66,7 @@ std::stringstream cmd_to_send; this->get_ElectroMeterRange(); _range += 1; -/* +/* //- get range limit switch(_MCCE2electroTypeNumber) { @@ -106,7 +106,7 @@ std::stringstream cmd_to_send; this->get_ElectroMeterRange(); _range -= 1; -/* +/* //- get range limit switch(_MCCE2electroTypeNumber) { @@ -128,7 +128,7 @@ std::stringstream cmd_to_send; //- build and send the command // _rangeStr = NType1_rangeValue[_range]; cmd_to_send << _range; - + _electrometerProtocol->set_range(cmd_to_send.str()); } @@ -187,7 +187,7 @@ std::stringstream range_cmd_to_send; "N_PhotoVoltaique::set_ElectroMeterRange( )."); //- it is OK range_cmd_to_send << _range; - + _electrometerProtocol->set_range(range_cmd_to_send.str()); } @@ -225,4 +225,4 @@ std::string rangeStr(""); "N_PhotoVoltaique::get_ElectroMeterRange( )."); return rangeStr; -} +} diff --git a/src/NovelecProtocol.cpp b/src/NovelecProtocol.cpp index 60529a5..bbe03cc 100644 --- a/src/NovelecProtocol.cpp +++ b/src/NovelecProtocol.cpp @@ -24,7 +24,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "NovelecProtocol.h" //- commands numbers diff --git a/src/Novelec_MCCE2.cpp b/src/Novelec_MCCE2.cpp index 6ce103b..103e6fe 100644 --- a/src/Novelec_MCCE2.cpp +++ b/src/Novelec_MCCE2.cpp @@ -17,7 +17,7 @@ #include <iostream> #include <sstream> #include <string> -#include <Xstring.h> +#include <helpers/Xstring.h> #include "NovelecProtocol.h" #include "Novelec_MCCE2.h" @@ -43,7 +43,7 @@ Novelec_MCCE2::Novelec_MCCE2 (std::string& comLink_device_name, unsigned short a : AbstractElectrometerClass(comLink_device_name), _rangeLimit(0), _address(address), - _MCCE2electroTypeNumber(0), + _MCCE2electroTypeNumber(0), _MCCE2electroTypeStr("Unknown type") { std::cout << "\t\tNovelec_MCCE2::Novelec_MCCE2 <-" << std::endl; @@ -74,37 +74,37 @@ bool Novelec_MCCE2::init_protocol (void) _electrometerProtocol = new NovelecProtocol(_device_proxy_name, _address); if(_electrometerProtocol) - success = _electrometerProtocol->build_communicationLink(); - - //- find electrometer type : - std::string elecTypeStr(""); + success = _electrometerProtocol->build_communicationLink(); + + //- find electrometer type : + std::string elecTypeStr(""); NovelecProtocol* _pNP = dynamic_cast<NovelecProtocol*>(_electrometerProtocol); - if(_pNP) + if(_pNP) elecTypeStr = _pNP->check_electrotype(); - //- get the connected electrometer type : + //- get the connected electrometer type : if(_pNP) this->_MCCE2electroTypeNumber = _pNP->get_electrometerType(); - - switch(_MCCE2electroTypeNumber) - { + + switch(_MCCE2electroTypeNumber) + { case 0 : this->_MCCE2electroTypeStr = "Not connected"; success = false; - break; - case 1 : this->_MCCE2electroTypeStr = "Photovolta�que UHS"; - _rangeLimit = 3; - break; + break; + case 1 : this->_MCCE2electroTypeStr = "Photovolta�que UHS"; + _rangeLimit = 3; + break; case 2 : this->_MCCE2electroTypeStr = "Photovolta�que HS"; - _rangeLimit = 7; - break; - case 3 : this->_MCCE2electroTypeStr = "Photovolta�que MS"; - _rangeLimit = 7; - break; + _rangeLimit = 7; + break; + case 3 : this->_MCCE2electroTypeStr = "Photovolta�que MS"; + _rangeLimit = 7; + break; case 4 : this->_MCCE2electroTypeStr = "Photoconducteur HS"; - _rangeLimit = 3; + _rangeLimit = 3; break; case 5 : this->_MCCE2electroTypeStr = "Photoconducteur MS"; - _rangeLimit = 3; + _rangeLimit = 3; break; default : set_electroState(FAULT); success = false; @@ -286,7 +286,7 @@ std::string Novelec_MCCE2::electrometer_status (void) { //- read novelec status from HW tmp = _electrometerProtocol->get_raw_status(); - + status = XString<short>::convertFromString(tmp); } catch(...) @@ -327,7 +327,7 @@ std::string Novelec_MCCE2::electrometer_status (void) //- error(s) detail(s) if(status & 0x80) - { + { short errors = -1; try { @@ -345,7 +345,7 @@ std::string Novelec_MCCE2::electrometer_status (void) argout += "\nError(s) detail(s) :\n"; argout += "------------------------\n"; - bool change_state_to_alarm = true; + bool change_state_to_alarm = true; if(errors & 0x01) argout += "Param�tre par d�faut\n"; @@ -353,15 +353,15 @@ std::string Novelec_MCCE2::electrometer_status (void) argout += "Erreur s�rie\n"; if(errors & 0x04) argout += "Param�tre invalide\n"; - if(errors & 0x08) - { + if(errors & 0x08) + { argout += "Electrom�tre satur�\n"; - change_state_to_alarm = false; + change_state_to_alarm = false; } - if(errors & 0x10) + if(errors & 0x10) { argout += "Electrom�tre bloqu� (Polarity error ?)\n"; - change_state_to_alarm = false; + change_state_to_alarm = false; } if(errors & 0x20) argout += "HT < limite basse\n"; @@ -377,8 +377,8 @@ std::string Novelec_MCCE2::electrometer_status (void) argout += "Type d'�lectrom�tre inconnu\n"; if(errors & 0x800) argout += "Electrom�tre d�connect�\n"; - - //- set state according to specifications : if "bloqu�" or "satur�" do not change the state to ALARM !! + + //- set state according to specifications : if "bloqu�" or "satur�" do not change the state to ALARM !! if ( change_state_to_alarm ) set_electroState(ALARM); } -- GitLab