Get with File on P-ION: connect and transfer the way Ontrol's Niagara driver does
A real P-ION (fw 1.32) restarted on every Sox file get. Ontrol's Niagara 4 driver gets app.sab from the same device, so its settings are copied: - DASP hello asks for 256-byte packets (idealMax/absMax), so file chunks are 238 bytes - the message-length header (0x81) goes to Orion only, decided once the platform id is read - the app is saved on the device before app.sab is read, the save resent every 5 s rather than 1 s (a P-ION save takes 2-3+ s) - the file open is resent every 15 s; DASP gains a per-packet resend interval for this Tested on a P-ION at 192.168.1.252: save 3.2 s, app.sab + kits.scode + app.sax in 15.8 s, no resends, device stayed up. The unsaved-changes question became a notice, since the app is now always saved first. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+3
-1
@@ -10,6 +10,7 @@ import xml.etree.ElementTree as ET
|
||||
|
||||
import app_state
|
||||
import schema
|
||||
import sox
|
||||
from sox import SoxClient, SoxComponent, TREE, CONFIG, RUNTIME, LINKS, ALL
|
||||
|
||||
|
||||
@@ -43,7 +44,8 @@ class DeviceSession:
|
||||
|
||||
def connect(self, host, port, user, password):
|
||||
"""DASP connect → read schema → load root. Called from background thread."""
|
||||
self.sox_client = SoxClient(host, int(port), user, password)
|
||||
self.sox_client = SoxClient(host, int(port), user, password,
|
||||
ideal_max=sox.IDEAL_MAX, abs_max=sox.ABS_MAX)
|
||||
self.sox_client.on_event = self._on_sox_event
|
||||
self.sox_client.checksum_resolver = schema.resolve_truncated_checksum
|
||||
self.sox_client.connect()
|
||||
|
||||
Reference in New Issue
Block a user