Expand Minimize Picture-in-picture Power Device Status Voice Recognition Skip Back Skip Forward Minus Plus Play Search
Documentation
Sidebar

SDLSubscribeVehicleData Class Reference

Section Contents

Overview

Subscribes to specific published vehicle data items. The data will be only sent if it has changed. The application will be notified by the onVehicleData notification whenever new data is available. The update rate is dependent on sensors, vehicle architecture and vehicle type.

Warning

A vehicle may only support a subset of the vehicle data items. Be prepared for the situation where a signal is not available on a vehicle.

Function Group: Location, VehicleInfo and DrivingChara HMILevel needs to be FULL, LIMITED or BACKGROUND Since SmartDeviceLink 2.0 See SDLUnsubscribeVehicleData, SDLGetVehicleData

-initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:

Convenience init for subscribing to all possible vehicle data items.

Objective-C

- (nonnull instancetype)
    initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition
                         airbagStatus:(BOOL)airbagStatus
                           beltStatus:(BOOL)beltStatus
                      bodyInformation:(BOOL)bodyInformation
                    clusterModeStatus:(BOOL)clusterModeStatus
                         deviceStatus:(BOOL)deviceStatus
                        driverBraking:(BOOL)driverBraking
                            eCallInfo:(BOOL)eCallInfo
                       emergencyEvent:(BOOL)emergencyEvent
                         engineTorque:(BOOL)engineTorque
                  externalTemperature:(BOOL)externalTemperature
                            fuelLevel:(BOOL)fuelLevel
                       fuelLevelState:(BOOL)fuelLevelState
                                  gps:(BOOL)gps
                       headLampStatus:(BOOL)headLampStatus
               instantFuelConsumption:(BOOL)instantFuelConsumption
                                myKey:(BOOL)myKey
                             odometer:(BOOL)odometer
                                prndl:(BOOL)prndl
                                  rpm:(BOOL)rpm
                                speed:(BOOL)speed
                   steeringWheelAngle:(BOOL)steeringWheelAngle
                         tirePressure:(BOOL)tirePressure
                          wiperStatus:(BOOL)wiperStatus;

Swift

init(accelerationPedalPosition: Bool, airbagStatus: Bool, beltStatus: Bool, bodyInformation: Bool, clusterModeStatus: Bool, deviceStatus: Bool, driverBraking: Bool, eCallInfo: Bool, emergencyEvent: Bool, engineTorque: Bool, externalTemperature: Bool, fuelLevel: Bool, fuelLevelState: Bool, gps: Bool, headLampStatus: Bool, instantFuelConsumption: Bool, myKey: Bool, odometer: Bool, prndl: Bool, rpm: Bool, speed: Bool, steeringWheelAngle: Bool, tirePressure: Bool, wiperStatus: Bool)

Parameters

accelerationPedalPosition

Subscribe to accelerationPedalPosition

airbagStatus

Subscribe to airbagStatus

beltStatus

Subscribe to beltStatus

bodyInformation

Subscribe to bodyInformation

clusterModeStatus

Subscribe to clusterModeStatus

deviceStatus

Subscribe to deviceStatus

driverBraking

Subscribe to driverBraking

eCallInfo

Subscribe to eCallInfo

emergencyEvent

Subscribe to emergencyEvent

engineTorque

Subscribe to engineTorque

externalTemperature

Subscribe to externalTemperature

fuelLevel

Subscribe to fuelLevel

fuelLevelState

Subscribe to fuelLevelState

gps

Subscribe to gps

headLampStatus

Subscribe to headLampStatus

instantFuelConsumption

Subscribe to instantFuelConsumption

myKey

Subscribe to myKey

odometer

Subscribe to odometer

prndl

Subscribe to prndl

rpm

Subscribe to rpm

speed

Subscribe to speed

steeringWheelAngle

Subscribe to steeringWheelAngle

tirePressure

Subscribe to tirePressure

wiperStatus

Subscribe to wiperStatus

Return Value

A SDLSubscribeVehicleData object

-initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:

Convenience init for subscribing to all possible vehicle data items.

Objective-C

