// ignore_for_file: non_constant_identifier_names import 'package:vnote_device_plugin/consts/status.dart'; import 'package:vnote_device_plugin/consts/types.dart'; abstract class DeviceConsts { static final Map STATUS_DESC_MAP = { VDeviceEventStatus.PERMISSION_OFF_BT: "权限-BLUETOOTH 未开启", VDeviceEventStatus.PERMISSION_OFF_BT_ADMIN: "权限-BLUETOOTH_ADMIN 未开启", VDeviceEventStatus.PERMISSION_OFF_FINE_LOCATION: "权限-ACCESS_FINE_LOCATION 未开启", VDeviceEventStatus.PERMISSION_OFF_COARSE_LOCATION: "权限-ACCESS_COARSE_LOCATION 未开启", VDeviceEventStatus.PERMISSION_OFF_BT_SCAN: "权限-BLUETOOTH_SCAN 未开启", VDeviceEventStatus.PERMISSION_OFF_BT_ADVERTISE: "权限-BLUETOOTH_ADVERTISE 未开启", VDeviceEventStatus.PERMISSION_OFF_BT_CONNECT: "权限-BLUETOOTH_CONNECT 未开启", VDeviceEventStatus.CALLBACK_UNDEFINED: "外设SDK-未注册回调接口", VDeviceEventStatus.PARAM_ERROR: "外设SDK-参数传递错误", VDeviceEventStatus.DEVICE_UNSUPPORT: "不支持该型号设备驱动", // VDeviceEventStatus.BLE_NOT_ON: "蓝牙未开启", // VDeviceEventStatus.BLUETOOTH_CONNECTED_NO_NOTIFY: "蓝牙连接成功,注册通知失败", VDeviceEventStatus.DEVICE_NOT_MATCHED: "该蓝牙设备需要绑定配对", VDeviceEventStatus.DEVICE_MAC_INVALID: "蓝牙Mac地址无效", }; static final Map SDK_2_SERVER_TR_MAP = { DeviceTypes.TEMP: "Temp", DeviceTypes.WEIGHT: "BMI", DeviceTypes.SPO2: "SpO2", DeviceTypes.NIBP: "NIBP", DeviceTypes.SUGAR: "GLU", DeviceTypes.URINE: "Urine", DeviceTypes.IC_READER: "ICReader", DeviceTypes.HEART: "HEART", }; /// 将SDK 设备类型 翻译成 服务中的设备Key static String transType2ServerKey(String sdkDeviceType) { return SDK_2_SERVER_TR_MAP[sdkDeviceType] ?? sdkDeviceType; } }