Skip to content

Commit fa7895d

Browse files
author
Volker Richert
committed
expose port of e3dc to support FARM
1 parent b6cd645 commit fa7895d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

e3dc/_e3dc_rscp_local.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class CommunicationError(Exception):
4444
class E3DC_RSCP_local:
4545
"""A class describing an E3DC system connection using RSCP protocol locally."""
4646

47-
def __init__(self, username: str, password: str, ip: str, key: str):
47+
def __init__(self, username: str, password: str, ip: str, key: str, port: int = PORT):
4848
"""Constructor of an E3DC RSCP local object.
4949
5050
Args:
@@ -56,6 +56,7 @@ def __init__(self, username: str, password: str, ip: str, key: str):
5656
self.username = username.encode("utf-8")
5757
self.password = password.encode("utf-8")
5858
self.ip = ip
59+
self.port = port
5960
self.key = key.encode("utf-8")
6061
self.socket: socket.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
6162
self.connected: bool = False
@@ -122,7 +123,7 @@ def connect(self) -> None:
122123
try:
123124
self.socket = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
124125
self.socket.settimeout(5)
125-
self.socket.connect((self.ip, PORT))
126+
self.socket.connect((self.ip, self.port))
126127
self.processedData = None
127128
self.connected = True
128129
except Exception:

0 commit comments

Comments
 (0)