- (nonnull instancetype)
    initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition
                         airbagStatus:(BOOL)airbagStatus
                           beltStatus:(BOOL)beltStatus
                      bodyInformation:(BOOL)bodyInformation
                    clusterModeStatus:(BOOL)clusterModeStatus
                         deviceStatus:(BOOL)deviceStatus
                        driverBraking:(BOOL)driverBraking
                            eCallInfo:(BOOL)eCallInfo
            electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus
                       emergencyEvent:(BOOL)emergencyEvent
                        engineOilLife:(BOOL)engineOilLife
                         engineTorque:(BOOL)engineTorque
                  externalTemperature:(BOOL)externalTemperature
                            fuelLevel:(BOOL)fuelLevel
                       fuelLevelState:(BOOL)fuelLevelState
                            fuelRange:(BOOL)fuelRange
                                  gps:(BOOL)gps
                       headLampStatus:(BOOL)headLampStatus
               instantFuelConsumption:(BOOL)instantFuelConsumption
                                myKey:(BOOL)myKey
                             odometer:(BOOL)odometer
                                prndl:(BOOL)prndl
                                  rpm:(BOOL)rpm
                                speed:(BOOL)speed
                   steeringWheelAngle:(BOOL)steeringWheelAngle
                         tirePressure:(BOOL)tirePressure
                           turnSignal:(BOOL)turnSignal
                          wiperStatus:(BOOL)wiperStatus;

Swift

init(accelerationPedalPosition: Bool, airbagStatus: Bool, beltStatus: Bool, bodyInformation: Bool, clusterModeStatus: Bool, deviceStatus: Bool, driverBraking: Bool, eCallInfo: Bool, electronicParkBrakeStatus: Bool, emergencyEvent: Bool, engineOilLife: Bool, engineTorque: Bool, externalTemperature: Bool, fuelLevel: Bool, fuelLevelState: Bool, fuelRange: Bool, gps: Bool, headLampStatus: Bool, instantFuelConsumption: Bool, myKey: Bool, odometer: Bool, prndl: Bool, rpm: Bool, speed: Bool, steeringWheelAngle: Bool, tirePressure: Bool, turnSignal: Bool, wiperStatus: Bool)

Parameters

accelerationPedalPosition

Subscribe to accelerationPedalPosition

airbagStatus

Subscribe to airbagStatus

beltStatus

Subscribe to beltStatus

bodyInformation

Subscribe to bodyInformation

clusterModeStatus

Subscribe to clusterModeStatus

deviceStatus

Subscribe to deviceStatus

driverBraking

Subscribe to driverBraking

eCallInfo

Subscribe to eCallInfo

electronicParkBrakeStatus

Subscribe to electronicParkBrakeStatus

emergencyEvent

Subscribe to emergencyEvent

engineOilLife

Subscribe to engineOilLife

engineTorque

Subscribe to engineTorque

externalTemperature

Subscribe to externalTemperature

fuelLevel

Subscribe to fuelLevel

fuelLevelState

Subscribe to fuelLevelState

fuelRange

Subscribe to fuelRange

gps

Subscribe to gps

headLampStatus

Subscribe to headLampStatus

instantFuelConsumption

Subscribe to instantFuelConsumption

myKey

Subscribe to myKey

odometer

Subscribe to odometer

prndl

Subscribe to prndl

rpm

Subscribe to rpm

speed

Subscribe to speed

steeringWheelAngle

Subscribe to steeringWheelAngle

tirePressure

Subscribe to tirePressure

turnSignal

Subscribe to turnSignal

wiperStatus

Subscribe to wiperStatus

Return Value

A SDLSubscribeVehicleData object

-initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:

Convenience init for subscribing to all possible vehicle data items.

Objective-C

- (nonnull instancetype)
    initWithAccelerationPedalPosition:(BOOL)accelerationPedalPosition
                         airbagStatus:(BOOL)airbagStatus
                           beltStatus:(BOOL)beltStatus
                      bodyInformation:(BOOL)bodyInformation
                    cloudAppVehicleID:(BOOL)cloudAppVehicleID
                    clusterModeStatus:(BOOL)clusterModeStatus
                         deviceStatus:(BOOL)deviceStatus
                        driverBraking:(BOOL)driverBraking
                            eCallInfo:(BOOL)eCallInfo
            electronicParkBrakeStatus:(BOOL)electronicParkBrakeStatus
                       emergencyEvent:(BOOL)emergencyEvent
                        engineOilLife:(BOOL)engineOilLife
                         engineTorque:(BOOL)engineTorque
                  externalTemperature:(BOOL)externalTemperature
                            fuelLevel:(BOOL)fuelLevel
                       fuelLevelState:(BOOL)fuelLevelState
                            fuelRange:(BOOL)fuelRange
                                  gps:(BOOL)gps
                       headLampStatus:(BOOL)headLampStatus
               instantFuelConsumption:(BOOL)instantFuelConsumption
                                myKey:(BOOL)myKey
                             odometer:(BOOL)odometer
                                prndl:(BOOL)prndl
                                  rpm:(BOOL)rpm
                                speed:(BOOL)speed
                   steeringWheelAngle:(BOOL)steeringWheelAngle
                         tirePressure:(BOOL)tirePressure
                           turnSignal:(BOOL)turnSignal
                          wiperStatus:(BOOL)wiperStatus;

