BGXpressScanner is used to detect changes to the Bluetooth hardware and scan for devices.
More...
BGXpressScanner is used to detect changes to the Bluetooth hardware and scan for devices.
It also contains a list of devices.
It has a delegate property using the BGXpressScanDelegate protocol.
◆ BGXpressScanDelegate -p
protocol BGXpressScanDelegate -p |
A protocol for keeping track of goings on with your BGXpressScanner.
Inherits <NSObject>.
◆ bluetoothStateChanged:()
- (void BGXpressScanDelegate) bluetoothStateChanged: |
|
(CBManagerState) |
state |
|
|
optional |
bluetoothStateChanged This is called to indicate that system state of Bluetooth changed.
◆ deviceDiscovered:()
- (void BGXpressScanDelegate) deviceDiscovered: |
|
(BGXDevice *) |
device |
|
|
optional |
This is called to indicate that the scanner has found a device.
You can access each device as its discovered (via the parameter) or access them all using the devicesDiscovered property which is an array of BGXDevice objects.
◆ scanStateChanged:()
- (void BGXpressScanDelegate) scanStateChanged: |
|
(ScanState) |
scanState |
|
|
optional |
This method is called when the scanState has changed.
◆ BGXpressScanner
Inherits NSObject, and <CBCentralManagerDelegate>.
◆ startScan()
Call this method to start scanning for devices.
- Returns
- Boolean value to indicate if scanning will start.
◆ stopScan()
Call this method to stop scanning for devices.
- Returns
- Boolean value to indicate if scanning will stop.
◆ _scanState
◆ delegate
- (NSObject<BGXpressScanDelegate>*) delegate |
|
readwritenonatomicstrong |
Assign this property to be your scan delegate.
◆ devicesDiscovered
- (NSMutableArray*) devicesDiscovered |
|
readwritenonatomicstrong |
This is an array of BGXDevice objects discovered by the scanner.
This property will be made read only and immutable in the future.
◆ scanState
The current state of the scanner.
◆ ScanState
Enumerator |
---|
CantScan | Scanning cannot occur. Calls to startScan will fail. Wait for Bluetooth to be enabled.
|
Idle | Not currently scanning.
|
Scanning | Currently scanning.
|