diff options
author | NicoleYarroch <nicole@livio.io> | 2020-08-28 15:34:11 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-28 15:34:11 -0400 |
commit | 4376899c9d88ad441078143bcaad59001dbc7309 (patch) | |
tree | ae8b177e4f263d2d02f63a8635bcd1381529af6b | |
parent | e5975a4c8f0b9109b42e3192cd5ac3d576ae0f6c (diff) | |
parent | 34f202d88fe559c6f69b2132efe7791d85af0dbb (diff) | |
download | sdl_ios-4376899c9d88ad441078143bcaad59001dbc7309.tar.gz |
Merge pull request #1694 from yoooriii/feature/0261_vehicle_data_WindowStatus
[SDL-0261] New vehicle data WindowStatus
37 files changed, 768 insertions, 167 deletions
diff --git a/Example Apps/Example ObjC/VehicleDataManager.m b/Example Apps/Example ObjC/VehicleDataManager.m index 8e8d3b9a6..e7a8b0079 100644 --- a/Example Apps/Example ObjC/VehicleDataManager.m +++ b/Example Apps/Example ObjC/VehicleDataManager.m @@ -144,11 +144,12 @@ NS_ASSUME_NONNULL_BEGIN SDLLogD(@"App has permission to access vehicle data. Requesting vehicle data..."); - SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES]; + SDLGetVehicleData *getAllVehicleData = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES]; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" getAllVehicleData.fuelLevel = @YES; getAllVehicleData.fuelLevel_State = @YES; + getAllVehicleData.prndl = @YES; #pragma clang diagnostic pop [manager sendRequest:getAllVehicleData withResponseHandler:^(__kindof SDLRPCRequest * _Nullable request, __kindof SDLRPCResponse * _Nullable response, NSError * _Nullable error) { diff --git a/SmartDeviceLink-iOS.podspec b/SmartDeviceLink-iOS.podspec index 8309e52d5..ab29f5b45 100644 --- a/SmartDeviceLink-iOS.podspec +++ b/SmartDeviceLink-iOS.podspec @@ -457,6 +457,8 @@ s.public_header_files = [ 'SmartDeviceLink/SDLWeatherServiceManifest.h', 'SmartDeviceLink/SDLWiperStatus.h', 'SmartDeviceLink/SDLWindowCapability.h', +'SmartDeviceLink/SDLWindowState.h', +'SmartDeviceLink/SDLWindowStatus.h', 'SmartDeviceLink/SDLWindowType.h', 'SmartDeviceLink/SDLWindowTypeCapabilities.h', 'SmartDeviceLink/SmartDeviceLink.h', diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 12ce7b388..ae70e6fd9 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -1589,6 +1589,12 @@ 9FE2471522D77AD500F8D2FC /* SDLWindowType.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471322D77AD500F8D2FC /* SDLWindowType.h */; settings = {ATTRIBUTES = (Public, ); }; }; 9FE2471622D77AD500F8D2FC /* SDLWindowType.m in Sources */ = {isa = PBXBuildFile; fileRef = 9FE2471422D77AD500F8D2FC /* SDLWindowType.m */; }; 9FE2471922D77AED00F8D2FC /* SDLPredefinedWindows.h in Headers */ = {isa = PBXBuildFile; fileRef = 9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B38D8E6524A029F700B977D0 /* SDLWindowStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */; }; + B38D8E6624A029F700B977D0 /* SDLWindowStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B38D8E6924A02A4800B977D0 /* SDLWindowState.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6724A02A4700B977D0 /* SDLWindowState.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B38D8E6A24A02A4800B977D0 /* SDLWindowState.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6824A02A4800B977D0 /* SDLWindowState.m */; }; + B38D8E7B24A0E11C00B977D0 /* SDLWindowStatusSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */; }; + B38D8E7C24A0E11C00B977D0 /* SDLWindowStateSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */; }; B38D8E61249FE28500B977D0 /* SDLCapacityUnit.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E5F249FE28500B977D0 /* SDLCapacityUnit.h */; settings = {ATTRIBUTES = (Public, ); }; }; B38D8E62249FE28500B977D0 /* SDLCapacityUnit.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E60249FE28500B977D0 /* SDLCapacityUnit.m */; }; B38D8E8224A1F53500B977D0 /* SDLCapacityUnitSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */; }; @@ -3404,6 +3410,12 @@ 9FE2471322D77AD500F8D2FC /* SDLWindowType.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLWindowType.h; sourceTree = "<group>"; }; 9FE2471422D77AD500F8D2FC /* SDLWindowType.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLWindowType.m; sourceTree = "<group>"; }; 9FE2471722D77AED00F8D2FC /* SDLPredefinedWindows.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLPredefinedWindows.h; sourceTree = "<group>"; }; + B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStatus.m; sourceTree = "<group>"; }; + B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLWindowStatus.h; sourceTree = "<group>"; }; + B38D8E6724A02A4700B977D0 /* SDLWindowState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLWindowState.h; sourceTree = "<group>"; }; + B38D8E6824A02A4800B977D0 /* SDLWindowState.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowState.m; sourceTree = "<group>"; }; + B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStatusSpec.m; sourceTree = "<group>"; }; + B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLWindowStateSpec.m; sourceTree = "<group>"; }; B38D8E5F249FE28500B977D0 /* SDLCapacityUnit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLCapacityUnit.h; sourceTree = "<group>"; }; B38D8E60249FE28500B977D0 /* SDLCapacityUnit.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLCapacityUnit.m; sourceTree = "<group>"; }; B38D8E8124A1F53500B977D0 /* SDLCapacityUnitSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCapacityUnitSpec.m; sourceTree = "<group>"; }; @@ -4051,6 +4063,8 @@ 000DD56B22EEF8E4005AB7A7 /* SDLSeatLocationCapabilitySpec.m */, 000DD56D22EF01FC005AB7A7 /* SDLSeatLocationSpec.m */, 9FA0CFFF22DF06A0009CF344 /* SDLWindowCapabilitySpec.m */, + B38D8E7A24A0E11C00B977D0 /* SDLWindowStateSpec.m */, + B38D8E7924A0E11C00B977D0 /* SDLWindowStatusSpec.m */, 9FA0D00222DF06B9009CF344 /* SDLWindowTypeCapabilitiesSpec.m */, ); path = StructSpecs; @@ -5123,6 +5137,10 @@ 0055413122D75A7B003194D3 /* SDLSeatLocationCapability.m */, 9F425AD022DD980200BE3245 /* SDLWindowCapability.h */, 9F425AD122DD980200BE3245 /* SDLWindowCapability.m */, + B38D8E6724A02A4700B977D0 /* SDLWindowState.h */, + B38D8E6824A02A4800B977D0 /* SDLWindowState.m */, + B38D8E6424A029F700B977D0 /* SDLWindowStatus.h */, + B38D8E6324A029F700B977D0 /* SDLWindowStatus.m */, 9F425AD422DD981E00BE3245 /* SDLWindowTypeCapabilities.h */, 9F425AD522DD981E00BE3245 /* SDLWindowTypeCapabilities.m */, ); @@ -6981,6 +6999,7 @@ 884E701B21FB8D0F008D53BA /* SDLPublishAppService.h in Headers */, 5DA23FFD1F312DBA009C0313 /* SDLVideoEncoderDelegate.h in Headers */, EE7B6124205BF97B00E0655B /* SDLControlFramePayloadRegisterSecondaryTransportNak.h in Headers */, + B38D8E6624A029F700B977D0 /* SDLWindowStatus.h in Headers */, 5D61FCE01A84238C00846EE7 /* SDLKeyboardEvent.h in Headers */, 5D3E48751D6F3B330000BFEF /* SDLAsynchronousOperation.h in Headers */, 88AF11DC220B6B3D00A59985 /* SDLPerformAppServiceInteraction.h in Headers */, @@ -7236,6 +7255,7 @@ 7538764F22D8CEDB00FE8484 /* SDLShowAppMenu.h in Headers */, 1E5AD0841F20B9290029B8AF /* SDLButtonPressResponse.h in Headers */, 1E5AD0681F2080B50029B8AF /* SDLRadioControlData.h in Headers */, + B38D8E6924A02A4800B977D0 /* SDLWindowState.h in Headers */, 1E5AD0481F1F773E0029B8AF /* SDLModuleType.h in Headers */, 88B58DC622204AF10011B063 /* SDLNavigationAction.h in Headers */, 1E5AD06C1F208BAB0029B8AF /* SDLClimateControlData.h in Headers */, @@ -7688,6 +7708,7 @@ DA9F7E801DCC028B00ACAE48 /* SDLOnWayPointChange.m in Sources */, 5D92935B20B33D4F00FCC775 /* SDLChoiceCell.m in Sources */, E4139D1E1F6017770005B6EA /* SDLLifecycleConfigurationUpdate.m in Sources */, + B38D8E6A24A02A4800B977D0 /* SDLWindowState.m in Sources */, 5D61FC6E1A84238C00846EE7 /* SDLCreateInteractionChoiceSetResponse.m in Sources */, 888DBAF022D528DE002A0AE2 /* SDLCloseApplicationResponse.m in Sources */, 5D61FD061A84238C00846EE7 /* SDLOnButtonPress.m in Sources */, @@ -7716,6 +7737,7 @@ 5D61FD261A84238C00846EE7 /* SDLPerformAudioPassThru.m in Sources */, 1EAA471E203410BB000FE74B /* SDLAudioControlCapabilities.m in Sources */, 88BCEA932266250B00BB7E70 /* SDLIAPControlSession.m in Sources */, + B38D8E6524A029F700B977D0 /* SDLWindowStatus.m in Sources */, 5D61FC971A84238C00846EE7 /* SDLECallConfirmationStatus.m in Sources */, 8816772D222097C3001FACFF /* SDLNavigationServiceData.m in Sources */, 1E5AD04D1F1F79640029B8AF /* SDLDefrostZone.m in Sources */, @@ -8341,6 +8363,7 @@ 5DCC458D221C9F6600036C2F /* SDLVersionSpec.m in Sources */, 1EE8C45D1F387D1C00FDC2CF /* SDLGetInteriorVehicleDataResponseSpec.m in Sources */, 162E82F21A9BDE8B00906325 /* SDLPredefinedLayoutSpec.m in Sources */, + B38D8E7B24A0E11C00B977D0 /* SDLWindowStatusSpec.m in Sources */, 162E83521A9BDE8B00906325 /* SDLDeleteSubMenuResponseSpec.m in Sources */, 162E82E91A9BDE8B00906325 /* SDLKeypressModeSpec.m in Sources */, 162E83211A9BDE8B00906325 /* SDLRPCPayloadSpec.m in Sources */, @@ -8368,6 +8391,7 @@ 1680B1141A9CD7AD00DBD79E /* SDLV1ProtocolHeaderSpec.m in Sources */, 880D2680220E038800B3F496 /* SDLWeatherServiceManifestSpec.m in Sources */, 88EEC5BE220A3B8B005AA2F9 /* SDLPublishAppServiceResponseSpec.m in Sources */, + B38D8E7C24A0E11C00B977D0 /* SDLWindowStateSpec.m in Sources */, 1680B1161A9CD7AD00DBD79E /* SDLProtocolMessageSpec.m in Sources */, DA9F7EB21DCC084300ACAE48 /* SDLDeliveryModeSpec.m in Sources */, 162E83771A9BDE8B00906325 /* SDLClusterModeStatusSpec.m in Sources */, diff --git a/SmartDeviceLink.podspec b/SmartDeviceLink.podspec index d04994eb8..cc51e1ea7 100644 --- a/SmartDeviceLink.podspec +++ b/SmartDeviceLink.podspec @@ -461,6 +461,8 @@ sdefault.public_header_files = [ 'SmartDeviceLink/SDLWeatherServiceManifest.h', 'SmartDeviceLink/SDLWiperStatus.h', 'SmartDeviceLink/SDLWindowCapability.h', +'SmartDeviceLink/SDLWindowState.h', +'SmartDeviceLink/SDLWindowStatus.h', 'SmartDeviceLink/SDLWindowType.h', 'SmartDeviceLink/SDLWindowTypeCapabilities.h', 'SmartDeviceLink/SmartDeviceLink.h', diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h index e162aef25..6084e56ee 100644 --- a/SmartDeviceLink/SDLGetVehicleData.h +++ b/SmartDeviceLink/SDLGetVehicleData.h @@ -47,8 +47,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Get wiperStatus data * @return A SDLGetVehicleData object */ -- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); - +- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for getting data for all possible vehicle data items. @@ -84,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Get wiperStatus data * @return A SDLGetVehicleData object */ -- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for getting data for all possible vehicle data items. @@ -121,8 +120,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Get wiperStatus data * @return A SDLGetVehicleData object */ -- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); - +- (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for getting data for all possible vehicle data items. @@ -156,9 +154,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModeStatus - clusterModeStatus * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLGetVehicleData object */ -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering; +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus; /** * See GearStatus @@ -251,6 +250,13 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, strong, nonatomic) NSNumber<SDLBool> *driverBraking; /** + * See WindowStatus + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus; + +/** * A boolean value. If true, requests Wiper Status data. */ @property (nullable, strong, nonatomic) NSNumber<SDLBool> *wiperStatus; diff --git a/SmartDeviceLink/SDLGetVehicleData.m b/SmartDeviceLink/SDLGetVehicleData.m index 8a0fa1519..875b90711 100644 --- a/SmartDeviceLink/SDLGetVehicleData.m +++ b/SmartDeviceLink/SDLGetVehicleData.m @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic pop - (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN } - (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -49,12 +49,8 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (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 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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus { - return [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; -} - - (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 vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) vin:@(vin) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -66,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal vin:(nullable NSNumber<SDLBool> *)vin gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus { self = [self init]; if (!self) { return nil; @@ -100,6 +96,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModeStatus = clusterModeStatus; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -343,6 +340,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSNumber.class error:nil]; } +- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; +} + +- (nullable NSNumber<SDLBool> *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error]; +} + - (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus { [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus]; } diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h index 022ba7af0..4db703901 100644 --- a/SmartDeviceLink/SDLGetVehicleDataResponse.h +++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h @@ -23,6 +23,7 @@ @class SDLHeadLampStatus; @class SDLMyKey; @class SDLTireStatus; +@class SDLWindowStatus; /** @@ -67,9 +68,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModeStatus - clusterModeStatus * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLGetVehicleDataResponse object */ -- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering; +- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus; /** * See GearStatus @@ -164,6 +166,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking; /** + * See WindowStatus + * {"array_min_size": 0, "array_max_size": 100} + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) NSArray<SDLWindowStatus *> *windowStatus; + +/** The status of the wipers */ @property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus; @@ -250,7 +260,7 @@ NS_ASSUME_NONNULL_BEGIN /** Gets the OEM custom vehicle data item for any given OEM custom vehicle data name. - + @param vehicleDataName The name of the OEM custom vehicle data item. @return An OEM custom vehicle data object for the given vehicle data name. diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink/SDLGetVehicleDataResponse.m index 0f6f12802..355246692 100644 --- a/SmartDeviceLink/SDLGetVehicleDataResponse.m +++ b/SmartDeviceLink/SDLGetVehicleDataResponse.m @@ -20,6 +20,7 @@ #import "SDLRPCParameterNames.h" #import "SDLRPCFunctionNames.h" #import "SDLTireStatus.h" +#import "SDLWindowStatus.h" NS_ASSUME_NONNULL_BEGIN @@ -36,8 +37,7 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop -- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { - self = [self init]; +- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus { self = [self init]; if (!self) { return nil; } @@ -70,6 +70,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModeStatus = clusterModeStatus; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -210,6 +211,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_enumForName:SDLRPCParameterNameDriverBraking error:nil]; } +- (void)setWindowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; +} + +- (nullable NSArray<SDLWindowStatus *> *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectsForName:SDLRPCParameterNameWindowStatus ofClass:SDLWindowStatus.class error:&error]; +} + - (void)setWiperStatus:(nullable SDLWiperStatus)wiperStatus { [self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus]; } @@ -218,6 +228,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_enumForName:SDLRPCParameterNameWiperStatus error:nil]; } +- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable NSNumber<SDLBool> *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +} + - (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -330,15 +349,6 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSObject.class error:nil]; } -- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; -} - -- (nullable NSNumber<SDLBool> *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; -} - @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink/SDLOnVehicleData.h index 7a749c13d..8423141f4 100644 --- a/SmartDeviceLink/SDLOnVehicleData.h +++ b/SmartDeviceLink/SDLOnVehicleData.h @@ -23,6 +23,7 @@ @class SDLHeadLampStatus; @class SDLMyKey; @class SDLTireStatus; +@class SDLWindowStatus; /** @@ -67,9 +68,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModeStatus - clusterModeStatus * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLOnVehicleData object */ -- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering; +- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus; /** * See GearStatus @@ -164,6 +166,14 @@ NS_ASSUME_NONNULL_BEGIN @property (nullable, strong, nonatomic) SDLVehicleDataEventStatus driverBraking; /** + * See WindowStatus + * {"array_min_size": 0, "array_max_size": 100} + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) NSArray<SDLWindowStatus *> *windowStatus; + +/** The status of the wipers */ @property (nullable, strong, nonatomic) SDLWiperStatus wiperStatus; diff --git a/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink/SDLOnVehicleData.m index 914a6246f..f215173a7 100644 --- a/SmartDeviceLink/SDLOnVehicleData.m +++ b/SmartDeviceLink/SDLOnVehicleData.m @@ -19,6 +19,7 @@ #import "SDLRPCParameterNames.h" #import "SDLRPCFunctionNames.h" #import "SDLTireStatus.h" +#import "SDLWindowStatus.h" NS_ASSUME_NONNULL_BEGIN @@ -35,7 +36,7 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop -- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { +- (instancetype)initWithGps:(nullable SDLGPSData *)gps speed:(float)speed rpm:(nullable NSNumber<SDLUInt> *)rpm instantFuelConsumption:(float)instantFuelConsumption fuelRange:(nullable NSArray<SDLFuelRange *> *)fuelRange externalTemperature:(float)externalTemperature turnSignal:(nullable SDLTurnSignal)turnSignal vin:(nullable NSString *)vin gearStatus:(nullable SDLGearStatus *)gearStatus tirePressure:(nullable SDLTireStatus *)tirePressure odometer:(nullable NSNumber<SDLUInt> *)odometer beltStatus:(nullable SDLBeltStatus *)beltStatus bodyInformation:(nullable SDLBodyInformation *)bodyInformation deviceStatus:(nullable SDLDeviceStatus *)deviceStatus driverBraking:(nullable SDLVehicleDataEventStatus)driverBraking wiperStatus:(nullable SDLWiperStatus)wiperStatus headLampStatus:(nullable SDLHeadLampStatus *)headLampStatus engineTorque:(float)engineTorque accPedalPosition:(float)accPedalPosition steeringWheelAngle:(float)steeringWheelAngle engineOilLife:(float)engineOilLife electronicParkBrakeStatus:(nullable SDLElectronicParkBrakeStatus)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSString *)cloudAppVehicleID eCallInfo:(nullable SDLECallInfo *)eCallInfo airbagStatus:(nullable SDLAirbagStatus *)airbagStatus emergencyEvent:(nullable SDLEmergencyEvent *)emergencyEvent clusterModeStatus:(nullable SDLClusterModeStatus *)clusterModeStatus myKey:(nullable SDLMyKey *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus { self = [self init]; if (!self) { return nil; @@ -69,6 +70,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModeStatus = clusterModeStatus; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -217,6 +219,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_enumForName:SDLRPCParameterNameWiperStatus error:nil]; } +- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable NSNumber<SDLBool> *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +} + - (void)setHeadLampStatus:(nullable SDLHeadLampStatus *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -321,21 +332,20 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSString.class error:nil]; } -- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(NSObject *)vehicleDataState { - [self.parameters sdl_setObject:vehicleDataState forName:vehicleDataName]; +- (void)setWindowStatus:(nullable NSArray<SDLWindowStatus *> *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; } -- (nullable NSObject *)getOEMCustomVehicleData:(NSString *)vehicleDataName { - return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSObject.class error:nil]; +- (nullable NSArray<SDLWindowStatus *> *)windowStatus { + return [self.parameters sdl_objectsForName:SDLRPCParameterNameWindowStatus ofClass:SDLWindowStatus.class error:nil]; } -- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(NSObject *)vehicleDataState { + [self.parameters sdl_setObject:vehicleDataState forName:vehicleDataName]; } -- (nullable NSNumber<SDLBool> *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +- (nullable NSObject *)getOEMCustomVehicleData:(NSString *)vehicleDataName { + return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSObject.class error:nil]; } @end diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h index d65c9eeb1..a782281b1 100644 --- a/SmartDeviceLink/SDLRPCParameterNames.h +++ b/SmartDeviceLink/SDLRPCParameterNames.h @@ -68,6 +68,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameAmbientLightStatus; extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperature; extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureHigh; extern SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureLow; +extern SDLRPCParameterName const SDLRPCParameterNameApproximatePosition; extern SDLRPCParameterName const SDLRPCParameterNameAppBundleId; extern SDLRPCParameterName const SDLRPCParameterNameAppDisplayName; extern SDLRPCParameterName const SDLRPCParameterNameAppHMIType; @@ -177,6 +178,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameDesiredTemperatureAvailable; extern SDLRPCParameterName const SDLRPCParameterNameDestination; extern SDLRPCParameterName const SDLRPCParameterNameDestinationETA; extern SDLRPCParameterName const SDLRPCParameterNameDetails; +extern SDLRPCParameterName const SDLRPCParameterNameDeviation; extern SDLRPCParameterName const SDLRPCParameterNameDeviceInfo; extern SDLRPCParameterName const SDLRPCParameterNameDeviceStatus; extern SDLRPCParameterName const SDLRPCParameterNameDiagonalScreenSize; @@ -766,6 +768,7 @@ extern SDLRPCParameterName const SDLRPCParameterNameWiperStatus; extern SDLRPCParameterName const SDLRPCParameterNameWindowCapabilities; extern SDLRPCParameterName const SDLRPCParameterNameWindowId; extern SDLRPCParameterName const SDLRPCParameterNameWindowName; +extern SDLRPCParameterName const SDLRPCParameterNameWindowStatus; extern SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported; extern SDLRPCParameterName const SDLRPCParameterNameX; extern SDLRPCParameterName const SDLRPCParameterNameY; diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m index dc6915683..b705b8f1a 100644 --- a/SmartDeviceLink/SDLRPCParameterNames.m +++ b/SmartDeviceLink/SDLRPCParameterNames.m @@ -66,6 +66,7 @@ SDLRPCParameterName const SDLRPCParameterNameAmbientLightStatus = @"ambientLight SDLRPCParameterName const SDLRPCParameterNameApparentTemperature = @"apparentTemperature"; SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureHigh = @"apparentTemperatureHigh"; SDLRPCParameterName const SDLRPCParameterNameApparentTemperatureLow = @"apparentTemperatureLow"; +SDLRPCParameterName const SDLRPCParameterNameApproximatePosition = @"approximatePosition"; SDLRPCParameterName const SDLRPCParameterNameAppBundleId = @"appBundleID"; SDLRPCParameterName const SDLRPCParameterNameAppHMIType = @"appHMIType"; SDLRPCParameterName const SDLRPCParameterNameAppId = @"appID"; @@ -176,6 +177,7 @@ SDLRPCParameterName const SDLRPCParameterNameDestinationETA = @"destinationETA"; SDLRPCParameterName const SDLRPCParameterNameDeviceInfo = @"deviceInfo"; SDLRPCParameterName const SDLRPCParameterNameDeviceStatus = @"deviceStatus"; SDLRPCParameterName const SDLRPCParameterNameDetails = @"details"; +SDLRPCParameterName const SDLRPCParameterNameDeviation = @"deviation"; SDLRPCParameterName const SDLRPCParameterNameDiagonalScreenSize = @"diagonalScreenSize"; SDLRPCParameterName const SDLRPCParameterNameDialNumberEnabled = @"dialNumberEnabled"; SDLRPCParameterName const SDLRPCParameterNameDIDLocation = @"didLocation"; @@ -761,6 +763,7 @@ SDLRPCParameterName const SDLRPCParameterNameWiperStatus = @"wiperStatus"; SDLRPCParameterName const SDLRPCParameterNameWindowCapabilities = @"windowCapabilities"; SDLRPCParameterName const SDLRPCParameterNameWindowId = @"windowID"; SDLRPCParameterName const SDLRPCParameterNameWindowName = @"windowName"; +SDLRPCParameterName const SDLRPCParameterNameWindowStatus = @"windowStatus"; SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported = @"windowTypeSupported"; SDLRPCParameterName const SDLRPCParameterNameX = @"x"; SDLRPCParameterName const SDLRPCParameterNameY = @"y"; diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h index e4b9f0762..bcd05c2fc 100644 --- a/SmartDeviceLink/SDLSubscribeVehicleData.h +++ b/SmartDeviceLink/SDLSubscribeVehicleData.h @@ -48,7 +48,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Subscribe to wiperStatus * @return A SDLSubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for subscribing to all possible vehicle data items. @@ -83,7 +83,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Subscribe to wiperStatus * @return A SDLSubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for subscribing to all possible vehicle data items. @@ -119,7 +119,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Subscribe to wiperStatus * @return A SDLSubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for subscribing to all possible vehicle data items. @@ -152,9 +152,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModeStatus - clusterModeStatus * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLSubscribeVehicleData object */ -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering; +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus; /** * See GearStatus @@ -242,6 +243,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking; /** + * See WindowStatus + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus; + +/** * A boolean value. If true, subscribes Wiper Status data. */ @property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus; diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.m b/SmartDeviceLink/SDLSubscribeVehicleData.m index 98eaf936a..fc26ddbd4 100644 --- a/SmartDeviceLink/SDLSubscribeVehicleData.m +++ b/SmartDeviceLink/SDLSubscribeVehicleData.m @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic pop - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN } - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN } - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -63,7 +63,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus { self = [self init]; if (!self) { return nil; @@ -96,6 +96,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModeStatus = clusterModeStatus; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -227,6 +228,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:NSNumber.class error:nil]; } +- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; +} + +- (nullable NSNumber<SDLBool> *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error]; +} + - (void)setWiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus { [self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus]; } @@ -235,6 +245,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:NSNumber.class error:nil]; } +- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable NSNumber<SDLBool> *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +} + - (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -347,15 +366,6 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSNumber.class error:nil]; } -- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; -} - -- (nullable NSNumber<SDLBool> *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; -} - @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h index 598eef10e..fa66f4fbf 100644 --- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h +++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h @@ -17,7 +17,7 @@ NS_ASSUME_NONNULL_BEGIN @interface SDLSubscribeVehicleDataResponse : SDLRPCResponse /** - * Convenience init for setting all data on vehicle data items. + * Convenience init for setting all possible values on vehicle data items. * * @param gps - gps * @param speed - speed @@ -47,9 +47,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModes - clusterModes * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLSubscribeVehicleDataResponse object */ -- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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; +- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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 windowStatus:(nullable SDLVehicleDataResult *)windowStatus; /** * See GearStatus @@ -165,6 +166,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking; /** + * See WindowStatus + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) SDLVehicleDataResult *windowStatus; + +/** The result of requesting to subscribe to the status of the wipers. Optional diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m index 0f9982431..ec2432d80 100644 --- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m +++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop -- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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; { +- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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 windowStatus:(nullable SDLVehicleDataResult *)windowStatus { self = [self init]; if (!self) { return nil; @@ -57,6 +57,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModes = clusterModes; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -188,6 +189,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:SDLVehicleDataResult.class error:nil]; } +- (void)setWindowStatus:(nullable SDLVehicleDataResult *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; +} + +- (nullable SDLVehicleDataResult *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:SDLVehicleDataResult.class error:&error]; +} + - (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus { [self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus]; } @@ -196,6 +206,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:SDLVehicleDataResult.class error:nil]; } +- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable SDLVehicleDataResult *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error]; +} + - (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -308,15 +327,6 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:vehicleDataName ofClass:SDLVehicleDataResult.class error:nil]; } -- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; -} - -- (nullable SDLVehicleDataResult *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error]; -} - @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h index 93147b11a..c1d2930e7 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleData.h +++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.h @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Unsubscribe to wiperStatus * @return A SDLUnsubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for unsubscribing to all possible vehicle data items. @@ -85,7 +85,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Unsubscribe to wiperStatus * @return A SDLUnsubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for unsubscribing to all possible vehicle data items. @@ -121,7 +121,7 @@ NS_ASSUME_NONNULL_BEGIN * @param wiperStatus Unsubscribe to wiperStatus * @return A SDLUnsubscribeVehicleData object */ -- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering: instead"); +- (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 __deprecated_msg("Use initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus: instead"); /** * Convenience init for unsubscribing from all possible vehicle data items. @@ -154,9 +154,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModeStatus - clusterModeStatus * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLUnsubscribeVehicleData object */ -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering; +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus; /** * See GearStatus @@ -244,6 +245,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) NSNumber<SDLBool> *driverBraking; /** + * See WindowStatus + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) NSNumber<SDLBool> *windowStatus; + +/** * If true, unsubscribes from Wiper Status */ @property (strong, nonatomic, nullable) NSNumber<SDLBool> *wiperStatus; diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.m b/SmartDeviceLink/SDLUnsubscribeVehicleData.m index 07174a8e0..3db5afa69 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleData.m +++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.m @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN #pragma clang diagnostic pop - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:nil externalTemperature:@(externalTemperature) turnSignal:nil gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:nil electronicParkBrakeStatus:nil cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -37,7 +37,7 @@ NS_ASSUME_NONNULL_BEGIN } - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:nil eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN } - (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 { - self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil]; + self = [self initWithGps:@(gps) speed:@(speed) rpm:@(rpm) instantFuelConsumption:@(instantFuelConsumption) fuelRange:@(fuelRange) externalTemperature:@(externalTemperature) turnSignal:@(turnSignal) gearStatus:nil tirePressure:@(tirePressure) odometer:@(odometer) beltStatus:@(beltStatus) bodyInformation:@(bodyInformation) deviceStatus:@(deviceStatus) driverBraking:@(driverBraking) wiperStatus:@(wiperStatus) headLampStatus:@(headLampStatus) engineTorque:@(engineTorque) accPedalPosition:@(accelerationPedalPosition) steeringWheelAngle:@(steeringWheelAngle) engineOilLife:@(engineOilLife) electronicParkBrakeStatus:@(electronicParkBrakeStatus) cloudAppVehicleID:@(cloudAppVehicleID) eCallInfo:@(eCallInfo) airbagStatus:@(airbagStatus) emergencyEvent:@(emergencyEvent) clusterModeStatus:@(clusterModeStatus) myKey:@(myKey) handsOffSteering:nil windowStatus:nil]; if (self) { #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -62,7 +62,7 @@ NS_ASSUME_NONNULL_BEGIN return self; } -- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { +- (instancetype)initWithGps:(nullable NSNumber<SDLBool> *)gps speed:(nullable NSNumber<SDLBool> *)speed rpm:(nullable NSNumber<SDLBool> *)rpm instantFuelConsumption:(nullable NSNumber<SDLBool> *)instantFuelConsumption fuelRange:(nullable NSNumber<SDLBool> *)fuelRange externalTemperature:(nullable NSNumber<SDLBool> *)externalTemperature turnSignal:(nullable NSNumber<SDLBool> *)turnSignal gearStatus:(nullable NSNumber<SDLBool> *)gearStatus tirePressure:(nullable NSNumber<SDLBool> *)tirePressure odometer:(nullable NSNumber<SDLBool> *)odometer beltStatus:(nullable NSNumber<SDLBool> *)beltStatus bodyInformation:(nullable NSNumber<SDLBool> *)bodyInformation deviceStatus:(nullable NSNumber<SDLBool> *)deviceStatus driverBraking:(nullable NSNumber<SDLBool> *)driverBraking wiperStatus:(nullable NSNumber<SDLBool> *)wiperStatus headLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus engineTorque:(nullable NSNumber<SDLBool> *)engineTorque accPedalPosition:(nullable NSNumber<SDLBool> *)accPedalPosition steeringWheelAngle:(nullable NSNumber<SDLBool> *)steeringWheelAngle engineOilLife:(nullable NSNumber<SDLBool> *)engineOilLife electronicParkBrakeStatus:(nullable NSNumber<SDLBool> *)electronicParkBrakeStatus cloudAppVehicleID:(nullable NSNumber<SDLBool> *)cloudAppVehicleID eCallInfo:(nullable NSNumber<SDLBool> *)eCallInfo airbagStatus:(nullable NSNumber<SDLBool> *)airbagStatus emergencyEvent:(nullable NSNumber<SDLBool> *)emergencyEvent clusterModeStatus:(nullable NSNumber<SDLBool> *)clusterModeStatus myKey:(nullable NSNumber<SDLBool> *)myKey handsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering windowStatus:(nullable NSNumber<SDLBool> *)windowStatus { self = [self init]; if (!self) { return nil; @@ -95,6 +95,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModeStatus = clusterModeStatus; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -234,6 +235,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:NSNumber.class error:nil]; } +- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable NSNumber<SDLBool> *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +} + - (void)setHeadLampStatus:(nullable NSNumber<SDLBool> *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -338,21 +348,21 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameCloudAppVehicleID ofClass:NSNumber.class error:nil]; } -- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(BOOL)vehicleDataState { - [self.parameters sdl_setObject:@(vehicleDataState) forName:vehicleDataName]; +- (void)setWindowStatus:(nullable NSNumber<SDLBool> *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; } -- (nullable NSNumber<SDLBool> *)getOEMCustomVehicleData:(NSString *)vehicleDataName { - return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSNumber.class error:nil]; +- (nullable NSNumber<SDLBool> *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:NSNumber.class error:&error]; } -- (void)setHandsOffSteering:(nullable NSNumber<SDLBool> *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +- (void)setOEMCustomVehicleData:(NSString *)vehicleDataName withVehicleDataState:(BOOL)vehicleDataState { + [self.parameters sdl_setObject:@(vehicleDataState) forName:vehicleDataName]; } -- (nullable NSNumber<SDLBool> *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:NSNumber.class error:&error]; +- (nullable NSNumber<SDLBool> *)getOEMCustomVehicleData:(NSString *)vehicleDataName { + return [self.parameters sdl_objectForName:vehicleDataName ofClass:NSNumber.class error:nil]; } @end diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h index cce61b2de..fca751001 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h +++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h @@ -46,9 +46,10 @@ NS_ASSUME_NONNULL_BEGIN * @param clusterModes - clusterModes * @param myKey - myKey * @param handsOffSteering - handsOffSteering + * @param windowStatus - windowStatus * @return A SDLUnsubscribeVehicleDataResponse object */ -- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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; +- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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 windowStatus:(nullable SDLVehicleDataResult *)windowStatus; /** * See GearStatus @@ -164,6 +165,13 @@ NS_ASSUME_NONNULL_BEGIN @property (strong, nonatomic, nullable) SDLVehicleDataResult *driverBraking; /** + * See WindowStatus + * + * @since SDL 7.0 + */ +@property (strong, nonatomic, nullable) SDLVehicleDataResult *windowStatus; + +/** The result of requesting to unsubscribe to the status of the wipers. Optional diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m index f5fb1ae1c..271020beb 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m +++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m @@ -24,7 +24,7 @@ NS_ASSUME_NONNULL_BEGIN } #pragma clang diagnostic pop -- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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 { +- (instancetype)initWithGps:(nullable SDLVehicleDataResult *)gps speed:(nullable SDLVehicleDataResult *)speed rpm:(nullable SDLVehicleDataResult *)rpm instantFuelConsumption:(nullable SDLVehicleDataResult *)instantFuelConsumption fuelRange:(nullable SDLVehicleDataResult *)fuelRange externalTemperature:(nullable SDLVehicleDataResult *)externalTemperature turnSignal:(nullable SDLVehicleDataResult *)turnSignal gearStatus:(nullable SDLVehicleDataResult *)gearStatus 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 windowStatus:(nullable SDLVehicleDataResult *)windowStatus { self = [self init]; if (!self) { return nil; @@ -57,6 +57,7 @@ NS_ASSUME_NONNULL_BEGIN self.clusterModes = clusterModes; self.myKey = myKey; self.handsOffSteering = handsOffSteering; + self.windowStatus = windowStatus; return self; } @@ -189,6 +190,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameDriverBraking ofClass:SDLVehicleDataResult.class error:nil]; } +- (void)setWindowStatus:(nullable SDLVehicleDataResult *)windowStatus { + [self.parameters sdl_setObject:windowStatus forName:SDLRPCParameterNameWindowStatus]; +} + +- (nullable SDLVehicleDataResult *)windowStatus { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameWindowStatus ofClass:SDLVehicleDataResult.class error:&error]; +} + - (void)setWiperStatus:(nullable SDLVehicleDataResult *)wiperStatus { [self.parameters sdl_setObject:wiperStatus forName:SDLRPCParameterNameWiperStatus]; } @@ -197,6 +207,15 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:SDLRPCParameterNameWiperStatus ofClass:SDLVehicleDataResult.class error:nil]; } +- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering { + [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; +} + +- (nullable SDLVehicleDataResult *)handsOffSteering { + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error]; +} + - (void)setHeadLampStatus:(nullable SDLVehicleDataResult *)headLampStatus { [self.parameters sdl_setObject:headLampStatus forName:SDLRPCParameterNameHeadLampStatus]; } @@ -309,15 +328,6 @@ NS_ASSUME_NONNULL_BEGIN return [self.parameters sdl_objectForName:vehicleDataName ofClass:SDLVehicleDataResult.class error:nil]; } -- (void)setHandsOffSteering:(nullable SDLVehicleDataResult *)handsOffSteering { - [self.parameters sdl_setObject:handsOffSteering forName:SDLRPCParameterNameHandsOffSteering]; -} - -- (nullable SDLVehicleDataResult *)handsOffSteering { - NSError *error = nil; - return [self.parameters sdl_objectForName:SDLRPCParameterNameHandsOffSteering ofClass:SDLVehicleDataResult.class error:&error]; -} - @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink/SDLVehicleDataType.h index b8e675003..54bc2b16d 100644 --- a/SmartDeviceLink/SDLVehicleDataType.h +++ b/SmartDeviceLink/SDLVehicleDataType.h @@ -182,3 +182,10 @@ extern SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID; Added in SDL 6.0 */ extern SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType; + +/** + * Describes the status of a window of a door/liftgate etc. + * + * @since SDL 7.0 + */ +extern SDLVehicleDataType const SDLVehicleDataTypeWindowStatus; diff --git a/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink/SDLVehicleDataType.m index 627547d62..585e40130 100644 --- a/SmartDeviceLink/SDLVehicleDataType.m +++ b/SmartDeviceLink/SDLVehicleDataType.m @@ -4,37 +4,38 @@ #import "SDLVehicleDataType.h" -SDLVehicleDataType const SDLVehicleDataTypeGPS = @"VEHICLEDATA_GPS"; -SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED"; -SDLVehicleDataType const SDLVehicleDataTypeRPM = @"VEHICLEDATA_RPM"; -SDLVehicleDataType const SDLVehicleDataTypeFuelLevel = @"VEHICLEDATA_FUELLEVEL"; -SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState = @"VEHICLEDATA_FUELLEVEL_STATE"; -SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELCONSUMPTION"; -SDLVehicleDataType const SDLVehicleDataTypeFuelRange = @"VEHICLEDATA_FUELRANGE"; -SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature = @"VEHICLEDATA_EXTERNTEMP"; -SDLVehicleDataType const SDLVehicleDataTypeVIN = @"VEHICLEDATA_VIN"; -SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE"; -SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER"; +SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal = @"VEHICLEDATA_ACCPEDAL"; +SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus = @"VEHICLEDATA_AIRBAGSTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage = @"VEHICLEDATA_BATTVOLTAGE"; SDLVehicleDataType const SDLVehicleDataTypeBeltStatus = @"VEHICLEDATA_BELTSTATUS"; SDLVehicleDataType const SDLVehicleDataTypeBodyInfo = @"VEHICLEDATA_BODYINFO"; +SDLVehicleDataType const SDLVehicleDataTypeBraking = @"VEHICLEDATA_BRAKING"; +SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID = @"VEHICLEDATA_CLOUDAPPVEHICLEID"; +SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus = @"VEHICLEDATA_CLUSTERMODESTATUS"; SDLVehicleDataType const SDLVehicleDataTypeDeviceStatus = @"VEHICLEDATA_DEVICESTATUS"; SDLVehicleDataType const SDLVehicleDataTypeECallInfo = @"VEHICLEDATA_ECALLINFO"; -SDLVehicleDataType const SDLVehicleDataTypeAirbagStatus = @"VEHICLEDATA_AIRBAGSTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeElectronicParkBrakeStatus = @"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS"; SDLVehicleDataType const SDLVehicleDataTypeEmergencyEvent = @"VEHICLEDATA_EMERGENCYEVENT"; -SDLVehicleDataType const SDLVehicleDataTypeClusterModeStatus = @"VEHICLEDATA_CLUSTERMODESTATUS"; -SDLVehicleDataType const SDLVehicleDataTypeGearStatus = @"VEHICLEDATA_GEARSTATUS"; -SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY"; -SDLVehicleDataType const SDLVehicleDataTypeBraking = @"VEHICLEDATA_BRAKING"; -SDLVehicleDataType const SDLVehicleDataTypeWiperStatus = @"VEHICLEDATA_WIPERSTATUS"; -SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus = @"VEHICLEDATA_HEADLAMPSTATUS"; -SDLVehicleDataType const SDLVehicleDataTypeBatteryVoltage = @"VEHICLEDATA_BATTVOLTAGE"; SDLVehicleDataType const SDLVehicleDataTypeEngineOilLife = @"VEHICLEDATA_ENGINEOILLIFE"; SDLVehicleDataType const SDLVehicleDataTypeEngineTorque = @"VEHICLEDATA_ENGINETORQUE"; -SDLVehicleDataType const SDLVehicleDataTypeAccelerationPedal = @"VEHICLEDATA_ACCPEDAL"; +SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature = @"VEHICLEDATA_EXTERNTEMP"; +SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELCONSUMPTION"; +SDLVehicleDataType const SDLVehicleDataTypeFuelLevel = @"VEHICLEDATA_FUELLEVEL"; +SDLVehicleDataType const SDLVehicleDataTypeFuelLevelState = @"VEHICLEDATA_FUELLEVEL_STATE"; +SDLVehicleDataType const SDLVehicleDataTypeFuelRange = @"VEHICLEDATA_FUELRANGE"; +SDLVehicleDataType const SDLVehicleDataTypeGPS = @"VEHICLEDATA_GPS"; +SDLVehicleDataType const SDLVehicleDataTypeGearStatus = @"VEHICLEDATA_GEARSTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeHandsOffSteering = @"VEHICLEDATA_HANDSOFFSTEERING"; +SDLVehicleDataType const SDLVehicleDataTypeHeadlampStatus = @"VEHICLEDATA_HEADLAMPSTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeMyKey = @"VEHICLEDATA_MYKEY"; +SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType = @"VEHICLEDATA_OEM_CUSTOM_DATA"; +SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER"; SDLVehicleDataType const SDLVehicleDataTypePRNDL = @"VEHICLEDATA_PRNDL"; +SDLVehicleDataType const SDLVehicleDataTypeRPM = @"VEHICLEDATA_RPM"; +SDLVehicleDataType const SDLVehicleDataTypeSpeed = @"VEHICLEDATA_SPEED"; SDLVehicleDataType const SDLVehicleDataTypeSteeringWheel = @"VEHICLEDATA_STEERINGWHEEL"; -SDLVehicleDataType const SDLVehicleDataTypeElectronicParkBrakeStatus = @"VEHICLEDATA_ELECTRONICPARKBRAKESTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE"; SDLVehicleDataType const SDLVehicleDataTypeTurnSignal = @"VEHICLEDATA_TURNSIGNAL"; -SDLVehicleDataType const SDLVehicleDataTypeCloudAppVehicleID = @"VEHICLEDATA_CLOUDAPPVEHICLEID"; -SDLVehicleDataType const SDLVehicleDataTypeOEMVehicleDataType = @"VEHICLEDATA_OEM_CUSTOM_DATA"; -SDLVehicleDataType const SDLVehicleDataTypeHandsOffSteering = @"VEHICLEDATA_HANDSOFFSTEERING"; +SDLVehicleDataType const SDLVehicleDataTypeVIN = @"VEHICLEDATA_VIN"; +SDLVehicleDataType const SDLVehicleDataTypeWindowStatus = @"VEHICLEDATA_WINDOWSTATUS"; +SDLVehicleDataType const SDLVehicleDataTypeWiperStatus = @"VEHICLEDATA_WIPERSTATUS"; diff --git a/SmartDeviceLink/SDLWindowState.h b/SmartDeviceLink/SDLWindowState.h new file mode 100644 index 000000000..fcbab5691 --- /dev/null +++ b/SmartDeviceLink/SDLWindowState.h @@ -0,0 +1,65 @@ +/* + * Copyright (c) 2020, SmartDeviceLink Consortium, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SDLRPCStruct.h" + +NS_ASSUME_NONNULL_BEGIN + +/** + * @since SDL 7.0.0 + */ +@interface SDLWindowState : SDLRPCStruct + +/** + * @param approximatePosition - The approximate percentage that the window is open - 0 being fully closed, 100 being fully open + * @param deviation - The percentage deviation of the approximatePosition. e.g. If the approximatePosition is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60. + * @return A SDLWindowState object + */ +- (instancetype)initWithApproximatePosition:(UInt8)approximatePosition deviation:(UInt8)deviation; + +/** + * The approximate percentage that the window is open - 0 being fully closed, 100 being fully open + * + * Mandatory, Integer, 0 - 100 + */ +@property (strong, nonatomic) NSNumber<SDLUInt> *approximatePosition; + +/** + * The percentage deviation of the approximatePosition. e.g. If the approximatePosition is 50 and the deviation is 10, then the window's location is somewhere between 40 and 60. + * + * Mandatory, Integer, 0 - 100 + */ +@property (strong, nonatomic) NSNumber<SDLUInt> *deviation; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLWindowState.m b/SmartDeviceLink/SDLWindowState.m new file mode 100644 index 000000000..ee22c09bb --- /dev/null +++ b/SmartDeviceLink/SDLWindowState.m @@ -0,0 +1,71 @@ +/* + * Copyright (c) 2020, SmartDeviceLink Consortium, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSMutableDictionary+Store.h" +#import "SDLRPCParameterNames.h" +#import "SDLWindowState.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation SDLWindowState + +- (instancetype)initWithApproximatePosition:(UInt8)approximatePosition deviation:(UInt8)deviation { + self = [super init]; + if (!self) { + return nil; + } + self.approximatePosition = @(approximatePosition); + self.deviation = @(deviation); + return self; +} + +- (void)setApproximatePosition:(NSNumber<SDLUInt> *)approximatePosition { + [self.store sdl_setObject:approximatePosition forName:SDLRPCParameterNameApproximatePosition]; +} + +- (NSNumber<SDLUInt> *)approximatePosition { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameApproximatePosition ofClass:NSNumber.class error:&error]; +} + +- (void)setDeviation:(NSNumber<SDLUInt> *)deviation { + [self.store sdl_setObject:deviation forName:SDLRPCParameterNameDeviation]; +} + +- (NSNumber<SDLUInt> *)deviation { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameDeviation ofClass:NSNumber.class error:&error]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLWindowStatus.h b/SmartDeviceLink/SDLWindowStatus.h new file mode 100644 index 000000000..e3e235242 --- /dev/null +++ b/SmartDeviceLink/SDLWindowStatus.h @@ -0,0 +1,70 @@ +/* + * Copyright (c) 2020, SmartDeviceLink Consortium, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#import "SDLRPCStruct.h" + +@class SDLGrid; +@class SDLWindowState; + +NS_ASSUME_NONNULL_BEGIN + +/** + * Describes the status of a window of a door/liftgate etc. + * + * @since SDL 7.0.0 + */ +@interface SDLWindowStatus : SDLRPCStruct + +/** + * @param location - location + * @param state - state + * @return A SDLWindowStatus object + */ +- (instancetype)initWithLocation:(SDLGrid *)location state:(SDLWindowState *)state; + +/** + * location + * + * Mandatory +*/ +@property (strong, nonatomic) SDLGrid *location; + +/** + * state + * + * Mandatory +*/ +@property (strong, nonatomic) SDLWindowState *state; + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLWindowStatus.m b/SmartDeviceLink/SDLWindowStatus.m new file mode 100644 index 000000000..1fc54b359 --- /dev/null +++ b/SmartDeviceLink/SDLWindowStatus.m @@ -0,0 +1,73 @@ +/* + * Copyright (c) 2020, SmartDeviceLink Consortium, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * + * Redistributions of source code must retain the above copyright notice, this + * list of conditions and the following disclaimer. + * + * Redistributions in binary form must reproduce the above copyright notice, + * this list of conditions and the following + * disclaimer in the documentation and/or other materials provided with the + * distribution. + * + * Neither the name of the SmartDeviceLink Consortium Inc. nor the names of + * its contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE + * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#import "NSMutableDictionary+Store.h" +#import "SDLGrid.h" +#import "SDLRPCParameterNames.h" +#import "SDLWindowState.h" +#import "SDLWindowStatus.h" + +NS_ASSUME_NONNULL_BEGIN + +@implementation SDLWindowStatus + +- (instancetype)initWithLocation:(SDLGrid *)location state:(SDLWindowState *)state { + self = [super init]; + if (!self) { + return nil; + } + self.location = location; + self.state = state; + return self; +} + +- (void)setLocation:(SDLGrid *)location { + [self.store sdl_setObject:location forName:SDLRPCParameterNameLocation]; +} + +- (SDLGrid *)location { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameLocation ofClass:SDLGrid.class error:&error]; +} + +- (void)setState:(SDLWindowState *)state { + [self.store sdl_setObject:state forName:SDLRPCParameterNameState]; +} + +- (SDLWindowState *)state { + NSError *error = nil; + return [self.store sdl_objectForName:SDLRPCParameterNameState ofClass:SDLWindowState.class error:&error]; +} + +@end + +NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SmartDeviceLink.h b/SmartDeviceLink/SmartDeviceLink.h index 45ee193cd..66f82fb70 100644 --- a/SmartDeviceLink/SmartDeviceLink.h +++ b/SmartDeviceLink/SmartDeviceLink.h @@ -288,6 +288,8 @@ FOUNDATION_EXPORT const unsigned char SmartDeviceLinkVersionString[]; #import "SDLWeatherServiceData.h" #import "SDLWeatherServiceManifest.h" #import "SDLWindowCapability.h" +#import "SDLWindowStatus.h" +#import "SDLWindowState.h" #import "SDLWindowTypeCapabilities.h" #pragma mark Enums diff --git a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m index 597a599bc..3f423bd0b 100644 --- a/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/EnumSpecs/SDLVehicleDataTypeSpec.m @@ -50,6 +50,7 @@ describe(@"individual enum value tests", ^{ expect(SDLVehicleDataTypeTirePressure).to(equal(@"VEHICLEDATA_TIREPRESSURE")); expect(SDLVehicleDataTypeTurnSignal).to(equal(@"VEHICLEDATA_TURNSIGNAL")); expect(SDLVehicleDataTypeVIN).to(equal(@"VEHICLEDATA_VIN")); + expect(SDLVehicleDataTypeWindowStatus).to(equal(@"VEHICLEDATA_WINDOWSTATUS")); expect(SDLVehicleDataTypeWiperStatus).to(equal(@"VEHICLEDATA_WIPERSTATUS")); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m index 4be5f5e93..67d5cd911 100644 --- a/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/NotificationSpecs/SDLOnVehicleDataSpec.m @@ -45,6 +45,7 @@ const float engineTorque = 999.123; const float accPedalPosition = 35.88; const float engineOilLife = 98.76; SDLElectronicParkBrakeStatus electronicParkBrakeStatus = SDLElectronicParkBrakeStatusTransition; +NSArray<SDLWindowStatus *> *windowStatus = @[[[SDLWindowStatus alloc] init], [[SDLWindowStatus alloc] init]]; const BOOL handsOffSteering = YES; SDLGearStatus *gearStatus = [[SDLGearStatus alloc] initWithUserSelectedGear:SDLPRNDLDrive actualGear:SDLPRNDLPark transmissionType:SDLTransmissionTypeAutomatic]; @@ -88,6 +89,7 @@ describe(@"getter/setter tests", ^{ testResponse.tirePressure = tirePressure; testResponse.turnSignal = turnSignal; testResponse.vin = vin; + testResponse.windowStatus = windowStatus; testResponse.wiperStatus = wiperStatus; it(@"expect all properties to be set properly", ^{ @@ -128,6 +130,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); @@ -172,6 +175,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameTirePressure:tirePressure, SDLRPCParameterNameTurnSignal:turnSignal, SDLRPCParameterNameVIN:vin, + SDLRPCParameterNameWindowStatus:windowStatus, SDLRPCParameterNameWiperStatus:wiperStatus, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameOnVehicleData}}; @@ -179,6 +183,7 @@ describe(@"getter/setter tests", ^{ #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] initWithDictionary:dict]; #pragma clang diagnostic pop + it(@"expect all properties to be set properly", ^{ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition))); expect(testResponse.airbagStatus).to(equal(airbagStatus)); @@ -217,6 +222,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); @@ -261,12 +267,14 @@ describe(@"getter/setter tests", ^{ expect(testResponse.tirePressure).to(beNil()); expect(testResponse.turnSignal).to(beNil()); expect(testResponse.vin).to(beNil()); + expect(testResponse.windowStatus).to(beNil()); expect(testResponse.wiperStatus).to(beNil()); }); }); - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering", ^{ - SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering)]; + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{ + SDLOnVehicleData* testResponse = [[SDLOnVehicleData alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering) windowStatus:windowStatus]; + it(@"expect all properties to be set properly", ^{ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition))); expect(testResponse.airbagStatus).to(equal(airbagStatus)); @@ -295,16 +303,18 @@ describe(@"getter/setter tests", ^{ expect(testResponse.instantFuelConsumption).to(equal(@(instantFuelConsumption))); expect(testResponse.myKey).to(equal(myKey)); expect(testResponse.odometer).to(equal(@(odometer))); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testResponse.prndl).to(beNil()); -#pragma clang diagnostic pop + #pragma clang diagnostic pop + expect(testResponse.gearStatus).to(equal(gearStatus)); expect(testResponse.rpm).to(equal(@(rpm))); expect(testResponse.speed).to(equal(@(speed))); expect(testResponse.steeringWheelAngle).to(equal(@(steeringWheelAngle))); expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m index 8db2294d7..f2199bf2e 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLGetVehicleDataSpec.m @@ -17,7 +17,6 @@ QuickSpecBegin(SDLGetVehicleDataSpec) describe(@"getter/setter tests", ^{ context(@"init and assign", ^{ SDLGetVehicleData* testRequest = [[SDLGetVehicleData alloc] init]; - testRequest.accPedalPosition = @YES; testRequest.airbagStatus = @YES; testRequest.beltStatus = @YES; @@ -54,6 +53,7 @@ describe(@"getter/setter tests", ^{ testRequest.steeringWheelAngle = @YES; testRequest.tirePressure = @YES; testRequest.turnSignal = @YES; + testRequest.windowStatus = @YES; testRequest.wiperStatus = @YES; it(@"expect all properties to be set properly", ^{ @@ -93,9 +93,8 @@ describe(@"getter/setter tests", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); - expect(testRequest.handsOffSteering).to(equal(@YES)); - expect(testRequest.fuelRange).to(equal(@YES)); }); }); @@ -138,6 +137,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameSteeringWheelAngle:@YES, SDLRPCParameterNameTirePressure:@YES, SDLRPCParameterNameTurnSignal:@YES, + SDLRPCParameterNameWindowStatus:@YES, SDLRPCParameterNameWiperStatus:@YES, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}}; @@ -183,6 +183,7 @@ describe(@"getter/setter tests", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); @@ -228,10 +229,12 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(beNil()); expect(testRequest.tirePressure).to(beNil()); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(beNil()); }); }); - context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{ + + context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:windowStatus:", ^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES emergencyEvent:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES vin:YES wiperStatus:YES]; @@ -274,9 +277,11 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); + context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:wiperStatus:", ^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" @@ -320,6 +325,7 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); @@ -367,12 +373,13 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:", ^{ - SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES]; + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{ + SDLGetVehicleData *testRequest = [[SDLGetVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES vin:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES]; it(@"expect all properties to be YES", ^{ expect(testRequest.accPedalPosition).to(equal(@YES)); @@ -411,6 +418,7 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m index b42b0a03c..6d8bfe532 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSubscribeVehicleDataSpec.m @@ -17,7 +17,6 @@ QuickSpecBegin(SDLSubscribeVehicleDataSpec) describe(@"getter/setter tests", ^{ context(@"init and assign", ^{ SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] init]; - testRequest.accPedalPosition = @YES; testRequest.airbagStatus = @YES; testRequest.beltStatus = @YES; @@ -54,6 +53,7 @@ describe(@"getter/setter tests", ^{ testRequest.steeringWheelAngle = @YES; testRequest.tirePressure = @YES; testRequest.turnSignal = @YES; + testRequest.windowStatus = @YES; testRequest.wiperStatus = @YES; it(@"expect all properties to be set properly", ^{ @@ -88,11 +88,13 @@ describe(@"getter/setter tests", ^{ #pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testRequest.prndl).to(equal(@YES)); #pragma clang diagnostic pop + expect(testRequest.gearStatus).to(equal(@YES)); expect(testRequest.rpm).to(equal(@YES)); expect(testRequest.speed).to(equal(@YES)); expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); @@ -136,6 +138,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameSteeringWheelAngle:@YES, SDLRPCParameterNameTirePressure:@YES, SDLRPCParameterNameTurnSignal:@YES, + SDLRPCParameterNameWindowStatus:@YES, SDLRPCParameterNameWiperStatus:@YES, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubscribeVehicleData}}; @@ -176,17 +179,19 @@ describe(@"getter/setter tests", ^{ #pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testRequest.prndl).to(equal(@YES)); #pragma clang diagnostic pop + expect(testRequest.gearStatus).to(equal(@YES)); expect(testRequest.rpm).to(equal(@YES)); expect(testRequest.speed).to(equal(@YES)); expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); }); -describe(@"initializers", ^{ +describe(@"test initializers", ^{ context(@"init", ^{ SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] init]; @@ -227,6 +232,7 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(beNil()); expect(testRequest.tirePressure).to(beNil()); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(beNil()); }); }); @@ -274,6 +280,7 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); @@ -321,12 +328,13 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:", ^{ - SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES]; + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{ + SDLSubscribeVehicleData* testRequest = [[SDLSubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES]; it(@"expect all properties to be set properly", ^{ expect(testRequest.accPedalPosition).to(equal(@YES)); @@ -365,6 +373,7 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m index 3c3efd294..697d1d265 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnsubscribeVehicleDataSpec.m @@ -17,7 +17,6 @@ QuickSpecBegin(SDLUnsubscribeVehicleDataSpec) describe(@"getter/setter tests", ^{ context(@"init and assign", ^{ SDLUnsubscribeVehicleData* testRequest = [[SDLUnsubscribeVehicleData alloc] init]; - testRequest.accPedalPosition = @YES; testRequest.airbagStatus = @YES; testRequest.beltStatus = @YES; @@ -54,6 +53,7 @@ describe(@"getter/setter tests", ^{ testRequest.steeringWheelAngle = @YES; testRequest.tirePressure = @YES; testRequest.turnSignal = @YES; + testRequest.windowStatus = @YES; testRequest.wiperStatus = @YES; it(@"expect all properties to be set properly", ^{ @@ -136,6 +136,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameSteeringWheelAngle:@YES, SDLRPCParameterNameTirePressure:@YES, SDLRPCParameterNameTurnSignal:@YES, + SDLRPCParameterNameWindowStatus:@YES, SDLRPCParameterNameWiperStatus:@YES, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}}; @@ -181,12 +182,13 @@ describe(@"getter/setter tests", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); }); -describe(@"initializers", ^{ +describe(@"test initializers", ^{ context(@"init", ^{ SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] init]; @@ -227,11 +229,12 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(beNil()); expect(testRequest.tirePressure).to(beNil()); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(beNil()); }); }); - context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{ + context(@"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:", ^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES]; @@ -274,11 +277,12 @@ describe(@"initializers", ^{ expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); -context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:gps:headLampStatus:instantFuelConsumption:myKey:odometer:prndl:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus:", ^{ +context(@"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:", ^{ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithAccelerationPedalPosition:YES airbagStatus:YES beltStatus:YES bodyInformation:YES cloudAppVehicleID:YES clusterModeStatus:YES deviceStatus:YES driverBraking:YES eCallInfo:YES electronicParkBrakeStatus:YES emergencyEvent:YES engineOilLife:YES engineTorque:YES externalTemperature:YES fuelLevel:YES fuelLevelState:YES fuelRange:YES gps:YES headLampStatus:YES instantFuelConsumption:YES myKey:YES odometer:YES prndl:YES rpm:YES speed:YES steeringWheelAngle:YES tirePressure:YES turnSignal:YES wiperStatus:YES]; @@ -368,15 +372,13 @@ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformat expect(testRequest.steeringWheelAngle).to(equal(@YES)); expect(testRequest.tirePressure).to(equal(@YES)); expect(testRequest.turnSignal).to(beNil()); + expect(testRequest.windowStatus).to(beNil()); expect(testRequest.wiperStatus).to(equal(@YES)); }); }); - context (@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:", ^{ -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" - SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES]; -#pragma clang diagnostic pop + context (@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{ + SDLUnsubscribeVehicleData *testRequest = [[SDLUnsubscribeVehicleData alloc] initWithGps:@YES speed:@YES rpm:@YES instantFuelConsumption:@YES fuelRange:@YES externalTemperature:@YES turnSignal:@YES gearStatus:@YES tirePressure:@YES odometer:@YES beltStatus:@YES bodyInformation:@YES deviceStatus:@YES driverBraking:@YES wiperStatus:@YES headLampStatus:@YES engineTorque:@YES accPedalPosition:@YES steeringWheelAngle:@YES engineOilLife:@YES electronicParkBrakeStatus:@YES cloudAppVehicleID:@YES eCallInfo:@YES airbagStatus:@YES emergencyEvent:@YES clusterModeStatus:@YES myKey:@YES handsOffSteering:@YES windowStatus:@YES]; it(@"expect all properties to be set properly", ^{ expect(testRequest.accPedalPosition).to(equal(@YES)); @@ -393,11 +395,11 @@ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformat expect(testRequest.engineOilLife).to(equal(@YES)); expect(testRequest.engineTorque).to(equal(@YES)); expect(testRequest.externalTemperature).to(equal(@YES)); -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wdeprecated-declarations" + #pragma clang diagnostic push + #pragma clang diagnostic ignored "-Wdeprecated-declarations" expect(testRequest.fuelLevel).to(beNil()); expect(testRequest.fuelLevel_State).to(beNil()); -#pragma clang diagnostic push + #pragma clang diagnostic push expect(testRequest.fuelRange).to(equal(@YES)); expect(testRequest.gearStatus).to(equal(@YES)); expect(testRequest.gps).to(equal(@YES)); @@ -408,15 +410,16 @@ context(@"initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformat expect(testRequest.odometer).to(equal(@YES)); #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" - expect(testRequest.prndl).to(beNil()); + expect(testRequest.prndl).to(beNil()); #pragma clang diagnostic pop - expect(testRequest.rpm).to(equal(@YES)); - expect(testRequest.speed).to(equal(@YES)); - expect(testRequest.steeringWheelAngle).to(equal(@YES)); - expect(testRequest.tirePressure).to(equal(@YES)); - expect(testRequest.turnSignal).to(equal(@YES)); - expect(testRequest.wiperStatus).to(equal(@YES)); - }); + expect(testRequest.rpm).to(equal(@YES)); + expect(testRequest.speed).to(equal(@YES)); + expect(testRequest.steeringWheelAngle).to(equal(@YES)); + expect(testRequest.tirePressure).to(equal(@YES)); + expect(testRequest.turnSignal).to(equal(@YES)); + expect(testRequest.windowStatus).to(equal(@YES)); + expect(testRequest.wiperStatus).to(equal(@YES)); + }); }); context(@"should set OEM Custom Vehicle Data", ^{ diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m index 1fff77a19..cdf61e1c9 100644 --- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLGetVehicleDataResponseSpec.m @@ -48,6 +48,7 @@ SDLTurnSignal turnSignal = SDLTurnSignalBoth; SDLWiperStatus wiperStatus = SDLWiperStatusAutomaticHigh; SDLElectronicParkBrakeStatus electronicParkBrakeStatus = SDLElectronicParkBrakeStatusTransition; const BOOL handsOffSteering = YES; +NSArray<SDLWindowStatus *> *windowStatus = @[[[SDLWindowStatus alloc] init], [[SDLWindowStatus alloc] init]]; describe(@"getter/setter tests", ^{ context(@"init and assign", ^{ @@ -89,6 +90,7 @@ describe(@"getter/setter tests", ^{ testResponse.tirePressure = tirePressure; testResponse.turnSignal = turnSignal; testResponse.vin = vin; + testResponse.windowStatus = windowStatus; testResponse.wiperStatus = wiperStatus; it(@"expect all properties to be set properly", ^{ @@ -129,6 +131,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); @@ -173,6 +176,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameTirePressure:tirePressure, SDLRPCParameterNameTurnSignal:turnSignal, SDLRPCParameterNameVIN:vin, + SDLRPCParameterNameWindowStatus:windowStatus, SDLRPCParameterNameWiperStatus:wiperStatus, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameGetVehicleData}}; @@ -219,11 +223,12 @@ describe(@"getter/setter tests", ^{ expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); -context(@"init", ^{ + context(@"init", ^{ SDLGetVehicleDataResponse* testResponse = [[SDLGetVehicleDataResponse alloc] init]; it(@"expect all properties to be nil", ^{ expect(testResponse.accPedalPosition).to(beNil()); @@ -263,14 +268,14 @@ context(@"init", ^{ expect(testResponse.tirePressure).to(beNil()); expect(testResponse.turnSignal).to(beNil()); expect(testResponse.vin).to(beNil()); + expect(testResponse.windowStatus).to(beNil()); expect(testResponse.wiperStatus).to(beNil()); }); }); - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:", ^{ - SDLGetVehicleDataResponse *testResponse = [[SDLGetVehicleDataResponse alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering)]; - - it(@"expect all properties to be set properly", ^{ + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:vin:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModeStatus:myKey:handsOffSteering:windowStatus:", ^{ + SDLGetVehicleDataResponse *testResponse = [[SDLGetVehicleDataResponse alloc] initWithGps:gps speed:speed rpm:@(rpm) instantFuelConsumption:instantFuelConsumption fuelRange:fuelRangeArray externalTemperature:externalTemperature turnSignal:turnSignal vin:vin gearStatus:gearStatus tirePressure:tirePressure odometer:@(odometer) beltStatus:beltStatus bodyInformation:bodyInformation deviceStatus:deviceStatus driverBraking:driverBraking wiperStatus:wiperStatus headLampStatus:headLampStatus engineTorque:engineTorque accPedalPosition:accPedalPosition steeringWheelAngle:steeringWheelAngle engineOilLife:engineOilLife electronicParkBrakeStatus:electronicParkBrakeStatus cloudAppVehicleID:cloudAppVehicleID eCallInfo:eCallInfo airbagStatus:airbagStatus emergencyEvent:emergencyEvent clusterModeStatus:clusterModeStatus myKey:myKey handsOffSteering:@(handsOffSteering) windowStatus:windowStatus]; + it(@"should set all properties properly", ^{ expect(testResponse.accPedalPosition).to(equal(@(accPedalPosition))); expect(testResponse.airbagStatus).to(equal(airbagStatus)); expect(testResponse.beltStatus).to(equal(beltStatus)); @@ -308,6 +313,7 @@ context(@"init", ^{ expect(testResponse.tirePressure).to(equal(tirePressure)); expect(testResponse.turnSignal).to(equal(turnSignal)); expect(testResponse.vin).to(equal(vin)); + expect(testResponse.windowStatus).to(equal(windowStatus)); expect(testResponse.wiperStatus).to(equal(wiperStatus)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m index bce75c36b..88253eb18 100644 --- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m @@ -23,7 +23,6 @@ SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc] describe(@"getter/setter tests", ^{ context(@"init and assign", ^{ SDLSubscribeVehicleDataResponse* testResponse = [[SDLSubscribeVehicleDataResponse alloc] init]; - testResponse.accPedalPosition = vehicleDataResult; testResponse.airbagStatus = vehicleDataResult; testResponse.beltStatus = vehicleDataResult; @@ -60,6 +59,7 @@ describe(@"getter/setter tests", ^{ testResponse.steeringWheelAngle = vehicleDataResult; testResponse.tirePressure = vehicleDataResult; testResponse.turnSignal = vehicleDataResult; + testResponse.windowStatus = vehicleDataResult; testResponse.wiperStatus = vehicleDataResult; it(@"expect all properties to be set properly", ^{ @@ -99,6 +99,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); @@ -142,6 +143,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameTirePressure:vehicleDataResult, SDLRPCParameterNameTurnSignal:vehicleDataResult, SDLRPCParameterNameWiperStatus:vehicleDataResult, + SDLRPCParameterNameWindowStatus:vehicleDataResult, SDLRPCParameterNameHandsOffSteering:vehicleDataResult }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameSubscribeVehicleData}}; @@ -187,6 +189,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); @@ -231,12 +234,13 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(beNil()); expect(testResponse.tirePressure).to(beNil()); expect(testResponse.turnSignal).to(beNil()); + expect(testResponse.windowStatus).to(beNil()); expect(testResponse.wiperStatus).to(beNil()); }); }); - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:prndl:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:", ^{ - SDLSubscribeVehicleDataResponse *testResponse = [[SDLSubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult]; + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{ + SDLSubscribeVehicleDataResponse *testResponse = [[SDLSubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult windowStatus:vehicleDataResult]; it(@"expect all properties to be set properly", ^{ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult)); @@ -275,6 +279,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m index 143e0e38b..a0047604c 100644 --- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m @@ -22,7 +22,6 @@ SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc] describe(@"getter/setter tests", ^{ context(@"init", ^{ SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init]; - testResponse.accPedalPosition = vehicleDataResult; testResponse.airbagStatus = vehicleDataResult; testResponse.beltStatus = vehicleDataResult; @@ -59,6 +58,7 @@ describe(@"getter/setter tests", ^{ testResponse.steeringWheelAngle = vehicleDataResult; testResponse.tirePressure = vehicleDataResult; testResponse.turnSignal = vehicleDataResult; + testResponse.windowStatus = vehicleDataResult; testResponse.wiperStatus = vehicleDataResult; it(@"expect all properties to be set properly", ^{ @@ -98,6 +98,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); @@ -141,6 +142,7 @@ describe(@"getter/setter tests", ^{ SDLRPCParameterNameSteeringWheelAngle:vehicleDataResult, SDLRPCParameterNameTirePressure:vehicleDataResult, SDLRPCParameterNameTurnSignal:vehicleDataResult, + SDLRPCParameterNameWindowStatus:vehicleDataResult, SDLRPCParameterNameWiperStatus:vehicleDataResult, }, SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}}; @@ -186,6 +188,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); @@ -229,12 +232,13 @@ describe(@"getter/setter tests", ^{ expect(testResponse.speed).to(beNil()); expect(testResponse.steeringWheelAngle).to(beNil()); expect(testResponse.tirePressure).to(beNil()); + expect(testResponse.windowStatus).to(beNil()); expect(testResponse.turnSignal).to(beNil()); }); }); - - context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:prndl:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:", ^{ - SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult]; + + context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:gearStatus:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:windowStatus:", ^{ + SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult gearStatus:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult windowStatus:vehicleDataResult]; it(@"expect all properties to be set properly", ^{ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult)); @@ -273,6 +277,7 @@ describe(@"getter/setter tests", ^{ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult)); expect(testResponse.tirePressure).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.windowStatus).to(equal(vehicleDataResult)); expect(testResponse.wiperStatus).to(equal(vehicleDataResult)); }); }); diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m new file mode 100644 index 000000000..efed67b35 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStateSpec.m @@ -0,0 +1,50 @@ +// +// SDLWindowStateSpec.m +// SmartDeviceLinkTests +// + +#import <Foundation/Foundation.h> +#import <Nimble/Nimble.h> +#import <Quick/Quick.h> +#import "SDLRPCParameterNames.h" +#import "SDLWindowState.h" + +QuickSpecBegin(SDLWindowStateSpec) + +const UInt8 approximatePosition = 13; +const UInt8 deviation = 42; + +describe(@"getter/setter tests", ^{ + context(@"initWithApproximatePosition:deviation:", ^{ + SDLWindowState *testStruct = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation]; + + it(@"expect all properties to be set properly", ^{ + expect(testStruct.approximatePosition).to(equal(approximatePosition)); + expect(testStruct.deviation).to(equal(deviation)); + }); + }); + + context(@"initWithDictionary:", ^{ + NSDictionary *dict = @{SDLRPCParameterNameDeviation:@(deviation), SDLRPCParameterNameApproximatePosition:@(approximatePosition)}; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLWindowState *testStruct = [[SDLWindowState alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + it(@"expect all properties to be set properly", ^{ + expect(testStruct.approximatePosition).to(equal(approximatePosition)); + expect(testStruct.deviation).to(equal(deviation)); + }); + }); + + context(@"init", ^{ + SDLWindowState *testStruct = [[SDLWindowState alloc] init]; + + it(@"should return nil if not set", ^{ + expect(testStruct.approximatePosition).to(beNil()); + expect(testStruct.deviation).to(beNil()); + }); + }); +}); + +QuickSpecEnd diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m new file mode 100644 index 000000000..5214de55c --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLWindowStatusSpec.m @@ -0,0 +1,56 @@ +// +// SDLWindowStatusSpec.m +// SmartDeviceLinkTests +// + +#import <Foundation/Foundation.h> +#import <Nimble/Nimble.h> +#import <Quick/Quick.h> +#import "SDLGrid.h" +#import "SDLRPCParameterNames.h" +#import "SDLWindowState.h" +#import "SDLWindowStatus.h" + +const UInt8 approximatePosition = 13; +const UInt8 deviation = 42; + +QuickSpecBegin(SDLWindowStatusSpec) + +describe(@"getter/setter tests", ^{ + context(@"initWithLocation:state", ^{ + SDLWindowState *state = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation]; + SDLGrid *location = [[SDLGrid alloc] init]; + SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] initWithLocation:location state:state]; + + it(@"expect all properties to be set properly", ^{ + expect(testStruct.location).to(equal(location)); + expect(testStruct.state).to(equal(state)); + }); + }); + + context(@"initWithDictionary:", ^{ + SDLWindowState *state = [[SDLWindowState alloc] initWithApproximatePosition:approximatePosition deviation:deviation]; + SDLGrid *location = [[SDLGrid alloc] init]; + NSDictionary *dict = @{SDLRPCParameterNameLocation:location, SDLRPCParameterNameState:state}; +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" + SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] initWithDictionary:dict]; +#pragma clang diagnostic pop + + it(@"expect all properties to be set properly", ^{ + expect(testStruct.location).to(equal(location)); + expect(testStruct.state).to(equal(state)); + }); + }); + + context(@"init", ^{ + SDLWindowStatus *testStruct = [[SDLWindowStatus alloc] init]; + + it(@"should return nil if not set", ^{ + expect(testStruct.location).to(beNil()); + expect(testStruct.state).to(beNil()); + }); + }); +}); + +QuickSpecEnd |