Bluenet
5.7.0
Bluenet, firmware for nRF52 smart home devices
|
Crownstones pseudo random number generator wrapper. More...
#include <cs_RandomGenerator.h>
Public Member Functions | |
RandomGenerator (uint32_t seed) | |
The given seed need not be very high quality. More... | |
uint32_t | rand () |
Generates a new random number and updates the internal state. More... | |
uint32_t | operator() () |
Private Attributes | |
Msws::State | _state |
Crownstones pseudo random number generator wrapper.
Usefull for generating sequences of pseudo random numbers that are identical across devices in the mesh.
|
inline |
The given seed need not be very high quality.
The constructor will ensure that the internal state is set up to acceptable values, deterministically generated from the given seed parameter.
|
inline |
|
inline |
Generates a new random number and updates the internal state.
|
private |