feat/add-basic-telemetry #10
@@ -5,16 +5,20 @@ import logging as lg
|
|||||||
import selectors
|
import selectors
|
||||||
import socket
|
import socket
|
||||||
import time
|
import time
|
||||||
from typing import Callable
|
from typing import Callable, TYPE_CHECKING
|
||||||
|
|
||||||
from judas_protocol import Category, ControlAction, Message
|
from judas_protocol import Category, ControlAction, Message
|
||||||
|
|
||||||
|
if TYPE_CHECKING:
|
||||||
|
from judas_client.client import Client
|
||||||
|
|
||||||
|
|
||||||
class Connector:
|
class Connector:
|
||||||
"""Connector class for managing TCP connection and message exchange."""
|
"""Connector class for managing TCP connection and message exchange."""
|
||||||
|
|
||||||
def __init__(
|
def __init__(
|
||||||
self,
|
self,
|
||||||
|
client: Client,
|
||||||
mac_address: str,
|
mac_address: str,
|
||||||
host: str,
|
host: str,
|
||||||
port: int,
|
port: int,
|
||||||
@@ -34,6 +38,8 @@ class Connector:
|
|||||||
)
|
)
|
||||||
self.logger.debug("Initializing Connector...")
|
self.logger.debug("Initializing Connector...")
|
||||||
|
|
||||||
|
self.client: Client = client
|
||||||
|
|
||||||
self.host: str = host
|
self.host: str = host
|
||||||
self.port: int = port
|
self.port: int = port
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user