Title: Avoid truncating unknown types in SDO upload (fixes #436) by acolomb · Pull Request #591 · canopen-python/canopen · GitHub
Open Graph Title: Avoid truncating unknown types in SDO upload (fixes #436) by acolomb · Pull Request #591 · canopen-python/canopen
X Title: Avoid truncating unknown types in SDO upload (fixes #436) by acolomb · Pull Request #591 · canopen-python/canopen
Description: When an OD entry is found in SdoClient.upload(), the truncation is currently skipped only for those types explicitly listed as variable length data (domain, strings). That causes unknown types to be truncated to whatever their length indicates, which is usually one byte. Invert the condition to check all types with an explicitly known size, a.k.a. those listed in STRUCT_TYPES where the required length can be deduced from the structure format. Factor out the condition to a new fixed_size property, which is easier to override when adding custom data types. Re-enable the unit tests which were skipped based on the previously buggy behavior.
Open Graph Description: When an OD entry is found in SdoClient.upload(), the truncation is currently skipped only for those types explicitly listed as variable length data (domain, strings). That causes unknown types to ...
X Description: When an OD entry is found in SdoClient.upload(), the truncation is currently skipped only for those types explicitly listed as variable length data (domain, strings). That causes unknown types to ...
Opengraph URL: https://github.com/canopen-python/canopen/pull/591
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:738f175c-52d6-93c3-f9ef-c34c59276172 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9B88:32DBD9:4C713:656B1:6A5ECC7D |
| html-safe-nonce | 4518188c7b066d7a66ea46ecdcd43fdbc7defc1e443ecfc319e153f6cd377382 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Qjg4OjMyREJEOTo0QzcxMzo2NTZCMTo2QTVFQ0M3RCIsInZpc2l0b3JfaWQiOiIzNDI3NTkwNTczNTIzOTEzODUzIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 69d225f103e4234759dcf5f580535252c9a190997b6db6ce6a4fc204a0891bfd |
| hovercard-subject-tag | pull_request:2593794624 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,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/canopen-python/canopen/pull/591/files |
| twitter:image | https://avatars.githubusercontent.com/u/6996887?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/6996887?s=400&v=4 |
| og:image:alt | When an OD entry is found in SdoClient.upload(), the truncation is currently skipped only for those types explicitly listed as variable length data (domain, strings). That causes unknown types to ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9bd00899c80f8b6ea4e7a96c99290af4722b0befdf9e021b19232cbd6f993660 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| 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 full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9996307881fdf9017d864a20b3dfe5aae4dddd3e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width