欧拉啊旺
2016-03-21 14:31Android的BLE技术中的GattAttributes是干什么的?
最近在研究BLE技术发现了这个东西有一点不明白,有一个GattAttributes的文件
/**
-
This class includes a small subset of standard GATT attributes for demonstration purposes.
*/
public class SampleGattAttributes {
private static HashMap attributes = new HashMap();
public static String HEART_RATE_MEASUREMENT = "00002a37-0000-1000-8000-00805f9b34fb";
public static String CLIENT_CHARACTERISTIC_CONFIG = "00002902-0000-1000-8000-00805f9b34fb";static {
// Sample Services.
attributes.put("0000180d-0000-1000-8000-00805f9b34fb", "Heart Rate Service");
attributes.put("0000180a-0000-1000-8000-00805f9b34fb", "Device Information Service");
// Sample Characteristics.
attributes.put(HEART_RATE_MEASUREMENT, "Heart Rate Measurement");
attributes.put("00002a29-0000-1000-8000-00805f9b34fb", "Manufacturer Name String");
}public static String lookup(String uuid, String defaultName) {
String name = attributes.get(uuid);
return name == null ? defaultName : name;
}
}
翻译说是一种协议,请问用来干嘛的?
- 点赞
- 回答
- 收藏
- 复制链接分享
3条回答
为你推荐
- win10系统,VS2017 winfrom无法找到Windows.Devices.Bluetoot,怎么解决?
- c#
- visual studio
- 1个回答
- Go的Syscall()中的第二个r2返回值是什么?
- it技术
- 互联网问答
- IT行业问题
- 计算机技术
- 编程语言问答
- 1个回答
- 关于微信小程序请求服务器和服务器返回数据的疑问
- 微信小程序后台
- 2个回答
- Laravel外键有什么问题?
- laravel
- mysql
- php
- 1个回答
- 从Laravel中的Controller访问模型的最佳实践
- laravel
- php
- 2个回答