Android蓝牙4.0API-类-BluetoothGattCharacteristic
来源:互联网 发布:生产数据化管理 编辑:程序博客网 时间:2024/05/29 16:59
Represents a Bluetooth GATT Characteristic
A GATT characteristic is a basic data element 元素used to construct构建 a GATT service, BluetoothGattService
. The characteristic contains a value as well as additional附加的 information and optional可选的 GATT descriptors,BluetoothGattDescriptor
.
常量
int FORMAT_FLOAT
Characteristic 特有的value format type float (32-bit float)
int FORMAT_SFLOAT
Characteristic value format type sfloat (16-bit float)
int FORMAT_SINT16
Characteristic value format type sint16
int FORMAT_SINT32
int FORMAT_SINT8
int FORMAT_UINT16
int FORMAT_UINT32
int FORMAT_UINT8
int PERMISSION_READ
Characteristic read permission读的权限
int PERMISSION_READ_ENCRYPTED
Characteristic permission: Allow encrypted加密 read operations
int PERMISSION_READ_ENCRYPTED_MITM
Characteristic permission: Allow reading with man-in-the-middle protection
int PERMISSION_WRITE
Characteristic write permission
int PERMISSION_WRITE_ENCRYPTED
int PERMISSION_WRITE_ENCRYPTED_MITM
int PERMISSION_WRITE_SIGNED
Characteristic permission: Allow signed有符号的 write operations
int PERMISSION_WRITE_SIGNED_MITM
int PROPERTY_BROADCAST
Characteristic proprty属性: Characteristic is broadcastable
int PROPERTY_EXTENDED_PROPS
Characteristic property: Characteristic has extended properties
int PROPERTY_INDICATE
Characteristic property: Characteristic supports indication特征
int PROPERTY_NOTIFY
Characteristic property: Characteristic supports notification
int PROPERTY_SIGNED_WRITE
Characteristic property: Characteristic supports write with signature
int PROPERTY_WRITE
Characteristic property: Characteristic can be written.
int PROPERTY_WRITE_NO_RESPONSE
Characteristic property: Characteristic can be written without response.
int WRITE_TYPE_DEFAULT
Write characteristic, requesting acknoledgement by the remote device
int WRITE_TYPE_NO_RESPONSE
Wrtite characteristic without requiring a response by the remote device
int WRITE_TYPE_SIGNED
Write characteristic including authentication signature
公有方法
boolean addDescriptor(BluetoothGattDescriptor descriptor)
Adds a descriptor描述 to this characteristic.
BluetoothGattDescriptorgetDescriptor(UUID uuid)
Returns a descriptor with a given UUID out of the list of descriptors for this characteristic.
List<BluetoothGattDescriptor> getDescriptors()
Returns a list of descriptors for this characteristic.
FloatgetFloatValue(int formatType, int offset)
Return the stored存储 value of this characteristic.
int getInstanceId()
Returns the instance实例 ID for this characteristic.
Integer getIntValue(int formatType, int offset)
Return the stored value of this characteristic.
int getPermissions()
Returns the permissions for this characteristic.
int getProperties()
Returns the properties of this characteristic.
BluetoothGattService getService()
Returns the service this characteristic belongs to.
String getStringValue(int offset)
Return the stored value of this characteristic.
UUID getUuid()
Returns the UUID of this characteristic
byte[] getValue()
Get the stored value for this characteristic.
int getWriteType()
Gets the write type for this characteristic.
boolean setValue(int value, int formatType, int offset)
Set the locally stored value of this characteristic.
boolean setValue(byte[] value)
Updates the locally stored value of this characteristic.
boolean setValue(String value)
Set the locally stored value of this characteristic.
boolean setValue(int mantissa, int exponent, int formatType, int offset)
Set the locally stored value of this characteristic.
void setWriteType(int writeType)
Set the write type for this characteristic
Setting the write type of a characteristic determines how the writeCharacteristic(BluetoothGattCharacteristic)
function write this characteristic.
- Android蓝牙4.0API-类-BluetoothGattCharacteristic
- Android蓝牙4.0API-类-BluetoothGatt
- Android蓝牙4.0API-类-BluetoothGattCallback
- Android蓝牙4.0API-类-BluetoothHealth
- Android蓝牙4.0API部分内容
- Android蓝牙4.0API内容-接口-BluetoothProfile
- Android蓝牙API之BluetoothAdapter类(1)
- Android蓝牙API之BluetoothAdapter类(2)
- Android蓝牙API之BluetoothSocket类(1)
- Android蓝牙API之BluetoothSocket类(2)
- Android蓝牙API之BluetoothAdapter类
- Android蓝牙API之 BluetoothSocket类
- Android蓝牙API之BluetoothAdapter类
- Android蓝牙API之BluetoothAdapter类
- Android 蓝牙API之BluetoothAdapter类使用
- Android蓝牙API之BluetoothAdapter类(1)
- Android蓝牙API之BluetoothAdapter类
- Android蓝牙API之BluetoothAdapter类(1)
- locationManager获取位置信息
- #POJ 3468 A Simple Problem with Integers 【区间加减法】【水】
- iOS Images.xcassets: None of the input catalogs contained a matching app icon set named "AppIcon".
- 【B/S】——Html基础
- Python去掉字符串中空格的方法
- Android蓝牙4.0API-类-BluetoothGattCharacteristic
- 【C#-Socket监听消息处理】
- C++11获取时间戳和时间戳转日期(毫秒精度)
- CSS3新特性与选择器
- SimpleDateFormat格式化日期
- 345. Reverse Vowels of a String
- CF Educational Round 12,A
- Java InputStream类详解
- 看 nova-scheduler 如何选择计算节点 - 每天5分钟玩转 OpenStack(27)