User Manual

Table Of Contents
RK-5409-5 Reference Kit User’s Guide 4-37
iBeanAPI_LPR.h
3. ibApi_LPR_SetWakeupAndDutyRatio()
ibApi_FUNC ibApi_LPR_SetWakeupAndDutyRatio(
ibApi_APIHANDLE api_hdl,
ibApi_GROUPID network,
ibApi_UINT32 wakeup_interval,
ibApi_UINT32 duty_ratio
)
This function sets the low power router wakeup interval and duty ratio for all devices. The
wakeup interval and duty ratio are global attributes that applies to all devices in the network.
Changing of wakeup interval and duty ratio may have impact on the network stability,
however, the worst case is to cause the network to reestablish itself entirely. Minimum value
for wakeup interval is 60 seconds, maximum value is 6540 seconds (109 minutes).
Wakeup interval should be expressed in milliseconds. If too many digits of precision are used
round off error can occur. Use ranges of 100's, 1000's, 10000's or 100000's of milliseconds
rounded up to the nearest second to prevent round off error.
Minimum value for duty radio depends on minimum wakeup interval, and network size,
radius (number of hops), currently it set to be 10%, maximum value is 100%. The 100%
duty ratio means the router is no longer sleep.
Duty ratio can be set in 0.5% increments using the integer range 5-1000, with increments of
5. If (DutyRatio MOD 5) != 0, an error will be returned.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
network: (input) Group ID of the network.
wakeup_interval: (input) Wakeup interval in milliseconds.
duty_ratio: (input) the duty ratio (5 - 1000), in increments of 5.
Return Value:
Wakeup interval in ms if successful, error code (<0) if not.