Reactive Bluetooth Low Energy Framework for iOS  1
RBTCharacteristic.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 
12 
13 @interface RBTCharacteristic : NSObject
14 
16 @property(weak, nonatomic, readonly) RBTPeripheral *peripheral;
17 
19 @property(weak, nonatomic, readonly) RBTService *service;
20 
22 @property(nonatomic, readonly) CBCharacteristic *cbCharacteristic;
23 
25 @property(nonatomic, readonly) CBUUID *UUID;
26 
28 @property(nonatomic, getter=isNotifying) BOOL notifying;
29 
31 @property(nonatomic, readonly) CBCharacteristicProperties properties;
32 
34 @property(readonly) NSData *value;
35 
37 @property(nonatomic, readonly) RACSignal *valueSignal;
38 
40 @property(nonatomic, readonly) RACSequence *descriptors;
41 
42 
46 - (instancetype)initWithCBCharacteristic:(CBCharacteristic *)cbCharacteristic ofService:(RBTService *)service;
47 
48 
50 - (RACSignal *)readValue;
51 
53 - (void)writeValue:(NSData *)data;
54 
56 - (RACSignal *)writeValue:(NSData *)data withResponse:(BOOL)response;
57 
58 
60 - (RACSignal *)setNotifyingStatus:(BOOL)notifying;
61 
62 
65 - (RACSignal *)discoverDescriptors;
66 
67 @end
CBCharacteristic * cbCharacteristic
CoreBluetooth characteristic.
Definition: RBTCharacteristic.h:22
Definition: RBTCharacteristic.h:13
RACSignal * discoverDescriptors()
Definition: RBTCharacteristic.m:124
NSData * value
Current value of the characteristic.
Definition: RBTCharacteristic.h:34
BOOL notifying
Flag whether the characteristic is notifying to centrals.
Definition: RBTCharacteristic.h:28
Definition: RBTService.h:13
CBUUID * UUID
Identifier of the characteristic.
Definition: RBTCharacteristic.h:25
RBTPeripheral * peripheral
Parrent peripheral.
Definition: RBTCharacteristic.h:16
Definition: RBTPeripheral.h:13
RACSignal * readValue()
Trigger to read the value of the characteristic. Returns a signal which completed when successful...
Definition: RBTCharacteristic.m:46
RBTService * service
Parrent Service.
Definition: RBTCharacteristic.h:19
RACSignal * valueSignal
Current value as signal.
Definition: RBTCharacteristic.h:37
RACSequence * descriptors
Related descriptors of the characteristic.
Definition: RBTCharacteristic.h:40
CBCharacteristicProperties properties
Properties (access rights / freatures) of the characteristic (e.g. readable, writable...)
Definition: RBTCharacteristic.h:31