SYS_GetNormalizedRandomNumber Function

C

uint16_t SYS_GetNormalizedRandomNumber(uint16_t upperLimit);

Description

Generates a random two-bytes number normalized by given upper limit.

ingroup sys

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 startup and updates it periodically later on.

Parameters

ParamDescription
upperLimitThe upper limit of random number

Returns

s A normalized random number in the range 0x000 - upper limit