References (iOS)

TripResponseStatus

TripResponseStatus indicates if the analyzed trip by the DriveQuant servers is valid or not:

public class TripResponseStatus: NSObject {
    public let status: TripResponseStatusType
    public let hasSafetyAndEcoDrivingScore: Bool
    public let info: [TripResponseInfo]
    public let error: TripResponseError?
}

TripResponseInfo

TripResponseError

StartMode

StartMode indicates how the trip is started. It is an enum with the following values:

public enum StartMode: Int {
    case gps = 1
    case beacon = 2
    case manual = 3
    case geozone = 4
    case bluetooth = 5
    case unknown_bluetooth = 6
}

CancelTrip

CancelTrip indicates how the trip was cancelled. It is an enum with the following values:

public enum CancelTrip {
    case user, highspeed, noSpeed, noBeacon, missingConfiguration, noGPSData, reset, beaconNoSpeed, bluetoothDeviceNoSpeed
}

TripPoint

TripPoint is an object that contains data for each location registered by the SDK.

public struct TripPoint {
    let latitude: Double
    let longitude: Double
    let speed: Double
    let accuracy: Double
    let elevation: Double
    let distance: Double
    let heading: Double
    let duration: Double
}

TripVehicle

TripVehicle is an object that contains vehicle detailed characteristics.

public class TripVehicle {
    public var carTypeIndex: Int = 1
    public var carEngineIndex: Int = 1
    public var carPower: Double = 150.0
    public var carMass: Double = 1400.0
    public var carGearboxIndex: Int = 2
    public var carConsumption: Double = 4.5
    public var carAutoGearboxNumber: Int = 0
    public var engineDisplacement: Double = 1_200.0
    public var frontTireSize: String?
    public var rearTireSize: String?
    public var length: Double
    public var width: Double
    public var height: Double
    public var engineCylinderNb: Int
    public var driveWheels: Int
}

BeaconData

BeaconData is an object that contains beacon characteristics.

public class BeaconData {
    public let proximityUuid: String
    public let major: Int
    public let minor: Int
}

BluetoothData

BluetoothData is an object that contains the Bluetooth device characteristics.

public class BluetoothData {
    public var name: String
    public var macAddress: String
}

DKCrashInfo

Crash information object have the following structure

public class DKCrashInfo {
    public let crashId: String
    public let date: Date
    public let probability: Int
    public let latitude: Double
    public let longitude: Double
    public let velocity: Double
    public let crashStatus: DKCrashStatus
}

with the following enumeration for crash status

public enum DKCrashStatus {
    case unconfirmed
    case confirmed
}

DKCrashFeedbackConfig

DKCrashFeedbackConfig is an object used to configure the Crash Detection feedback feature.

public class DKCrashFeedbackConfig: NSObject {
    public let crashVelocityThreshold: Double
    public let notification: DKCrashFeedbackNotification
}

with the following class for DKCrashFeedbaclNotification

public class DKCrashFeedbackNotification: NSObject {
    public let title: String
    public let message: String
    public let crashAlert: DKCrashAlert
}

DKCrashFeedbackNotification

public class DKCrashFeedbackNotification: NSObject {
    public let title: String
    public let message: String
    public let crashAlert: DKCrashAlert
}

DKCrashAlert

public enum DKCrashAlert: Int {
    case silence
    case vibration
    case soundAndVibration
}

CrashFeedbackType

CrashFeedbackSeverity

Last updated