#import <ThingBLEAgent.h>
Definition at line 41 of file ThingBLEAgent.h.
◆ addDelegate: [1/2]
Adds a delegate.
- Parameters
-
◆ addDelegate: [2/2]
Adds a delegate.
- Parameters
-
◆ cleanScanedCache: [1/2]
- (void) cleanScanedCache: |
|
(NSString *) |
service |
|
Clears the discovery cache.
◆ cleanScanedCache: [2/2]
- (void) cleanScanedCache: |
|
(NSString *) |
service |
|
Clears the discovery cache.
◆ cleanScanedCacheWithServices: [1/2]
- (void) cleanScanedCacheWithServices: |
|
(NSArray< NSString * > *) |
services |
|
◆ cleanScanedCacheWithServices: [2/2]
- (void) cleanScanedCacheWithServices: |
|
(NSArray< NSString * > *) |
services |
|
◆ connectPeripheral:CharactUUID:serviceUUID:completion: [1/2]
Connects to a discovered Bluetooth device.
- Parameters
-
peripheral | The Bluetooth device to be connected. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ connectPeripheral:CharactUUID:serviceUUID:completion: [2/2]
Connects to a discovered Bluetooth device.
- Parameters
-
peripheral | The Bluetooth device to be connected. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ connectPeripheral:CharactUUID:serviceUUID:timeout:completion: [1/2]
Connects to a discovered Bluetooth device.
- Parameters
-
peripheral | The Bluetooth device to be connected. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
timeout | The connection timed out. |
aCallback | The callback. |
◆ connectPeripheral:CharactUUID:serviceUUID:timeout:completion: [2/2]
Connects to a discovered Bluetooth device.
- Parameters
-
peripheral | The Bluetooth device to be connected. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
timeout | The connection timed out. |
aCallback | The callback. |
◆ customNotifyData:fromPeriphral:CharactUUID:serviceUUID:completion: [1/2]
Receives data from custom notify channel that is pushed by the Bluetooth device.
- Parameters
-
b | The switch that enables or disables data transfers. |
aPeripheral | The connected Bluetooth device. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ customNotifyData:fromPeriphral:CharactUUID:serviceUUID:completion: [2/2]
Receives data from custom notify channel that is pushed by the Bluetooth device.
- Parameters
-
b | The switch that enables or disables data transfers. |
aPeripheral | The connected Bluetooth device. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ disconnectPeripheral: [1/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
◆ disconnectPeripheral: [2/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
◆ disconnectPeripheral:completion:timeout: [1/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
aCallback | The callback. |
◆ disconnectPeripheral:completion:timeout: [2/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
aCallback | The callback. |
◆ disconnectPeripheral:timeout: [1/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
timeout | The disconnection timed out. |
◆ disconnectPeripheral:timeout: [2/2]
Disconnects from a Bluetooth device.
- Parameters
-
peripheral | The connected Bluetooth device. |
timeout | The disconnection timed out. |
◆ discoverServiceUUID:options:scanFilter:completion: [1/2]
- (void) discoverServiceUUID: |
|
(NSArray< NSString * > *) |
services |
options: |
|
(NSDictionary< NSString *, id > *) |
options |
scanFilter: |
|
(BOOL(^)(NSDictionary *advertisementData, NSNumber *rssi)) |
scanFilter |
completion: |
|
(ThingBLEAgentCentralDiscoverCallback) |
aCallback |
|
|
| |
Discovers Bluetooth devices.
- Parameters
-
services | The UUIDs of services. |
options | The discovery parameters. |
scanFilter | The filtering criteria for discovery. |
aCallback | The callback of discovered devices that meet the filtering criteria. |
◆ discoverServiceUUID:options:scanFilter:completion: [2/2]
- (void) discoverServiceUUID: |
|
(NSArray< NSString * > *) |
services |
options: |
|
(NSDictionary< NSString *, id > *) |
options |
scanFilter: |
|
(BOOL(^)(NSDictionary *advertisementData, NSNumber *rssi)) |
scanFilter |
completion: |
|
(ThingBLEAgentCentralDiscoverCallback) |
aCallback |
|
|
| |
Discovers Bluetooth devices.
- Parameters
-
services | The UUIDs of services. |
options | The discovery parameters. |
scanFilter | The filtering criteria for discovery. |
aCallback | The callback of discovered devices that meet the filtering criteria. |
◆ discoverWithScanFilter:completion: [1/2]
Discovers Bluetooth devices.
- Parameters
-
scanFilter | The filtering criteria for discovery. |
aCallback | The callback of discovered devices that meet the filtering criteria. |
◆ discoverWithScanFilter:completion: [2/2]
Discovers Bluetooth devices.
- Parameters
-
scanFilter | The filtering criteria for discovery. |
aCallback | The callback of discovered devices that meet the filtering criteria. |
◆ notifyData:FromPeriphral:CharactUUID:serviceUUID:completion: [1/2]
Receives data that is pushed by the Bluetooth device.
- Parameters
-
b | The switch that enables or disables data transfers. |
aPeripheral | The connected Bluetooth device. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ notifyData:FromPeriphral:CharactUUID:serviceUUID:completion: [2/2]
Receives data that is pushed by the Bluetooth device.
- Parameters
-
b | The switch that enables or disables data transfers. |
aPeripheral | The connected Bluetooth device. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ readDataFromPeriphreral:CharactUUID:serviceUUID:completion: [1/2]
Reads from a Bluetooth device.
- Parameters
-
aPeripheral | The Bluetooth device from which data is read. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ readDataFromPeriphreral:CharactUUID:serviceUUID:completion: [2/2]
Reads from a Bluetooth device.
- Parameters
-
aPeripheral | The Bluetooth device from which data is read. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ removeDelegate: [1/2]
Removes a delegate.
- Parameters
-
◆ removeDelegate: [2/2]
Removes a delegate.
- Parameters
-
◆ retrieveConnectedPeripheralsWithServices: [1/2]
Retrieve Connected Peripherals.
- Parameters
-
serviceUUIDs | The service UUID. |
- Returns
- The ThingBLEPeripheral array.
◆ retrieveConnectedPeripheralsWithServices: [2/2]
Retrieve Connected Peripherals.
- Parameters
-
serviceUUIDs | The service UUID. |
- Returns
- The ThingBLEPeripheral array.
◆ scanFilter
- (BOOL(^)) scanFilter |
|
(NSDictionary *) |
advertisementData |
|
|
(NSNumber *) |
rssi |
|
|
| |
◆ stopDiscovering [1/2]
◆ stopDiscovering [2/2]
◆ writeData:toPeripheral:charactUUID:serviceUUID:completion: [1/2]
Writes to a Bluetooth device.
- Parameters
-
aData | The binary data to be written. |
aPeripheral | The Bluetooth device to which data is written. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ writeData:toPeripheral:charactUUID:serviceUUID:completion: [2/2]
Writes to a Bluetooth device.
- Parameters
-
aData | The binary data to be written. |
aPeripheral | The Bluetooth device to which data is written. |
aCharacteristic | The characteristic UUID. |
aService | The service UUID. |
aCallback | The callback. |
◆ isPoweredOn
Specifies whether to enable Bluetooth.
Definition at line 50 of file ThingBLEAgent.h.
◆ role
- (ThingBLEAgentRole) role |
|
readnonatomicassign |
◆ scanFilter
- (BOOL(^ scanFilter) (NSDictionary *advertisementData, NSNumber *rssi)) |
|
readnonatomiccopy |
The documentation for this class was generated from the following files:
- /Users/humtong/Downloads/Pods_副本/ThingBluetooth/Build/ThingBluetooth.xcframework/ios-arm64_x86_64-simulator/ThingBluetooth.framework/Headers/ThingBLEAgent.h
- /Users/humtong/Downloads/Pods_副本/ThingBluetooth/Build/ThingBluetooth.xcframework/ios-arm64/ThingBluetooth.framework/Headers/ThingBLEAgent.h