refactor: use new port negotiation style

As changed in the API document, this now uses the new port negotiation style.

ref: N25B-168
This commit is contained in:
Twirre Meulenbelt
2025-10-16 17:22:04 +02:00
parent e12d88726d
commit 23c3379bfb
8 changed files with 43 additions and 69 deletions

View File

@@ -2,6 +2,8 @@ import logging
import signal
import threading
from robot_interface.utils.qi_utils import get_qi_session
class State(object):
"""
@@ -15,6 +17,7 @@ class State(object):
self.is_initialized = False
self.exit_event = None
self.sockets = [] # type: List[SocketBase]
self.qi_session = None # type: None | ssl.SSLSession
def initialize(self):
if self.is_initialized:
@@ -28,6 +31,8 @@ class State(object):
signal.signal(signal.SIGINT, handle_exit)
signal.signal(signal.SIGTERM, handle_exit)
self.qi_session = get_qi_session()
self.is_initialized = True
def deinitialize(self):