Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
G
Gdpd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IVMI
Gdpd
Commits
9f095289
Commit
9f095289
authored
4 years ago
by
BERTHAUT Florent
Browse files
Options
Downloads
Patches
Plain Diff
Added subscribe method
parent
83b02b0e
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/gdpd.cpp
+7
-0
7 additions, 0 deletions
src/gdpd.cpp
src/gdpd.hpp
+1
-0
1 addition, 0 deletions
src/gdpd.hpp
with
8 additions
and
0 deletions
src/gdpd.cpp
+
7
−
0
View file @
9f095289
...
...
@@ -6,6 +6,7 @@ void Gdpd::_register_methods() {
register_method
(
"init"
,
&
Gdpd
::
init
);
register_method
(
"openfile"
,
&
Gdpd
::
openfile
);
register_method
(
"closefile"
,
&
Gdpd
::
closefile
);
register_method
(
"subscribe"
,
&
Gdpd
::
subscribe
);
register_method
(
"has_message"
,
&
Gdpd
::
has_message
);
register_method
(
"get_next"
,
&
Gdpd
::
get_next
);
register_method
(
"start_message"
,
&
Gdpd
::
start_message
);
...
...
@@ -124,6 +125,12 @@ void Gdpd::closefile() {
m_pd
.
closePatch
(
m_patch
);
}
void
Gdpd
::
subscribe
(
String
symbStr
)
{
std
::
wstring
symbWs
=
symbStr
.
unicode_str
();
std
::
string
symbS
(
symbWs
.
begin
(),
symbWs
.
end
());
m_pd
.
subscribe
(
symbS
.
c_str
());
}
bool
Gdpd
::
has_message
()
{
//receive new messages
m_pd
.
receiveMessages
();
...
...
This diff is collapsed.
Click to expand it.
src/gdpd.hpp
+
1
−
0
View file @
9f095289
...
...
@@ -44,6 +44,7 @@ public:
bool
has_message
();
Array
get_next
();
int
blocksize
();
void
subscribe
(
String
symbStr
);
int
start_message
(
int
nbValues
);
void
add_symbol
(
String
symbStr
);
void
add_float
(
float
val
);
...
...
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