Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
RobotAPI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Container Registry
Model registry
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software
ArmarX
RobotAPI
Commits
123edd48
Commit
123edd48
authored
1 year ago
by
Fabian Reister
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of git.h2t.iar.kit.edu:sw/armarx/robot-api
parents
da0f3986
53876d2f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
source/RobotAPI/libraries/armem/client/ReadStream.cpp
+5
-5
5 additions, 5 deletions
source/RobotAPI/libraries/armem/client/ReadStream.cpp
source/RobotAPI/libraries/armem/client/ReadStream.h
+5
-5
5 additions, 5 deletions
source/RobotAPI/libraries/armem/client/ReadStream.h
with
10 additions
and
10 deletions
source/RobotAPI/libraries/armem/client/ReadStream.cpp
+
5
−
5
View file @
123edd48
...
...
@@ -19,7 +19,7 @@ namespace armarx::armem::client
}
std
::
optional
<
wm
::
EntitySnapshot
>
ReadStream
::
pollBlocking
(
SnapshotCallbackT
&
callback
)
ReadStream
::
pollBlocking
(
const
SnapshotCallbackT
&
callback
)
{
if
(
isPolling
.
exchange
(
true
))
{
...
...
@@ -34,7 +34,7 @@ namespace armarx::armem::client
}
void
ReadStream
::
pollAsync
(
SnapshotCallbackT
&
callback
)
ReadStream
::
pollAsync
(
const
SnapshotCallbackT
&
callback
)
{
if
(
isPolling
.
exchange
(
true
))
{
...
...
@@ -46,7 +46,7 @@ namespace armarx::armem::client
}
std
::
optional
<
wm
::
EntitySnapshot
>
ReadStream
::
_pollBlocking
(
SnapshotCallbackT
&
callback
)
ReadStream
::
_pollBlocking
(
const
SnapshotCallbackT
&
callback
)
{
while
(
not
pollingStoppedExternally
)
{
...
...
@@ -71,7 +71,7 @@ namespace armarx::armem::client
}
std
::
optional
<
wm
::
EntitySnapshot
>
ReadStream
::
pollOnce
(
SnapshotCallbackT
&
callback
)
ReadStream
::
pollOnce
(
const
SnapshotCallbackT
&
callback
)
{
if
(
isPolling
.
exchange
(
true
))
{
...
...
@@ -85,7 +85,7 @@ namespace armarx::armem::client
}
std
::
optional
<
wm
::
EntitySnapshot
>
ReadStream
::
_pollOnce
(
SnapshotCallbackT
&
callback
)
ReadStream
::
_pollOnce
(
const
SnapshotCallbackT
&
callback
)
{
// Make sure to not busy wait. Also wait until probably data is available in first iteration.
metronome
.
waitForNextTick
();
...
...
This diff is collapsed.
Click to expand it.
source/RobotAPI/libraries/armem/client/ReadStream.h
+
5
−
5
View file @
123edd48
...
...
@@ -67,7 +67,7 @@ namespace armarx::armem::client
* @return The snapshot object that returns false.
* @throw armarx::armem::error::ReadStreamAlreadyPolling If the stream is already polling.
*/
std
::
optional
<
wm
::
EntitySnapshot
>
pollBlocking
(
SnapshotCallbackT
&
callback
);
std
::
optional
<
wm
::
EntitySnapshot
>
pollBlocking
(
const
SnapshotCallbackT
&
callback
);
/**
* @brief Poll in a new thread as long as callback returns true.
...
...
@@ -83,7 +83,7 @@ namespace armarx::armem::client
* @param callback Function to call on each entity snapshot.
* @throw armarx::armem::error::ReadStreamAlreadyPolling If the stream is already polling.
*/
void
pollAsync
(
SnapshotCallbackT
&
callback
);
void
pollAsync
(
const
SnapshotCallbackT
&
callback
);
/**
* @brief Stop a running polling loop.
*
...
...
@@ -114,12 +114,12 @@ namespace armarx::armem::client
* @param callback Function to call on each entity snapshot.
* @throw armarx::armem::error::ReadStreamAlreadyPolling If the stream is already polling.
*/
std
::
optional
<
wm
::
EntitySnapshot
>
pollOnce
(
SnapshotCallbackT
&
callback
);
std
::
optional
<
wm
::
EntitySnapshot
>
pollOnce
(
const
SnapshotCallbackT
&
callback
);
private:
std
::
optional
<
wm
::
EntitySnapshot
>
_pollBlocking
(
SnapshotCallbackT
&
callback
);
std
::
optional
<
wm
::
EntitySnapshot
>
_pollOnce
(
SnapshotCallbackT
&
callback
);
std
::
optional
<
wm
::
EntitySnapshot
>
_pollBlocking
(
const
SnapshotCallbackT
&
callback
);
std
::
optional
<
wm
::
EntitySnapshot
>
_pollOnce
(
const
SnapshotCallbackT
&
callback
);
private:
...
...
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