BLEAutumn Class Reference
Inherits from | NSObject |
---|---|
Declared in | BLEAutumn.h |
Overview
Core class, management search and connection, is also the entrance to the SDK. Sample @code{self.bleautumn = [BLEAutumn midAutumn:BLEProtocol_All]; self.bleautumn.discoverDelegate = self; self.bleautumn.connectDelegate = self;}@endcode
– readManagerPowerState
Represents the current state of a CBManager.
- (NSInteger)readManagerPowerState
Return Value
Return to the state of the central manager, you can determine the status of Bluetooth.
Declared In
BLEAutumn.h
– getPeripheralState
Get the peripheral state
- (CBPeripheralState)getPeripheralState
Declared In
BLEAutumn.h
– getBleProtocolType
Get current protocol type;
- (BLEProtocol)getBleProtocolType
Declared In
BLEAutumn.h
– startScanForTimeInternal:andServiceUuids:andOptions:
Scan device. You will get the discovered devices in the callback method of discoverDelegate @see solsticeDidDiscoverDeviceWithMAC:
- (void)startScanForTimeInternal:(NSTimeInterval)seconds andServiceUuids:(NSArray<NSString*> *)uuids andOptions:(NSDictionary<NSString*,id> *)options
Parameters
seconds |
Enter a number of seconds that you want to stop searching after later |
---|---|
uuids |
The uuids you want to specify when searching |
options |
Same with options in @method scanForPeripheralsWithServices:options: |
Declared In
BLEAutumn.h
– startScanForTimeInternal:andServiceUuids:
startScanForTimeInternal:andServiceUuids:andOptions: Default options is nil.
- (void)startScanForTimeInternal:(NSTimeInterval)seconds andServiceUuids:(NSArray<NSString*> *)uuids
Parameters
seconds |
The uuids you want to specify when searching |
---|---|
uuids |
Same with options in @method scanForPeripheralsWithServices:options: |
See Also
- startScanForTimeInternal:andServiceUuids:andOptions: Default options is nil.
Declared In
BLEAutumn.h
– startScan
startScanForTimeInternal:andServiceUuids: Default seconds is 10, uuids is nil, The SDK will choose the correct uuids for the BLEProtocol.
- (void)startScan
See Also
- startScanForTimeInternal:andServiceUuids: Default seconds is 10, uuids is nil, The SDK will choose the correct uuids for the <BLEProtocol>.
Declared In
BLEAutumn.h
– stopScan
Stop scan. The SDK calls the @see solsticeStopScan method if you have already implemented it.
- (void)stopScan
Declared In
BLEAutumn.h
– bindDevice:
Bind and connect the device. What’s the ‘Band’ is SDK will help you remember the uuid of this device, and reconnect it when you call the reConnectDevice method. @method solsticeDidConnectDevice: in BleConnectDelegate
- (void)bindDevice:(ZRBlePeripheral *)device
Parameters
device |
The device you want to connected that had discovered |
---|
Declared In
BLEAutumn.h
– bindUuidStr
That NSUuid.identifer that was remembered
- (NSString *)bindUuidStr
Declared In
BLEAutumn.h
– reConnectDevice
Reconnect the bound device
- (NSError *)reConnectDevice
Return Value
In most cases it is nil, unless you have not bound the device, you will get a “No binding device” prompt
Declared In
BLEAutumn.h
– solstice
- If you need a BLESolstice object to communicate with device, after searching and connecting to the device with BLEAutumn, please using the this method initinal the object, or you have a peripheral device that has been connected without BLEAutumn, you can use the @see solsticeWithConnectedPeripheral: method.
- (id<BLESolstice>)solstice
Return Value
Follow the BLESolstice protocol for communication between the Operations Center and its surroundings
Declared In
BLEAutumn.h
– solsticeWithConnectedPeripheral:
- (id<BLESolstice>)solsticeWithConnectedPeripheral:(ZRBlePeripheral *)zrPeripheral
Parameters
zrPeripheral |
the Device had connected |
---|
Return Value
Follow the BLESolstice agreement object
See Also
Declared In
BLEAutumn.h
– registerSolsticeEquinox:
Call this method after initinal BLESolstice object; or ,you can not got any data callback from SDK.
- (BOOL)registerSolsticeEquinox:(id<BLEquinox>)equinox
Parameters
equinox |
The object that implements the BLEquinox protocol method, accepts data from sdk |
---|
Return Value
Returning NO means there is something wrong with BLESolstice’s object
Declared In
BLEAutumn.h