RVS_BTDriver_ServiceProtocol

public protocol RVS_BTDriver_ServiceProtocol : AnyObject
  • This refers to the device instance that “owns” this service.

    Declaration

    Swift

    var owner: RVS_BTDriver_DeviceProtocol! { get }
  • This is the public read-only access to the properties list.

    Declaration

    Swift

    var properties: [RVS_BTDriver_PropertyProtocol] { get }
  • This is the read-only unique ID for this service.

    Declaration

    Swift

    var uuid: String { get }
  • This is the read-only count of properties.

    Declaration

    Swift

    var count: Int { get }
  • This is a public read-only subscript to the property list.

    Declaration

    Swift

    subscript(inIndex: Int) -> RVS_BTDriver_PropertyProtocol { get }
  • Test to see if a subscriber is already subscribed.

    Declaration

    Swift

    func isThisInstanceASubscriber(_ subscriber: RVS_BTDriver_ServiceSubscriberProtocol) -> Bool

    Parameters

    subscriber

    The subscriber to test.

    Return Value

    True, if the instance is subscribed.

  • Add an observer of the service.

    It should be noted that subscribers are held as strong references (if they are classes).

    Declaration

    Swift

    func subscribe(_ subscriber: RVS_BTDriver_ServiceSubscriberProtocol)

    Parameters

    subscriber

    The instance to subscribe. Nothing is done, if we are already subscribed.

  • remove a subscriber from the list. Nothing happens if the subscriber is not already subscribed.

    Declaration

    Swift

    func unsubscribe(_ subscriber: RVS_BTDriver_ServiceSubscriberProtocol)

    Parameters

    subscriber

    The instance to unsubscribe. Nothing is done, if we are not already subscribed.