Professional OPC
Development Tools

logos

Online Forums

Technical support is provided through Support Forums below. Anybody can view them; you need to Register/Login to our site (see links in upper right corner) in order to Post questions. You do not have to be a licensed user of our product.

Please read Rules for forum posts before reporting your issue or asking a question. OPC Labs team is actively monitoring the forums, and replies as soon as possible. Various technical information can also be found in our Knowledge Base. For your convenience, we have also assembled a Frequently Asked Questions page.

Do not use the Contact page for technical issues.

Does SubscribeItem always return positive integer handles?

More
21 Dec 2022 08:45 #11364 by support
Hello.

Please read this first: opclabs.doc-that.com/files/onlinedocs/QuickOpc/Latest/User%2...y%20subscribed%20entities.html

The fact that you are asking questions like this means that you intend to do something incorrect with the handles. In general, they are opaque values, and you should not make assumptions like those you suggested. In reality, just between two us, we do not pass out zero handles, and as long as possible we try not to reuse the handles - but this is simply to make troubleshooting easier. All of this should be considered an implementation detail and your code must not rely on it. I do not have definitive answer on negative values, but the same applies to them.

If you are struggling with how to write your subscription code, please explain more about your issue, and I will suggest the approach we think is the best.

Best regards

Please Log in or Create an account to join the conversation.

More
21 Dec 2022 06:25 - 21 Dec 2022 06:26 #11362 by aris
The EasyDAClient::SubscribeItem returns an integer handle.
  1. Is the integer handle value always positive or it can be negative or even 0?
  2. Let's say handle1 is the handler for ItemID1 returned by SubscribeItem. If I call UnsubscribeItem(handle1) and then SubscribeItem(...ItemID1...) again, can the same integer handle be returned by SubscribeIte?
Last edit: 21 Dec 2022 06:26 by aris.

Please Log in or Create an account to join the conversation.

Moderators: support
Time to create page: 0.054 seconds