RVS_BTDriver_OBD_Device_TransactionStruct
public struct RVS_BTDriver_OBD_Device_TransactionStruct
This struct will contain a transaction for an OBD device. OBD transactions are atomic and single-threaded. There can only be one going to a device at a time.
-
This is the OBD device instance, running the transaction.
Declaration
Swift
public let device: RVS_BTDriver_OBD_DeviceProtocol! -
This is the raw String value of the command being sent (it may be a format string).
Declaration
Swift
public let rawCommand: String! -
This is any interpreter, containing parsed data.
Declaration
Swift
public let interpreter: RVS_BTDriver_OBD_Command_Service_Command_Interpreter! -
This is the command, filled out (it may be the same as the rawCommand, but a format will have values substituted).
Declaration
Swift
public var completeCommand: String! -
This is any data that was returned from the OBD adapter.
Declaration
Swift
public var responseData: Data! -
This is the response, “cleaned,” and converted to a String (if possible).
Upon being set, we execute the parser.
Declaration
Swift
public var responseDataAsString: String! -
Any error that may have occurred.
Declaration
Swift
public var error: RVS_BTDriver.Errors! -
Initializer, with most fields optional.
Declaration
Swift
public init(device inDevice: RVS_BTDriver_OBD_DeviceProtocol!, rawCommand inRawCommand: String, completeCommand inCompleteCommand: String, responseData inResponseData: Data! = nil, responseDataAsString inResponseDataAsString: String! = nil, error inError: RVS_BTDriver.Errors! = nil, interpreter inInterpreter: RVS_BTDriver_OBD_Command_Service_Command_Interpreter! = nil)Parameters
deviceRequired. The device that is running the transaction. It can be nil for testing purposes, but should not be nil, otherwise.
rawCommandRequired. This is the raw String value of the command being sent (it may be a format string).
completeCommandRequired. This is the command, filled out (it may be the same as the rawCommand, but a format will have values substituted).
responseDataOptional. This is any data that was returned from the OBD adapter.
responseDataAsStringOptional. If the command can be represented as a String, that is set here.
interpreterThis is an interpreter that was created to parse and report the data.
errorOptional. Any error that may have occurred.
-
Readable text description.
Declaration
Swift
public var description: String { get }
View on GitHub
RVS_BTDriver_OBD_Device_TransactionStruct Structure Reference