def _pop_triggered_datachanges(self, result: ua.PublishResult):
     """Append all enqueued data changes to the given `PublishResult` and clear the queue."""
     if self._triggered_datachanges:
         notif = ua.DataChangeNotification()
         notif.MonitoredItems = [item for sublist in self._triggered_datachanges.values() for item in sublist]
         self._triggered_datachanges = {}
         #self.logger.debug("sending datachanges notification with %s events", len(notif.MonitoredItems))
         result.NotificationMessage.NotificationData.append(notif)
Ejemplo n.º 2
0
 def _pop_triggered_datachanges(self, result):
     if self._triggered_datachanges:
         notif = ua.DataChangeNotification()
         notif.MonitoredItems = [
             item for sublist in self._triggered_datachanges.values()
             for item in sublist
         ]
         self._triggered_datachanges = {}
         self.logger.debug(
             "sending datachanges notification with %s events",
             len(notif.MonitoredItems))
         result.NotificationMessage.NotificationData.append(notif)