Skip to content
Snippets Groups Projects
Commit 22eeda2b authored by Sonia Minolli's avatar Sonia Minolli
Browse files

Created tag release_2_0_1.

parent c1692387
No related branches found
No related merge requests found
......@@ -9,7 +9,7 @@
<groupId>fr.soleil.device</groupId>
<artifactId>PulseCounting-${aol}-${mode}</artifactId>
<version>2.0.1-SNAPSHOT</version>
<version>2.0.1</version>
<packaging>nar</packaging>
<name>PulseCounting</name>
......@@ -56,7 +56,7 @@
<dependency>
<groupId>fr.soleil.lib</groupId>
<artifactId>NexusCPPV2-${aol}-${library}-${mode}</artifactId>
<version>2.3.1</version>
<version>2.3.2</version>
</dependency>
</dependencies>
<scm>
......
......@@ -248,6 +248,10 @@ void BufferedCounterDt::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer, l
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
// add number to copy to current data
data.capacity(data.length() + nb_to_copy, true);
data.force_length(data.length() + nb_to_copy);
// tempo buffer for storage
RawData_t bufNx;
if (data_to_be_stored)
......@@ -329,15 +333,25 @@ void BufferedCounterDt::startCnt()
// check if infinite mode
if (this->m_cfg.acq.samplesNumber == 0)
{
// set data length to buffer depth
// set data length & capacity to buffer depth
this->m_data.capacity(this->m_cfg.acq.bufferDepth);
this->m_data.force_length(this->m_cfg.acq.bufferDepth);
}
else
{
// set data length to samples nber
// check if continuous mode
if (this->m_cfg.acq.continuousAcquisition)
{
// set data length & capacity to samples nber
this->m_data.capacity(this->m_cfg.acq.samplesNumber);
this->m_data.force_length(this->m_cfg.acq.samplesNumber);
}
else
{
// set data capacity & length to 0
this->m_data.capacity(0);
this->m_data.force_length(0);
}
}
this->m_data.fill(yat::IEEE_NAN);
......
......@@ -264,6 +264,10 @@ void BufferedCounterEvt::handle_raw_buffer(ni660Xsl::InRawBuffer* buffer, long&
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
// add number to copy to current data
data.capacity(data.length() + nb_to_copy, true);
data.force_length(data.length() + nb_to_copy);
// tempo buffer for storage
RawData_t bufNx;
if (data_to_be_stored)
......@@ -362,16 +366,26 @@ void BufferedCounterEvt::startCnt()
// check if infinite mode
if (this->m_cfg.acq.samplesNumber == 0)
{
// set data length to buffer depth
// set data length & capacity to buffer depth
this->m_data.capacity(this->m_cfg.acq.bufferDepth);
this->m_data.force_length(this->m_cfg.acq.bufferDepth);
}
else
{
// set data length to samples nber
// check if continuous mode
if (this->m_cfg.acq.continuousAcquisition)
{
// set data length & capacity to samples nber
this->m_data.capacity(this->m_cfg.acq.samplesNumber);
this->m_data.force_length(this->m_cfg.acq.samplesNumber);
}
else
{
// set data capacity & length to 0
this->m_data.capacity(0);
this->m_data.force_length(0);
}
}
this->m_data.fill(yat::IEEE_NAN);
unsigned long buffer_depth_nbpts = 0;
......
......@@ -249,6 +249,10 @@ void BufferedCounterPeriod::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffe
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
// add number to copy to current data
data.capacity(data.length() + nb_to_copy, true);
data.force_length(data.length() + nb_to_copy);
// tempo buffer for storage
RawData_t bufNx;
if (data_to_be_stored)
......@@ -330,15 +334,25 @@ void BufferedCounterPeriod::startCnt()
// check if infinite mode
if (this->m_cfg.acq.samplesNumber == 0)
{
// set data length to buffer depth
// set data length & capacity to buffer depth
this->m_data.capacity(this->m_cfg.acq.bufferDepth);
this->m_data.force_length(this->m_cfg.acq.bufferDepth);
}
else
{
// set data length to samples nber
// check if continuous mode
if (this->m_cfg.acq.continuousAcquisition)
{
// set data length & capacity to samples nber
this->m_data.capacity(this->m_cfg.acq.samplesNumber);
this->m_data.force_length(this->m_cfg.acq.samplesNumber);
}
else
{
// set data capacity & length to 0
this->m_data.capacity(0);
this->m_data.force_length(0);
}
}
this->m_data.fill(yat::IEEE_NAN);
......
......@@ -296,6 +296,10 @@ void BufferedCounterPos::handle_scaled_buffer(ni660Xsl::InScaledBuffer* buffer,
}
DEBUG_STREAM << "NB to copy : " << nb_to_copy << endl;
// add number to copy to current data
pos.capacity(pos.length() + nb_to_copy, true);
pos.force_length(pos.length() + nb_to_copy);
// tempo buffer for storage
RawData_t bufNx;
if (data_to_be_stored)
......@@ -397,15 +401,25 @@ void BufferedCounterPos::startCnt()
// check if infinite mode
if (this->m_cfg.acq.samplesNumber == 0)
{
// set data length to buffer depth
// set data length & capacity to buffer depth
this->m_data.capacity(this->m_cfg.acq.bufferDepth);
this->m_data.force_length(this->m_cfg.acq.bufferDepth);
}
else
{
// set data length to samples nber
// check if continuous mode
if (this->m_cfg.acq.continuousAcquisition)
{
// set data length & capacity to samples nber
this->m_data.capacity(this->m_cfg.acq.samplesNumber);
this->m_data.force_length(this->m_cfg.acq.samplesNumber);
}
else
{
// set data capacity & length to 0
this->m_data.capacity(0);
this->m_data.force_length(0);
}
}
this->m_data.fill(yat::IEEE_NAN);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment