def _modify_monitored_item(self, params):
     for mdata in self._monitored_items.values():
         result = ua.MonitoredItemModifyResult()
         if mdata.monitored_item_id == params.MonitoredItemId:
             result.RevisedSamplingInterval = params.RequestedParameters.SamplingInterval
             result.RevisedQueueSize = params.RequestedParameters.QueueSize
             if params.RequestedParameters.Filter is not None:
                 mdata.filter = params.RequestedParameters.Filter
             mdata.queue_size = params.RequestedParameters.QueueSize
             return result
     result = ua.MonitoredItemModifyResult()
     result.StatusCode(ua.StatusCodes.BadMonitoredItemIdInvalid)
     return result
 def modify_monitored_items(self, params):
     self.logger.info("modify monitored items")
     if params.SubscriptionId not in self.subscriptions:
         res = []
         for _ in params.ItemsToModify:
             result = ua.MonitoredItemModifyResult()
             result.StatusCode = ua.StatusCode(ua.StatusCodes.BadSubscriptionIdInvalid)
             res.append(result)
         return res
     return self.subscriptions[params.SubscriptionId].monitored_item_srv.modify_monitored_items(params)