Skip to content
Snippets Groups Projects
Commit 5f0f75f9 authored by Arafat Nourredine's avatar Arafat Nourredine
Browse files

- Set device state to FAULT If overrun occured during the acquisition

- Reduce verbosity of traces during acquisition in Mode MAPPING_SCA (already done in MCA et MAPPING_FULL)
parent 0314b0ce
Branches
Tags
No related merge requests found
......@@ -9,7 +9,7 @@
<groupId>fr.soleil.device</groupId>
<artifactId>XiaDxp-${aol}-${mode}</artifactId>
<version>3.2.2-SNAPSHOT</version>
<version>3.2.2</version>
<packaging>nar</packaging>
<name>XiaDxp</name>
<description>XiaDxp device</description>
......
......@@ -85,7 +85,7 @@ Tango::DevState Acquisition::get_state()
{
case State::INITIALIZATION_SUCCESSFUL:
///DEBUG_STREAM<<"------- INITIALIZATION_SUCCESSFUL"<<endl;
if(m_state!=Tango::ALARM)
if(m_state!=Tango::ALARM && m_state!=Tango::FAULT)
set_state(Tango::STANDBY);
break;
case State::INITIALIZATION_UNKNOWN:
......
......@@ -81,6 +81,7 @@ void DataParserMapping::parse_buffer_xmap(DataBufferContainerPtr map_buffer_ptr)
ERROR_STREAM << "DataParserMapping::parse_buffer_xmap() - " << ss_msg.str() << std::endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -94,6 +95,7 @@ void DataParserMapping::parse_buffer_xmap(DataBufferContainerPtr map_buffer_ptr)
ERROR_STREAM << "DataParserMapping::parse_buffer_xmap() - " << ss_msg.str() << std::endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -123,6 +125,7 @@ void DataParserMapping::parse_buffer_xmap(DataBufferContainerPtr map_buffer_ptr)
ERROR_STREAM << "DataParserMapping::parse_buffer_xmap() - " << ex.what() << endl;
//stop_acquisition();//@@TODO
//on_alarm(ex.what());
m_store->set_status(ex.what());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
ex.what(),
......@@ -156,6 +159,7 @@ void DataParserMapping::parse_pixel_full_xmap(int module, int pixel, DataType* d
ERROR_STREAM << "DataStore::parse_data() - " << ss_msg.str() << endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -243,6 +247,7 @@ void DataParserMapping::parse_pixel_sca_xmap(int module, int pixel, DataType* da
ERROR_STREAM << "DataParserMapping::parse_pixel_sca() - " << ss_msg.str() << endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -250,16 +255,16 @@ void DataParserMapping::parse_pixel_sca_xmap(int module, int pixel, DataType* da
}
unsigned long the_pixel_header_size = pixel_data[2];
INFO_STREAM<<"\t\t- the_pixel_header_size = "<<the_pixel_header_size<<std::endl;
//INFO_STREAM<<"\t\t- the_pixel_header_size = "<<the_pixel_header_size<<std::endl;
unsigned long the_pixel = WORD_TO_LONG(pixel_data[4], pixel_data[5]);
INFO_STREAM<<"\t\t- the_pixel = "<<the_pixel<<std::endl;
//INFO_STREAM<<"\t\t- the_pixel = "<<the_pixel<<std::endl;
unsigned long the_mapping_mode = pixel_data[3];
INFO_STREAM<<"\t\t- the_mapping_mode = "<<the_mapping_mode<<std::endl;
//INFO_STREAM<<"\t\t- the_mapping_mode = "<<the_mapping_mode<<std::endl;
unsigned long the_roi_size = pixel_data[12];
INFO_STREAM<<"\t\t- the_roi_size = "<<the_roi_size<<std::endl;
//INFO_STREAM<<"\t\t- the_roi_size = "<<the_roi_size<<std::endl;
// Get spectrum sizes located at WORD 8/9/10/11
......@@ -268,7 +273,7 @@ void DataParserMapping::parse_pixel_sca_xmap(int module, int pixel, DataType* da
for(int channel = 0;channel < NB_CHANNEL_XMAP_MAX;channel++)
{
nb_rois[channel] = pixel_data[8 + channel];
INFO_STREAM<<"\t\t- nb_rois["<<channel<<"] = "<<nb_rois[channel]<<std::endl;
//INFO_STREAM<<"\t\t- nb_rois["<<channel<<"] = "<<nb_rois[channel]<<std::endl;
}
//INFO_STREAM <<"\t\t- parse data - module = " <<module <<" - pixel = " <<the_pixel <<" - length = " <<length_of_pixData <<std::endl;
......@@ -338,6 +343,7 @@ void DataParserMapping::parse_buffer_falconx(DataBufferContainerPtr map_buffer_p
ERROR_STREAM << "DataParserMapping::parse_buffer_falconx() - " << ss_msg.str() << std::endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -351,6 +357,7 @@ void DataParserMapping::parse_buffer_falconx(DataBufferContainerPtr map_buffer_p
ERROR_STREAM << "DataParserMapping::parse_buffer_falconx() - " << ss_msg.str() << std::endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -382,6 +389,7 @@ void DataParserMapping::parse_buffer_falconx(DataBufferContainerPtr map_buffer_p
ERROR_STREAM << "DataParserMapping::parse_buffer_falconx() - " << ex.what() << endl;
//stop_acquisition();//@@TODO
//on_alarm(ex.what());
m_store->set_status(ex.what());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
ex.what(),
......@@ -414,6 +422,7 @@ void DataParserMapping::parse_pixel_full_falconx(int module, int pixel, DataType
ERROR_STREAM << "DataStore::parse_pixel_full_falconx() - " << ss_msg.str() << endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......@@ -427,6 +436,7 @@ void DataParserMapping::parse_pixel_full_falconx(int module, int pixel, DataType
ERROR_STREAM << "DataParserMapping::parse_pixel_full_falconx() - " << ss_msg.str() << std::endl;
//stop_acquisition();//@@TODO
//on_alarm(ss_msg.str());
m_store->set_status(ss_msg.str());
m_store->set_state(Tango::FAULT);
Tango::Except::throw_exception("XIA_ERROR",
(ss_msg.str()).c_str(),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment