gravity-controller-operator 2.2.3__py3-none-any.whl → 2.2.5__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- gravity_controller_operator/controllers/sigur.py +8 -37
- gravity_controller_operator/main.py +1 -1
- {gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/METADATA +1 -1
- {gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/RECORD +7 -7
- {gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/WHEEL +0 -0
- {gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/licenses/LICENSE +0 -0
- {gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/top_level.txt +0 -0
|
@@ -2,47 +2,18 @@ import time
|
|
|
2
2
|
from http.client import responses
|
|
3
3
|
|
|
4
4
|
from gravity_controller_operator.controllers_super import DIInterface, RelayInterface, ControllerInterface
|
|
5
|
-
from _thread import allocate_lock
|
|
6
|
-
from socket import socket
|
|
7
5
|
|
|
8
6
|
|
|
9
7
|
class SigurBase:
|
|
10
|
-
def __init__(self
|
|
11
|
-
|
|
12
|
-
self.mutex = allocate_lock()
|
|
13
|
-
#self.login()
|
|
14
|
-
#self.subscribe_ce()
|
|
15
|
-
|
|
16
|
-
def login(self, login="Administrator", password=""):
|
|
17
|
-
return self._send_command(f'"LOGIN" 1.8 "{login}" "{password}"')
|
|
18
|
-
|
|
19
|
-
def subscribe_ce(self):
|
|
20
|
-
return self._send_command(f'"SUBSCRIBE" CE')
|
|
21
|
-
|
|
22
|
-
def _send_command(self, command, get_response=True):
|
|
23
|
-
time.sleep(0.15)
|
|
24
|
-
self.mutex.acquire()
|
|
25
|
-
command = f'{command}\r\n'
|
|
26
|
-
self.sock.send(command.encode("utf-8"))
|
|
27
|
-
if get_response:
|
|
28
|
-
response = self.sock.recv(1024)
|
|
29
|
-
self.mutex.release()
|
|
30
|
-
return response
|
|
31
|
-
self.mutex.release()
|
|
32
|
-
|
|
33
|
-
def get_response(self):
|
|
34
|
-
time.sleep(0.15)
|
|
35
|
-
self.mutex.acquire()
|
|
36
|
-
response = self.sock.recv(1024)
|
|
37
|
-
self.mutex.release()
|
|
38
|
-
return responses
|
|
8
|
+
def __init__(self):
|
|
9
|
+
pass
|
|
39
10
|
|
|
40
11
|
class SigurDI(DIInterface, SigurBase):
|
|
41
12
|
map_keys_amount = 5
|
|
42
13
|
starts_with = 3
|
|
43
14
|
|
|
44
|
-
def __init__(self
|
|
45
|
-
SigurBase.__init__(self
|
|
15
|
+
def __init__(self):
|
|
16
|
+
SigurBase.__init__(self)
|
|
46
17
|
DIInterface.__init__(self)
|
|
47
18
|
|
|
48
19
|
def get_phys_dict(self):
|
|
@@ -56,8 +27,8 @@ class SigurRelay(RelayInterface, SigurBase):
|
|
|
56
27
|
map_keys_amount = 3
|
|
57
28
|
starts_with = 1
|
|
58
29
|
|
|
59
|
-
def __init__(self
|
|
60
|
-
SigurBase.__init__(self
|
|
30
|
+
def __init__(self):
|
|
31
|
+
SigurBase.__init__(self)
|
|
61
32
|
RelayInterface.__init__(self)
|
|
62
33
|
|
|
63
34
|
def get_phys_dict(self):
|
|
@@ -76,6 +47,6 @@ class Sigur:
|
|
|
76
47
|
|
|
77
48
|
def __init__(self, sock, login="Administrator", password="",
|
|
78
49
|
name="Sigur", *args, **kwargs):
|
|
79
|
-
di = SigurDI(
|
|
80
|
-
relay = SigurRelay(
|
|
50
|
+
di = SigurDI()
|
|
51
|
+
relay = SigurRelay()
|
|
81
52
|
self.interface = ControllerInterface(di_interface=di, relay_interface=relay)
|
{gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/METADATA
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: gravity_controller_operator
|
|
3
|
-
Version: 2.2.
|
|
3
|
+
Version: 2.2.5
|
|
4
4
|
Summary: SDK предоставляющий универсальный интерфейс для работы со многими промышленными контроллерами ввода-вывода (количество расширяемо)
|
|
5
5
|
Author: PunchyArchy
|
|
6
6
|
Author-email: ksmdrmvscthny@gmail.com
|
{gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/RECORD
RENAMED
|
@@ -2,21 +2,21 @@ gravity_controller_operator/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMp
|
|
|
2
2
|
gravity_controller_operator/controller_factory.py,sha256=QQHym-fPhWCBCOFUp7MHrecjXcRy9dXVnUbg6LvwvDo,1111
|
|
3
3
|
gravity_controller_operator/controllers_super.py,sha256=xn_66lJbyT9CQ-mMVy_QkUYEPc3nPoiI9zBuIo_yFzk,3785
|
|
4
4
|
gravity_controller_operator/exceptions.py,sha256=tAuviQbnrZh_T5E31RBeEnagwbvdi7x23uQJ8v4XRtM,647
|
|
5
|
-
gravity_controller_operator/main.py,sha256=
|
|
5
|
+
gravity_controller_operator/main.py,sha256=NMEukJrei6xbxoDxHyJyBL2GB4uOjRoUO9ffDi2vKxA,1586
|
|
6
6
|
gravity_controller_operator/controllers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
7
7
|
gravity_controller_operator/controllers/arm_k210.py,sha256=qlpQoqoLfZddTVJ-Dzdvk_59-0E4FEays3kE8V2Xd1I,2036
|
|
8
8
|
gravity_controller_operator/controllers/emulator_contr.py,sha256=SGZBzUeCXDwWXHcYdMDvErwIj1L81ycnObHvCjB86Sk,943
|
|
9
9
|
gravity_controller_operator/controllers/moxa.py,sha256=OGvEB6ggDi1NZh7OOEfjxVUTKC-opi0hIcAKTJJAMi0,2407
|
|
10
10
|
gravity_controller_operator/controllers/netping_relay.py,sha256=0cpioEQbZ19BApAPJT2fXWTKDEB9zf2GU9OUfbBGkAY,2572
|
|
11
|
-
gravity_controller_operator/controllers/sigur.py,sha256=
|
|
11
|
+
gravity_controller_operator/controllers/sigur.py,sha256=o0n7Oc4AJSvRBpiVNae7QBM-MXWD4lq0hnAuYMuGQa0,1504
|
|
12
12
|
gravity_controller_operator/controllers/wb_mr6lv.py,sha256=qDmb71t7KXX_w8nhguUpEoMgkPOZcoVs83We5kTgFfk,2358
|
|
13
13
|
gravity_controller_operator/controllers/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
14
|
gravity_controller_operator/controllers/tests/test_moxa_controller.py,sha256=RKwpE4WI6QylPD6qGrse6iv6X8ybzf45oTHHTjlCLXA,1068
|
|
15
15
|
gravity_controller_operator/docs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
16
16
|
gravity_controller_operator/tests/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
17
17
|
gravity_controller_operator/tests/main_tests.py,sha256=BkgWDKUXVmK4WIYY_5CAHazYmqkKumYPtfbnyxcm_UU,575
|
|
18
|
-
gravity_controller_operator-2.2.
|
|
19
|
-
gravity_controller_operator-2.2.
|
|
20
|
-
gravity_controller_operator-2.2.
|
|
21
|
-
gravity_controller_operator-2.2.
|
|
22
|
-
gravity_controller_operator-2.2.
|
|
18
|
+
gravity_controller_operator-2.2.5.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
|
|
19
|
+
gravity_controller_operator-2.2.5.dist-info/METADATA,sha256=x4WQnlL4BXk0yeXpmFkclhD44Xia9AtT2PNIq1yBHAc,4124
|
|
20
|
+
gravity_controller_operator-2.2.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
21
|
+
gravity_controller_operator-2.2.5.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
|
|
22
|
+
gravity_controller_operator-2.2.5.dist-info/RECORD,,
|
{gravity_controller_operator-2.2.3.dist-info → gravity_controller_operator-2.2.5.dist-info}/WHEEL
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|