/// /// /** * @public * @example * ```tsx * import { gateway } from '@ray-js/ray'; * * const { hasParamsMethod } = gateway; * * hasParamsMethod({ * testDeviceID: 0, * success: (result) => { * console.log('hasParamsMethod success', result); * }, * fail: (error) => { * console.log('hasParamsMethod fail', error.errorMsg); * }, * }); * ``` */ export declare const hasParamsMethod: typeof ty.groupcitest.hasParamsMethod; /** * @public */ export declare const richDocMethod: typeof ty.groupcitest.richDocMethod; /** * 下发更新 LQI 指令,用于刷新网关子设备的信号质量值 * @param params.devId 子设备 ID * @returns 是否下发成功 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const refreshLQI = async () => { * try { * const success = await gateway.sendCmdForRefreshDeviceLQI({ * devId: 'sub_device_001', * }); * console.log('下发刷新LQI指令:', success); * } catch (err) { * console.error('下发失败:', err); * } * }; * ``` */ export declare const sendCmdForRefreshDeviceLQI: typeof ty.gateway.sendCmdForRefreshDeviceLQI; /** * 获取设备最新 LQI(链路质量指示)信息 * @param params.devId 子设备 ID * @param params.offsetTime 时间偏移量,单位为毫秒 * @returns 设备 LQI 信息列表 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const fetchLQI = async () => { * try { * const lqiList = await gateway.getLastDeviceLQI({ * devId: 'sub_device_001', * offsetTime: 60000, * }); * lqiList.forEach(item => { * console.log(`设备: ${item.deviceName}, LQI: ${item.lqi}`); * }); * } catch (err) { * console.error('获取LQI失败:', err); * } * }; * ``` */ export declare const getLastDeviceLQI: typeof ty.gateway.getLastDeviceLQI; /** * 查询设备高级能力,返回设备支持的扩展能力键值对 * @param params.devId 设备 ID * @returns 设备高级能力键值对 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const querySeniorAbility = async () => { * try { * const abilities = await gateway.getSeniorAbility({ * devId: 'device_001', * }); * console.log('设备高级能力:', abilities); * } catch (err) { * console.error('查询失败:', err); * } * }; * ``` */ export declare const getSeniorAbility: typeof ty.gateway.getSeniorAbility; /** * 获取网关子设备数量限制,包括各类型子设备的上限 * @param params.devId 设备 ID * @returns 子设备数量限制信息 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const fetchSubDevLimit = async () => { * try { * const limit = await gateway.getGatewaySubDevLimit({ * devId: 'gateway_001', * }); * console.log('子设备上限:', limit.max); * console.log('蓝牙子设备上限:', limit.blu); * console.log('Zigbee子设备上限:', limit.zig); * } catch (err) { * console.error('获取失败:', err); * } * }; * ``` */ export declare const getGatewaySubDevLimit: typeof ty.gateway.getGatewaySubDevLimit; /** * Mesh 类设备拖拽,将子设备从一个 Mesh 网络移动到另一个 * @param params.nodeIds 需要拖拽的子设备 ID 列表 * @param params.sourceMeshId 原 Mesh ID 或网关 ID * @param params.targetMeshId 目标 Mesh ID 或网关 ID * @returns 拖拽结果,包含已在目标网关下的设备列表 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const moveMeshDevices = async () => { * try { * const result = await gateway.updateRelationMesh({ * nodeIds: ['node_001', 'node_002'], * sourceMeshId: 'mesh_source', * targetMeshId: 'mesh_target', * }); * if (result.repeatNodeIds.length > 0) { * console.log('已在目标网关下的设备:', result.repeatNodeIds); * } * } catch (err) { * console.error('拖拽失败:', err); * } * }; * ``` */ export declare const updateRelationMesh: typeof ty.gateway.updateRelationMesh; /** * 蓝牙单点类设备拖拽,将蓝牙子设备从一个网关移动到另一个 * @param params.nodes 需要拖拽的子设备 ID 与 UUID 列表 * @param params.sourceMeshId 原网关 ID * @param params.targetMeshId 目标网关 ID * @returns 拖拽结果,包含已在目标网关下的设备列表 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const moveBlueDevices = async () => { * try { * const result = await gateway.updateRelationBlue({ * nodes: [ * { devId: 'blue_dev_001', uuid: 'uuid_001' }, * { devId: 'blue_dev_002', uuid: 'uuid_002' }, * ], * sourceMeshId: 'gateway_source', * targetMeshId: 'gateway_target', * }); * if (result.repeatNodeIds.length > 0) { * console.log('已在目标网关下的设备:', result.repeatNodeIds); * } * } catch (err) { * console.error('拖拽失败:', err); * } * }; * ``` */ export declare const updateRelationBlue: typeof ty.gateway.updateRelationBlue; /** * Beacon 类设备拖拽,将 Beacon 子设备从一个网关移动到另一个 * @param params.nodes 需要拖拽的子设备 ID 与 MAC 列表 * @param params.sourceMeshId 原网关 ID * @param params.targetMeshId 目标网关 ID * @returns 拖拽结果,包含已在目标网关下的设备列表 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const moveBeaconDevices = async () => { * try { * const result = await gateway.updateRelationBeacon({ * nodes: [ * { devId: 'beacon_dev_001', mac: 'AA:BB:CC:DD:EE:01' }, * { devId: 'beacon_dev_002', mac: 'AA:BB:CC:DD:EE:02' }, * ], * sourceMeshId: 'gateway_source', * targetMeshId: 'gateway_target', * }); * if (result.repeatNodeIds.length > 0) { * console.log('已在目标网关下的设备:', result.repeatNodeIds); * } * } catch (err) { * console.error('拖拽失败:', err); * } * }; * ``` */ export declare const updateRelationBeacon: typeof ty.gateway.updateRelationBeacon; /** * 获取网关的能力信息,包括信号质量、性能指标和子设备数量上限 * @param params.devIds 设备 ID 拼成的字符串,以逗号分隔 * @returns 网关能力信息列表 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const fetchGatewayAbility = async () => { * try { * const abilities = await gateway.getGatewayAbility({ * devIds: 'gateway_001,gateway_002', * }); * abilities.forEach(item => { * console.log(`设备: ${item.devId}, 能力值: ${item.capability}, LQI: ${item.lqi}`); * }); * } catch (err) { * console.error('获取失败:', err); * } * }; * ``` */ export declare const getGatewayAbility: typeof ty.gateway.getGatewayAbility; /** * 获取设备安全日志,支持分页查询 * @param params.queryStr 查询条件字符串 * @returns 设备日志数据,包含日志列表和分页信息 * @public * @since @ray-js/ray 1.7.60 * @example * ```typescript * import { gateway } from '@ray-js/ray'; * * const fetchDeviceLog = async () => { * try { * const logData = await gateway.getSecurityDeviceLog({ * queryStr: 'device_001', * }); * console.log('总数:', logData.totalCount); * logData.datas.forEach(log => { * console.log(`DP: ${log.dpName}, 值: ${log.value}, 时间: ${log.eventTime}`); * }); * if (logData.hasNext) { * console.log('还有更多数据'); * } * } catch (err) { * console.error('获取日志失败:', err); * } * }; * ``` */ export declare const getSecurityDeviceLog: typeof ty.gateway.getSecurityDeviceLog; export declare const gateway: { sendCmdForRefreshDeviceLQI: typeof ty.gateway.sendCmdForRefreshDeviceLQI; getLastDeviceLQI: typeof ty.gateway.getLastDeviceLQI; getSeniorAbility: typeof ty.gateway.getSeniorAbility; getGatewaySubDevLimit: typeof ty.gateway.getGatewaySubDevLimit; updateRelationMesh: typeof ty.gateway.updateRelationMesh; updateRelationBlue: typeof ty.gateway.updateRelationBlue; updateRelationBeacon: typeof ty.gateway.updateRelationBeacon; getGatewayAbility: typeof ty.gateway.getGatewayAbility; getSecurityDeviceLog: typeof ty.gateway.getSecurityDeviceLog; };