04/14/2020
Hello, I am implementing an OPCUA server based on the .NET Standard reference implementation, and I’m very new to OPCUA.
I want to update a value on demand when a client requests, so that it is ensured to be the latest value from the backend database. I’m trying to determine where is the correct place to do this update of the value? Is there a method that I need to override somewhere or something like that? Is there an example in any of the samples anywhere? I couldn’t find an example that worked this way. All of the samples either seem to initialize the value at startup, or simulate it changing all the time, but none of them seem to update it when requested by the client.
Thanks in advance.
04/14/2020
Thank you for your reply. I’m not sure if I explained clearly what I’m asking though. I don’t want to automatically keep updating the value of every node in the system. What I’d like to do is only update the value when it is requested by a client.
I have a back-end SCADA system that is getting updates frequently and that is where the source data values are stored. There can be hundreds of thousands of different points getting updated. I’m not going to have every single point in the system hooked up to a notification thread unless the client subscribes to it. I think I already understand how to do that.
What I’m asking about is just the simple case of a client browsing to a node and requesting the current value. Is there an event or method override that I’d need to hook into where I’d read from my back-end SCADA system, to set the value before the it is read and returned to the client?
06/18/2018
I might not be understanding what you mean but if you supply a method to the OnReadValue in your server code you could then, in that method, you get the value from your SCADA backend and return it. The OnReadValue is called as a result of a client read. Since the node is supplied to the method you could come up with a extendable means to determine the address of the data in the SCADA backend and use this method for all SCADA data representing nodes.Â
1 Guest(s)