RVS_BTDriver_DeviceSubscriberProtocol
public protocol RVS_BTDriver_DeviceSubscriberProtocol : RVS_BTDriver_SubscriberProtocol
This is a protocol for classes, structs or enums that want to “subscribe” to a device.
-
REQUIRED: Error reporting method.
Declaration
Swift
func subscribedDevice(_ device: RVS_BTDriver_DeviceProtocol, encounteredThisError: RVS_BTDriver.Errors)Parameters
deviceThe
RVS_BTDriver_DeviceProtocolinstance that has the service.encounteredThisErrorThe error that was encountered.
-
subscribedDevice(_:serviceAdded:)Default implementationOPTIONAL: Called When a service is added to the main list.
Default Implementation
Default does nothing.
Declaration
Swift
func subscribedDevice(_ device: RVS_BTDriver_DeviceProtocol, serviceAdded: RVS_BTDriver_ServiceProtocol)Parameters
deviceThe
RVS_BTDriver_DeviceProtocolinstance that has the service.serviceAddedThe
RVS_BTDriver_ServiceProtocolservice that was added. -
subscribedDeviceStatusUpdate(_:)Default implementationOPTIONAL: Called to indicate that the device’s status should be checked.
It may be called frequently, and there may not be any changes. This is mereley a “make you aware of the POSSIBILITY of a change” call.
This is optional, and is NOT guaranteed to be called in the main thread.
Default Implementation
Default does nothing.
Declaration
Swift
func subscribedDeviceStatusUpdate(_ device: RVS_BTDriver_DeviceProtocol)Parameters
deviceThe
RVS_BTDriver_DeviceProtocolinstance calling this.
View on GitHub
RVS_BTDriver_DeviceSubscriberProtocol Protocol Reference