Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
N
NI660Xsl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Libraries
NI660Xsl
Commits
d1c1098e
Commit
d1c1098e
authored
Aug 26, 2015
by
Sonia Minolli
Browse files
Options
Downloads
Patches
Plain Diff
Input buffer size update for callback mode (CPPAPIS-18)
parent
03887fa8
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/BufferedEventCounting.cpp
+13
-2
13 additions, 2 deletions
src/BufferedEventCounting.cpp
src/BufferedPositionMeasurement.cpp
+13
-2
13 additions, 2 deletions
src/BufferedPositionMeasurement.cpp
with
26 additions
and
4 deletions
src/BufferedEventCounting.cpp
+
13
−
2
View file @
d1c1098e
...
@@ -163,10 +163,21 @@ void BufferedEventCounting::configure(void)
...
@@ -163,10 +163,21 @@ void BufferedEventCounting::configure(void)
//-------------------------configure acquisition buffer-------------------------------------------
//-------------------------configure acquisition buffer-------------------------------------------
if
(
this
->
use_callback_
)
if
(
this
->
use_callback_
)
{
// In DMA mode, if samples number = total number of points, configure
// input buffer size with 2 * total_nb_pts_, because input buffer size
// should be strictly above total_nb_pts_ in callback mode
if
((
this
->
data_transfer_
==
ni
::
dma
)
&&
(
this
->
nb_samples_
==
this
->
total_nb_pts_
))
{
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
2
*
this
->
total_nb_pts_
);
}
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
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
total_nb_pts_
);
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
total_nb_pts_
);
}
}
}
else
else
{
{
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
nb_samples_
);
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
nb_samples_
);
...
...
This diff is collapsed.
Click to expand it.
src/BufferedPositionMeasurement.cpp
+
13
−
2
View file @
d1c1098e
...
@@ -162,10 +162,21 @@ void BufferedPositionMeasurement::configure (void)
...
@@ -162,10 +162,21 @@ void BufferedPositionMeasurement::configure (void)
//-------------------------configure buffer-------------------------------------------
//-------------------------configure buffer-------------------------------------------
//std::cout<<<<"BufferedPositionMeasurement::config buffer"<<std::endl;
//std::cout<<<<"BufferedPositionMeasurement::config buffer"<<std::endl;
if
(
this
->
use_callback_
)
if
(
this
->
use_callback_
)
{
// In DMA mode, if samples number = total number of points, configure
// input buffer size with 2 * total_nb_pts_, because input buffer size
// should be strictly above total_nb_pts_ in callback mode
if
((
this
->
data_transfer_
==
ni
::
dma
)
&&
(
this
->
nb_samples_
==
this
->
total_nb_pts_
))
{
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
2
*
this
->
total_nb_pts_
);
}
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
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
total_nb_pts_
);
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
total_nb_pts_
);
}
}
}
else
else
{
{
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
nb_samples_
);
err
=
DAQmxCfgInputBuffer
(
this
->
task_handle_
,
this
->
nb_samples_
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment