Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix calling stop monitored item callback. #132

Merged
merged 8 commits into from
Mar 10, 2019
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions docs/source/_templates/layout.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{% extends "!layout.html" %}

{%- block extrahead %}
<meta name="google-site-verification" content="bUDMPBn4rTuF6NW-6pWLXWjl5q9l3UI83tZVFD6w0Zc" />
{% endblock %}
3 changes: 2 additions & 1 deletion src/OpcUaStackServer/ServiceSet/MonitorManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,9 @@ namespace OpcUaStackServer
}

// check monitored item list
monitoredItemIds_.erase(it1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok, The ID is not deleted if only one ID exists in the list.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, if there are other IDs, `newMonitoredItemIds' is not empty and I insert the rest IDs in L587.

if (newMonitoredItemIds.size() > 0) {
Copy link
Member Author

@atimin atimin Mar 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sure that this functional used to work correctly. But judging the history of file it could never work at all.

Copy link
Member Author

@atimin atimin Mar 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've understood. The problem is only for duplication monitored items inside of a single subscription. I tested my application with different clients.

monitoredItemIds_.insert(std::make_pair(baseNodeClass->nodeId().data(), monitoredItemIds));
monitoredItemIds_.insert(std::make_pair(baseNodeClass->nodeId().data(), newMonitoredItemIds));
return;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh , the same data will be inserted again.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not the same. newMonitoredItemIds has the rest of ID's and I re-insert them deleting old ID's before. See L585.

}

Expand Down