Skip to content
Snippets Groups Projects
Commit cade39e2 authored by Xavier ELATTAOUI's avatar Xavier ELATTAOUI
Browse files

MANTIS 23850 :

- state management modified : HT and BIAS values in device status for information now.
parent e2844609
No related branches found
No related tags found
No related merge requests found
......@@ -8,7 +8,7 @@
</parent>
<groupId>fr.soleil.device</groupId>
<artifactId>LoCuM_4-${aol}-${mode}</artifactId>
<version>2.2.0</version>
<version>2.2.1</version>
<packaging>nar</packaging>
<name>LoCuM_4</name>
<description>LoCuM_4 device</description>
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/LoCuM_4/src/LoCuM_4.cpp,v 1.24 2012-10-12 10:21:59 xavela Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/LoCuM_4/src/LoCuM_4.cpp,v 1.25 2013-01-16 15:33:27 xavela Exp $";
//+=============================================================================
//
// file : LoCuM_4.cpp
......@@ -13,9 +13,14 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: xavela $
//
// $Revision: 1.24 $
// $Revision: 1.25 $
//
// $Log: not supported by cvs2svn $
// Revision 1.24 2012/10/12 10:21:59 xavela
// - config checked at init :
// -> range set to 1000. if not
// -> if Bias is not Minus and/or HV is not ON => device state is ALARM.
//
// Revision 1.23 2010/04/30 10:33:22 nleclercq
// Fixed "" char pb
//
......@@ -464,18 +469,16 @@ Tango::DevString LoCuM_4::send_locum4_command(Tango::DevString argin)
dev_status_ += "no more communication with locum4 amplifier\n";
argout = Tango::FAULT;
}
else if ( !this->_isBiasValueMinus )
else
{
dev_status_ += "Bias voltage source is not set to \"Minus\".\n";
argout = Tango::ALARM;
}
else if ( !this->_isHV_On )
dev_status_ += "Bias voltage source is set to : " + this->_biasValue + ".\n";
if ( !this->_isHV_On )
{
dev_status_ += "HV is not \"ON\".\n";
argout = Tango::ALARM;
dev_status_ += "HV is \"OFF\".\n";
}
else
{
dev_status_ += "HV is \"ON\".\n";
dev_status_ += "locum is fine \n";
argout = Tango::ON;
}
......@@ -711,10 +714,10 @@ Tango::DevString LoCuM_4::send_locum4_command(Tango::DevString argin)
double range = this->get_range(this->response);
if ( range != DEFAULT_RANGE )
this->set_manual_range(DEFAULT_RANGE);
//- extract S2 value
size_t s2_ValIdx = this->response.find("S2_Minus");
if ( s2_ValIdx == std::string::npos )
this->_isBiasValueMinus = false;
//- extract S2 value : the BIAS voltage source
size_t s2_ValIdx = this->response.find("S2_");
size_t s2_EndIdx = this->response.find(",",s2_ValIdx);
this->_biasValue = this->response.substr(s2_ValIdx, s2_EndIdx-s2_ValIdx);
//- extract S3 value
size_t s3_ValIdx = this->response.find("HV_ON");
if ( s3_ValIdx == std::string::npos )
......
......@@ -8,9 +8,14 @@
//
// $Author: xavela $
//
// $Revision: 1.16 $
// $Revision: 1.17 $
//
// $Log: not supported by cvs2svn $
// Revision 1.16 2012/10/12 10:21:59 xavela
// - config checked at init :
// -> range set to 1000. if not
// -> if Bias is not Minus and/or HV is not ON => device state is ALARM.
//
// Revision 1.15 2010/03/25 18:21:00 vince_soleil
// "Migration_Tango7"
//
......@@ -70,7 +75,7 @@
#include <tango.h>
/**
* @author $Author: xavela $
* @version $Revision: 1.16 $
* @version $Revision: 1.17 $
*/
// Add your own constants definitions here.
......@@ -279,7 +284,7 @@ private:
bool local;
std::string response,cmd;
std::string dev_status_;
bool _isBiasValueMinus; //- BIAS config
std::string _biasValue;
bool _isHV_On; //- High Voltage state
//methodes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment