Protocols

The following protocols are available globally.

Queue Protocol

  • This was taken straight from the objc.io book “Advanced Swift.” It’s so damn useful, that I have it made into a standard tool.

    The original design was done by Ole Begemann and Chris Eidhof. I have modified it slightly; but not much.

    It is fast all git-go.

    A type that can efficiently “enqueue” and “dequeue” elements. It works on one element at a time. You cannot dequeue groups of elements.

    See more

    Declaration

    Swift

    public protocol OLEB_Queue

Standardized Sequence Protocol to Let Collectors be Sequences

  • If you conform to this protocol, you get a few basic Sequence attributes for free.

    You’ll need to set up a sequence_contents Array (read/write), and set the Element type, and that’s about all.

    This also gives you a read-only subscript.

    This cannot be applied to enums, as it requires a stored property.

    See more

    Declaration

    Swift

    public protocol RVS_SequenceProtocol : Sequence

RVS_BTDriver_OBD_Command_Service_Command_Interpreter Protocol

  • This is the base protocol for command interpreters. It defines an Array of String, which is used to match the interpreter with the PID it is applied to.

    See more

    Declaration

    Swift

    public protocol RVS_BTDriver_OBD_Command_Service_Command_Interpreter

RVS_BTDriver_OBD_Command_Service_SupportedPIDsBitMask Protocol

  • This is the base protocol for command interpreters. It defines an Array of String, which is used to match the interpreter with the PID it is applied to.

    The sequence conformance allows us to act as a sequence of String

    See more

    Declaration

    Swift

    public protocol RVS_BTDriver_OBD_DTC_Container : Sequence where Self.Element == String

RVS_BTDriver_OBD_DeviceDelegate Protocol

RVS_BTDriver_OBD_DeviceProtocol Protocol

RVS_BTDriver_OBD_ELM327_DeviceProtocol Protocol

RVS_BTDriver_DeviceSubscriberProtocol Protocol

RVS_BTDriver_DeviceProtocol Protocol (Aggregates Services)

RVS_BTDriver_SubscriberProtocol Protocol

  • This is a “base” subscriber protocol for accessing driver elements.

    We require that subscribers be classes, so they will be referenced.

    See more

    Declaration

    Swift

    public protocol RVS_BTDriver_SubscriberProtocol : AnyObject

RVS_BTDriverDelegate Protocol

  • This is the delegate for the driver instance. You should definitely do this.

    See more

    Declaration

    Swift

    public protocol RVS_BTDriverDelegate : AnyObject

RVS_BTDriver_PropertyProtocol Protocol

  • This represents the public face of a “property,” which maps to a bluetooth “characteristic.”

    See more

    Declaration

    Swift

    public protocol RVS_BTDriver_PropertyProtocol : AnyObject

RVS_BTDriver_ServiceProtocol Protocol