User Manual

Table Of Contents
RK-5409-5 Reference Kit User’s Guide 4-17
iBeanAPI.h
9. ibApi_SetSamplingInterval()
ibApi_FUNC ibApi_SetSamplingInterval(
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
ibApi_UNIT32 sampling_interval_ms
);
This function sets the sampling interval for the device. The sampling interval determines how
frequently updates occur; lower values mean quicker response times, at the price of higher
bandwidth and power consumption. Typically the current interval must elapse before the
new interval will be programmed. When the update has completed, the device state will
return from ibApi_DEVISESTATE_REFRESHING to ibApi_DEVICESTATE_ONLINE.
Note: The assigned value will be quantized to the nearest legal value
supported by the device, which is typically a multiple of 100 ms larger than 300 ms.
Parameters:
api_hdl: (input) API handle returned from ibApi_Open().
device_id: (input) ID of device to be accessed.
sampling_interval_ms: (input) New sampling interval (in ms).
Return Value:
An ibApi_RESULT_SUCCESS if successful, error code (<0) if not.
10. ibApi_GetSamplingInterval()
ibApi_FUNC ibApi_GetSamplingInterval(
ibApi_APIHANDLE api_hdl,
ibApi_DEVICEID device_id,
);
This retrieves the sampling interval for the given device, measured in milliseconds. See
ibApi_SetSamplingInterval() above.
Return Value:
Sampling interval if successful, error code (<0) if not.