KGattCharacteristic class

Constructors

KGattCharacteristic(String uuid, {int properties = 0, int permissions = 0})

Properties

entityId String
no setter
hashCode int
The hash code for this object.
no setterinherited
permissions int
getter/setter pair
properties int
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
uuid String
getter/setter pair

Methods

addPermission(int permission) → dynamic
添加permission
addProperty(int property) → dynamic
添加property
listenNotificationState(void onStateChange(KGattDevice device, bool enabled)) StreamSubscription
监听主机设备订阅或取消订阅Notification
listenRead(void onRead(KGattDevice device, int requestId, int offset)) StreamSubscription
监听读取characteristic值的请求
listenWrite(void onWrite(KGattDevice device, int requestId, int offset, bool preparedWrite, bool responseNeeded, List value)) StreamSubscription
监听写characteristic值的请求
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
notify(String deviceAddress, List<int> value, {bool confirm = false}) → void
发送notify
sendResponse(String deviceAddress, int requestId, int offset, List<int> value) → dynamic
回复
toMap() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited