コード例 #1
0
 def _pop_publish_result(self):
     result = ua.PublishResult()
     result.SubscriptionId = self.data.SubscriptionId
     self._pop_triggered_datachanges(result)
     self._pop_triggered_events(result)
     self._pop_triggered_statuschanges(result)
     self._keep_alive_count = 0
     self._startup = False
     result.NotificationMessage.SequenceNumber = self._notification_seq
     if result.NotificationMessage.NotificationData:
         self._notification_seq += 1
         self._not_acknowledged_results[
             result.NotificationMessage.SequenceNumber] = result
     result.MoreNotifications = False
     result.AvailableSequenceNumbers = list(
         self._not_acknowledged_results.keys())
     return result
コード例 #2
0
 def _pop_publish_result(self) -> ua.PublishResult:
     """
     Return a `PublishResult` with all enqueued data changes, events and status changes.
     Clear all queues.
     """
     result = ua.PublishResult()
     result.SubscriptionId = self.data.SubscriptionId
     self._pop_triggered_datachanges(result)
     self._pop_triggered_events(result)
     self._pop_triggered_statuschanges(result)
     self._keep_alive_count = 0
     self._startup = False
     result.NotificationMessage.SequenceNumber = self._notification_seq
     if result.NotificationMessage.NotificationData and not self.no_acks:
         # Acknowledgement is only expected when the Subscription is for a client.
         self._notification_seq += 1
         self._not_acknowledged_results[result.NotificationMessage.SequenceNumber] = result
     result.MoreNotifications = False
     result.AvailableSequenceNumbers = list(self._not_acknowledged_results.keys())
     return result