@TY14 ,
It seems that the type mismatch error only happens when you save certain datalayer nodes? There is a lot of casting happening here, so it could very well be those operations.
if "history" in address:
root = InertialValue3.GetRootAs(buffer, 0)
try:
node = root.Node()
mount = root.Mount()
period = root.Period()
interval = root.Interval()
if isinstance(node, bytes):
node = node.decode('utf-8')
if isinstance(mount, bytes):
mount = mount.decode('utf-8')
# Sicherstellen, dass period und interval Ganzzahlen sind
if not isinstance(period, int):
period = int(period)
if not isinstance(interval, int):
interval = int(interval)
# Timeout-Wert berechnen
timeout_value = 1000 * period * interval
# Setzen des Timeouts für die Methode
result = self._provider.set_timeout_node(self._providerNode, timeout_value)
if result == Result.OK:
print(f"Timeout-Wert für Methode {self._nodeAddress} erfolgreich auf {timeout_value} ms gesetzt")
else:
print(f"Fehler beim Setzen des Timeout-Werts für Methode {self._nodeAddress}: {result}")
cb(Result.FAILED, None)
return
except (ValueError, TypeError) as e:
print(f"Error while decoding values: {e}", flush=True)
cb(Result.TYPE_MISMATCH, None)
return
I don't have a good guess on the DL_TIMEOUT problem besides overflowing some type maximum.
I would suggest deploying this app with a remote target and debugging. Set breakpoints on the TYPE_MISMATCH and DL_TIMEOUT errors to catch them as they are thrown.
... View more