Overriding NodeManager Methods

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

Moderator: uasdknet

Post Reply
DanG
Jr. Member
Jr. Member
Posts: 4
Joined: 24 Jul 2015, 06:57

Overriding NodeManager Methods

Post by DanG »

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Overriding NodeManager Methods

Post by Support Team »

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

DanG
Jr. Member
Jr. Member
Posts: 4
Joined: 24 Jul 2015, 06:57

Re: Overriding NodeManager Methods

Post by DanG »

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

User avatar
Support Team
Hero Member
Hero Member
Posts: 3064
Joined: 18 Mar 2011, 15:09

Re: Overriding NodeManager Methods

Post by Support Team »

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
baldo
Hero Member
Hero Member
Posts: 25
Joined: 19 Nov 2019, 12:15

Re: Overriding NodeManager Methods

Post by baldo »

Support Team wrote:
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
Hi, is there an example about this?
I can't find any, not even in the Demo source code. I would like to implement both the Read and the StartDataMonitoring (etc.) for <multiple nodes>.

Thanks in advance,

Best regards,
Baldo

Post Reply