Swift

init(accelerationPedalPosition: Bool, airbagStatus: Bool, beltStatus: Bool, bodyInformation: Bool, cloudAppVehicleID: Bool, clusterModeStatus: Bool, deviceStatus: Bool, driverBraking: Bool, eCallInfo: Bool, electronicParkBrakeStatus: Bool, emergencyEvent: Bool, engineOilLife: Bool, engineTorque: Bool, externalTemperature: Bool, fuelLevel: Bool, fuelLevelState: Bool, fuelRange: Bool, gps: Bool, headLampStatus: Bool, instantFuelConsumption: Bool, myKey: Bool, odometer: Bool, prndl: Bool, rpm: Bool, speed: Bool, steeringWheelAngle: Bool, tirePressure: Bool, turnSignal: Bool, wiperStatus: Bool)

Parameters

accelerationPedalPosition

Subscribe to accelerationPedalPosition

airbagStatus

Subscribe to airbagStatus

beltStatus

Subscribe to beltStatus

bodyInformation

Subscribe to bodyInformation

cloudAppVehicleID

Subscribe to cloudAppVehicleID

clusterModeStatus

Subscribe to clusterModeStatus

deviceStatus

Subscribe to deviceStatus

driverBraking

Subscribe to driverBraking

eCallInfo

Subscribe to eCallInfo

electronicParkBrakeStatus

Subscribe to electronicParkBrakeStatus

emergencyEvent

Subscribe to emergencyEvent

engineOilLife

Subscribe to engineOilLife

engineTorque

Subscribe to engineTorque

externalTemperature

Subscribe to externalTemperature

fuelLevel

Subscribe to fuelLevel

fuelLevelState

Subscribe to fuelLevelState

fuelRange

Subscribe to fuelRange

gps

Subscribe to gps

headLampStatus

Subscribe to headLampStatus

instantFuelConsumption

Subscribe to instantFuelConsumption

myKey

Subscribe to myKey

odometer

Subscribe to odometer

prndl

Subscribe to prndl

rpm

Subscribe to rpm

speed

Subscribe to speed

steeringWheelAngle

Subscribe to steeringWheelAngle

tirePressure

Subscribe to tirePressure

turnSignal

Subscribe to turnSignal

wiperStatus

Subscribe to wiperStatus

Return Value

A SDLSubscribeVehicleData object

gps

A boolean value. If true, subscribes GPS data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *gps;

Swift

var gps: (NSNumber & SDLBool)? { get set }

speed

A boolean value. If true, subscribes Speed data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *speed;

Swift

var speed: (NSNumber & SDLBool)? { get set }

rpm

A boolean value. If true, subscribes RPM data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *rpm;

Swift

var rpm: (NSNumber & SDLBool)? { get set }

fuelLevel

A boolean value. If true, subscribes Fuel Level data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *fuelLevel;

Swift

var fuelLevel: (NSNumber & SDLBool)? { get set }

fuelLevel_State

A boolean value. If true, subscribes Fuel Level State data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *fuelLevel_State;

Swift

var fuelLevel_State: (NSNumber & SDLBool)? { get set }

fuelRange

A boolean value. If true, subscribes Fuel Range data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *fuelRange;

Swift

var fuelRange: (NSNumber & SDLBool)? { get set }

instantFuelConsumption

A boolean value. If true, subscribes Instant Fuel Consumption data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *instantFuelConsumption;

Swift

var instantFuelConsumption: (NSNumber & SDLBool)? { get set }

externalTemperature

A boolean value. If true, subscribes External Temperature data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *externalTemperature;

Swift

var externalTemperature: (NSNumber & SDLBool)? { get set }

prndl

A boolean value. If true, subscribes PRNDL data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;

Swift

var prndl: (NSNumber & SDLBool)? { get set }

tirePressure

A boolean value. If true, subscribes Tire Pressure status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *tirePressure;

Swift

var tirePressure: (NSNumber & SDLBool)? { get set }

odometer

A boolean value. If true, subscribes Odometer data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *odometer;

Swift

var odometer: (NSNumber & SDLBool)? { get set }

beltStatus

A boolean value. If true, subscribes Belt Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *beltStatus;

