getDeviceClass

获取设备类型

import { MEngineerKit } from "@yl/super-jssdk"

MEngineerKit.getDeviceClass(optional)

参数说明

参数 类型 必填 作用
optional Object 必填参数

optional

参数 类型 必填 作用
device Object 当前设备信息

device

参数 类型 必填 作用
name string 设备名称

返回说明

参数 类型 作用
resolve(device) Function 成功回调,device为设备信息
reject(err) Function 失败回调,err为详细错误信息,是一个json对象,例如:{"errCode":-1,"errMsg":"出错啦"}

代码示例


MEngineerKit.getDeviceClass({device: {name: '明源激光测距仪M1'}})
  .then(res => {
    console.log(res);
  })
  .catch(err => {
    console.log('插件调用失败:', err)
  })

results matching ""

    No results matching ""