[英]Milo OPC UA Server push Values in Server Logic
I'm a newbie to OPC UA.我是 OPC UA 的新手。
My target is to create a OPC UA Server and as soon somebody changes any Value I want to receive a function call, so I can react on the Input.我的目标是创建一个 OPC UA 服务器,一旦有人更改了我想要接收函数调用的任何值,我就可以对输入做出反应。
To archive this, I created a server with MILO-Eclipse.为了归档这个,我用 MILO-Eclipse 创建了一个服务器。 In my Namespace I have some functions called onDataItemsModified() etc. But if I change a Value in my Server with UAExpert, the Server doesn't call the onDataItemsModified() Function.
在我的命名空间中,我有一些名为 onDataItemsModified() 等的函数。但是如果我使用UAExpert 更改服务器中的值,则服务器不会调用 onDataItemsModified() 函数。 Is there another way to receive a notification as soon somebody changed a value on my Server?
是否有另一种方法可以在有人更改我服务器上的值时立即收到通知? I saw the opportunity to add a client and register an observer, but I thought I can see the changes directly as Server and dosnt need to implement a client.
我看到了添加客户端和注册观察者的机会,但我认为我可以直接看到更改作为服务器并且不需要实现客户端。
When a client writes to an attribute of a Node in your address space it comes in via the Write service, not any of the Monitored Item services.当客户端写入地址空间中节点的属性时,它通过写入服务而不是任何受监控项服务进入。
You can override the write call in your address space, or simply add an AttributeObserver or an AttributeDelegate to the Nodes you create.您可以覆盖地址空间中的 write 调用,或者简单地将 AttributeObserver 或 AttributeDelegate 添加到您创建的节点。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.