Commit f4377b6d authored by oroulet's avatar oroulet Committed by oroulet

add create_subscription to sync server

parent 231b94cc
......@@ -168,7 +168,7 @@ class Client:
return "Sync" + self.aio_obj.__str__()
__repr__ = __str__
@property
def application_uri(self):
return self.aio_obj.application_uri
......@@ -193,7 +193,7 @@ class Client:
def set_password(self, pwd: str):
self.aio_obj.set_password(pwd)
@syncmethod
async def load_private_key(self, path: str, password: Optional[Union[str, bytes]] = None, extension: Optional[str] = None):
pass
......@@ -353,6 +353,12 @@ class Server:
def write_attribute_value(self, nodeid, datavalue, attr=ua.AttributeIds.Value):
pass
def create_subscription(self, period, handler):
coro = self.aio_obj.create_subscription(period, _SubHandler(self.tloop, handler))
aio_sub = self.tloop.post(coro)
return Subscription(self.tloop, aio_sub)
class EventGenerator:
def __init__(self, tloop, aio_evgen):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment