AccidentInfo
@objc
public class AccidentInfo : NSObject
Wrapper for meta-information related to an accident detected by the SDK.
-
The unique Id of drive during which the accident occured
Declaration
Swift
@objc public var driveId: String { get } -
The location of the accident.
Declaration
Swift
@objc public var accidentLocation: LocationPoint { get } -
The timestamp of the accident in milliseconds since epoch.
Declaration
Swift
@objc public var timestamp: Int64 { get } -
The session that was in progress when the accident occured, if a session was started in the SDK.
See also
Zendrive.startSession(_:)Declaration
Swift
@objc public var sessionId: String? { get } -
The tracking id of the ongoing drive when the accident occured.
Declaration
Swift
@objc public var trackingId: String? { get } -
The confidence of detected accident.
Declaration
Swift
@objc public var confidence: AccidentConfidence { get } -
[Experimental Feature] Approximate precision measure of the detected collision. Valid values range from 0 to 100. -1 by default. To enable this feature, contact: support@zendrive.com
Declaration
Swift
@objc public var confidenceNumber: Int32 { get } -
A unique identifier of this accident.
Declaration
Swift
@objc public var accidentId: String { get } -
Initializer for
AccidentInfo.Declaration
Swift
@objc public init(location: LocationPoint, timestamp: Int64, trackingId: String?, sessionId: String?, confidence: AccidentConfidence, confidenceNumber: Int32, accidentId: String, driveId: String)Parameters
locationThe location of the accident
timestampThe timestamp of the accident in milliseconds since epoch
trackingIdThe tracking id of the ongoing drive when the accident occured
sessionIdThe session that was in progress when the accident occured, if a session was started in the SDK
confidenceConfidence measure of the detected accident
confidenceNumberConfidence number of the detected accident
accidentIdA unique identifier of this accident
driveIdThe unique Id of drive during which the accident occured
Return Value
AccidentInfoobject -
Returns a dictionary that represents the
AccidentInfoobject.Declaration
Swift
@objc public func toDictionary() -> [AnyHashable : Any] -
Returns a JSON formatted string that represents the
AccidentInfoobject.Declaration
Swift
@objc public func toJson() -> String
AccidentInfo Class Reference