Page 1 of 1

Overriding NodeManager Methods

Posted: 16 Aug 2015, 08:27
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

Re: Overriding NodeManager Methods

Posted: 19 Aug 2015, 10:23
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

Re: Overriding NodeManager Methods

Posted: 18 Apr 2016, 07:22
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

Re: Overriding NodeManager Methods

Posted: 20 Apr 2016, 15:54
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

Re: Overriding NodeManager Methods

Posted: 21 Sep 2020, 11:12
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