Skip to content
Snippets Groups Projects
Commit 0b5d543a authored by System User's avatar System User
Browse files

[ICATHALES-219] - Ajout de l'attribut error_message pour retenir le message a afficher sur ATKPanel

parent ee02e99f
Branches
Tags
1 merge request!1[ICATHALES-219] - Device initialization should not crash if trouble with driver
......@@ -200,6 +200,8 @@ void RetrigAO::init_device()
ch5 = 0;
ch6 = 0;
ch7 = 0;
_error_message = "";
// Initialise variables to default values
//--------------------------------------------
get_device_property();
......@@ -2018,6 +2020,7 @@ void RetrigAO::init_board(void)
//config.set_stop_mode (adl::wait_end_waveform);
DEBUG_STREAM<<"RetrigAO::init_device : init acq"<<std::endl;
try{
_ASL_TRY_ACTION
(
ao->init(adl::DAQ2502, boardNum),
......@@ -2028,13 +2031,26 @@ void RetrigAO::init_board(void)
this->config = _config;
/*DEBUG_STREAM<<"RetrigAO::init_device : config acq"<<std::endl;
try
{
_ASL_TRY_ACTION
(
ao->configure(_config),
"configure",
"RetrigAO::init_device",
this->set_internal_state()
); */
);
}
catch (...)
{
_error_message = "Error while configurating drivers";
}
*/
}
catch (...)
{
_error_message = "Error while initializing drivers";
}
}
//+------------------------------------------------------------------
/**
......@@ -2229,7 +2245,10 @@ void RetrigAO::set_internal_state(void)
break;
case asl::ContinuousAO::FAULT:
this->set_state(Tango::FAULT);
if (_error_message == "")
this->set_status("An error has occured");
else
this->set_status(_error_message);
break;
case asl::ContinuousAO::UNKNOWN:
default:
......
src/RetrigAO.h 100644 → 100755
......@@ -549,6 +549,7 @@ protected :
double* ch7;
double err_ctr;
short use_fifo;
std::string _error_message;
//- Store the values into the property
//- Properties stuff
int FindIndexFromPropertyName(Tango::DbData& dev_prop, string property_name);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment