Skip to content

feat(Data): add payload slice accessor payload #15

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

elrafoon
Copy link
Contributor

@elrafoon elrafoon commented May 8, 2025

My use case is to parse rather large register block from modbus powermeter.

I do it by designing exactly matching struct, deriving zerocopy::FromBytes for it, and the just creating it from register payload bytes as received from the powermeter. Since zerocopy crate has support for endianness, it looks to me like nearly perfect way to parse structured data represented in flat modbus registers.

I see no reason to hide register payload from library user - let him exploit them :-)

Thanks.

I see no reason to hide register payload from library user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant