Skip to content
This repository has been archived by the owner on Aug 18, 2019. It is now read-only.

CRC check #11

Open
Tomarchelone opened this issue Aug 19, 2018 · 0 comments
Open

CRC check #11

Tomarchelone opened this issue Aug 19, 2018 · 0 comments

Comments

@Tomarchelone
Copy link
Contributor

To check CRC we need both raw header bytes and bytes after header, so it is difficult to implement it as Frame struct method since it holds header as a FrameHeader struct. Putting CRC check inside next_frame() function feels wrong, taking frame argument as raw bytes will require repetition of half of next_frame()'s code. What should we do?

Also, in some cases the amount of bits included in CRC check may not be a multiple of 8. Rust's CRC library though can work only with whole number of bytes, so it seems like we will need to add some leading zeroes at the beginning of the check data and then realign all bytes. Can this be done easier?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant