Login  •  Register


Overriding NodeManager Methods

Questions regarding the use of the .NET SDK 2.0 for Server or Client development or integration into customer products ...

Overriding NodeManager Methods

Postby DanG » 16 Aug 2015, 08:27

Hi,

I'm overriding NodeManager Methods to add specific behaviour for browse/read/write/browse/monitoring.

Although the NodeManager implements async "BeginRead" etc. Methods only the sync "Read" can be overridden. Will overriding the sync "Read" block the server? I'm asking because data aquisition takes a while in my scenario. The same is true for "Write".

For Browse I can override the BeginBrowse Method though.

I'd be happy for any hints about sync behaviour.

Thanks and best regards,
Daniel
DanG
Jr. Member
Jr. Member
 
Posts: 4
Joined: 24 Jul 2015, 06:57

Re: Overriding NodeManager Methods

Postby Support Team » 19 Aug 2015, 10:23

Hello Daniel,
if the read operation takes a long time you can:
- override the Read() method and return NULL
- override FinishTransaction to start the read operation from there
- call transaction.Callback when the read completes

This behaviour is not described in the documentation for the Read method and will be added / updated for the next release.

Best Regards,
Unified Automation Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2422
Joined: 18 Mar 2011, 15:09

Re: Overriding NodeManager Methods

Postby DanG » 18 Apr 2016, 07:22

Hello Support Team,

The transaction.Callback only allows to pass the result for one read (= one operationHandle). I have 100+ operationHandles in one read request. Internally, all are being returned form the underlying system in one response. Is there a way to pass all values back in one transaction.Callback? Or do I need to loop over all the operationHandles and invoke a Callback for each? If implement the loop, The response to the client will only be sent after the last Callback was invoked, right?

Thanks and best regards,
Daniel
DanG
Jr. Member
Jr. Member
 
Posts: 4
Joined: 24 Jul 2015, 06:57

Re: Overriding NodeManager Methods

Postby Support Team » 20 Apr 2016, 15:54

Hello,

In FinishReadTransaction there is the argument transaction. You can cast this argument to DataTransactionHandle. The NodeHandles property contains the necessary information for all nodes to read.
After receiving all values from your underlying system, you can call the callback for each NodeAttributeOperationHandle.

Best regards
Support Team
User avatar
Support Team
Hero Member
Hero Member
 
Posts: 2422
Joined: 18 Mar 2011, 15:09


Return to .NET based OPC UA SDK

Who is online

Users browsing this forum: No registered users and 1 guest

cron