Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mj
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
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
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
Accelerators
TANGO
mj
Commits
097b165e
Commit
097b165e
authored
5 months ago
by
Guillaume Communie
Browse files
Options
Downloads
Plain Diff
Merge branch 'bug_att_event' into 'main'
Bug with event subscription Closes
#4
See merge request
!21
parents
b52f3dd3
af616875
No related branches found
No related tags found
1 merge request
!21
Bug with event subscription
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/tango_api/client/attribute.h
+2
-0
2 additions, 0 deletions
include/tango_api/client/attribute.h
src/attribute.cpp
+2
-3
2 additions, 3 deletions
src/attribute.cpp
src/tango_api/attribute.cpp
+5
-0
5 additions, 0 deletions
src/tango_api/attribute.cpp
with
9 additions
and
3 deletions
include/tango_api/client/attribute.h
+
2
−
0
View file @
097b165e
...
...
@@ -63,6 +63,8 @@ class attribute
attribute
(
const
std
::
string
&
attr_name
,
const
std
::
string
host
,
unsigned
int
port
);
attribute
(
const
std
::
string
&
dev_name
,
const
std
::
string
&
attr_name
,
const
std
::
string
host
,
unsigned
int
port
);
std
::
string
get_fqdn
()
const
;
const
std
::
type_info
&
get_type
()
const
;
attribute_value
get_value
()
const
;
...
...
This diff is collapsed.
Click to expand it.
src/attribute.cpp
+
2
−
3
View file @
097b165e
...
...
@@ -410,7 +410,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options)
}
std
::
string
deviceName
{
""
};
if
(
args
.
size
()
==
4
)
if
(
args
.
size
()
==
5
)
{
if
(
std
::
string
{
"device"
}.
starts_with
(
args
[
3
]))
{
...
...
@@ -429,8 +429,7 @@ int eventAttribute(std::span<std::string> args, const mj::options &options)
auto
attribute
=
details
::
create_attribute
(
deviceName
,
attName
,
options
);
// event subscription
std
::
cerr
<<
"Subscription to event of type
\"
"
<<
EVENT_NAMES
[
evType
]
<<
"
\"
"
<<
"of
\"
"
<<
attName
<<
"
\"
"
<<
"on
\"
"
<<
deviceName
<<
"
\"
"
<<
std
::
endl
;
<<
"of
\"
"
<<
attribute
.
get_fqdn
()
<<
"
\"
"
<<
std
::
endl
;
std
::
cerr
<<
"Ctrl-C to stop"
<<
std
::
endl
;
auto
t0
=
std
::
chrono
::
steady_clock
::
now
();
...
...
This diff is collapsed.
Click to expand it.
src/tango_api/attribute.cpp
+
5
−
0
View file @
097b165e
...
...
@@ -75,6 +75,11 @@ attribute::attribute(const std::string &dev_name,
{
}
std
::
string
attribute
::
get_fqdn
()
const
{
return
fqdn_name
;
}
std
::
string
attribute
::
get_name
()
const
{
if
(
ptr_attr
)
...
...
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