le_rand.h File Reference

Go to the source code of this file.


uint32_t le_rand_GetNumBetween (uint32_t min, uint32_t max)
void le_rand_GetBuffer (uint8_t *bufPtr, size_t bufSize)

Detailed Description

Legato Random Number API include file.

Function Documentation

◆ le_rand_GetBuffer()

void le_rand_GetBuffer ( uint8_t *  bufPtr,
size_t  bufSize 

Get a buffer of random numbers.

[out]bufPtrBuffer to store the random numbers in.
[in]bufSizeNumber of random numbers to get.

◆ le_rand_GetNumBetween()

uint32_t le_rand_GetNumBetween ( uint32_t  min,
uint32_t  max 

Get a random number within the specified range, min to max inclusive.

The max value must be greater than the min value, if not this function will log the error and kill the calling process.
The random number.
[in]minMinimum value in range (inclusive).
[in]maxMaximum value in range (inclusive).