validDeviceOnlineType(params: Object)
Requires:
DeviceKit≥1.2.6@ray-js/ray≥0.6.23
Platforms:
iOSAndroid
Description
Check whether the specified online type (onlineType) matches the connectivity type defined in the device thing model
Parameters
| Property | Type | Required | Description |
|---|---|---|---|
deviceId | string | Yes | Device ID |
onlineType | number | Yes | Device network online types, represented as bitwise flags; multiple online states can be combined. Defined as follows: bit 0 (1 << 0): Wi‑Fi online (Cloud online || LAN online). If you only want to check cloud online, use bit 7 bit 1 (1 << 1): Local online, LAN online bit 2 (1 << 2): BLE online (Bluetooth online) bit 3 (1 << 3): BLEMesh online (Bluetooth mesh online) bit 4 (1 << 4): Beacon online bit 5 (1 << 5): Dayu online bit 6 (1 << 6): System BT online (system Bluetooth online) bit 7 (1 << 7): Cloud online bit 8 (1 << 8): Matter online (Matter local online) |
complete | () => void | No | Completion callback (executed on both success and failure) |
| No | Callback on successful API call | ||
fail | (params: Object) => void | No | Failure callback |
fail callback parameters
| Property | Type | Description |
|---|---|---|
errorMsg | string | Error message |
errorCode | string | number | Error code |
| Error extension |
Return Value
None