MCPcopy Create free account
hub / github.com/FreeOpcUa/python-opcua / eval

Method eval

opcua/server/internal_subscription.py:409–419  ·  view source on GitHub ↗
(self, event)

Source from the content-addressed store, hash-verified

407 self._aspace = aspace
408
409 def eval(self, event):
410 if not self.elements:
411 return True
412 # spec says we should only evaluate first element, which may use other elements
413 try:
414 res = self._eval_el(0, event)
415 except Exception as ex:
416 self.logger.exception("Exception while evaluating WhereClause %s for event %s: %s",
417 self.elements, event, ex)
418 return False
419 return res
420
421 def _eval_el(self, index, event):
422 el = self.elements[index]

Callers 2

test_where_clauseMethod · 0.95
_trigger_eventMethod · 0.80

Calls 1

_eval_elMethod · 0.95

Tested by 1

test_where_clauseMethod · 0.76