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

Update for infinite buffered mode (TANGODEVIC-1243)

parent db2bbedf
No related branches found
No related tags found
No related merge requests found
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include <NI660Xsl/BufferedEventCounting.h> #include <NI660Xsl/BufferedEventCounting.h>
#include <NI660Xsl/Exception.h> #include <NI660Xsl/Exception.h>
#include <iostream>
namespace ni660Xsl namespace ni660Xsl
{ {
...@@ -170,10 +171,19 @@ void BufferedEventCounting::configure(void) ...@@ -170,10 +171,19 @@ void BufferedEventCounting::configure(void)
if ((this->data_transfer_ == ni::dma) && if ((this->data_transfer_ == ni::dma) &&
(this->nb_samples_ == this->total_nb_pts_)) (this->nb_samples_ == this->total_nb_pts_))
{ {
std::cout << "soso trace lib - dma + continuous" << std::endl;
err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->total_nb_pts_); err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->total_nb_pts_);
} }
// If total number of points is null (means infinite acquisition):
// set input buffer size with 2 * nb_samples_
else if (this->total_nb_pts_ == 0)
{
std::cout << "soso trace lib - inifinite" << std::endl;
err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->nb_samples_);
}
else else
{ {
std::cout << "soso trace lib - classical" << std::endl;
// Configure the input buffer size with the total number of point to be received // Configure the input buffer size with the total number of point to be received
err = DAQmxCfgInputBuffer(this->task_handle_, this->total_nb_pts_); err = DAQmxCfgInputBuffer(this->task_handle_, this->total_nb_pts_);
} }
......
...@@ -171,6 +171,12 @@ void BufferedPositionMeasurement::configure (void) ...@@ -171,6 +171,12 @@ void BufferedPositionMeasurement::configure (void)
{ {
err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->total_nb_pts_); err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->total_nb_pts_);
} }
// If total number of points is null (means infinite acquisition):
// set input buffer size with 2 * nb_samples_
else if (this->total_nb_pts_ == 0)
{
err = DAQmxCfgInputBuffer(this->task_handle_, 2 * this->nb_samples_);
}
else else
{ {
// Configure the input buffer size with the total number of point to be received // Configure the input buffer size with the total number of point to be received
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment