Protocols
The following protocols are available globally.
-
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 moreDeclaration
Swift
public protocol OLEB_Queue
-
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 moreDeclaration
Swift
public protocol RVS_SequenceProtocol : Sequence
-
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 moreDeclaration
Swift
public protocol RVS_BTDriver_OBD_Command_Service_Command_Interpreter
-
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 moreDeclaration
Swift
public protocol RVS_BTDriver_OBD_DTC_Container : Sequence where Self.Element == String
-
This protocol is for delegates for OBD devices.
See moreDeclaration
Swift
public protocol RVS_BTDriver_OBD_DeviceDelegate : AnyObject
-
Declaration
Swift
public protocol RVS_BTDriver_OBD_DeviceProtocol : RVS_BTDriver_DeviceProtocol
-
This is a specialization for the common ELM327 chipset.
See moreDeclaration
Swift
public protocol RVS_BTDriver_OBD_ELM327_DeviceProtocol : RVS_BTDriver_OBD_DeviceProtocol
-
This is a protocol for classes, structs or enums that want to “subscribe” to a device.
See moreDeclaration
Swift
public protocol RVS_BTDriver_DeviceSubscriberProtocol : RVS_BTDriver_SubscriberProtocol
-
Declaration
Swift
public protocol RVS_BTDriver_DeviceProtocol : AnyObject
-
This is a “base” subscriber protocol for accessing driver elements.
We require that subscribers be classes, so they will be referenced.
See moreDeclaration
Swift
public protocol RVS_BTDriver_SubscriberProtocol : AnyObject
-
This is the delegate for the driver instance. You should definitely do this.
See moreDeclaration
Swift
public protocol RVS_BTDriverDelegate : AnyObject
-
This represents the public face of a “property,” which maps to a bluetooth “characteristic.”
See moreDeclaration
Swift
public protocol RVS_BTDriver_PropertyProtocol : AnyObject
-
Declaration
Swift
public protocol RVS_BTDriver_ServiceSubscriberProtocol : RVS_BTDriver_SubscriberProtocol
-
Declaration
Swift
public protocol RVS_BTDriver_ServiceProtocol : AnyObject