08/10/2022
Hi,
I am new to OPC UA. I would like to use predefined Nodeset file as nodes in my server and would like also to map data from external source. I looked into DataAccess example in Workshop folder. But there I understood that in the example Nodes are created separately in the BlockState. Do I need this Underlying System at all? Since, there I need to create all the nodes again. What am I missing here?
Thanks in advance!
Regards
05/30/2017
The underlying system is an abstraction layer that separates the UA model from the specifics of your implementation.
It is a good software design strategy to create an abstraction layer like this.
This abstraction layer is still useful even if the nodes are defined in the nodeset.
08/10/2022
Thanks Randy for your reply.
I have one more with architecture of the software. Since the abstraction layer from UA model is created, I tried to use dependency injection to get actual data and event into the underlying system. But I found underlying system is still bound to nodemanger, segment and many other classes. Making underlying system as a singleton class would be an option. I know making a singleton has few important drawback in the code.
Is this right approach? or am I missing here anything?
Thanks in advance!
Regards
05/30/2017
The issue is there needs to be 2 way communication between the UnderlyingSystem and the NodeManager.
i.e. Reads go from the NodeManager => UnderlyingSystem but updates go from the UnderlyingSystem => NodeManager .
This detail makes the UnderlyingSystem unsuited for dependency injection which presumes the dependency does know about its container.
You could move to an event model in the UnderlyingSystem where the NodeManager adds event handlers that are used to receive updates from the UnderlyingSystem. This would eliminate the 2 way communication and should allow you to use dependency injection.
08/10/2022
Thanks for your reply.
I didn't understand you completely. How moving events in the UnderlyingSystem will change the situation here?
Anyway I need publish variable and its value from Underlying System via BlockState. Since, eventing will take place at different places (objects) depending on which event belong to which object in the server.
1 Guest(s)