Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Internet Explorer alert
This browser is not recommended for use with smartdevicelink.com, and may not function properly. Upgrade to a different browser to guarantee support of all features.
close alert
To Top Created with Sketch. To Top
To Bottom Created with Sketch. To Bottom
iOS Documentation
SDLFuelRange

SDLFuelRange Class Reference

Section Contents

Overview

Describes the distance a vehicle can travel with the current level of fuel.

-initWithType:range:level:levelState:capacity:capacityUnit:

Objective-C

- (nonnull instancetype)initWithType:(nullable SDLFuelType)type
                               range:(float)range
                               level:(float)level
                          levelState:
                              (nullable SDLComponentVolumeStatus)levelState
                            capacity:(float)capacity
                        capacityUnit:(nullable SDLCapacityUnit)capacityUnit;

Swift

init(type: SDLFuelType?, range: Float, level: Float, levelState: SDLComponentVolumeStatus?, capacity: Float, capacityUnit: SDLCapacityUnit?)

Parameters

type

- type

range

- @(range)

level

- @(level)

levelState

- levelState

capacity

- @(capacity)

capacityUnit

- capacityUnit

Return Value

A SDLFuelRange object

capacity

The absolute capacity of this fuel type.

Optional, Float, 0.0 - 1000000.0

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *capacity;

Swift

var capacity: (NSNumber & SDLFloat)? { get set }

capacityUnit

The unit of the capacity of this fuel type such as liters for gasoline or kWh for batteries.

Objective-C

@property (nonatomic, strong, nullable) SDLCapacityUnit capacityUnit;

Swift

var capacityUnit: SDLCapacityUnit? { get set }

level

The relative remaining capacity of this fuel type (percentage).

Optional, Float, -6.0 - 1000000.0

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *level;

Swift

var level: (NSNumber & SDLFloat)? { get set }

levelState

The fuel level state.

Objective-C

@property (nonatomic, strong, nullable) SDLComponentVolumeStatus levelState;

Swift

var levelState: SDLComponentVolumeStatus? { get set }

type

The vehicle’s fuel type

Optional

Objective-C

@property (nonatomic, strong, nullable) SDLFuelType type;

Swift

var type: SDLFuelType? { get set }

range

The estimate range in KM the vehicle can travel based on fuel level and consumption.

Optional, Float, 0 - 10,000

Objective-C

@property (nonatomic, strong, nullable) NSNumber<SDLFloat> *range;

Swift

var range: (NSNumber & SDLFloat)? { get set }
View on GitHub.com
Previous Section Next Section