TMDVehicle Class Reference
Inherits from | NSObject |
---|---|
Declared in | TMDVehicle.h |
tmdVehicleId
The unique id of the vehicle profile.
@property (nonatomic, strong) NSUUID *tmdVehicleId
Declared In
TMDVehicle.h
modality
The name of the modality associated with the vehicle profile.
@property (nonatomic, strong) NSString *modality
Declared In
TMDVehicle.h
engineType
The engine type of the vehicle.
@property (assign) TMDEngineType engineType
Declared In
TMDVehicle.h
model
The model of the vehicle.
@property (nonatomic, strong) NSString *model
Declared In
TMDVehicle.h
isForUserGarage
Boolean value indicating if the vehicle belongs to the user garage or not.
@property (assign) BOOL isForUserGarage
Declared In
TMDVehicle.h
isDefaultVehicle
Boolean value indicating if the vehicle is the default vehicle used by the user for this modality.
@property (assign) BOOL isDefaultVehicle
Declared In
TMDVehicle.h
isUserOwner
Boolean value indicating if the user owns the vehicle.
@property (assign) BOOL isUserOwner
Declared In
TMDVehicle.h
syncedWithCloud
Indicates whether changes made locally on the vehicle have been synced with the cloud.
@property (assign) BOOL syncedWithCloud
Declared In
TMDVehicle.h
timestampUpdate
The UTC timestamp (in ms) of the last update of the TMD Vehicle
@property (assign) long long timestampUpdate
Declared In
TMDVehicle.h
timestampCreation
The UTC timestamp (in ms) of the creation of the TMD Vehicle
@property (assign) long long timestampCreation
Declared In
TMDVehicle.h
– initWithModality:engineType:name:make:makeAlt:model:modelAlt:year:isDefaultVehicle:isUserOwner:
- (instancetype)initWithModality:(NSString *)modality engineType:(TMDEngineType)engineType name:(NSString *)name make:(NSString *)make makeAlt:(NSString *)makeAlt model:(NSString *)model modelAlt:(NSString *)modelAlt year:(int)year isDefaultVehicle:(BOOL)isDefaultVehicle isUserOwner:(BOOL)isUserOwner
– initWithId:modality:engineType:name:make:makeAlt:model:modelAlt:year:isForUserGarage:isDefaultVehicle:isUserOwner:timestampCreation:timestampUpdate:synced:
- (instancetype)initWithId:(NSUUID *)tmdVehicleId modality:(NSString *)modality engineType:(TMDEngineType)engineType name:(NSString *)name make:(NSString *)make makeAlt:(NSString *)makeAlt model:(NSString *)model modelAlt:(NSString *)modelAlt year:(int)year isForUserGarage:(BOOL)isForUserGarage isDefaultVehicle:(BOOL)isDefaultVehicle isUserOwner:(BOOL)isUserOwner timestampCreation:(long long)timestampCreation timestampUpdate:(long long)timestampUpdate synced:(BOOL)syncedWithCloud
+ carbonEmissionsForEngineType:forModality:
Returns the carbon emission value, in g/km, for a modality with a given engine type.
+ (float)carbonEmissionsForEngineType:(TMDEngineType)engineType forModality:(NSString *)modalityName
Parameters
engineType |
the engine type to compute carbon emissions for |
---|---|
modalityName |
Return Value
The computed carbon emission value, in g/km.
Declared In
TMDVehicle.h
+ tmdEngineTypeToStringForEngineType:
Returns a string representation of a given engine type.
+ (NSString *)tmdEngineTypeToStringForEngineType:(TMDEngineType)engineType
Declared In
TMDVehicle.h
+ tmdEngineTypeFromString:
Returns a TMDEngineType value from a string.
+ (TMDEngineType)tmdEngineTypeFromString:(NSString *)engineTypeString
Declared In
TMDVehicle.h
– tmdEngineTypeString
Returns the string representation of the vehicle’s engine type.
- (NSString *)tmdEngineTypeString
Declared In
TMDVehicle.h
– toJson
Returns the vehicle profile as a JSON string..
- (NSString *)toJson
Declared In
TMDVehicle.h