TePacket class

Inheritance

Constructors

TePacket({required DateTime timestamp, required String tripId, required double distanceTraveled, required double maxSpeed, required Duration duration})
TePacket is the Trip end packet.

Properties

distanceTraveled double
distanceTraveled is the distance traveled during the trip in meters. This is identified in the packet as DISTANCE_TRAVELED
final
duration Duration
duration is the duration of the trip in seconds. This is identified in the packet as DURATION
final
hashCode int
The hash code for this object.
no setterinherited
maxSpeed double
maxSpeed is the maximum speed during the trip in km/h. This is identified in the packet as MAX_SPEED
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
timestamp is the time of the packet. This is identified in the packet as UNIX
final
tripId String
tripId is the trip identifier of the packet. This is identified in the packet as TRIP_ID
final

Methods

copyWith({DateTime? timestamp, String? tripId, double? distanceTraveled, double? maxSpeed, Duration? duration}) TePacket
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toPacket() String
toPacket returns the packet in the format of Layrz Protocol v3.
override
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

fromPacket(String raw) TePacket
fromPacket creates a TePacket from a string packet in the format of Layrz Protocol v3.
override