TMDTrip Class Reference
Inherits from | NSObject |
---|---|
Declared in | TMDTrip.h |
Overview
This class includes all information pertaining to the TMD trip collected from the Moprim Cloud.
tripId
The unique id of the trip when stored in the local cache
@property (assign) long long tripId
Declared In
TMDTrip.h
timestampDownload
The UTC timestamp (in ms) of the last download of the TMD trip
@property long long timestampDownload
Declared In
TMDTrip.h
timestampModified
The UTC timestamp (in ms) of the last modification of the TMD trip
@property (assign) long long timestampModified
Declared In
TMDTrip.h
timestampStart
Returns the UTC timestamp (in ms) of the start of the TMD trip
@property long long timestampStart
Declared In
TMDTrip.h
timestampEnd
Returns the UTC timestamp (in ms) of the end of the TMD trip
@property long long timestampEnd
Declared In
TMDTrip.h
distance
The distance of the trip in meters Returns the distance of the trip
@property (assign) double distance
Declared In
TMDTrip.h
co2
The co2 produced during this trip Returns the co2 produced in grams
@property (assign) double co2
Declared In
TMDTrip.h
origin
The name of the origin for the trip Returns the origin of the trip
@property (nonatomic, strong) NSString *origin
Declared In
TMDTrip.h
destination
The destination of the trip Returns the destination
@property (nonatomic, strong) NSString *destination
Declared In
TMDTrip.h
reason
The reason for the trip Returns the reason for the trip
@property (nonatomic, strong) NSString *reason
Declared In
TMDTrip.h
metadata
The metadata for the trip Returns the metadata for the trip
@property (nonatomic, strong) NSString *metadata
Declared In
TMDTrip.h
checksum
The checksum of the trip
@property (nonatomic, strong) NSString *checksum
Declared In
TMDTrip.h
legs
Get the list of legs for this trip Returns the list of legs for this trip
@property (nonatomic, strong) NSArray<TMDActivity*> *legs
Declared In
TMDTrip.h
mainMode
Returns the main mode of the trip
@property (nonatomic, strong) NSString *mainMode
Declared In
TMDTrip.h
isValidated
This field is important for reporting Returns true if the trip has been validated by the user
@property BOOL isValidated
Declared In
TMDTrip.h
isCompleted
This fields tells if the trip is completed and thus, may be not be modified without the user’s input Returns true if the trip is completed.
@property BOOL isCompleted
Declared In
TMDTrip.h
syncedWithCloud
Indicates whether change made manually on the trip have been synced with the cloud
@property BOOL syncedWithCloud
Declared In
TMDTrip.h
– initWithId:timestampDownload:timestampStart:timestampEnd:timestampModified:legs:mainMode:co2:distance:origin:destination:reason:metadata:checksum:isValidated:isCompleted:synced:
- (instancetype)initWithId:(long long)tripId timestampDownload:(long long)timestampDownload timestampStart:(long long)timestampStart timestampEnd:(long long)timestampEnd timestampModified:(long long)timestampModified legs:(NSArray<TMDActivity*> *)legs mainMode:(NSString *)mainMode co2:(double)co2 distance:(double)distance origin:(NSString *)origin destination:(NSString *)destination reason:(NSString *)reason metadata:(NSString *)metadata checksum:(NSString *)checksum isValidated:(BOOL)isValidated isCompleted:(BOOL)isCompleted synced:(BOOL)syncedWithCloud
– getLegAt:
Returns a leg from the list of legs for this trip
- (TMDActivity *)getLegAt:(int)position
Declared In
TMDTrip.h
– duration
Returns the duration in seconds of the trip
- (NSTimeInterval)duration
Declared In
TMDTrip.h
– hasSameTimestampsThanTrip:
Returns TRUE if the trip has same start and stop timestamp than ‘other’
- (BOOL)hasSameTimestampsThanTrip:(TMDTrip *)other
Discussion
Trips are usually compared with their timestamps.
Declared In
TMDTrip.h
– overlapsWithTrip:isInclusive:
Returns TRUE if the timestamps of both trips overlap
- (BOOL)overlapsWithTrip:(TMDTrip *)other isInclusive:(BOOL)isInclusive
Declared In
TMDTrip.h
– hasSameDataThanTrip:
Compares 2 TMDTrip objects, ignoring tripId, timestampDownload, timestampModified and syncedWithCloud
- (BOOL)hasSameDataThanTrip:(TMDTrip *)other
Declared In
TMDTrip.h