LEDeviceManagerDelegate Protocol Reference
Conforms to | NSObject |
Declared in | LEDeviceManager.h |
Overview
Implement this protocol to be notified when a new device starts or stops advertising, and when a connection to a device is established or closed.
Instance Methods
deviceManager:deviceDidAppear:
Invoked when a device advertising a LEGO Device service UUID is discovered.
- (void)deviceManager:(LEDeviceManager *)manager deviceDidAppear:(LEDevice *)device
Discussion
Invoked when a device advertising a LEGO Device service UUID is discovered.
Declared In
LEDeviceManager.h
deviceManager:deviceDidDisappear:
Invoked when a device stops advertising a LEGO Device service. The LEDeviceManager will check at small refresh-intervals if an advertising packet was received during the refresh-interval. If not, this method is invoked.
- (void)deviceManager:(LEDeviceManager *)manager deviceDidDisappear:(LEDevice *)device
Discussion
Invoked when a device stops advertising a LEGO Device service. The LEDeviceManager will check at small refresh-intervals if an advertising packet was received during the refresh-interval. If not, this method is invoked.
Declared In
LEDeviceManager.h
deviceManager:didDisconnectFromDevice:willAttemptAutoReconnect:error:
Invoked when a device is disconnected.
- (void)deviceManager:(LEDeviceManager *)manager didDisconnectFromDevice:(LEDevice *)device willAttemptAutoReconnect:(BOOL)autoReconnect error:(NSError *)error
Parameters
- manager
The LEDeviceManager
- device
The disconnected device
- autoReconnect
YES if an automatic reconnect will be attempted, see [LEDeviceManager automaticReconnectOnConnectionLostEnabled].
- error
If an error occurred, the cause of the failure.
Discussion
Invoked when a device is disconnected.
Declared In
LEDeviceManager.h
deviceManager:didFailToConnectToDevice:willAttemptAutoReconnect:error:
Invoked when a device fails to connect, of if a connection request times out.
- (void)deviceManager:(LEDeviceManager *)manager didFailToConnectToDevice:(LEDevice *)device willAttemptAutoReconnect:(BOOL)autoReconnect error:(NSError *)error
Parameters
- manager
The LEDeviceManager
- device
The device that failed to connect
- autoReconnect
YES if an automatic reconnect will be attempted, see [LEDeviceManager automaticReconnectOnConnectionLostEnabled].
- error
The cause of the failure.
Discussion
Invoked when a device fails to connect, of if a connection request times out.
Declared In
LEDeviceManager.h
deviceManager:didFinishInterrogatingDevice:
Invoked when a connection to a device is established and all required services has been discovered. At this point the device is ready for use.
- (void)deviceManager:(LEDeviceManager *)manager didFinishInterrogatingDevice:(LEDevice *)device
Discussion
Invoked when a connection to a device is established and all required services has been discovered. At this point the device is ready for use.
Declared In
LEDeviceManager.h
deviceManager:didStartInterrogatingDevice:
Invoked when a connection to a device is established, and the interrogation of the device for required services begins. A connection is established at this point but the device is not yet ready to be used.
- (void)deviceManager:(LEDeviceManager *)manager didStartInterrogatingDevice:(LEDevice *)device
Discussion
Invoked when a connection to a device is established, and the interrogation of the device for required services begins. A connection is established at this point but the device is not yet ready to be used.
Declared In
LEDeviceManager.h
deviceManager:willStartConnectingToDevice:
Invoked when starting a device connect attempt. Normally, this will happen right after calling [LEDeviceManager connectToDevice:]. However, it may also happen in relation to an automatic reconnect attempt.
- (void)deviceManager:(LEDeviceManager *)manager willStartConnectingToDevice:(LEDevice *)device
Discussion
Invoked when starting a device connect attempt. Normally, this will happen right after calling [LEDeviceManager connectToDevice:]. However, it may also happen in relation to an automatic reconnect attempt.
See Also
Declared In
LEDeviceManager.h