Skip to content
Snippets Groups Projects
Commit 1dc39827 authored by Alexandre MALFREYT's avatar Alexandre MALFREYT
Browse files

fix: move SingleShotAOManager construction to dtart of init_device to allow...

fix: move SingleShotAOManager construction to dtart of init_device to allow init after an error in get_device_property()
parent 3a0041bb
No related branches found
No related tags found
1 merge request!4develop -> main
...@@ -231,6 +231,30 @@ void SingleShotAO::init_device() ...@@ -231,6 +231,30 @@ void SingleShotAO::init_device()
//- trace/profile this method //- trace/profile this method
yat4tango::TraceHelper t("SingleShotAO::init_device", this); yat4tango::TraceHelper t("SingleShotAO::init_device", this);
// construct the AO manager
//--------------------------------------------
try
{
m_manager = new SingleShotAOManager(this);
}
catch (...)
{
ERROR_STREAM << "initialization failed - failed to create manager" << std::endl;
m_currStatus = "initialization failed [failed to create manager]. See log for details";
m_state = Tango::FAULT;
return;
}
// test the manager
if (!m_manager)
{
ERROR_STREAM << "initialization failed - the manager is not created" << std::endl;
m_currStatus = "initialization failed [the manager is not created]. See log for details";
m_state = Tango::FAULT;
return;
}
// Initialise variables to default values // Initialise variables to default values
//-------------------------------------------- //--------------------------------------------
...@@ -320,29 +344,6 @@ void SingleShotAO::init_device() ...@@ -320,29 +344,6 @@ void SingleShotAO::init_device()
INFO_STREAM << "Board has " << m_nb_chan << " channels" << endl; INFO_STREAM << "Board has " << m_nb_chan << " channels" << endl;
// construct the AO manager
//--------------------------------------------
try
{
m_manager = new SingleShotAOManager(this);
}
catch (...)
{
ERROR_STREAM << "initialization failed - failed to create manager" << std::endl;
m_currStatus = "initialization failed [failed to create manager]. See log for details";
m_state = Tango::FAULT;
return;
}
// test the manager
if (!m_manager)
{
ERROR_STREAM << "initialization failed - the manager is not created" << std::endl;
m_currStatus = "initialization failed [the manager is not created]. See log for details";
m_state = Tango::FAULT;
return;
}
// get frequency value in database // get frequency value in database
//-------------------------------------------- //--------------------------------------------
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment