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
Overriding NodeManager Methods
Moderator: uasdknet
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Overriding NodeManager Methods
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
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
-
- Jr. Member
- Posts: 4
- Joined: 24 Jul 2015, 06:57
Re: Overriding NodeManager Methods
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
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
- Support Team
- Hero Member
- Posts: 3072
- Joined: 18 Mar 2011, 15:09
Re: Overriding NodeManager Methods
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
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
- baldo
- Hero Member
- Posts: 25
- Joined: 19 Nov 2019, 12:15
Re: Overriding NodeManager Methods
Hi, is there an example about this?Support Team wrote: ↑19 Aug 2015, 10:23Hello 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
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