le_rand.h File Reference
Go to the source code of this file.
Functions | |
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.
Copyright (C) Sierra Wireless Inc. Use of this work is subject to license.
Function Documentation
◆ le_rand_GetBuffer()
void le_rand_GetBuffer | ( | uint8_t * | bufPtr, |
size_t | bufSize | ||
) |
Get a buffer of random numbers.
- Parameters
-
[out] bufPtr Buffer to store the random numbers in. [in] bufSize Number 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.
- Warning
- The max value must be greater than the min value, if not this function will log the error and kill the calling process.
- Returns
- The random number.
- Parameters
-
[in] min Minimum value in range (inclusive). [in] max Maximum value in range (inclusive).