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

Class VarUpdater

examples/server-example.py:58–71  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

56
57
58class VarUpdater(Thread):
59 def __init__(self, var):
60 Thread.__init__(self)
61 self._stopev = False
62 self.var = var
63
64 def stop(self):
65 self._stopev = True
66
67 def run(self):
68 while not self._stopev:
69 v = sin(time.time() / 10)
70 self.var.set_value(v)
71 time.sleep(0.1)
72
73
74if __name__ == "__main__":

Callers 1

server-example.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected