6 #import <Foundation/Foundation.h>
7 #import <CoreBluetooth/CoreBluetooth.h>
8 #import <ReactiveCocoa/ReactiveCocoa.h>
9 #import <ReactiveCocoa/RACEXTScope.h>
19 @property(weak, nonatomic, readonly) RBTService *
service;
25 @property(nonatomic, readonly) CBUUID *
UUID;
28 @property(nonatomic, getter=isNotifying) BOOL
notifying;
31 @property(nonatomic, readonly) CBCharacteristicProperties
properties;
34 @property(readonly) NSData *
value;
46 - (instancetype)initWithCBCharacteristic:(CBCharacteristic *)cbCharacteristic ofService:(RBTService *)service;
53 - (void)writeValue:(NSData *)data;
56 - (RACSignal *)writeValue:(NSData *)data withResponse:(BOOL)response;
60 - (RACSignal *)setNotifyingStatus:(BOOL)notifying;
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