gravity-controller-operator 2.2.3__py3-none-any.whl → 2.2.4__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.
@@ -2,40 +2,11 @@ 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
8
  def __init__(self, sock):
11
- self.sock = sock
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
9
+ self.sock = None
39
10
 
40
11
  class SigurDI(DIInterface, SigurBase):
41
12
  map_keys_amount = 5
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gravity_controller_operator
3
- Version: 2.2.3
3
+ Version: 2.2.4
4
4
  Summary: SDK предоставляющий универсальный интерфейс для работы со многими промышленными контроллерами ввода-вывода (количество расширяемо)
5
5
  Author: PunchyArchy
6
6
  Author-email: ksmdrmvscthny@gmail.com
@@ -8,15 +8,15 @@ gravity_controller_operator/controllers/arm_k210.py,sha256=qlpQoqoLfZddTVJ-Dzdvk
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=BAhu86MZn9siToudGHPOnSIiuEnjYdXk2xaF5J_9648,2475
11
+ gravity_controller_operator/controllers/sigur.py,sha256=nljHk1nRu1ijJPp_ApwGPNucdR_z4AWxMJeeIHF6nTk,1554
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.3.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
- gravity_controller_operator-2.2.3.dist-info/METADATA,sha256=7JdMgLSFqVBGpZ5N21At31JI7fhHVCv2nVK00tFB2zI,4124
20
- gravity_controller_operator-2.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- gravity_controller_operator-2.2.3.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
- gravity_controller_operator-2.2.3.dist-info/RECORD,,
18
+ gravity_controller_operator-2.2.4.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
+ gravity_controller_operator-2.2.4.dist-info/METADATA,sha256=YhROoX40gBs1UIzqhijUF4pk_yE12mbT1OIv6Vn5KmA,4124
20
+ gravity_controller_operator-2.2.4.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ gravity_controller_operator-2.2.4.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
+ gravity_controller_operator-2.2.4.dist-info/RECORD,,