gravity-controller-operator 2.2.1__py3-none-any.whl → 2.2.2__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.
@@ -41,8 +41,12 @@ class SigurDI(DIInterface, SigurBase):
41
41
  def get_phys_dict(self):
42
42
  result = {}
43
43
  for point in range(self.starts_with, self.starts_with + self.map_keys_amount):
44
- raw = self._send_command(f'"GETAPINFO" {point}')
45
- response = raw.decode()
44
+ while True:
45
+ raw = self._send_command(f'"GETAPINFO" {point}')
46
+ response = raw.decode()
47
+ if "OK" in response:
48
+ continue
49
+ break
46
50
  status = response.split(" ")[-2]
47
51
  result[point] = 0 if status in ("ONLINE_UNLOCKED", "ONLINE_NORMAL") else 1
48
52
  return result
@@ -59,8 +63,12 @@ class SigurRelay(RelayInterface, SigurBase):
59
63
  def get_phys_dict(self):
60
64
  result = {}
61
65
  for point in range(self.starts_with, self.starts_with + self.map_keys_amount):
62
- raw = self._send_command(f'"GETAPINFO" {point}')
63
- response = raw.decode()
66
+ while True:
67
+ raw = self._send_command(f'"GETAPINFO" {point}')
68
+ response = raw.decode()
69
+ if "OK" in response:
70
+ continue
71
+ break
64
72
  status = response.split(" ")[-2]
65
73
  result[point] = 0 if status in ("ONLINE_UNLOCKED", "ONLINE_NORMAL") else 1
66
74
  return result
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: gravity_controller_operator
3
- Version: 2.2.1
3
+ Version: 2.2.2
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=0smnGvihcAH2WxG9k6TaWGDVUmffuR-iaBgEoDI-sl0,2660
11
+ gravity_controller_operator/controllers/sigur.py,sha256=30T35U_pHK4j6jywO4ABuvALVVIys1_6t1Ie4AlF2so,2908
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.1.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
- gravity_controller_operator-2.2.1.dist-info/METADATA,sha256=rtCJfcUFu7WObQtc1XYqMNNcLTefudBeKx9RGv7S6iI,4124
20
- gravity_controller_operator-2.2.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
- gravity_controller_operator-2.2.1.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
- gravity_controller_operator-2.2.1.dist-info/RECORD,,
18
+ gravity_controller_operator-2.2.2.dist-info/licenses/LICENSE,sha256=6kbiFSfobTZ7beWiKnHpN902HgBx-Jzgcme0SvKqhKY,1091
19
+ gravity_controller_operator-2.2.2.dist-info/METADATA,sha256=J1NATp-3719MgB7dct3sBP5y8suwYKOO8cA8yvK9w34,4124
20
+ gravity_controller_operator-2.2.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ gravity_controller_operator-2.2.2.dist-info/top_level.txt,sha256=krapbz1cEDGquDJf0DnoTbnybUwi7J_8OgoIumEc0OM,28
22
+ gravity_controller_operator-2.2.2.dist-info/RECORD,,