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

CRC check #11

@Tomarchelone

Description

@Tomarchelone

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions