diff --git a/pom.xml b/pom.xml index d93cdd6c33dc164c90a3aa858533b6b7faedbfde..af1b3c2b3522689c455dc4954f931efcec9bf25d 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 6695583ca0ec9bce8ec25f3035428d4b67df4548..46dc216db617f86159e8db8b69552bc08e192d01 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 443bdbb0b6a151e71976db62ce192418eae02a0b..53377f72d0c24ba2a9b82e883ddff06823338be9 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 c2a84a3c0da642b8e280c913f2372db2770eb48d..a38faa67012cb90b1c91bc7976a6a16a1701c037 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 5a514d6eae1336cfec907ab44f9455aa89d2918f..09cd71e4a9ef0f612a78c6dfca7b14ce07956d76 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 ba2dcbe1b46f6eaf0c7c91462c745f246c9d9f75..1aaf3a3c0cec9000d4e0041be024116465be8b74 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 fd0f17fd5084cf95e322abec4e297bf0c9d5c05f..0d4a9b6ab1a12bbc39d19f88f4e746a20503c1f4 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 dc70d1891c4eada6197066597cd7ce722eaca780..d9592c6adca160bc725810a17e8466b2147a6151 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 5088fec357564144431f5914cc35858ae2f434bb..6c48266281123dd39b3a229f735e1011f0a2b63b 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 95e499548ea4d3850adca8ede4be1fad647129f4..f68e87a672f00e3cbf44f97e92cdc4cfb9d2b24f 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 8919229c04d557b2cdb1013c82a06938f38cc4b4..3955dfa86a7aa4810e2edded48b80b4dd30c1fa7 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 6d56793f80f4acd5cac848cf4ebef379a6f9f6a5..a2bcd40b63f56dd251606d7b3e65bab316123eba 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 d65dd9af32f694f4a17986cdf22eaeb49d7c0764..61e90240af18057125de88b07fd923b9dad5ccc1 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 e8d2895b4ff076ba3a12f52f74dfae4b12c7f577..30d811ea51b875090b200137d2d94f01535466be 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 65276bfcf2e83181bc996efd0b711dfa6e78c84a..7460499c0a6b17fe138f2c8fe931f0a33286633f 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 60529a59da46359c164d2a5335cb5be6e0293453..bbe03cc3509997ae6759ce19e8a2ba2780477e6f 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 6ce103b016c3cba4912dbd6bd44a3f5bcb9bdae0..103e6fe0f08b7cb1d51dcc7f189caee3d4532350 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); }