TNDriveMotionDelegate

@objc
public protocol TNDriveMotionDelegate

This delegate is for users to receive trip changes through broadcast.

  • When the trip starts, this method is called.

    @param driveStartEvent Information about drive start event

    Declaration

    Swift

    func onDriveStart(_ event: TNDriveStartEvent) throws
  • When the trip ends, this method is called.

    @param driveEndEvent Information about drive end event

    Declaration

    Swift

    func onDriveEnd(_ event: TNDriveEndEvent) throws
  • When a safety event is detected, this method is called.

    @param driveEvent Information about drive event

    Declaration

    Swift

    func onDriveEventDetected(_ event: TNDriveEvent) throws
  • If the trip is not over, this method will be called every time the score is calculated.

    @param driveScoreEvent Information about drive score

    Declaration

    Swift

    func onDriveScoreUpdated(_ event: TNDriveScoreEvent) throws
  • When the trip is analyzed, this method is called.

    @param driveAnalyzedEvent Information about drive analyzation

    Declaration

    Swift

    func onDriveAnalyzed(_ event: TNDriveAnalyzedEvent) throws