Create a subscription. returns a Subscription object which allow to subscribe to events or data on server period is in milliseconds handler is a python object with following methods: def datachange_notification(self, node, val, data):
(self, period, handler)
| 386 | return Node(self.iserver.isession, nodeid) |
| 387 | |
| 388 | def create_subscription(self, period, handler): |
| 389 | """ |
| 390 | Create a subscription. |
| 391 | returns a Subscription object which allow |
| 392 | to subscribe to events or data on server |
| 393 | period is in milliseconds |
| 394 | handler is a python object with following methods: |
| 395 | def datachange_notification(self, node, val, data): |
| 396 | def event_notification(self, event): |
| 397 | def status_change_notification(self, status): |
| 398 | """ |
| 399 | params = ua.CreateSubscriptionParameters() |
| 400 | params.RequestedPublishingInterval = period |
| 401 | params.RequestedLifetimeCount = 3000 |
| 402 | params.RequestedMaxKeepAliveCount = 10000 |
| 403 | params.MaxNotificationsPerPublish = 0 |
| 404 | params.PublishingEnabled = True |
| 405 | params.Priority = 0 |
| 406 | return Subscription(self.iserver.isession, params, handler) |
| 407 | |
| 408 | def get_namespace_array(self): |
| 409 | """ |
no test coverage detected