ABLight Class Reference
| Inherits from | NSObject |
| Declared in | ABLight.h ABLight.m |
Tasks
Publicly available properties
-
peripheralproperty -
delegateproperty -
currentLightproperty -
– initWithPeripheral: -
– connect -
– disconnect -
– setLightValue:withCompletion:
Properties
currentLight
currentLight
@property (nonatomic) NSUInteger currentLightDiscussion
currentLight
Current light value
Declared In
ABLight.hInstance Methods
connect
Connect to ABLight to communicate with it
- (void)connectReturn Value
void
Discussion
Connect to ABLight to communicate with it
Declared In
ABLight.hdisconnect
Disconnect with the ABLight
- (void)disconnectReturn Value
void
Discussion
Disconnect with the ABLight
Declared In
ABLight.hinitWithPeripheral:
Init mehtod of ABLight with CBPeripheral object.
- (instancetype)initWithPeripheral:(CBPeripheral *)peripheralParameters
- peripheral
CBPeripheral object
Return Value
void
Discussion
Init mehtod of ABLight with CBPeripheral object.
Declared In
ABLight.hsetLightValue:withCompletion:
Modify the light value of ABLight
- (void)setLightValue:(NSInteger)lightValue withCompletion:(ABCompletionBlock)completionParameters
- 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