pymscada 0.2.6b0__tar.gz → 0.2.6b1__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.2.6b0/src/pymscada.egg-info → pymscada-0.2.6b1}/PKG-INFO +1 -1
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/pyproject.toml +1 -1
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/alarms.py +1 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/bus_client.py +7 -1
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/bus_server.py +7 -1
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/callout.py +1 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/files.py +1 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/history.py +1 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/opnotes.py +1 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1/src/pymscada.egg-info}/PKG-INFO +1 -1
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/LICENSE +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/MANIFEST.in +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/README.md +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/setup.cfg +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/__init__.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/__main__.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/checkout.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/config.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/console.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/README.md +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/__init__.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/__pycache__/__init__.cpython-311.pyc +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/accuweather.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/alarms.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/bus.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/callout.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/files.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/history.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/logixclient.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/modbus_plc.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/modbusclient.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/modbusserver.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/openweather.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/opnotes.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/piapi.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/ping.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-alarms.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-bus.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-callout.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-demo-modbus_plc.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-files.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-history.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-logixclient.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-modbusclient.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-modbusserver.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-openweather.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-piapi.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-ping.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-sms.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-snmpclient.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-io-witsapi.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-opnotes.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/pymscada-wwwserver.service +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/sms.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/snmpclient.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/tags.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/witsapi.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/wwwserver.yaml +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/__init__.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/accuweather.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/logix_client.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/logix_map.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/modbus_client.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/modbus_map.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/modbus_server.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/openweather.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/piapi.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/ping_client.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/ping_map.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/sms.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/snmp_client.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/snmp_map.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/witsapi.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/iodrivers/witsapi_POC.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/main.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/misc.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/module_config.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/pdf/__init__.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/pdf/__pycache__/__init__.cpython-311.pyc +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/pdf/one.pdf +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/pdf/two.pdf +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/periodic.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/protocol_constants.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/samplers.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/tag.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/tools/get_history.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/tools/snmp_client2.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/tools/walk.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/www_server.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada.egg-info/SOURCES.txt +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada.egg-info/dependency_links.txt +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada.egg-info/entry_points.txt +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada.egg-info/requires.txt +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada.egg-info/top_level.txt +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_alarms.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_bus_server.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_callout.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_config.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_history.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_misc.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_opnotes.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_periodic.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_samplers.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_sms.py +0 -0
- {pymscada-0.2.6b0 → pymscada-0.2.6b1}/tests/test_tag.py +0 -0
|
@@ -211,6 +211,7 @@ class Alarms:
|
|
|
211
211
|
self.rta = Tag(rta_tag, dict)
|
|
212
212
|
self.rta.value = {'__rta_id__': 0}
|
|
213
213
|
self.busclient.add_callback_rta(rta_tag, self.rta_cb)
|
|
214
|
+
self.busclient.add_tag(self.rta)
|
|
214
215
|
self._init_db(db, table)
|
|
215
216
|
self.periodic = Periodic(self.periodic_cb, 1.0)
|
|
216
217
|
|
|
@@ -77,6 +77,9 @@ class BusClient:
|
|
|
77
77
|
jsonstr = json.dumps(request).encode()
|
|
78
78
|
size = len(jsonstr)
|
|
79
79
|
data = struct.pack(f'>B{size}s', pc.TYPE.JSON, jsonstr)
|
|
80
|
+
action = request.get("action", "unknown")
|
|
81
|
+
tag_id = self.tag_by_name[tagname].id
|
|
82
|
+
logging.info(f'{self.module}: RTA sending {tagname} {action} to tag_id {tag_id}')
|
|
80
83
|
self.write(pc.COMMAND.RTA, self.tag_by_name[tagname].id, time_us, data)
|
|
81
84
|
|
|
82
85
|
def write(self, command: pc.COMMAND, tag_id: int, time_us: int,
|
|
@@ -209,10 +212,13 @@ class BusClient:
|
|
|
209
212
|
data = struct.unpack_from(f'!{len(value) - 1}s', value, offset=1
|
|
210
213
|
)[0].decode()
|
|
211
214
|
data = json.loads(data)
|
|
215
|
+
action = data.get("action", "unknown")
|
|
216
|
+
logging.info(f'{self.module}: RTA received {tag.name} {action} '
|
|
217
|
+
f'from tag_id {tag_id}')
|
|
212
218
|
try:
|
|
213
219
|
self.rta_handlers[tag.name](data)
|
|
214
220
|
except KeyError:
|
|
215
|
-
logging.warning(f'unhandled RTA for {tag.name} {data}')
|
|
221
|
+
logging.warning(f'{self.module}: unhandled RTA for {tag.name} {data}')
|
|
216
222
|
else:
|
|
217
223
|
raise SystemExit(f'Invalid message {cmd}')
|
|
218
224
|
|
|
@@ -201,15 +201,21 @@ class BusServer:
|
|
|
201
201
|
try:
|
|
202
202
|
tag = BusTags._tag_by_id[tag_id]
|
|
203
203
|
except KeyError:
|
|
204
|
+
logging.warning(f'RTA KeyError {tag_id}')
|
|
204
205
|
self.connections[bus_id].write(
|
|
205
206
|
pc.COMMAND.ERR, tag_id, time_us,
|
|
206
207
|
f"RTA KeyError {tag_id}".encode())
|
|
208
|
+
return
|
|
207
209
|
try:
|
|
210
|
+
logging.info(f'RTA forwarding {tag.name} from_bus={tag.from_bus} '
|
|
211
|
+
f'to bus_id={tag.from_bus}')
|
|
208
212
|
self.connections[tag.from_bus].write(
|
|
209
213
|
pc.COMMAND.RTA, tag_id, tag.time_us, data)
|
|
210
214
|
except KeyError:
|
|
211
|
-
logging.warning(f'
|
|
215
|
+
logging.warning(f'RTA forwarding failed: busclient for '
|
|
216
|
+
f'{tag.name} (from_bus={tag.from_bus}) is gone')
|
|
212
217
|
except Exception as e:
|
|
218
|
+
logging.warning(f'RTA forwarding error {tag.name}: {e}')
|
|
213
219
|
self.connections[bus_id].write(
|
|
214
220
|
pc.COMMAND.ERR, tag_id, time_us,
|
|
215
221
|
f"RTA {tag_id} {e}".encode())
|
|
@@ -145,6 +145,7 @@ class Callout:
|
|
|
145
145
|
'groups': self.groups,
|
|
146
146
|
'escalation': self.escalation}
|
|
147
147
|
self.busclient.add_callback_rta(rta_tag, self.rta_cb)
|
|
148
|
+
self.busclient.add_tag(self.rta)
|
|
148
149
|
self.periodic = Periodic(self.periodic_cb, 1.0)
|
|
149
150
|
|
|
150
151
|
def alarms_cb(self, alm_tag):
|
|
@@ -33,6 +33,7 @@ class Files():
|
|
|
33
33
|
self.rta = Tag(rta_tag, dict)
|
|
34
34
|
self.rta.value = {}
|
|
35
35
|
self.busclient.add_callback_rta(rta_tag, self.rta_cb)
|
|
36
|
+
self.busclient.add_tag(self.rta)
|
|
36
37
|
|
|
37
38
|
def rta_cb(self, request):
|
|
38
39
|
"""Respond to Request to Author and publish on rta_tag as needed."""
|
|
@@ -272,6 +272,7 @@ class History():
|
|
|
272
272
|
self.rta = Tag(rta_tag, bytes)
|
|
273
273
|
self.rta.value = b'\x00\x00\x00\x00\x00\x00' # rta_id is 0
|
|
274
274
|
self.busclient.add_callback_rta(rta_tag, self.rta_cb)
|
|
275
|
+
self.busclient.add_tag(self.rta)
|
|
275
276
|
|
|
276
277
|
def rta_cb(self, request: Request):
|
|
277
278
|
"""Respond to bus requests for data to publish on rta."""
|
|
@@ -55,6 +55,7 @@ class OpNotes:
|
|
|
55
55
|
self.rta = Tag(rta_tag, dict)
|
|
56
56
|
self.rta.value = {'__rta_id__': 0}
|
|
57
57
|
self.busclient.add_callback_rta(rta_tag, self.rta_cb)
|
|
58
|
+
self.busclient.add_tag(self.rta)
|
|
58
59
|
|
|
59
60
|
def _init_table(self):
|
|
60
61
|
"""Initialize or upgrade the database table schema."""
|
|
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
|
{pymscada-0.2.6b0 → pymscada-0.2.6b1}/src/pymscada/demo/__pycache__/__init__.cpython-311.pyc
RENAMED
|
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
|