From e0e74468cd9c77ff59747374818b2e6296398f01 Mon Sep 17 00:00:00 2001 From: Sonia Minolli <sonia.minolli@synchrotron-soleil.fr> Date: Mon, 27 Apr 2015 07:22:48 +0000 Subject: [PATCH] Created tag release_2_3_3. --- pom.xml | 2 +- src/AcqMode.cpp | 21 +++++++++++++++++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/pom.xml b/pom.xml index 6fd6abd..464960a 100644 --- a/pom.xml +++ b/pom.xml @@ -9,7 +9,7 @@ <groupId>fr.soleil.device</groupId> <artifactId>AIControllerV2-${aol}-${mode}</artifactId> - <version>2.3.3-SNAPSHOT</version> + <version>2.3.3</version> <packaging>nar</packaging> <name>AIControllerV2</name> diff --git a/src/AcqMode.cpp b/src/AcqMode.cpp index 4785a72..3bc4d73 100644 --- a/src/AcqMode.cpp +++ b/src/AcqMode.cpp @@ -976,6 +976,15 @@ void AcqMode::initDataBuffers() //- initialize map for statistics history buffer //- size = initial statistics history depth (in number of samples) + // Check if value not null + if (this->m_dataTrt.statHistoryBufferDepth == 0) + { + ERROR_STREAM << "Init data buffers failed. Data history size should at least be 1!" << std::endl; + THROW_DEVFAILED(_CPTC("CONFIGURATION_ERROR"), + _CPTC("Failed to init stats data buffers!"), + _CPTC("AcqMode::initDataBuffers")); + } + this->setStatHistoBufferMem(this->m_dataTrt.statHistoryBufferDepth); if (this->m_dataTrt.isDataHistorized) // if data not historized, nothing to do @@ -987,8 +996,8 @@ void AcqMode::initDataBuffers() this->m_errorOccurred = true; ERROR_STREAM << "Init data buffers failed. Data history size should at least be 2!" << std::endl; - THROW_DEVFAILED(_CPTC("DEVICE_ERROR"), - _CPTC("Failed to init data buffers!"), + THROW_DEVFAILED(_CPTC("CONFIGURATION_ERROR"), + _CPTC("Failed to init data history buffers!"), _CPTC("AcqMode::initDataBuffers")); } @@ -2660,6 +2669,14 @@ void AcqMode::write_callback_stat_history_buffer_depth(yat4tango::DynamicAttribu Tango::DevULong histo_depth; cbd.tga->get_write_value(histo_depth); + // Check if value not null + if (histo_depth == 0) + { + THROW_DEVFAILED(_CPTC("DATA_OUT_OF_RANGE"), + _CPTC("request aborted - attribute cannot be null!"), + _CPTC("AcqMode::write_callback_stat_history_buffer_depth")); + } + this->setStatisticsHistoryDepth(histo_depth); this->store_value_as_property(histo_depth, "__StatHistoryBufferDepth"); } -- GitLab