I am a full newbie in OPC. Some things are not obvious for me.
I am using opcua stack (uaserver) from: https://github.com/digitalpetri As a client software (for now, just for tests) I am using UAExpert from United Automation.
Each customer has a few units. Each unit can have some values. Everything is in a postgres db. I need to expose those values via OPC for customers.
Now I see it like I have to implement:
- A Folder Node per each customer.
- Each Folder has References for multiple Nodes which are units
- Each unit has some Nodes which are values (not really matter here)
My concerns:
- I don't know if such model is ideologically correct for OPC-UA.
- It seems unclear for me how shall I notify the OPC client if a unit has been added or removed.
- Also it seems I need to prepare all the nodes for all customer folders, units etc., just on my OPC server start. And to keep them even for customers which would have never connected. Is there any correct way to avoid this?
- The UAExpert client subscribes to a Server Object just after connect to the server. Is it required for all clients?
Sorry, I really guess the most of these questions could be answered while reading the OPC UA Spec, but maybe someone could just reply it before I dig tons of papers)