DriveMotionDelegate
TNDriveMotionDelegate is a protocol for users to receive trip changes through delegate methods.
Implement TNDriveMotionDelegate protocol in a class
For how to configure the implementation class of TNDriveMotionDelegate, please refer to Initialize the SDK. And no matter whether TNDriveDetectionMode is .auto or .manual, the application can learn the dynamics of the trip through this protocol.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Events
- TNDriveStartEvent: When the trip starts, DriveMotion will broadcast this event, which mainly includes tripId, start time and start location.
- TNDriveEvent: After the trip starts, if DriveMotion detects a safety event (such as: hard acceleration, hard braking, sharp turns, etc.), it will broadcast the event. It contains a specific safety event.
- TNDriveScoreEvent: After the trip starts, If DriveMotion has calculated the score of the current trip, this event will be broadcast. It will include the latest summary information, the latest score, and information about safety events in current trip.
- TNDriveAnalyzedEvent: After the trip ends, DriveMotion will first send the event for the final analysis of the trip. Compared with DriveScoreEvent, it represents the final itinerary information, so it has the trajectory of the entire itinerary.
- TNDriveEndEvent: After the trip ends and TNDriveAnalyzedEvent is broadcast, DriveMotion will broadcast this event, which mainly includes tripId, end time, end location and trip status.