pymscada 0.1.11b5__tar.gz → 0.1.11b7__tar.gz
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.
Potentially problematic release.
This version of pymscada might be problematic. Click here for more details.
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/PKG-INFO +1 -1
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/pyproject.toml +1 -1
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/www_server.py +10 -20
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/LICENSE +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/README.md +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/__init__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/__main__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/bus_client.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/bus_server.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/checkout.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/config.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/console.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/README.md +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/__init__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/accuweather.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/bus.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/files.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/history.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/logixclient.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/modbus_plc.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/modbusclient.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/modbusserver.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/openweather.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/opnotes.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/ping.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-bus.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-demo-modbus_plc.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-files.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-history.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-accuweather.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-logixclient.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-modbusclient.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-modbusserver.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-ping.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-io-snmpclient.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-opnotes.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/pymscada-wwwserver.service +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/snmpclient.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/tags.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/demo/wwwserver.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/files.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/history.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/__init__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/accuweather.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/logix_client.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/logix_map.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/modbus_client.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/modbus_map.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/modbus_server.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/openweather.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/ping_client.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/ping_map.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/snmp_client.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/iodrivers/snmp_map.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/main.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/misc.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/module_config.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/opnotes.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/pdf/__init__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/pdf/one.pdf +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/pdf/two.pdf +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/periodic.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/protocol_constants.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/samplers.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/tag.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/tools/snmp_client2.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/tools/walk.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/src/pymscada/validate.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/__init__.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/bus_echo.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/iodrivers/test_logix.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/iodrivers/test_modbus.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/busserver.yaml +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/db.sqlite +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/hist_tag_0_0.dat +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/hist_tag_0_10_2.dat +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/hist_tag_0_15.dat +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/hist_tag_0_26.dat +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_assets/hist_tag_0_50.dat +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_bus_server.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_config.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_history.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_misc.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_openweather.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_opnotes.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_periodic.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_samplers.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_tag.py +0 -0
- {pymscada-0.1.11b5 → pymscada-0.1.11b7}/tests/test_validate.py +0 -0
|
@@ -56,27 +56,15 @@ class WSHandler():
|
|
|
56
56
|
try:
|
|
57
57
|
while True:
|
|
58
58
|
as_bytes, message = await self.queue.get()
|
|
59
|
-
if
|
|
60
|
-
logging.debug(f'{self.rta_id}
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
else:
|
|
66
|
-
await self.ws.send_json(message)
|
|
67
|
-
except ConnectionResetError:
|
|
68
|
-
logging.debug(f'{self.rta_id}: Connection reset, stopping send_queue')
|
|
69
|
-
break
|
|
70
|
-
except Exception as e:
|
|
71
|
-
logging.warning(f'{self.rta_id}: Error sending message: {e}')
|
|
72
|
-
break
|
|
59
|
+
if as_bytes:
|
|
60
|
+
# logging.debug(f'{self.rta_id} as bytes {message}')
|
|
61
|
+
await self.ws.send_bytes(message)
|
|
62
|
+
else:
|
|
63
|
+
# logging.debug(f'{self.rta_id} as json {message}')
|
|
64
|
+
await self.ws.send_json(message)
|
|
73
65
|
except asyncio.CancelledError:
|
|
74
|
-
logging.
|
|
75
|
-
|
|
76
|
-
# Clean up subscriptions when the connection ends
|
|
77
|
-
for tag in self.tag_by_id.values():
|
|
78
|
-
tag.del_callback_id(self.notify_id)
|
|
79
|
-
tag.del_callback(self.publish)
|
|
66
|
+
logging.warning(f'{self.rta_id}: send queue error, close '
|
|
67
|
+
f'{self.ws.exception()}')
|
|
80
68
|
|
|
81
69
|
def publish(self, tag: Tag):
|
|
82
70
|
"""
|
|
@@ -194,6 +182,8 @@ class WSHandler():
|
|
|
194
182
|
if action == 'set': # pc.CMD_SET
|
|
195
183
|
self.tag_by_name[tagname].value = value, time_us, bus
|
|
196
184
|
elif action == 'rta': # pc.CMD_RTA
|
|
185
|
+
if tagname not in self.tag_by_name:
|
|
186
|
+
self.do_sub(tagname)
|
|
197
187
|
if 'File' in value:
|
|
198
188
|
file = await anext(self.ws)
|
|
199
189
|
value['_file_data'] = file.data
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|