You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The DefaultValue for data type OCTET_STRING and DOMAIN is formatted with two hex digits for each byte in the EDS - see corresponding CiA standard. Also the content of the default value has to end up in a bytes instance and not in a string instance. (otherwise an exception is thrown when the SDOServer tries to answer a SDO upload request for an object dictionary entry with this data type.)
Please see the following patch, and please integrate it:
--- eds.py.orig 2021-01-13 15:50:52.906669000 +0100
+++ eds.py 2021-01-15 12:48:02.089073320 +0100
@@ -138,7 +138,9 @@
def _convert_variable(node_id, var_type, value):
- if var_type in objectdictionary.DATA_TYPES:
+ if var_type in (objectdictionary.OCTET_STRING, objectdictionary.DOMAIN):
+ return bytes.fromhex(value)
+ elif var_type in (objectdictionary.VISIBLE_STRING, objectdictionary.UNICODE_STRING):
return value
elif var_type in objectdictionary.FLOAT_TYPES:
return float(value)
The text was updated successfully, but these errors were encountered:
The DefaultValue for data type OCTET_STRING and DOMAIN is formatted with two hex digits for each byte in the EDS - see corresponding CiA standard. Also the content of the default value has to end up in a bytes instance and not in a string instance. (otherwise an exception is thrown when the SDOServer tries to answer a SDO upload request for an object dictionary entry with this data type.)
Please see the following patch, and please integrate it:
The text was updated successfully, but these errors were encountered: