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

Release preparation (CI-1058 : device should start in any case)

parent 972d1ee4
Branches
Tags
No related merge requests found
......@@ -8,7 +8,7 @@
</parent>
<groupId>fr.soleil.device</groupId>
<artifactId>SY900S_group-${aol}-${mode}</artifactId>
<version>2.0.6-SNAPSHOT</version>
<version>2.0.6</version>
<packaging>nar</packaging>
<name>SY900S_Group</name>
<description>SY900S_group device</description>
......
......@@ -68,12 +68,11 @@ static const char *RcsId = "$Header: /users/chaize/newsvn/cvsroot/Instrumentatio
//===================================================================
#include <tango.h>
#include <SY900S_Group.h>
#include <SY900S_GroupClass.h>
#include "SY900S_Group.h"
#include "SY900S_GroupClass.h"
#include "PogoHelper.h"
#include "Xstring.h"
#include <PogoHelper.h>
#include <Xstring.h>
namespace SY900S_Group_ns
{
......@@ -137,10 +136,10 @@ namespace SY900S_Group_ns
// Initialise variables to default values
//--------------------------------------------
get_device_property();
SY900S_generic_Proxy = 0;
get_device_property();
CREATE_SCALAR_ATTRIBUTE(attr_group_read);
}
......@@ -195,15 +194,25 @@ namespace SY900S_Group_ns
// End of Automatic code generation
//-------------------------------------------------------------
std::size_t idx = -1;
//- Creates default property
Tango::DbData data_put;
if ( dev_prop[++idx].is_empty() )
{
Tango::DbDatum prop("GroupNumber");
prop << groupNumber;
data_put.push_back(prop);
}
if ( dev_prop[++idx].is_empty() )
{
Tango::DbDatum prop("SY900SgenericProxyServer");
prop << sY900SgenericProxyServer;
data_put.push_back(prop);
}
if(groupNumber == 0)
INFO_STREAM<<" the group numer is the default value = 0 "<<endl;
if(sY900SgenericProxyServer == "")
Tango::Except::throw_exception(
(const char*) "TANGO_CONFIGURATION_ERROR",
(const char*) "SY900SgenericProxyServer property is missing ",
(const char*) "SY900S_Group::get_device_property()");
//- write default property if created
if( !data_put.empty() )
get_db_device()->put_property(data_put);
}
//+----------------------------------------------------------------------------
......@@ -215,7 +224,7 @@ namespace SY900S_Group_ns
//-----------------------------------------------------------------------------
void SY900S_Group::always_executed_hook()
{
dev_state();
//dev_state();
}
//+----------------------------------------------------------------------------
//
......@@ -474,6 +483,22 @@ void SY900S_Group::set_channels_target_voltage()
Tango::DevState argout = DeviceImpl::dev_state();
DEBUG_STREAM << "SY900S_Group::dev_state(): entering... !" << endl;
if ( sY900SgenericProxyServer.empty() )
{
argout = Tango::FAULT;
set_state(argout);
set_status("SY900SgenericProxyServer property is empty.");
return argout;
}
if ( !SY900S_generic_Proxy )
{
argout = Tango::FAULT;
set_state(argout);
set_status("Device initialization failed : cannot create device proxy!");
return argout;
}
// command_generation
command = command_generation(groupNumber,"_status",0,false,false);
......@@ -494,6 +519,7 @@ void SY900S_Group::set_channels_target_voltage()
}
return argout;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment