RVS_BTDriver_OBD_Command_Service_Command_Interpreter
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.
-
This returns an Array of Strings, reflecting which PIDs will return data to be decoded by this mask set.
Declaration
Swift
static var pidCommands: [String] { get }
-
This return an Int, with the service being handled by this interpreter.
Declaration
Swift
var service: Int { get }
-
This is the “factory” generator.
Declaration
Swift
static func createNewInstance(contents inContents: String, service inService: Int) -> RVS_BTDriver_OBD_Command_Service_Command_Interpreter?
Parameters
contents
The contents, as a String of 2-character hex numbers, space-separated.
service
The service to which this interpreter applies.
Return Value
A new instance of this interpeter class, for use as a factory.
-
This will read in the data, and save the header (a UInt8 bitmask), and the data (4 UInt16).
Declaration
Swift
init(contents inContents: String, service inService: Int)
Parameters
contents
The contents, as a String of 2-character hex numbers, space-separated.
service
The service to which this interpreter applies.
-
init()
Default implementationIf we initialize with no parameters, we are making a “factory instance.”
Default Implementation
We call the default init with empty parameters.
Declaration
Swift
init()