mirror of
https://github.com/tiqi-group/pydase.git
synced 2025-04-25 18:40:03 +02:00
updates sio events
- adds disconnect event which marks the DeviceConnection as disconnected - updates connect event to notify the observer about the new state and set connected to True
This commit is contained in:
parent
ad0fd8e833
commit
5936e7091e
@ -68,6 +68,14 @@ class Client:
|
||||
ProxyLoader.update_data_service_proxy(
|
||||
self.proxy, serialized_object=serialized_object
|
||||
)
|
||||
serialized_object["type"] = "DeviceConnection"
|
||||
self.proxy._notify_changed("", loads(serialized_object))
|
||||
self.proxy._connected = True
|
||||
|
||||
@self._sio.event
|
||||
async def disconnect() -> None:
|
||||
logger.debug("Disconnected from '%s:%s' ...", self._hostname, self._port)
|
||||
self.proxy._connected = False
|
||||
|
||||
@self._sio.event
|
||||
async def notify(data: NotifyDict) -> None:
|
||||
|
Loading…
x
Reference in New Issue
Block a user