Skip to content
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

Simpler rand #573

Merged
merged 4 commits into from
Dec 4, 2021
Merged

Simpler rand #573

merged 4 commits into from
Dec 4, 2021

Conversation

Dirbaio
Copy link
Member

@Dirbaio Dirbaio commented Nov 25, 2021

Requires #571

Revisits #547, because it turns out the rand_custom_impl! macro stuff was less nice than I thought. It's now a simple PRNG owned by Interface. The builder allows setting the random seed.

@crawford
Copy link
Contributor

Having just implemented against the earlier Rand interface, I like this better. My device RNG (and I imagine others) requires some setup before it can be used, so this ownership model removes the runtime checks needed in the previous interface (making sure that the RNG was configured before first-use). 👍

@thvdveld
Copy link
Contributor

thvdveld commented Dec 3, 2021

The sequence number for IEEE 802.15.4 needs to be random and not equal to zero when the interface is build. I guess we can now set it when building the interface, but then we should remove the sequence_no function in the interface builder.

Made a PR for it #575

Set the sequence number to a random value when building the interface.
575: ieee802154: random sequence number r=Dirbaio a=thibautvdv

Set the sequence number to a random value when building the interface (builds on #573).

Co-authored-by: Thibaut Vandervelden <thvdveld@vub.be>
@Dirbaio
Copy link
Member Author

Dirbaio commented Dec 4, 2021

bors r+

@bors
Copy link
Contributor

bors bot commented Dec 4, 2021

Build succeeded:

@bors bors bot merged commit 774b375 into master Dec 4, 2021
@bors bors bot deleted the rand2 branch December 4, 2021 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants