Title: Vector unconnected interface handling · Issue #353 · hardbyte/python-can · GitHub
Open Graph Title: Vector unconnected interface handling · Issue #353 · hardbyte/python-can
X Title: Vector unconnected interface handling · Issue #353 · hardbyte/python-can
Description: python-can/can/interfaces/vector/canlib.py Lines 102 to 104 in 6d0f4a6 idx = vxlapi.xlGetChannelIndex(hw_type.value, hw_index.value, hw_channel.value) mask = 1 << idx If the application config is okay but the interface that channel is as...
Open Graph Description: python-can/can/interfaces/vector/canlib.py Lines 102 to 104 in 6d0f4a6 idx = vxlapi.xlGetChannelIndex(hw_type.value, hw_index.value, hw_channel.value) mask = 1 << idx If the application config is o...
X Description: python-can/can/interfaces/vector/canlib.py Lines 102 to 104 in 6d0f4a6 idx = vxlapi.xlGetChannelIndex(hw_type.value, hw_index.value, hw_channel.value) mask = 1 << idx If the application confi...
Opengraph URL: https://github.com/hardbyte/python-can/issues/353
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Vector unconnected interface handling","articleBody":"https://github.com/hardbyte/python-can/blob/6d0f4a66d121e86d2c8c707ce11546822a0ca1d2/can/interfaces/vector/canlib.py#L102-L104\r\n\r\nIf the application config is okay but the interface that channel is associated to is disconnected, xlGetChannelIndex returns a negative number and `mask = 1 \u003c\u003c idx` fails with `ValueError: negative shift count`.\r\n\r\nIn 2.1.0, it died here: https://github.com/hardbyte/python-can/blob/338d21191ef89e9cb515eae80d9d945d12028477/can/interfaces/vector/canlib.py#L83-L85\r\nwith `can.interfaces.vector.exceptions.VectorError: XL_ERR_WRONG_PARAMETER`, presumably as a result of passing the negative self.mask to the Vector API.\r\n\r\nNeither is a particularly graceful way of handling the error. Does their API documentation say what's supposed to happen when the interface isn't there? Is it possible to test that and raise a nicer exception?","author":{"url":"https://github.com/tpwrules","@type":"Person","name":"tpwrules"},"datePublished":"2018-07-09T09:28:26.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":5},"url":"https://github.com/353/python-can/issues/353"}
| 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:3afde3f8-7889-a913-fcc2-85f823cc84ab |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C4F2:3D821D:284C784:3A54462:6A60CE05 |
| html-safe-nonce | 38a661a946feb00a61637d26ada2d378c2d0b983c2d0e8db10596f8b4c68739f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNEYyOjNEODIxRDoyODRDNzg0OjNBNTQ0NjI6NkE2MENFMDUiLCJ2aXNpdG9yX2lkIjoiODg4NzQzMjA4NzcyNzAzMzg2MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d3646462563032b106f60f60587b7dfb7c5bc39b59db5b0d4375dbceeefc4401 |
| hovercard-subject-tag | issue:339372294 |
| 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/hardbyte/python-can/353/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ca181d13c090b4f090fdf725b4c12d0ea2e9687690c4ec29004b0659226178a/hardbyte/python-can/issues/353 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ca181d13c090b4f090fdf725b4c12d0ea2e9687690c4ec29004b0659226178a/hardbyte/python-can/issues/353 |
| og:image:alt | python-can/can/interfaces/vector/canlib.py Lines 102 to 104 in 6d0f4a6 idx = vxlapi.xlGetChannelIndex(hw_type.value, hw_index.value, hw_channel.value) mask = 1 << idx If the application config is o... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tpwrules |
| hostname | github.com |
| expected-hostname | github.com |
| None | a9556c67fd2e63f5fecafc192915a3b089ef8170a9384ff6b59d7b4a2f6b73f8 |
| turbo-cache-control | no-preview |
| go-import | github.com/hardbyte/python-can git https://github.com/hardbyte/python-can.git |
| octolytics-dimension-user_id | 855189 |
| octolytics-dimension-user_login | hardbyte |
| octolytics-dimension-repository_id | 69090889 |
| octolytics-dimension-repository_nwo | hardbyte/python-can |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 69090889 |
| octolytics-dimension-repository_network_root_nwo | hardbyte/python-can |
| 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 | f464e59c3a800187a50f3c89c36ee16df9992c1b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width