本文へスキップ

BS2_SearchDeviceByIP

+ v2.9.13 Searches for a device at a specific IPv4 address and updates the list of devices available in the current context. The list of devices can be obtained via the BS2_GetDevices function.

The request is sent directly to the given address as a unicast, so a device is still found when broadcast is blocked or when the device is on another subnet.

情報

Overwrite the old device list.

注意

A response timeout is reported as BS_SDK_SUCCESS. Calling this function with an address where no device exists also returns success.

Do not decide by the return value. Check the number of devices returned by BS2_GetDevices.

Declaration​

#include "BS_API.h"

int BS2_SearchDeviceByIP(void* context, const char* deviceIpAddr);

Parameter​

  • [In] context : Context

  • [In] deviceIpAddr : IPv4 address of the device to search for

Return Value​

If successfully done, BS_SDK_SUCCESS will be returned.

If there is an error, the corresponding error code will be returned.

An IPv6 address is rejected with BS_SDK_ERROR_INVALID_ADDRESS.

See Also​

BS2_GetDevices

BS2_SearchDevices

BS2_SetDeviceSearchingTimeout

このページは役に立ちましたか?