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.

How to pass a State object to ReadMultipleItems

More
23 Mar 2012 19:55 #811 by support
R.,
You are right that such constructor does not exist. This is by design – [...] having all those combinations with and without the State in the constructor would lead to having too many overloads.
So, you need to use one of the constructors that are available, and then assign the State (or other properties that were not in the constructor) afterwards. C# (I think in Version 3.0+) also has an initializer list which can make it a bit shorter to code.
Best regards,
ZZ
From: R.
Sent: Friday, March 23, 2012 8:08 PM
To: Zbynek Zahradnik
Subject: RE: Ua ReadMultipleValues Method
Zbynek,
Yes I’ve read all of those sections in the help file. However, I don’t see a constructor that includes a parameter for the state object. That’s where I am confused. Should I just create an instance of the UaReadArguments object and assign the AttributeId, endpointdescriptor, state, etc separately?
R.
From: Zbynek Zahradnik [This email address is being protected from spambots. You need JavaScript enabled to view it.]
Sent: Friday, March 23, 2012 3:00 PM
To: R.
Subject: RE: Ua ReadMultipleValues Method
R.,
ReadMultipleValues (www.opclabs.com/onlinedocs/Qui... ) takes an array of UAReadArguments (www.opclabs.com/onlinedocs/Qui... ).
Each of them contains a State property (www.opclabs.com/onlinedocs/Qui... ), inherited from OperationArguments. This way, you can pass in a State for each node you want to read.
Best regards,
ZZ
From: R.
Sent: Friday, March 23, 2012 7:53 PM
To: Zbynek Zahradnik
Subject: Ua ReadMultipleValues Method
Hello Zbynek,
I have [....] UA question. The ReadMultipleItems method has a State property in the ValueResult. However, I don’t see any overloads for the ReadMultipleItems method that allows you to pass in a state object. Can you clarify this for me?
Thanks,
R.

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

Moderators: support
Time to create page: 0.050 seconds