DriveInfo
@objc
public class DriveInfo : NSObject
Wrapper for meta-information related to a drive.
-
The unique Id for this drive
Declaration
Swift
@objc public var driveId: String!
-
The type of the drive. This decides what other info parameters will be populated.
A drive callback will be sent even for falsely detected drives or for non automobile trips (Eg. biking, public transport).
Declaration
Swift
@objc public var driveType: DriveType
-
Whether the user was a driver or a passenger.
Driver/Passenger detection is disabled by default. Talk to your contact in
Zendrive
to enable this feature. Only present whendriveType
isDriveType.drive
and the SDK was able to determine with confidence whether the user was a driver or a passenger.If the SDK was not able to determine the user mode, this field is
UserMode.unavailable
.Declaration
Swift
@objc public var userMode: UserMode
-
The insurance period for this drive
Declaration
Swift
@objc public var insurancePeriod: InsurancePeriod
-
The start timestamp of trip in milliseconds since epoch.
Declaration
Swift
@objc public var startTimestamp: Int64
-
The end timestamp of trip in milliseconds since epoch
Declaration
Swift
@objc public var endTimestamp: Int64
-
The average speed of trip in metres/second
Declaration
Swift
@objc public var averageSpeed: Double
-
The maximum speed of trip in metres/second
If we do not receive any accurate location data during the drive, this property would be set to -1
Declaration
Swift
@objc public var maxSpeed: Double
-
The distance of the trip in metres
Declaration
Swift
@objc public var distance: Double
-
A list of
LocationPoint
objects corresponding to this trip in increasing order of timestamp. The first point corresponds to trip start location and last to trip end location.This is a sampled approximation of the drive which gives an indication of the path taken by the driver. It is not the full detailed location data of the drive. If no waypoints are recorded during the drive, this is an empty array.
Declaration
Swift
@objc public var waypoints: [LocationPoint]
-
Tracking id is specified by the enclosing application when it wants to start a drive manually by calling
Zendrive.startManualDrive(_:completionHandler:)
This may be the case for example in a taxi cab application that would know when to start a drive based on when a meter gets flagged. trackingId will be nil in case of auto detected drives.
Declaration
Swift
@objc public var trackingId: String?
-
Session id is specified by the enclosing application when it wants to record a session using
Zendrive.startSession(_:)
sessionId will be nil if there is no session associated with that drive.
Declaration
Swift
@objc public var sessionId: String?
-
The driving behaviour score for this trip.
Declaration
Swift
@objc public var score: DriveScore
-
The ratings of individual events for this trip
Declaration
Swift
@objc public var eventRatings: EventRatings
-
The position of the phone during this trip.
Declaration
Swift
@objc public var phonePosition: PhonePosition
-
A list of
TripWarning
objects for this trip.In case of no warnings in the trip an empty list is returned.
Declaration
Swift
@objc public var tripWarnings: [TripWarning]