ABLight Class Reference
Inherits from | NSObject |
Declared in | ABLight.h ABLight.m |
Tasks
Publicly available properties
-
peripheral
property -
delegate
property -
currentLight
property -
– initWithPeripheral:
-
– connect
-
– disconnect
-
– setLightValue:withCompletion:
Properties
currentLight
currentLight
@property (nonatomic) NSUInteger currentLight
Discussion
currentLight
Current light value
Declared In
ABLight.h
Instance Methods
connect
Connect to ABLight to communicate with it
- (void)connect
Return Value
void
Discussion
Connect to ABLight to communicate with it
Declared In
ABLight.h
disconnect
Disconnect with the ABLight
- (void)disconnect
Return Value
void
Discussion
Disconnect with the ABLight
Declared In
ABLight.h
initWithPeripheral:
Init mehtod of ABLight with CBPeripheral object.
- (instancetype)initWithPeripheral:(CBPeripheral *)peripheral
Parameters
- peripheral
CBPeripheral object
Return Value
void
Discussion
Init mehtod of ABLight with CBPeripheral object.
Declared In
ABLight.h
setLightValue:withCompletion:
Modify the light value of ABLight
- (void)setLightValue:(NSInteger)lightValue withCompletion:(ABCompletionBlock)completion
Parameters
- lightValue
The value to be set, the range is 0-255
- completion
The callback when complete the event
Return Value
void
Discussion
Modify the light value of ABLight
Declared In
ABLight.h