5.1.5.6 SYS_GetNormalizedRandomNumber Function
Syntax
uint16_t SYS_GetNormalizedRandomNumber(uint16_t upperLimit);
Description
This function generates a random two-byte number normalized by the given upper limit.
Generation of a random number is based on the seed value created in ZDO with the use of the radio (if the radio supports such mechanism). The stack creates the seed value on start-up and updates it periodically later on.
Input Parameters
Return Type and Values
Parameter Name | Description |
---|---|
upperLimit | The upper limit of random number |
- A normalized random number in the range from 0x000 to the upper limit.