diff --git a/pom.xml b/pom.xml index 6fd6abd157e9eeab225d0a1d3e12de24f4d19b96..464960a59978d54408976281591c4f05a18d61bd 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 4785a72bb901649ca0889e33885fa5dea483abff..3bc4d734573a8f7eb7541f18f260bc43503e0945 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"); }