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

- force write of LN at init

- added try/catch at init
parent ad6adbc0
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ FemtoCurrentAmplifier Class<Br>
</h1>
<b>
Revision: - Author: <Br>
Implemented in C++ - CVS repository: sourceforge(tango-ds)
Implemented in C++ - CVS repository: tango-ds
</b>
</center>
<Br>
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/Femto/src/FemtoCurrentAmplifier.cpp,v 1.12 2007-09-19 12:28:26 flanglois Exp $";
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 $";
//+=============================================================================
//
// file : FemtoCurrentAmplifier.cpp
......@@ -13,7 +13,7 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: flanglois $
//
// $Revision: 1.12 $
// $Revision: 1.13 $
//
// $Log: not supported by cvs2svn $
//
......@@ -143,6 +143,8 @@ namespace FemtoCurrentAmplifier_ns
// Initialise variables to default values
//--------------------------------------------
try
{
get_device_property();
//- Scalar Attributes
......@@ -155,6 +157,7 @@ namespace FemtoCurrentAmplifier_ns
attr_gain_write = 0;
dio_proxy_not_yet_created = true;
creates_dio_proxy();
if(femtoType == 1)
MAX_GAIN_INDEX = 5;
......@@ -163,8 +166,18 @@ namespace FemtoCurrentAmplifier_ns
mutex = new omni_mutex();
//- Force gain mode to LN
Tango::WAttribute &attr1 = dev_attr->get_w_attr_by_name("gainMode");
attr1.set_write_value(true);
write_gainMode(attr1);
}
catch(Tango::DevFailed& e)
{
ERROR_STREAM << "Error at init_device: " << string(e.errors[0].desc) << "; try to correct and retry init" << ENDLOG;
set_state(Tango::FAULT);
set_status("Error at init_device, check DIO proxy a retry to Init");
}
}
//+----------------------------------------------------------------------------
//
......
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/Femto/src/FemtoCurrentAmplifierStateMachine.cpp,v 1.3 2007-09-19 12:22:44 flanglois Exp $";
static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentation/Femto/src/FemtoCurrentAmplifierStateMachine.cpp,v 1.4 2007-11-16 10:55:51 flanglois Exp $";
//+=============================================================================
//
// file : FemtoCurrentAmplifierStateMachine.cpp
......@@ -10,7 +10,7 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//
// $Author: flanglois $
//
// $Revision: 1.3 $
// $Revision: 1.4 $
//
// $Log: not supported by cvs2svn $
//
......@@ -56,10 +56,14 @@ namespace FemtoCurrentAmplifier_ns
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_gain_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -70,10 +74,14 @@ bool FemtoCurrentAmplifier::is_gain_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_coupling_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -84,10 +92,14 @@ bool FemtoCurrentAmplifier::is_coupling_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_gainMode_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -98,10 +110,14 @@ bool FemtoCurrentAmplifier::is_gainMode_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_overload_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -112,10 +128,14 @@ bool FemtoCurrentAmplifier::is_overload_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_outputSignal_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -126,10 +146,14 @@ bool FemtoCurrentAmplifier::is_outputSignal_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_gainSelected_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
//+----------------------------------------------------------------------------
......@@ -140,10 +164,14 @@ bool FemtoCurrentAmplifier::is_gainSelected_allowed(Tango::AttReqType type)
//
//-----------------------------------------------------------------------------
bool FemtoCurrentAmplifier::is_upperBWLimit_allowed(Tango::AttReqType type)
{
if (get_state() == Tango::FAULT)
{
// End of Generated Code
// Re-Start of Generated Code
return false;
}
return true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment