简体   繁体   中英

Duplex communication between Client and server open62541(OPC-UA)

I would like to establish bidirectional data communication between client and server. The following example explains what I am trying to acheive.

Ex: Client sends a request to read the value of the two node ids(these node ids are numeric) every sec. Then in the client program it adds these numbers and gives it to the user. Then after 60 seconds,the server tells the client to multiply the number.So now every second the client is multiplying the values of the node ids. Then after 60 seconds, it switches back to addition again. I am able to request the data from the server through the client but I am trying to figure out how to make server request for data from the client?

Edit: I would like to add some new information to my original question.The reason is to make the post more clearer.The following image describes what I am trying to acheive. 在此处输入图像描述 In the above image,provider can be visualised as a server method and consumer can be visualised as a client method. Now if safety consumer2(client2) is connected to safety provider2(server2),how to pass the data received from safety provider2 to safety provider1.(as client can only be connected to a single server).Does the features of open62541 allow the following data flow: safety provider 2-->safety consumer2 --> safety provider1? If yes, can you provide an example? Thanks

That's not really how OPC UA works.

Instead, your client could monitor the Value attribute of some VariableNode in the server and then behave a certain way based on the current value.

The OPC UA protocol does what its documents specify and what you ask is not possible.

But you can make the client read both the values and the multiplier and do the operations you want on the client side, apart from OPC UA

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM