Skip to content
Snippets Groups Projects
Commit 89222775 authored by Florent LANGLOIS's avatar Florent LANGLOIS
Browse files

- apply the memroized value of the gain write only attribute, into the read part , at the init.

parent daa91213
Branches
Tags
No related merge requests found
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/Femto/src/FemtoCurrentAmplifier.cpp,v 1.13 2007-11-16 10:55:51 flanglois Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/Femto/src/FemtoCurrentAmplifier.cpp,v 1.14 2008-01-08 17:05:11 flanglois Exp $";
//+=============================================================================
//
// file : FemtoCurrentAmplifier.cpp
......@@ -13,7 +13,7 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: flanglois $
//
// $Revision: 1.13 $
// $Revision: 1.14 $
//
// $Log: not supported by cvs2svn $
//
......@@ -170,6 +170,12 @@ namespace FemtoCurrentAmplifier_ns
Tango::WAttribute &attr1 = dev_attr->get_w_attr_by_name("gainMode");
attr1.set_write_value(true);
write_gainMode(attr1);
Tango::WAttribute &attr2 = dev_attr->get_w_attr_by_name("gain");
string mem_value = attr2.get_mem_value();
attr_gain_write = XString<Tango::DevShort>::convertFromString(mem_value);
//string &get_mem_value() {return mem_value;}
}
catch(Tango::DevFailed& e)
{
......@@ -456,7 +462,8 @@ void FemtoCurrentAmplifier::read_gain(Tango::Attribute &attr)
{
DEBUG_STREAM << "FemtoCurrentAmplifier::read_gain(Tango::Attribute &attr) entering... "<< endl;
//- Nothing has to be written here because it's a WRITE ONLY attribute
//- Have to do that only for the init of the device as it is a memorized attr.
attr.set_value(&attr_gain_write);
}
//+----------------------------------------------------------------------------
......
......@@ -8,7 +8,7 @@
//
// $Author: flanglois $
//
// $Revision: 1.10 $
// $Revision: 1.11 $
//
// $Log: not supported by cvs2svn $
//
......@@ -29,12 +29,13 @@
#include <tango.h>
#include <TangoExceptionsHelper.h>
#include <DeviceProxyHelper.h>
#include <Xstring.h>
//using namespace Tango;
/**
* @author $Author: flanglois $
* @version $Revision: 1.10 $
* @version $Revision: 1.11 $
*/
// Add your own constants definitions here.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment