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
Constants
- PERMISSION_READ → const int
- PERMISSION_READ_ENCRYPTED → const int
- PERMISSION_READ_ENCRYPTED_MITM → const int
- PERMISSION_WRITE → const int
- PERMISSION_WRITE_ENCRYPTED → const int
- PERMISSION_WRITE_ENCRYPTED_MITM → const int
- PERMISSION_WRITE_SIGNED → const int
- PERMISSION_WRITE_SIGNED_MITM → const int
- PROPERTY_BROADCAST → const int
- PROPERTY_EXTENDED_PROPS → const int
- PROPERTY_INDICATE → const int
- PROPERTY_NOTIFY → const int
- PROPERTY_READ → const int
- PROPERTY_SIGNED_WRITE → const int
- PROPERTY_WRITE → const int
- PROPERTY_WRITE_NO_RESPONSE → const int