SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
|
#include <rtprandomurandom.h>
Public Member Functions | |
RTPRandomURandom () | |
~RTPRandomURandom () | |
int | Init () |
uint8_t | GetRandom8 () |
uint16_t | GetRandom16 () |
uint32_t | GetRandom32 () |
double | GetRandomDouble () |
Public Member Functions inherited from qrtplib::RTPRandom | |
RTPRandom () | |
virtual | ~RTPRandom () |
uint32_t | PickSeed () |
Private Attributes | |
FILE * | device |
Additional Inherited Members | |
Static Public Member Functions inherited from qrtplib::RTPRandom | |
static RTPRandom * | CreateDefaultRandomNumberGenerator () |
A random number generator which uses bytes delivered by the /dev/urandom device.
Definition at line 51 of file rtprandomurandom.h.
qrtplib::RTPRandomURandom::RTPRandomURandom | ( | ) |
qrtplib::RTPRandomURandom::~RTPRandomURandom | ( | ) |
|
virtual |
Returns a random sixteen bit value.
Implements qrtplib::RTPRandom.
Definition at line 87 of file rtprandomurandom.cpp.
References device.
|
virtual |
Returns a random thirty-two bit value.
Implements qrtplib::RTPRandom.
Definition at line 106 of file rtprandomurandom.cpp.
References device.
|
virtual |
Returns a random eight bit value.
Implements qrtplib::RTPRandom.
Definition at line 68 of file rtprandomurandom.cpp.
References device.
|
virtual |
Returns a random number between $0.0$ and $1.0$.
Implements qrtplib::RTPRandom.
Definition at line 125 of file rtprandomurandom.cpp.
References device, and RTPRANDOM_2POWMIN63.
int qrtplib::RTPRandomURandom::Init | ( | ) |
Initialize the random number generator.
Definition at line 53 of file rtprandomurandom.cpp.
References device, ERR_RTP_RTPRANDOMURANDOM_ALREADYOPEN, and ERR_RTP_RTPRANDOMURANDOM_CANTOPEN.
Referenced by qrtplib::RTPRandom::CreateDefaultRandomNumberGenerator().
|
private |
Definition at line 65 of file rtprandomurandom.h.
Referenced by GetRandom16(), GetRandom32(), GetRandom8(), GetRandomDouble(), Init(), RTPRandomURandom(), and ~RTPRandomURandom().