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 }
-
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, accidentId: String, driveId: String)
Parameters
location
The location of the accident
timestamp
The timestamp of the accident in milliseconds since epoch
trackingId
The tracking id of the ongoing drive when the accident occured
sessionId
The session that was in progress when the accident occured, if a session was started in the SDK
confidence
Confidence measure of the detected accident
accidentId
A unique identifier of this accident
driveId
The unique Id of drive during which the accident occured
Return Value
AccidentInfo
object -
Returns a dictionary that represents the
AccidentInfo
object.Declaration
Swift
@objc public func toDictionary() -> [AnyHashable : Any]
-
Returns a JSON formatted string that represents the
AccidentInfo
object.Declaration
Swift
@objc public func toJson() -> String