Tuya iOS Smart Life App SDK 5.15.0
ThingBLECharacteristic Class Reference

#import <ThingBLECharacteristic.h>

Inheritance diagram for ThingBLECharacteristic:

Instance Methods

(instancetype) - initWithCharacteristic:
 
(void) - notifyValue:Withcompletion:
 
(void) - customNotifyValue:withcompletion:
 
(void) - writeData:Withcompletion:
 
(void) - writeByte:Withcompletion:
 
(void) - readValueWithBlock:
 
(instancetype) - initWithCharacteristic:
 
(void) - notifyValue:Withcompletion:
 
(void) - customNotifyValue:withcompletion:
 
(void) - writeData:Withcompletion:
 
(void) - writeByte:Withcompletion:
 
(void) - readValueWithBlock:
 
(void) - handleSetNotified:WithError:
 
(void) - handleSetNotified:WithError:
 
(void) - handleReadValue:error:
 
(void) - handleReadValue:error:
 
(void) - handleWrittenValueWithError:
 
(void) - handleWrittenValueWithError:
 
(void) - handleNotfiyStateUpdate:
 
(void) - handleNotfiyStateUpdate:
 

Properties

CBCharacteristic * cbCharacteristic
 
NSString * UUIDString
 
CBCharacteristicProperties properties
 
ThingBLECentralCharacteristicNotifyCallback notifyCallback
 
ThingBLECentralCharacteristicReadCallback readCallback
 
ThingBLECentralCharacteristicWriteCallback writeCallback
 

Detailed Description

Definition at line 20 of file ThingBLECharacteristic.h.

Method Documentation

◆ customNotifyValue:withcompletion: [1/2]

- (void) customNotifyValue: (BOOL)  notifyValue
withcompletion: (ThingBLECentralCharacteristicNotifyCallback aCallback 

Custom notifies the peripheral to push data to the central manager.

Parameters
notifyValueThe switch flag.
aCallbackThe callback.

◆ customNotifyValue:withcompletion: [2/2]

- (void) customNotifyValue: (BOOL)  notifyValue
withcompletion: (ThingBLECentralCharacteristicNotifyCallback aCallback 

Custom notifies the peripheral to push data to the central manager.

Parameters
notifyValueThe switch flag.
aCallbackThe callback.

◆ handleNotfiyStateUpdate: [1/2]

- (void) handleNotfiyStateUpdate: (NSError *)  anError

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleNotfiyStateUpdate: [2/2]

- (void) handleNotfiyStateUpdate: (NSError *)  anError

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleReadValue:error: [1/2]

- (void) handleReadValue: (NSData *)  aValue
error: (NSError *)  anError 

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleReadValue:error: [2/2]

- (void) handleReadValue: (NSData *)  aValue
error: (NSError *)  anError 

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleSetNotified:WithError: [1/2]

- (void) handleSetNotified: (NSData *)  data
WithError: (NSError *)  anError 

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleSetNotified:WithError: [2/2]

- (void) handleSetNotified: (NSData *)  data
WithError: (NSError *)  anError 

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleWrittenValueWithError: [1/2]

- (void) handleWrittenValueWithError: (NSError *)  anError

Provided by category ThingBLECharacteristic(ToolMethods).

◆ handleWrittenValueWithError: [2/2]

- (void) handleWrittenValueWithError: (NSError *)  anError

Provided by category ThingBLECharacteristic(ToolMethods).

◆ initWithCharacteristic: [1/2]

- (instancetype) initWithCharacteristic: (CBCharacteristic *)  aCharacteristic

Creates a ThingBLECharacteristic object.

Parameters
aCharacteristicThe CBCharacteristic object.
Returns
The ThingBLECharacteristic object.

◆ initWithCharacteristic: [2/2]

- (instancetype) initWithCharacteristic: (CBCharacteristic *)  aCharacteristic

Creates a ThingBLECharacteristic object.

Parameters
aCharacteristicThe CBCharacteristic object.
Returns
The ThingBLECharacteristic object.

◆ notifyValue:Withcompletion: [1/2]

- (void) notifyValue: (BOOL)  notifyValue
Withcompletion: (ThingBLECentralCharacteristicNotifyCallback aCallback 

Notifies the peripheral to push data to the central manager.

Parameters
notifyValueThe switch flag.
aCallbackThe callback.

◆ notifyValue:Withcompletion: [2/2]

- (void) notifyValue: (BOOL)  notifyValue
Withcompletion: (ThingBLECentralCharacteristicNotifyCallback aCallback 

Notifies the peripheral to push data to the central manager.

Parameters
notifyValueThe switch flag.
aCallbackThe callback.

◆ readValueWithBlock: [1/2]

- (void) readValueWithBlock: (ThingBLECentralCharacteristicReadCallback aCallback

Reads from the peripheral.

Parameters
aCallbackThe callback.

◆ readValueWithBlock: [2/2]

- (void) readValueWithBlock: (ThingBLECentralCharacteristicReadCallback aCallback

Reads from the peripheral.

Parameters
aCallbackThe callback.

◆ writeByte:Withcompletion: [1/2]

- (void) writeByte: (int8_t)  aByte
Withcompletion: (ThingBLECentralCharacteristicWriteCallback aCallback 

Writes bytes to the peripheral.

Parameters
aByteThe bytes to be written.
aCallbackThe callback.

◆ writeByte:Withcompletion: [2/2]

- (void) writeByte: (int8_t)  aByte
Withcompletion: (ThingBLECentralCharacteristicWriteCallback aCallback 

Writes bytes to the peripheral.

Parameters
aByteThe bytes to be written.
aCallbackThe callback.

◆ writeData:Withcompletion: [1/2]

- (void) writeData: (NSData *)  data
Withcompletion: (ThingBLECentralCharacteristicWriteCallback aCallback 

Writes to the peripheral.

Parameters
dataThe binary streams to be written.
aCallbackThe callback.

◆ writeData:Withcompletion: [2/2]

- (void) writeData: (NSData *)  data
Withcompletion: (ThingBLECentralCharacteristicWriteCallback aCallback 

Writes to the peripheral.

Parameters
dataThe binary streams to be written.
aCallbackThe callback.

Property Documentation

◆ cbCharacteristic

- (CBCharacteristic *) cbCharacteristic
readnonatomicstrong

The CBCharacteristic object.

Definition at line 25 of file ThingBLECharacteristic.h.

◆ notifyCallback

- (ThingBLECentralCharacteristicNotifyCallback) notifyCallback
readwritenonatomiccopy

Definition at line 37 of file ThingBLECharacteristic.h.

◆ properties

- (CBCharacteristicProperties) properties
readwritenonatomicassign

The characteristic value.

Definition at line 35 of file ThingBLECharacteristic.h.

◆ readCallback

- (ThingBLECentralCharacteristicReadCallback) readCallback
readwritenonatomiccopy

Definition at line 38 of file ThingBLECharacteristic.h.

◆ UUIDString

- (NSString *) UUIDString
readnonatomicweak

The UUID string.

Definition at line 30 of file ThingBLECharacteristic.h.

◆ writeCallback

- (ThingBLECentralCharacteristicWriteCallback) writeCallback
readwritenonatomiccopy

Definition at line 39 of file ThingBLECharacteristic.h.


The documentation for this class was generated from the following files: