Reactive Bluetooth Low Energy Framework for iOS  1
RBTCentralModule.h
Go to the documentation of this file.
1 //
2 // Created by Martin Stöber
3 // Copyright (c) 2014-2015 ma design GmbH & Co. KG. All rights reserved.
4 //
5 
6 #import <Foundation/Foundation.h>
7 #import <CoreBluetooth/CoreBluetooth.h>
8 #import <ReactiveCocoa/ReactiveCocoa.h>
9 #import <ReactiveCocoa/RACEXTScope.h>
10 
11 
12 @interface RBTCentralModule : NSObject <CBCentralManagerDelegate>
13 
15 @property(nonatomic, readonly) CBCentralManager *cbCentralManager;
16 
18 @property(nonatomic, readonly) RACSignal *bluetoothState;
19 
21 @property(nonatomic, readonly) RACSignal *scanState;
22 
24 @property(readonly, getter=isScanning) BOOL scanning;
25 
27 @property(nonatomic, readonly) RACSignal *peripheralConnected;
28 
30 @property(nonatomic, readonly) RACSignal *peripheralDisconnected;
31 
32 
34 - (RACSignal *)scan;
35 
37 - (RACSignal *)scanWithDuplicates:(BOOL)allowDuplicates;
38 
40 - (RACSignal *)scanForPeripheralsWithServices:(NSArray *)services;
41 
43 - (RACSignal *)scanWithMaxRSSI:(NSNumber *)RSSI;
44 
46 - (RACSignal *)scanWithDuplicatesAndMaxRSSI:(NSNumber *)maxRSSI;
47 
49 - (RACSignal *)scanForPeripheralsWithServices:(NSArray *)services forTimeinterval:(NSTimeInterval)time
50  withDuplicates:(BOOL)allowDuplicates maxRSSI:(NSNumber *)maxRSSI;
51 
53 - (void)stopScan;
54 
55 
57 - (RACSequence *)retrieveConnectedPeripherals;
58 
61 - (RACSequence *)retrieveDeviceConnectedPeripheralsWithServices:(NSArray *)serviceUUIDs;
62 
64 - (RACSequence *)retrieveKnownPeripheralsWithIdentifiers:(NSArray *)identifiers;
65 
66 @end
RACSignal * scan()
Start scanning, signal send found peripherals.
Definition: RBTCentralModule.m:78
RACSequence * retrieveConnectedPeripherals()
Retives a sequence with all current connected peripherals.
Definition: RBTCentralModule.m:125
RACSignal * peripheralConnected
Signal which is send when a peripheral did connect.
Definition: RBTCentralModule.h:27
void stopScan()
Stop scanning.
Definition: RBTCentralModule.m:120
Definition: RBTCentralModule.h:12
RACSignal * bluetoothState
Definition: RBTCentralModule.h:18
CBCentralManager * cbCentralManager
CoreBluetooth manager.
Definition: RBTCentralModule.h:15
BOOL scanning
Scanstate as boolean (true -> scanning)
Definition: RBTCentralModule.h:24
RACSignal * scanState
Signal which is send when the cental is scanning.
Definition: RBTCentralModule.h:21
RACSignal * peripheralDisconnected
Signal which is send when a peripheral did disconnect.
Definition: RBTCentralModule.h:30