Swift

var beltStatus: (NSNumber & SDLBool)? { get set }

bodyInformation

A boolean value. If true, subscribes Body Information data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *bodyInformation;

Swift

var bodyInformation: (NSNumber & SDLBool)? { get set }

deviceStatus

A boolean value. If true, subscribes Device Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *deviceStatus;

Swift

var deviceStatus: (NSNumber & SDLBool)? { get set }

driverBraking

A boolean value. If true, subscribes Driver Braking data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *driverBraking;

Swift

var driverBraking: (NSNumber & SDLBool)? { get set }

wiperStatus

A boolean value. If true, subscribes Wiper Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *wiperStatus;

Swift

var wiperStatus: (NSNumber & SDLBool)? { get set }

headLampStatus

A boolean value. If true, subscribes Head Lamp Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *headLampStatus;

Swift

var headLampStatus: (NSNumber & SDLBool)? { get set }

engineOilLife

A boolean value. If true, subscribes to Engine Oil Life data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *engineOilLife;

Swift

var engineOilLife: (NSNumber & SDLBool)? { get set }

engineTorque

A boolean value. If true, subscribes Engine Torque data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *engineTorque;

Swift

var engineTorque: (NSNumber & SDLBool)? { get set }

accPedalPosition

A boolean value. If true, subscribes Acc Pedal Position data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *accPedalPosition;

Swift

var accPedalPosition: (NSNumber & SDLBool)? { get set }

steeringWheelAngle

A boolean value. If true, subscribes Steering Wheel Angle data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *steeringWheelAngle;

Swift

var steeringWheelAngle: (NSNumber & SDLBool)? { get set }

eCallInfo

A boolean value. If true, subscribes eCall Info data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *eCallInfo;

Swift

var eCallInfo: (NSNumber & SDLBool)? { get set }

airbagStatus

A boolean value. If true, subscribes Airbag Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *airbagStatus;

Swift

var airbagStatus: (NSNumber & SDLBool)? { get set }

emergencyEvent

A boolean value. If true, subscribes Emergency Event data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *emergencyEvent;

Swift

var emergencyEvent: (NSNumber & SDLBool)? { get set }

clusterModeStatus

A boolean value. If true, subscribes Cluster Mode Status data.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *clusterModeStatus;

Swift

var clusterModeStatus: (NSNumber & SDLBool)? { get set }

myKey

A boolean value. If true, subscribes myKey data.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *myKey;

Swift

var myKey: (NSNumber & SDLBool)? { get set }

electronicParkBrakeStatus

A boolean value. If true, subscribes to the electronic parking brake status.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *electronicParkBrakeStatus;

Swift

var electronicParkBrakeStatus: (NSNumber & SDLBool)? { get set }

turnSignal

A boolean value. If true, subscribes to the turn signal status.

Objective-C

@property (readwrite, strong, nonatomic, nullable) NSNumber<SDLBool> *turnSignal;

Swift

var turnSignal: (NSNumber & SDLBool)? { get set }

cloudAppVehicleID

A boolean value. If true, subscribes to the cloud app vehicle ID.

Objective-C

@property (readwrite, strong, nonatomic, nullable)
    NSNumber<SDLBool> *cloudAppVehicleID;

Swift

var cloudAppVehicleID: (NSNumber & SDLBool)? { get set }

-setOEMCustomVehicleData:withVehicleDataState:

Sets the OEM custom vehicle data state for any given OEM custom vehicle data name.

Added in SmartDeviceLink 6.0

Objective-C

- (void)setOEMCustomVehicleData:(nonnull NSString *)vehicleDataName
           withVehicleDataState:(BOOL)vehicleDataState;

Swift

func setOEMCustomVehicleData(name vehicleDataName: String, state vehicleDataState: Bool)

Parameters

vehicleDataName

The name of the OEM custom vehicle data item.

vehicleDataState

A boolean value. If true, requests the OEM custom vehicle data item.

-getOEMCustomVehicleData:

Gets the OEM custom vehicle data value for any given OEM custom vehicle data name.

Added in SmartDeviceLink 6.0

Objective-C

- (nullable NSNumber<SDLBool> *)getOEMCustomVehicleData:
    (nonnull NSString *)vehicleDataName;

Swift

func getOEMCustomVehicleData(_ vehicleDataName: String) -> (NSNumber & SDLBool)?

Parameters

vehicleDataName

The name of the OEM custom vehicle data item.

Return Value

The state of an OEM custom vehicle data item for the given vehicle data name.

View on GitHub.com
Previous Section Next Section