Title: Reading DefaultValue from EDS is wrong for data type OCTET_STRING and DOMAIN · Issue #217 · canopen-python/canopen · GitHub
Open Graph Title: Reading DefaultValue from EDS is wrong for data type OCTET_STRING and DOMAIN · Issue #217 · canopen-python/canopen
X Title: Reading DefaultValue from EDS is wrong for data type OCTET_STRING and DOMAIN · Issue #217 · canopen-python/canopen
Description: 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 strin...
Open Graph Description: 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 u...
X Description: 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 u...
Opengraph URL: https://github.com/canopen-python/canopen/issues/217
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Reading DefaultValue from EDS is wrong for data type OCTET_STRING and DOMAIN","articleBody":"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.)\r\n\r\nPlease see the following patch, and please integrate it:\r\n\r\n```\r\n--- eds.py.orig\t2021-01-13 15:50:52.906669000 +0100\r\n+++ eds.py\t2021-01-15 12:48:02.089073320 +0100\r\n@@ -138,7 +138,9 @@\r\n \r\n \r\n def _convert_variable(node_id, var_type, value):\r\n- if var_type in objectdictionary.DATA_TYPES:\r\n+ if var_type in (objectdictionary.OCTET_STRING, objectdictionary.DOMAIN):\r\n+ return bytes.fromhex(value)\r\n+ elif var_type in (objectdictionary.VISIBLE_STRING, objectdictionary.UNICODE_STRING):\r\n return value\r\n elif var_type in objectdictionary.FLOAT_TYPES:\r\n return float(value)\r\n\r\n```","author":{"url":"https://github.com/mlederhi","@type":"Person","name":"mlederhi"},"datePublished":"2021-01-15T12:16:01.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/217/canopen/issues/217"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:b69b02c5-555a-e8f5-f098-e06836304f33 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | A65A:2C32F8:43731F9:5914F72:6A5D768B |
| html-safe-nonce | 3fd353e08d8a1e6fed338b77e64063bd0780e240f4bfeed088ee9f19d10e91b8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBNjVBOjJDMzJGODo0MzczMUY5OjU5MTRGNzI6NkE1RDc2OEIiLCJ2aXNpdG9yX2lkIjoiNzQwNzk1Mzg0Mjk2NDEwMDc0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5968fb040304d8a9ab4faea3a88ad22fd0b8f28fcaf5a40177db220585b562a4 |
| hovercard-subject-tag | issue:786851995 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/canopen-python/canopen/217/issue_layout |
| twitter:image | https://opengraph.githubassets.com/d1a0bb11b48d0ab63f3a118702f7243b4e9fc3388adbab2ffe97d6c084b54f5f/canopen-python/canopen/issues/217 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/d1a0bb11b48d0ab63f3a118702f7243b4e9fc3388adbab2ffe97d6c084b54f5f/canopen-python/canopen/issues/217 |
| og:image:alt | 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 u... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mlederhi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/canopen-python/canopen git https://github.com/canopen-python/canopen.git |
| octolytics-dimension-user_id | 200581454 |
| octolytics-dimension-user_login | canopen-python |
| octolytics-dimension-repository_id | 68737600 |
| octolytics-dimension-repository_nwo | canopen-python/canopen |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 68737600 |
| octolytics-dimension-repository_network_root_nwo | canopen-python/canopen |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width