RVS_BTDriver_OBD_Command_Service_03

This is a special struct that is used to decode the Service 3 response. It can be subscripted or iterated as an Array of String.

  • This is true, if the instance has valid data.

    Declaration

    Swift

    var valid: Bool
  • This is only handler for the one PID available for Service 3. The response will be a list of trouble codes.

    Declaration

    Swift

    public static let pidCommands: [String]
  • The service. It will always be service 3, but we need to declare this for protocol conformance.

    Declaration

    Swift

    public let service: Int
  • These are the DTC codes returned by the device.

    Declaration

    Swift

    let codes: [RVS_BTDriver_OBD_DTC]
  • This is a static function that we use to parse a response string into an Array of DTC instances (structs).

    • prameter inResponseDataAsString: The response from the device, as a “raw” String.

    Declaration

    Swift

    internal static func parseCommand(_ inResponseDataAsString: String) -> [Any]

    Return Value

    An Array of 0 or more RVS_BTDriver_OBD_DTC instances, instantiated from the data.

  • Declaration

    Swift

    public init(contents inContents: String, service _: Int)

    Parameters

    contents

    The String, containing the OBD response to be parsed.

    service

    The service (ignored, as we are always 3).