diff options
Diffstat (limited to 'SmartDeviceLink/SDLSubscribeVehicleDataResponse.m')
-rw-r--r-- | SmartDeviceLink/SDLSubscribeVehicleDataResponse.m | 114 |
1 files changed, 111 insertions, 3 deletions
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m index 2d2cf0ba0..fccbaeb97 100644 --- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m +++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m @@ -30,11 +30,11 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#import "SDLSubscribeVehicleDataResponse.h" #import "NSMutableDictionary+Store.h" -#import "SDLVehicleDataResult.h" #import "SDLRPCFunctionNames.h" #import "SDLRPCParameterNames.h" +#import "SDLSubscribeVehicleDataResponse.h" +#import "SDLVehicleDataResult.h" NS_ASSUME_NONNULL_BEGIN @@ -42,7 +42,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" -- (instancetype)init { +- (nullable instancetype)init { self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData]; if (!self) { return nil; @@ -51,6 +51,114 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop +- (nullable instancetype)initWithAccPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition + airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus + beltStatus:(nullable SDLVehicleDataResult *)beltStatus + bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation + cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID + clusterModes:(nullable SDLVehicleDataResult *)clusterModes + deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus + driverBraking:(nullable SDLVehicleDataResult *)driverBraking + eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo + electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus + emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent + engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife + engineTorque:(nullable SDLVehicleDataResult *)engineTorque + externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature + fuelLevel:(nullable SDLVehicleDataResult *)fuelLevel + fuelLevel_State:(nullable SDLVehicleDataResult *)fuelLevel_State + fuelRange:(nullable SDLVehicleDataResult *)fuelRange + gps:(nullable SDLVehicleDataResult *)gps + handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering + headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus + instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption + myKey:(nullable SDLVehicleDataResult *)myKey + odometer:(nullable SDLVehicleDataResult *)odometer + prndl:(nullable SDLVehicleDataResult *)prndl + rpm:(nullable SDLVehicleDataResult *)rpm + speed:(nullable SDLVehicleDataResult *)speed + steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle + tirePressure:(nullable SDLVehicleDataResult *)tirePressure + turnSignal:(nullable SDLVehicleDataResult *)turnSignal + wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus +{ + self = [self init]; + if (!self) { + return nil; + } + + self.accPedalPosition = accPedalPosition; + self.airbagStatus = airbagStatus; + self.beltStatus = beltStatus; + self.bodyInformation = bodyInformation; + self.cloudAppVehicleID = cloudAppVehicleID; + self.clusterModes = clusterModes; + self.deviceStatus = deviceStatus; + self.driverBraking = driverBraking; + self.eCallInfo = eCallInfo; + self.electronicParkBrakeStatus = electronicParkBrakeStatus; + self.emergencyEvent = emergencyEvent; + self.engineOilLife = engineOilLife; + self.engineTorque = engineTorque; + self.externalTemperature = externalTemperature; + self.fuelLevel = fuelLevel; + self.fuelLevel_State = fuelLevel_State; + self.fuelRange = fuelRange; + self.gps = gps; + self.handsOffSteering = handsOffSteering; + self.headLampStatus = headLampStatus; + self.instantFuelConsumption = instantFuelConsumption; + self.myKey = myKey; + self.odometer = odometer; + self.prndl = prndl; + self.rpm = rpm; + self.speed = speed; + self.steeringWheelAngle = steeringWheelAngle; + self.tirePressure = tirePressure; + self.turnSignal = turnSignal; + self.wiperStatus = wiperStatus; + + return self; +} + +- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm fuelLevel:(nullable SDLVehicleDataResult *)fuelLevel fuelLevel_State:(nullable SDLVehicleDataResult *)fuelLevel_State instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal prndl:(nullable SDLVehicleDataResult *)prndl tirePressure:(nullable SDLVehicleDataResult *)tirePressure odometer:(nullable SDLVehicleDataResult *)odometer beltStatus:(nullable SDLVehicleDataResult *)beltStatus bodyInformation:(nullable SDLVehicleDataResult *)bodyInformation deviceStatus:(nullable SDLVehicleDataResult *)deviceStatus driverBraking:(nullable SDLVehicleDataResult *)driverBraking wiperStatus:(nullable SDLVehicleDataResult *)wiperStatus headLampStatus:(nullable SDLVehicleDataResult *)headLampStatus engineTorque:(nullable SDLVehicleDataResult *)engineTorque accPedalPosition:(nullable SDLVehicleDataResult *)accPedalPosition steeringWheelAngle:(nullable SDLVehicleDataResult *)steeringWheelAngle engineOilLife:(nullable SDLVehicleDataResult *)engineOilLife electronicParkBrakeStatus:(nullable SDLVehicleDataResult *)electronicParkBrakeStatus cloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID eCallInfo:(nullable SDLVehicleDataResult *)eCallInfo airbagStatus:(nullable SDLVehicleDataResult *)airbagStatus emergencyEvent:(nullable SDLVehicleDataResult *)emergencyEvent clusterModes:(nullable SDLVehicleDataResult *)clusterModes myKey:(nullable SDLVehicleDataResult *)myKey handsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering { + self = [super init]; + if (!self) { + return nil; + } + self.gps = gps; + self.speed = speed; + self.rpm = rpm; + self.fuelLevel = fuelLevel; + self.fuelLevel_State = fuelLevel_State; + self.instantFuelConsumption = instantFuelConsumption; + self.fuelRange = fuelRange; + self.externalTemperature = externalTemperature; + self.turnSignal = turnSignal; + self.prndl = prndl; + self.tirePressure = tirePressure; + self.odometer = odometer; + self.beltStatus = beltStatus; + self.bodyInformation = bodyInformation; + self.deviceStatus = deviceStatus; + self.driverBraking = driverBraking; + self.wiperStatus = wiperStatus; + self.headLampStatus = headLampStatus; + self.engineTorque = engineTorque; + self.accPedalPosition = accPedalPosition; + self.steeringWheelAngle = steeringWheelAngle; + self.engineOilLife = engineOilLife; + self.electronicParkBrakeStatus = electronicParkBrakeStatus; + self.cloudAppVehicleID = cloudAppVehicleID; + self.eCallInfo = eCallInfo; + self.airbagStatus = airbagStatus; + self.emergencyEvent = emergencyEvent; + self.clusterModes = clusterModes; + self.myKey = myKey; + self.handsOffSteering = handsOffSteering; + return self; +} + - (void)setGps:(nullable SDLVehicleDataResult *)gps { [self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS]; } |