{"action":"created","issue":{"url":"https://api.github.com/repos/howerj/dbcc/issues/11","repository_url":"https://api.github.com/repos/howerj/dbcc","labels_url":"https://api.github.com/repos/howerj/dbcc/issues/11/labels{/name}","comments_url":"https://api.github.com/repos/howerj/dbcc/issues/11/comments","events_url":"https://api.github.com/repos/howerj/dbcc/issues/11/events","html_url":"https://github.com/howerj/dbcc/issues/11","id":369817946,"node_id":"MDU6SXNzdWUzNjk4MTc5NDY=","number":11,"title":"Byte order","user":{"login":"xR3b0rn","id":6249046,"node_id":"MDQ6VXNlcjYyNDkwNDY=","avatar_url":"https://avatars0.githubusercontent.com/u/6249046?v=4","gravatar_id":"","url":"https://api.github.com/users/xR3b0rn","html_url":"https://github.com/xR3b0rn","followers_url":"https://api.github.com/users/xR3b0rn/followers","following_url":"https://api.github.com/users/xR3b0rn/following{/other_user}","gists_url":"https://api.github.com/users/xR3b0rn/gists{/gist_id}","starred_url":"https://api.github.com/users/xR3b0rn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xR3b0rn/subscriptions","organizations_url":"https://api.github.com/users/xR3b0rn/orgs","repos_url":"https://api.github.com/users/xR3b0rn/repos","events_url":"https://api.github.com/users/xR3b0rn/events{/privacy}","received_events_url":"https://api.github.com/users/xR3b0rn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-13T16:30:23Z","updated_at":"2018-10-13T17:53:33Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I am not sure, what to pass to unpack_can... functions.\r\nCasting frame.data (the 8 bytes of the can frame) into a uint64_t causes byte order failures (power pc would interpret it different than intel). So it would be better to pass the char array, so the unpacking function have to ensure the correct byte order.\r\n\r\nPS I also couldn't find something in your repo, where I may see how I shall use this function correctly. Fact is, the byte order gets messed up if I cast the frame.data array.\r\n\r\nMay be introduce a new dbcc flag for choosing the byte order.\r\n\r\nI need more time to test it. But prehaps I will do a other push."},"comment":{"url":"https://api.github.com/repos/howerj/dbcc/issues/comments/429561896","html_url":"https://github.com/howerj/dbcc/issues/11#issuecomment-429561896","issue_url":"https://api.github.com/repos/howerj/dbcc/issues/11","id":429561896,"node_id":"MDEyOklzc3VlQ29tbWVudDQyOTU2MTg5Ng==","user":{"login":"howerj","id":1807662,"node_id":"MDQ6VXNlcjE4MDc2NjI=","avatar_url":"https://avatars1.githubusercontent.com/u/1807662?v=4","gravatar_id":"","url":"https://api.github.com/users/howerj","html_url":"https://github.com/howerj","followers_url":"https://api.github.com/users/howerj/followers","following_url":"https://api.github.com/users/howerj/following{/other_user}","gists_url":"https://api.github.com/users/howerj/gists{/gist_id}","starred_url":"https://api.github.com/users/howerj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/howerj/subscriptions","organizations_url":"https://api.github.com/users/howerj/orgs","repos_url":"https://api.github.com/users/howerj/repos","events_url":"https://api.github.com/users/howerj/events{/privacy}","received_events_url":"https://api.github.com/users/howerj/received_events","type":"User","site_admin":false},"created_at":"2018-10-13T17:53:33Z","updated_at":"2018-10-13T17:53:33Z","author_association":"OWNER","body":"But the generated code doesn't depend on the byte order of the platform you are running it on? If a cast is performed on an array of bytes, then that introduces an endianess dependency (also one on alignment) - that's where the dependency on byte order comes from.\r\n\r\nThere's also nothing stopping someone putting the LSB in the last byte of an array, or the first byte, on either endianess platform. If I introduced a byte array into the interface I would have to introduce the convention that the LSB of the CAN packet is the first byte of the character array. "}}
{"actor":{"display_login":"howerj"}}