Event after write from special client

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

Moderator: uasdknet

Post Reply
jonasthiel
Sr. Member
Sr. Member
Posts: 10
Joined: 27 Aug 2013, 09:35

Event after write from special client

Post by jonasthiel »

Hy,
I'm a student and I'm evaluating the OPC UA .NET SDK for my bachelorthesis.
Now I facing a problem:
I implemented a OPC UA Server in my program. The program feeds this OPC-Server every second with information (through the internal client) from a external source. Now I want to notice when an external client change the value of some nodes, to prevent an update from the external source and work with the new "external client value".
Is there any event or something like this, caused by writting from an external client, from where I can get the concerning node id?

Thanks a lot for your help

Jonas

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

Re: Event after write from special client

Post by Support Team »

Hi Jonas,

Can you clarify what actors are involved and what interfaces they are using? The picture I get is under normal operation:
External Source (Non-UA) -> Internal Client (Non-UA) -> UA Server
And you want this to happen:
External Client (UA Write) -> UA Server (Non-UA) -> Internal Client. Is this correct?


Best Regards,
Support Team

jonasthiel
Sr. Member
Sr. Member
Posts: 10
Joined: 27 Aug 2013, 09:35

Re: Event after write from special client

Post by jonasthiel »

Hi Support Team,
thank you for your response!
The first part is right:
I use an API to get the data from the external source. Every second this source will be requested for data and this data will be written to the corresponfing UA Nodes with the serverinternal client. This data will be shown in the external client, which can manipulate the data.

But the second one is different to the actual situation and is the core of the problem:

External Client (UA Write) -> UA Server -> using of data in my own program.

The problem is, that I need to find out, when the external client writes something to the UA Sever to grab this data. Otherwise this nodes would be overwritten by the internal client (with data from external source) after one second. So the data manipuilated by the external client will be lost.

Kind Regards,
Jonas Thiel

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

Re: Event after write from special client

Post by Support Team »

Hi Jonas,

You want to configure your variables for ExternalPolled or ExternalPush because with this configuration your code is responsible for managing the memory that stores the value. This implies that you will be responsible for updating it no matter where the updates come. The GettingStarted examples have examples of ExternalPolled variables. See Tutorial Lesson 3
You will need to override the Read and Write methods on the BaseNodeManager and provide the code that fetches the value from your storage.


Best Regards
Support Team

jonasthiel
Sr. Member
Sr. Member
Posts: 10
Joined: 27 Aug 2013, 09:35

Re: Event after write from special client

Post by jonasthiel »

Thank you very much!!

Post Reply