summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorleonid l lokhmatov <YLokhmatov@luxoft.com>2020-06-22 04:35:24 +0300
committerleonid l lokhmatov <YLokhmatov@luxoft.com>2020-06-22 13:54:54 +0300
commit1b59427ada64a371b8d1b979e5fac2cb7dfedb91 (patch)
tree17ca747ec1d77d6b294de67c66bd28a04b23eadd
parentf0c104cf3cef6d8f5458d7723197dcd02ae90f1d (diff)
downloadsdl_ios-1b59427ada64a371b8d1b979e5fac2cb7dfedb91.tar.gz
sdl-0266 "New vehicle data GearStatus": auto generate classes from rpc_spec, add updated classes only, implement functionality and mark deprecated fields.
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj16
-rw-r--r--SmartDeviceLink/SDLGearStatus.h69
-rw-r--r--SmartDeviceLink/SDLGearStatus.m80
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.h102
-rw-r--r--SmartDeviceLink/SDLGetVehicleData.m92
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.h79
-rw-r--r--SmartDeviceLink/SDLGetVehicleDataResponse.m72
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.h81
-rw-r--r--SmartDeviceLink/SDLOnVehicleData.m71
-rw-r--r--SmartDeviceLink/SDLPRNDL.h50
-rw-r--r--SmartDeviceLink/SDLPRNDL.m36
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.h36
-rw-r--r--SmartDeviceLink/SDLRPCParameterNames.m36
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.h105
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleData.m88
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.h56
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.m51
-rw-r--r--SmartDeviceLink/SDLTransmissionType.h81
-rw-r--r--SmartDeviceLink/SDLTransmissionType.m42
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.h105
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleData.m92
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h49
-rw-r--r--SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m51
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.h44
-rw-r--r--SmartDeviceLink/SDLVehicleDataType.m37
25 files changed, 1431 insertions, 190 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 91b4f85a9..069549536 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -1543,6 +1543,10 @@
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, ); }; };
+ B38D8E6D24A034DB00B977D0 /* SDLGearStatus.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ B38D8E6E24A034DB00B977D0 /* SDLGearStatus.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */; };
+ B38D8E7124A0351200B977D0 /* SDLTransmissionType.m in Sources */ = {isa = PBXBuildFile; fileRef = B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */; };
+ B38D8E7224A0351200B977D0 /* SDLTransmissionType.h in Headers */ = {isa = PBXBuildFile; fileRef = B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA0C46AD1DCD35080001F2A8 /* SDLRPCParameterNames.m in Sources */ = {isa = PBXBuildFile; fileRef = DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */; };
DA0C46AF1DCD41E30001F2A8 /* SDLMacros.h in Headers */ = {isa = PBXBuildFile; fileRef = DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */; settings = {ATTRIBUTES = (Public, ); }; };
DA318C1F1DD0F06C00C035AC /* NSMutableDictionary+Store.h in Headers */ = {isa = PBXBuildFile; fileRef = DA318C1D1DD0F06C00C035AC /* NSMutableDictionary+Store.h */; };
@@ -3299,6 +3303,10 @@
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>"; };
+ B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLGearStatus.h; sourceTree = "<group>"; };
+ B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLGearStatus.m; sourceTree = "<group>"; };
+ B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLTransmissionType.m; sourceTree = "<group>"; };
+ B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLTransmissionType.h; sourceTree = "<group>"; };
BB3C600D221AEF37007DD4CA /* NSMutableDictionary+StoreSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; name = "NSMutableDictionary+StoreSpec.m"; path = "DevAPISpecs/NSMutableDictionary+StoreSpec.m"; sourceTree = "<group>"; };
DA0C46AC1DCD35080001F2A8 /* SDLRPCParameterNames.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLRPCParameterNames.m; sourceTree = "<group>"; };
DA0C46AE1DCD41E30001F2A8 /* SDLMacros.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SDLMacros.h; sourceTree = "<group>"; };
@@ -4718,6 +4726,8 @@
5D5934F31A85164500687FB9 /* Structs */ = {
isa = PBXGroup;
children = (
+ B38D8E6B24A034DB00B977D0 /* SDLGearStatus.h */,
+ B38D8E6C24A034DB00B977D0 /* SDLGearStatus.m */,
5D61FA481A84238A00846EE7 /* SDLAirbagStatus.h */,
5D61FA491A84238A00846EE7 /* SDLAirbagStatus.m */,
332A913C1CED87F80043824C /* SDLAppInfo.h */,
@@ -4937,6 +4947,8 @@
5D5934F41A85165E00687FB9 /* Enums */ = {
isa = PBXGroup;
children = (
+ B38D8E7024A0351200B977D0 /* SDLTransmissionType.h */,
+ B38D8E6F24A0351200B977D0 /* SDLTransmissionType.m */,
5D61FA521A84238A00846EE7 /* SDLAmbientLightStatus.h */,
5D61FA531A84238A00846EE7 /* SDLAmbientLightStatus.m */,
5D61FA541A84238A00846EE7 /* SDLAppHMIType.h */,
@@ -6803,6 +6815,7 @@
5D61FD431A84238C00846EE7 /* SDLProtocol.h in Headers */,
5D8B17531AC9E11B006A6E1C /* SDLDialNumberResponse.h in Headers */,
5DEF695B1FD6F82D004B8C2F /* SDLStreamingAudioManagerType.h in Headers */,
+ B38D8E7224A0351200B977D0 /* SDLTransmissionType.h in Headers */,
5D61FC921A84238C00846EE7 /* SDLDisplayType.h in Headers */,
5D61FD0D1A84238C00846EE7 /* SDLOnHashChange.h in Headers */,
5D61FC6B1A84238C00846EE7 /* SDLCreateInteractionChoiceSet.h in Headers */,
@@ -6980,6 +6993,7 @@
5D4631041F2120A30092EFDC /* SDLControlFramePayloadType.h in Headers */,
EED5CA061F4D1E2300F04000 /* SDLRTPH264Packetizer.h in Headers */,
5D61FCCF1A84238C00846EE7 /* SDLImageField.h in Headers */,
+ B38D8E6D24A034DB00B977D0 /* SDLGearStatus.h in Headers */,
5D535DC51B72473800CF7760 /* SDLGlobals.h in Headers */,
5D79A03B1CE36F030035797B /* SDLUploadFileOperation.h in Headers */,
8880D24722205B1B00964F6A /* SDLNavigationInstruction.h in Headers */,
@@ -7758,6 +7772,7 @@
5D61FCA41A84238C00846EE7 /* SDLEndAudioPassThru.m in Sources */,
5D339CEB207C066E000CC364 /* SDLMenuCell.m in Sources */,
8818ADD92100FC18007D6F19 /* SDLTurnSignal.m in Sources */,
+ B38D8E7124A0351200B977D0 /* SDLTransmissionType.m in Sources */,
5D8B17541AC9E11B006A6E1C /* SDLDialNumberResponse.m in Sources */,
DA6223BE1E7B088200878689 /* CVPixelBufferRef+SDLUtil.m in Sources */,
752ECDB7228B4D6B00D945F4 /* SDLDynamicMenuUpdateAlgorithm.m in Sources */,
@@ -7842,6 +7857,7 @@
5DCD7AE11FCCA8D200A0FC7F /* SDLCarWindow.m in Sources */,
1E5AD0911F20BE820029B8AF /* SDLSetInteriorVehicleData.m in Sources */,
884E702C21FBB151008D53BA /* SDLAppServiceRecord.m in Sources */,
+ B38D8E6E24A034DB00B977D0 /* SDLGearStatus.m in Sources */,
5D60088B1BE3ED540094A505 /* SDLStateMachine.m in Sources */,
8877F5EF1F34A72200DC128A /* SDLSendHapticDataResponse.m in Sources */,
5D61FD181A84238C00846EE7 /* SDLOnPermissionsChange.m in Sources */,
diff --git a/SmartDeviceLink/SDLGearStatus.h b/SmartDeviceLink/SDLGearStatus.h
new file mode 100644
index 000000000..83eddc9b2
--- /dev/null
+++ b/SmartDeviceLink/SDLGearStatus.h
@@ -0,0 +1,69 @@
+/*
+ * 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 "SDLPRNDL.h"
+#import "SDLRPCStruct.h"
+#import "SDLTransmissionType.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+/**
+ * @since SDL 6.2.0
+ */
+@interface SDLGearStatus : SDLRPCStruct
+
+/**
+ * @param userSelectedGear - userSelectedGear
+ * @param actualGear - actualGear
+ * @param transmissionType - transmissionType
+ * @return A SDLGearStatus object
+ */
+- (instancetype)initWithUserSelectedGear:(nullable SDLPRNDL)userSelectedGear actualGear:(nullable SDLPRNDL)actualGear transmissionType:(nullable SDLTransmissionType)transmissionType;
+
+/**
+ * Gear position selected by the user i.e. Park, Drive, Reverse
+ */
+@property (nullable, strong, nonatomic) SDLPRNDL userSelectedGear;
+
+/**
+ * Actual Gear in use by the transmission
+ */
+@property (nullable, strong, nonatomic) SDLPRNDL actualGear;
+
+/**
+ * Tells the transmission type
+ */
+@property (nullable, strong, nonatomic) SDLTransmissionType transmissionType;
+
+@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLGearStatus.m b/SmartDeviceLink/SDLGearStatus.m
new file mode 100644
index 000000000..b18981663
--- /dev/null
+++ b/SmartDeviceLink/SDLGearStatus.m
@@ -0,0 +1,80 @@
+/*
+ * 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 "SDLGearStatus.h"
+#import "NSMutableDictionary+Store.h"
+#import "SDLPRNDL.h"
+#import "SDLTransmissionType.h"
+#import "SDLRPCParameterNames.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@implementation SDLGearStatus
+
+- (instancetype)initWithUserSelectedGear:(nullable SDLPRNDL)userSelectedGear actualGear:(nullable SDLPRNDL)actualGear transmissionType:(nullable SDLTransmissionType)transmissionType {
+ self = [super init];
+ if (!self) {
+ return nil;
+ }
+ self.userSelectedGear = userSelectedGear;
+ self.actualGear = actualGear;
+ self.transmissionType = transmissionType;
+ return self;
+}
+
+- (void)setUserSelectedGear:(nullable SDLPRNDL)userSelectedGear {
+ [self.store sdl_setObject:userSelectedGear forName:SDLRPCParameterNameUserSelectedGear];
+}
+
+- (nullable SDLPRNDL)userSelectedGear {
+ return [self.store sdl_enumForName:SDLRPCParameterNameUserSelectedGear error:nil];
+}
+
+- (void)setActualGear:(nullable SDLPRNDL)actualGear {
+ [self.store sdl_setObject:actualGear forName:SDLRPCParameterNameActualGear];
+}
+
+- (nullable SDLPRNDL)actualGear {
+ return [self.store sdl_enumForName:SDLRPCParameterNameActualGear error:nil];
+}
+
+- (void)setTransmissionType:(nullable SDLTransmissionType)transmissionType {
+ [self.store sdl_setObject:transmissionType forName:SDLRPCParameterNameTransmissionType];
+}
+
+- (nullable SDLTransmissionType)transmissionType {
+ return [self.store sdl_enumForName:SDLRPCParameterNameTransmissionType error:nil];
+}
+
+@end
+
+NS_ASSUME_NONNULL_END \ No newline at end of file
diff --git a/SmartDeviceLink/SDLGetVehicleData.h b/SmartDeviceLink/SDLGetVehicleData.h
index 8e7082037..5fcad8313 100644
--- a/SmartDeviceLink/SDLGetVehicleData.h
+++ b/SmartDeviceLink/SDLGetVehicleData.h
@@ -1,20 +1,44 @@
-// SDLGetVehicleData.h
-//
-
+/*
+ * 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 "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
/**
- * Requests current values of specific published vehicle data items.
+ * Non periodic vehicle data read request.
*
- * Function Group: Location, VehicleInfo and DrivingChara
- * HMILevel needs to be FULL, LIMITED or BACKGROUND
- * Since SmartDeviceLink 2.0
- * See SDLSubscribeVehicleData, SDLUnsubscribeVehicleData
+ * @since SDL 2.0.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLGetVehicleData : SDLRPCRequest
/**
@@ -47,7 +71,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for getting data for all possible vehicle data items.
@@ -83,7 +107,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for getting data for all possible vehicle data items.
@@ -120,7 +144,45 @@ 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;
+- (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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+
+
+/**
+ * Convenience init for getting data for all possible vehicle data items.
+ *
+ * @param accelerationPedalPosition Get accelerationPedalPosition data
+ * @param airbagStatus Get airbagStatus data
+ * @param beltStatus Get beltStatus data
+ * @param bodyInformation Get bodyInformation data
+ * @param cloudAppVehicleID Get cloudAppVehicleID data
+ * @param clusterModeStatus Get clusterModeStatus data
+ * @param deviceStatus Get deviceStatus data
+ * @param driverBraking Get driverBraking data
+ * @param eCallInfo Get eCallInfo data
+ * @param electronicParkBrakeStatus Get electronicParkBrakeStatus data
+ * @param emergencyEvent Get emergencyEvent data
+ * @param engineOilLife Get engineOilLife data
+ * @param engineTorque Get engineTorque data
+ * @param externalTemperature Get externalTemperature data
+ * @param fuelLevel Get fuelLevel data
+ * @param fuelLevelState Get fuelLevelState data
+ * @param fuelRange Get fuelRange data
+ * @param gps Get gps data
+ * @param headLampStatus Get headLampStatus data
+ * @param instantFuelConsumption Get instantFuelConsumption data
+ * @param myKey Get myKey data
+ * @param odometer Get odometer data
+ * @param gearStatus Get gearStatus data
+ * @param rpm Get rpm data
+ * @param speed Get speed data
+ * @param steeringWheelAngle Get steeringWheelAngle data
+ * @param tirePressure Get tirePressure data
+ * @param turnSignal Get turnSignal data
+ * @param vin Get vin data
+ * @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 gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus;
/**
* A boolean value. If true, requests GPS data.
@@ -168,9 +230,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSNumber<SDLBool> *vin;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *gearStatus;
+
+/**
* A boolean value. If true, requests PRNDL data.
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (nullable, strong, nonatomic) NSNumber<SDLBool> *prndl;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead");
/**
* A boolean value. If true, requests Tire Pressure data.
diff --git a/SmartDeviceLink/SDLGetVehicleData.m b/SmartDeviceLink/SDLGetVehicleData.m
index 30b8dfe81..946431c59 100644
--- a/SmartDeviceLink/SDLGetVehicleData.m
+++ b/SmartDeviceLink/SDLGetVehicleData.m
@@ -1,12 +1,39 @@
-// SDLGetVehicleData.m
-//
-
+/*
+ * 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 "SDLGetVehicleData.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -15,7 +42,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameGetVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameGetVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -57,7 +86,50 @@ NS_ASSUME_NONNULL_BEGIN
self.gps = @(gps);
self.headLampStatus = @(headLampStatus);
self.instantFuelConsumption = @(instantFuelConsumption);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
self.prndl = @(prndl);
+#pragma clang diagnostic pop
+ self.rpm = @(rpm);
+ self.speed = @(speed);
+ self.steeringWheelAngle = @(steeringWheelAngle);
+ self.tirePressure = @(tirePressure);
+ self.turnSignal = @(turnSignal);
+ self.vin = @(vin);
+ self.wiperStatus = @(wiperStatus);
+
+ 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 fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal vin:(BOOL)vin wiperStatus:(BOOL)wiperStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.accPedalPosition = @(accelerationPedalPosition);
+ self.airbagStatus = @(airbagStatus);
+ self.beltStatus = @(beltStatus);
+ self.bodyInformation = @(bodyInformation);
+ self.cloudAppVehicleID = @(cloudAppVehicleID);
+ self.clusterModeStatus = @(clusterModeStatus);
+ self.deviceStatus = @(deviceStatus);
+ self.driverBraking = @(driverBraking);
+ self.eCallInfo = @(eCallInfo);
+ self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
+ self.emergencyEvent = @(emergencyEvent);
+ self.engineOilLife = @(engineOilLife);
+ self.engineTorque = @(engineTorque);
+ self.externalTemperature = @(externalTemperature);
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.fuelRange = @(fuelRange);
+ self.myKey = @(myKey);
+ self.odometer = @(odometer);
+ self.gps = @(gps);
+ self.headLampStatus = @(headLampStatus);
+ self.instantFuelConsumption = @(instantFuelConsumption);
+ self.gearStatus = @(gearStatus);
self.rpm = @(rpm);
self.speed = @(speed);
self.steeringWheelAngle = @(steeringWheelAngle);
@@ -141,6 +213,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameVIN ofClass:NSNumber.class error:nil];
}
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
+}
+
- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.h b/SmartDeviceLink/SDLGetVehicleDataResponse.h
index 7e727aebd..087ab18d3 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.h
@@ -1,37 +1,62 @@
-// SDLGetVehicleDataResponse.h
-//
-
-#import "SDLRPCResponse.h"
+/*
+ * 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 "SDLTurnSignal.h"
#import "SDLComponentVolumeStatus.h"
+#import "SDLRPCResponse.h"
+#import "SDLWiperStatus.h"
#import "SDLElectronicParkBrakeStatus.h"
-#import "SDLPRNDL.h"
-#import "SDLTurnSignal.h"
#import "SDLVehicleDataEventStatus.h"
-#import "SDLWiperStatus.h"
+#import "SDLPRNDL.h"
-@class SDLAirbagStatus;
-@class SDLBeltStatus;
-@class SDLBodyInformation;
-@class SDLClusterModeStatus;
+@class SDLHeadLampStatus;
@class SDLDeviceStatus;
+@class SDLMyKey;
+@class SDLFuelRange;
+@class SDLBodyInformation;
@class SDLECallInfo;
@class SDLEmergencyEvent;
-@class SDLFuelRange;
-@class SDLGPSData;
-@class SDLHeadLampStatus;
-@class SDLMyKey;
+@class SDLBeltStatus;
+@class SDLGearStatus;
@class SDLTireStatus;
+@class SDLClusterModeStatus;
+@class SDLGPSData;
+@class SDLAirbagStatus;
+NS_ASSUME_NONNULL_BEGIN
/**
- * Response to SDLGetVehicleData
- *
- * Since SmartDeviceLink 2.0
+ * @since SDL 2.0.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLGetVehicleDataResponse : SDLRPCResponse
/**
@@ -82,9 +107,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) SDLGearStatus *gearStatus;
+
+/**
The current gear shift state of the user's vehicle
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (nullable, strong, nonatomic) SDLPRNDL prndl;
+@property (nullable, strong, nonatomic) SDLPRNDL prndl __deprecated_msg("use gearStatus instead");
/**
The current pressure warnings for the user's vehicle
diff --git a/SmartDeviceLink/SDLGetVehicleDataResponse.m b/SmartDeviceLink/SDLGetVehicleDataResponse.m
index 25ddde3f4..f09c13066 100644
--- a/SmartDeviceLink/SDLGetVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetVehicleDataResponse.m
@@ -1,24 +1,58 @@
-// SDLGetVehicleDataResponse.m
-//
-
+/*
+ * 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 "SDLGetVehicleDataResponse.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLAirbagStatus.h"
-#import "SDLBeltStatus.h"
-#import "SDLBodyInformation.h"
-#import "SDLClusterModeStatus.h"
#import "SDLDeviceStatus.h"
-#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
-#import "SDLFuelRange.h"
-#import "SDLGPSData.h"
+#import "SDLTireStatus.h"
+#import "SDLGearStatus.h"
+#import "SDLAirbagStatus.h"
#import "SDLHeadLampStatus.h"
+#import "SDLComponentVolumeStatus.h"
+#import "SDLGPSData.h"
#import "SDLMyKey.h"
-#import "SDLRPCParameterNames.h"
+#import "SDLFuelRange.h"
+#import "SDLECallInfo.h"
+#import "SDLWiperStatus.h"
+#import "SDLClusterModeStatus.h"
+#import "SDLTurnSignal.h"
+#import "SDLBodyInformation.h"
+#import "SDLBeltStatus.h"
+#import "SDLElectronicParkBrakeStatus.h"
+#import "SDLVehicleDataEventStatus.h"
+#import "SDLPRNDL.h"
#import "SDLRPCFunctionNames.h"
-#import "SDLTireStatus.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -27,7 +61,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameGetVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameGetVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -105,6 +141,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameVIN ofClass:NSString.class error:nil];
}
+- (void)setGearStatus:(nullable SDLGearStatus *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLGearStatus *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLGearStatus.class error:nil];
+}
+
- (void)setPrndl:(nullable SDLPRNDL)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLOnVehicleData.h b/SmartDeviceLink/SDLOnVehicleData.h
index 815827cb3..24f9754b8 100644
--- a/SmartDeviceLink/SDLOnVehicleData.h
+++ b/SmartDeviceLink/SDLOnVehicleData.h
@@ -1,37 +1,64 @@
-// SDLOnVehicleData.h
-//
-
-#import "SDLRPCNotification.h"
+/*
+ * 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 "SDLTurnSignal.h"
#import "SDLComponentVolumeStatus.h"
+#import "SDLRPCNotification.h"
+#import "SDLWiperStatus.h"
#import "SDLElectronicParkBrakeStatus.h"
-#import "SDLPRNDL.h"
-#import "SDLTurnSignal.h"
#import "SDLVehicleDataEventStatus.h"
-#import "SDLWiperStatus.h"
+#import "SDLPRNDL.h"
-@class SDLAirbagStatus;
-@class SDLBeltStatus;
-@class SDLBodyInformation;
-@class SDLClusterModeStatus;
+@class SDLHeadLampStatus;
@class SDLDeviceStatus;
+@class SDLMyKey;
+@class SDLFuelRange;
+@class SDLBodyInformation;
@class SDLECallInfo;
@class SDLEmergencyEvent;
-@class SDLFuelRange;
-@class SDLGPSData;
-@class SDLHeadLampStatus;
-@class SDLMyKey;
+@class SDLBeltStatus;
+@class SDLGearStatus;
@class SDLTireStatus;
+@class SDLClusterModeStatus;
+@class SDLGPSData;
+@class SDLAirbagStatus;
+NS_ASSUME_NONNULL_BEGIN
/**
- Callback for the periodic and non periodic vehicle data read function.
-
- Since SmartDeviceLink 2.0
+ * Callback for the periodic and non periodic vehicle data read function.
+ *
+ * @since SDL 2.0.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLOnVehicleData : SDLRPCNotification
/**
@@ -82,9 +109,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (nullable, strong, nonatomic) NSString *vin;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) SDLGearStatus *gearStatus;
+
+/**
The current gear shift state of the user's vehicle
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (nullable, strong, nonatomic) SDLPRNDL prndl;
+@property (nullable, strong, nonatomic) SDLPRNDL prndl __deprecated_msg("use gearStatus instead");
/**
The current pressure warnings for the user's vehicle
diff --git a/SmartDeviceLink/SDLOnVehicleData.m b/SmartDeviceLink/SDLOnVehicleData.m
index 7c59dee34..69497aba9 100644
--- a/SmartDeviceLink/SDLOnVehicleData.m
+++ b/SmartDeviceLink/SDLOnVehicleData.m
@@ -1,23 +1,58 @@
-// SDLOnVehicleData.m
-//
+/*
+ * 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 "SDLOnVehicleData.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLAirbagStatus.h"
-#import "SDLBeltStatus.h"
-#import "SDLBodyInformation.h"
-#import "SDLClusterModeStatus.h"
#import "SDLDeviceStatus.h"
-#import "SDLECallInfo.h"
#import "SDLEmergencyEvent.h"
-#import "SDLFuelRange.h"
-#import "SDLGPSData.h"
+#import "SDLTireStatus.h"
+#import "SDLGearStatus.h"
+#import "SDLAirbagStatus.h"
#import "SDLHeadLampStatus.h"
+#import "SDLComponentVolumeStatus.h"
+#import "SDLGPSData.h"
#import "SDLMyKey.h"
-#import "SDLRPCParameterNames.h"
+#import "SDLFuelRange.h"
+#import "SDLECallInfo.h"
+#import "SDLWiperStatus.h"
+#import "SDLClusterModeStatus.h"
+#import "SDLTurnSignal.h"
+#import "SDLBodyInformation.h"
+#import "SDLBeltStatus.h"
+#import "SDLElectronicParkBrakeStatus.h"
+#import "SDLVehicleDataEventStatus.h"
+#import "SDLPRNDL.h"
#import "SDLRPCFunctionNames.h"
-#import "SDLTireStatus.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -26,7 +61,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameOnVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameOnVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -104,6 +141,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameVIN ofClass:NSString.class error:nil];
}
+- (void)setGearStatus:(nullable SDLGearStatus *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLGearStatus *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLGearStatus.class error:nil];
+}
+
- (void)setPrndl:(nullable SDLPRNDL)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLPRNDL.h b/SmartDeviceLink/SDLPRNDL.h
index db9c6e385..4a14e260b 100644
--- a/SmartDeviceLink/SDLPRNDL.h
+++ b/SmartDeviceLink/SDLPRNDL.h
@@ -1,13 +1,41 @@
-// SDLPRNDL.h
-//
-
+/*
+ * 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 "SDLEnum.h"
/**
- * The selected gear the car is in. Used in retrieving vehicle data.
+ * The selected gear.
*
- * @since SDL 2.0
+ * @since SDL 2.0.0
*/
typedef SDLEnum SDLPRNDL SDL_SWIFT_ENUM;
@@ -82,6 +110,18 @@ extern SDLPRNDL const SDLPRNDLSeventh;
extern SDLPRNDL const SDLPRNDLEighth;
/**
+ * Ninth gear
+ * @since SDL 6.2.0
+ */
+extern SDLPRNDL const SDLPRNDLNinth;
+
+/**
+ * Tenth gear
+ * @since SDL 6.2.0
+ */
+extern SDLPRNDL const SDLPRNDLTenth;
+
+/**
* Unknown
*/
extern SDLPRNDL const SDLPRNDLUnknown;
diff --git a/SmartDeviceLink/SDLPRNDL.m b/SmartDeviceLink/SDLPRNDL.m
index 77eed8336..4e360c697 100644
--- a/SmartDeviceLink/SDLPRNDL.m
+++ b/SmartDeviceLink/SDLPRNDL.m
@@ -1,6 +1,34 @@
-// SDLPRNDL.m
-//
-
+/*
+ * 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 "SDLPRNDL.h"
@@ -18,5 +46,7 @@ SDLPRNDL const SDLPRNDLFifth = @"FIFTH";
SDLPRNDL const SDLPRNDLSixth = @"SIXTH";
SDLPRNDL const SDLPRNDLSeventh = @"SEVENTH";
SDLPRNDL const SDLPRNDLEighth = @"EIGHTH";
+SDLPRNDL const SDLPRNDLNinth = @"NINTH";
+SDLPRNDL const SDLPRNDLTenth = @"TENTH";
SDLPRNDL const SDLPRNDLUnknown = @"UNKNOWN";
SDLPRNDL const SDLPRNDLFault = @"FAULT";
diff --git a/SmartDeviceLink/SDLRPCParameterNames.h b/SmartDeviceLink/SDLRPCParameterNames.h
index e6541968a..b21e0808d 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.h
+++ b/SmartDeviceLink/SDLRPCParameterNames.h
@@ -1,5 +1,35 @@
+/*
+ * 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.
+ */
// SDLRPCParameterNames.h
-//
#import <Foundation/Foundation.h>
#import "SDLMacros.h"
@@ -724,5 +754,9 @@ extern SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported;
extern SDLRPCParameterName const SDLRPCParameterNameX;
extern SDLRPCParameterName const SDLRPCParameterNameY;
extern SDLRPCParameterName const SDLRPCParameterNameYear;
+extern SDLRPCParameterName const SDLRPCParameterNameActualGear;
+extern SDLRPCParameterName const SDLRPCParameterNameGearStatus;
+extern SDLRPCParameterName const SDLRPCParameterNameUserSelectedGear;
+extern SDLRPCParameterName const SDLRPCParameterNameTransmissionType;
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLRPCParameterNames.m b/SmartDeviceLink/SDLRPCParameterNames.m
index 85a88b1d4..0c5622465 100644
--- a/SmartDeviceLink/SDLRPCParameterNames.m
+++ b/SmartDeviceLink/SDLRPCParameterNames.m
@@ -1,5 +1,35 @@
+/*
+ * 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.
+ */
// SDLRPCParameterNames.h
-//
#import "NSMutableDictionary+Store.h"
#import "SDLRPCParameterNames.h"
@@ -719,5 +749,9 @@ SDLRPCParameterName const SDLRPCParameterNameWindowTypeSupported = @"windowTypeS
SDLRPCParameterName const SDLRPCParameterNameX = @"x";
SDLRPCParameterName const SDLRPCParameterNameY = @"y";
SDLRPCParameterName const SDLRPCParameterNameYear = @"year";
+SDLRPCParameterName const SDLRPCParameterNameActualGear = @"actualGear";
+SDLRPCParameterName const SDLRPCParameterNameGearStatus = @"gearStatus";
+SDLRPCParameterName const SDLRPCParameterNameUserSelectedGear = @"userSelectedGear";
+SDLRPCParameterName const SDLRPCParameterNameTransmissionType = @"transmissionType";
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.h b/SmartDeviceLink/SDLSubscribeVehicleData.h
index d0e6d4629..d1c15a424 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.h
@@ -1,22 +1,46 @@
-// SDLSubscribeVehicleData.h
-//
-
-
-#import "SDLRPCRequest.h"
-
-/**
- * Subscribes to specific published vehicle data items. The data will be only sent if it has changed. The application will be notified by the `onVehicleData` notification whenever new data is available. The update rate is dependent on sensors, vehicle architecture and vehicle type.
+/*
+ * 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.
*
- * @warning A vehicle may only support a subset of the vehicle data items. Be prepared for the situation where a signal is not available on a vehicle.
+ * 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.
*
- * Function Group: Location, VehicleInfo and DrivingChara
- * HMILevel needs to be FULL, LIMITED or BACKGROUND
- * Since SmartDeviceLink 2.0
- * See SDLUnsubscribeVehicleData, SDLGetVehicleData
+ * 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 "SDLRPCRequest.h"
+
NS_ASSUME_NONNULL_BEGIN
+/**
+ * Subscribes for specific published data items. The data will be only sent if it has changed. The application will
+ * be notified by the onVehicleData notification whenever new data is available. To unsubscribe the notifications,
+ * use unsubscribe with the same subscriptionType.
+ *
+ * @since SDL 2.0.0
+ */
@interface SDLSubscribeVehicleData : SDLRPCRequest
/**
@@ -48,7 +72,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for subscribing to all possible vehicle data items.
@@ -83,7 +107,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for subscribing to all possible vehicle data items.
@@ -119,7 +143,44 @@ 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;
+- (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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+
+/**
+ * Convenience init for subscribing to all possible vehicle data items.
+ *
+ * @param accelerationPedalPosition Subscribe to accelerationPedalPosition
+ * @param airbagStatus Subscribe to airbagStatus
+ * @param beltStatus Subscribe to beltStatus
+ * @param bodyInformation Subscribe to bodyInformation
+ * @param cloudAppVehicleID Subscribe to cloudAppVehicleID
+ * @param clusterModeStatus Subscribe to clusterModeStatus
+ * @param deviceStatus Subscribe to deviceStatus
+ * @param driverBraking Subscribe to driverBraking
+ * @param eCallInfo Subscribe to eCallInfo
+ * @param electronicParkBrakeStatus Subscribe to electronicParkBrakeStatus
+ * @param emergencyEvent Subscribe to emergencyEvent
+ * @param engineOilLife Subscribe to engineOilLife
+ * @param engineTorque Subscribe to engineTorque
+ * @param externalTemperature Subscribe to externalTemperature
+ * @param fuelLevel Subscribe to fuelLevel
+ * @param fuelLevelState Subscribe to fuelLevelState
+ * @param fuelRange Subscribe to fuelRange
+ * @param gps Subscribe to gps
+ * @param headLampStatus Subscribe to headLampStatus
+ * @param instantFuelConsumption Subscribe to instantFuelConsumption
+ * @param myKey Subscribe to myKey
+ * @param odometer Subscribe to odometer
+ * @param gearStatus Subscribe to gearStatus
+ * @param rpm Subscribe to rpm
+ * @param speed Subscribe to speed
+ * @param steeringWheelAngle Subscribe to steeringWheelAngle
+ * @param tirePressure Subscribe to tirePressure
+ * @param turnSignal Subscribe to turnSignal
+ * @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 gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus;
+
/**
* A boolean value. If true, subscribes GPS data.
@@ -162,9 +223,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *gearStatus;
+
+/**
* A boolean value. If true, subscribes PRNDL data.
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead");
/**
* A boolean value. If true, subscribes Tire Pressure status data.
diff --git a/SmartDeviceLink/SDLSubscribeVehicleData.m b/SmartDeviceLink/SDLSubscribeVehicleData.m
index a5bd22070..42ec38ffa 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleData.m
@@ -1,12 +1,39 @@
-// SDLSubscribeVehicleData.m
-//
-
+/*
+ * 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 "SDLSubscribeVehicleData.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -15,7 +42,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -68,6 +97,45 @@ 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 fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.accPedalPosition = @(accelerationPedalPosition);
+ self.airbagStatus = @(airbagStatus);
+ self.beltStatus = @(beltStatus);
+ self.bodyInformation = @(bodyInformation);
+ self.cloudAppVehicleID = @(cloudAppVehicleID);
+ self.clusterModeStatus = @(clusterModeStatus);
+ self.deviceStatus = @(deviceStatus);
+ self.driverBraking = @(driverBraking);
+ self.eCallInfo = @(eCallInfo);
+ self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
+ self.emergencyEvent = @(emergencyEvent);
+ self.engineOilLife = @(engineOilLife);
+ self.engineTorque = @(engineTorque);
+ self.externalTemperature = @(externalTemperature);
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.fuelRange = @(fuelRange);
+ self.myKey = @(myKey);
+ self.odometer = @(odometer);
+ self.gps = @(gps);
+ self.headLampStatus = @(headLampStatus);
+ self.instantFuelConsumption = @(instantFuelConsumption);
+ self.gearStatus = @(gearStatus);
+ self.rpm = @(rpm);
+ self.speed = @(speed);
+ self.steeringWheelAngle = @(steeringWheelAngle);
+ self.tirePressure = @(tirePressure);
+ self.turnSignal = @(turnSignal);
+ self.wiperStatus = @(wiperStatus);
+
+ return self;
+}
+
- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -132,6 +200,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameExternalTemperature ofClass:NSNumber.class error:nil];
}
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
+}
+
- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
index 3f4386499..5d588db9e 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
@@ -1,19 +1,44 @@
-// SDLSubscribeVehicleDataResponse.h
-//
+/*
+ * 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 "SDLRPCResponse.h"
@class SDLVehicleDataResult;
+NS_ASSUME_NONNULL_BEGIN
/**
- Response to SDLSubscribeVehicleData
-
- Since SmartDeviceLink 2.0
+ * @since SDL 2.0.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLSubscribeVehicleDataResponse : SDLRPCResponse
/**
@@ -73,11 +98,20 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
- The result of requesting to subscribe to the PRNDL status.
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) SDLVehicleDataResult *gearStatus;
- Optional
+/**
+ * See PRNDL
+ * Optional
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
+@property (nullable, strong, nonatomic) SDLVehicleDataResult *prndl __deprecated_msg("use gearStatus instead");
/**
The result of requesting to subscribe to the tireStatus.
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
index 7ab6b4e63..7047d6b4a 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
@@ -1,13 +1,40 @@
-// SDLSubscribeVehicleDataResponse.m
-//
-
+/*
+ * 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 "SDLSubscribeVehicleDataResponse.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLRPCFunctionNames.h"
#import "SDLVehicleDataResult.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -16,7 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameSubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -86,6 +115,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameExternalTemperature ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setGearStatus:(nullable SDLVehicleDataResult *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLVehicleDataResult *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLVehicleDataResult.class error:nil];
+}
+
- (void)setPrndl:(nullable SDLVehicleDataResult *)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLTransmissionType.h b/SmartDeviceLink/SDLTransmissionType.h
new file mode 100644
index 000000000..a47dcf718
--- /dev/null
+++ b/SmartDeviceLink/SDLTransmissionType.h
@@ -0,0 +1,81 @@
+/*
+ * 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 "SDLEnum.h"
+
+/**
+ * Type of transmission used in the vehicle.
+ *
+ * @since SDL 6.2.0
+ */
+typedef SDLEnum SDLTransmissionType SDL_SWIFT_ENUM;
+
+/**
+ * Manual transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeManual;
+
+/**
+ * Automatic transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeAutomatic;
+
+/**
+ * Semi automatic transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeSemiAutomatic;
+
+/**
+ * Dual clutch transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeDualClutch;
+
+/**
+ * Continuously variable transmission(CVT).
+ */
+extern SDLTransmissionType const SDLTransmissionTypeContinuouslyVariable;
+
+/**
+ * Infinitely variable transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeInfinitelyVariable;
+
+/**
+ * Electric variable transmission.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeElectricVariable;
+
+/**
+ * Direct drive between engine and wheels.
+ */
+extern SDLTransmissionType const SDLTransmissionTypeDirectDrive;
+
diff --git a/SmartDeviceLink/SDLTransmissionType.m b/SmartDeviceLink/SDLTransmissionType.m
new file mode 100644
index 000000000..a7cadca0f
--- /dev/null
+++ b/SmartDeviceLink/SDLTransmissionType.m
@@ -0,0 +1,42 @@
+/*
+ * 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 "SDLTransmissionType.h"
+
+SDLTransmissionType const SDLTransmissionTypeManual = @"MANUAL";
+SDLTransmissionType const SDLTransmissionTypeAutomatic = @"AUTOMATIC";
+SDLTransmissionType const SDLTransmissionTypeSemiAutomatic = @"SEMI_AUTOMATIC";
+SDLTransmissionType const SDLTransmissionTypeDualClutch = @"DUAL_CLUTCH";
+SDLTransmissionType const SDLTransmissionTypeContinuouslyVariable = @"CONTINUOUSLY_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeInfinitelyVariable = @"INFINITELY_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeElectricVariable = @"ELECTRIC_VARIABLE";
+SDLTransmissionType const SDLTransmissionTypeDirectDrive = @"DIRECT_DRIVE";
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.h b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
index 370f34882..d9c23541e 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.h
@@ -1,24 +1,44 @@
-// SDLUnsubscribeVehicleData.h
-//
-
+/*
+ * 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 "SDLRPCRequest.h"
+NS_ASSUME_NONNULL_BEGIN
+
/**
- * This function is used to unsubscribe the notifications from the
- * subscribeVehicleData function
- * <p>
- * Function Group: Location, VehicleInfo and DrivingChara
- * <p>
- * <b>HMILevel needs to be FULL, LIMITED or BACKGROUND</b>
- * </p>
+ * This function is used to unsubscribe the notifications from the subscribeVehicleData function.
*
- * @since SmartDeviceLink 2.0<br/>
- * See SDLSubscribeVehicleData SDLGetVehicleData
+ * @since SDL 2.0.0
*/
-
-NS_ASSUME_NONNULL_BEGIN
-
@interface SDLUnsubscribeVehicleData : SDLRPCRequest
/**
@@ -50,7 +70,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for unsubscribing to all possible vehicle data items.
@@ -85,7 +105,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 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: 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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
/**
* Convenience init for unsubscribing to all possible vehicle data items.
@@ -121,7 +141,44 @@ 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;
+- (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 initWithAccelerationPedalPosition:airbagStatus:beltStatus:bodyInformation:cloudAppVehicleID:clusterModeStatus:deviceStatus:driverBraking:eCallInfo:electronicParkBrakeStatus:emergencyEvent:engineOilLife:engineTorque:externalTemperature:fuelLevel:fuelLevelState:fuelRange:gps:headLampStatus:instantFuelConsumption:myKey:odometer:gearStatus:rpm:speed:steeringWheelAngle:tirePressure:turnSignal:wiperStatus: instead");
+
+
+/**
+ * Convenience init for unsubscribing to all possible vehicle data items.
+ *
+ * @param accelerationPedalPosition Unsubscribe to accelerationPedalPosition
+ * @param airbagStatus Unsubscribe to airbagStatus
+ * @param beltStatus Unsubscribe to beltStatus
+ * @param bodyInformation Unsubscribe to bodyInformation
+ * @param cloudAppVehicleID Unsubscribe to cloudAppVehicleID
+ * @param clusterModeStatus Unsubscribe to clusterModeStatus
+ * @param deviceStatus Unsubscribe to deviceStatus
+ * @param driverBraking Unsubscribe to driverBraking
+ * @param eCallInfo Unsubscribe to eCallInfo
+ * @param electronicParkBrakeStatus Unsubscribe to electronicParkBrakeStatus
+ * @param emergencyEvent Unsubscribe to emergencyEvent
+ * @param engineOilLife Unsubscribe to engineOilLife
+ * @param engineTorque Unsubscribe to engineTorque
+ * @param externalTemperature Unsubscribe to externalTemperature
+ * @param fuelLevel Unsubscribe to fuelLevel
+ * @param fuelLevelState Unsubscribe to fuelLevelState
+ * @param fuelRange Unsubscribe to fuelRange
+ * @param gps Unsubscribe to gps
+ * @param headLampStatus Unsubscribe to headLampStatus
+ * @param instantFuelConsumption Unsubscribe to instantFuelConsumption
+ * @param myKey Unsubscribe to myKey
+ * @param odometer Unsubscribe to odometer
+ * @param gearStatus Unsubscribe from gearStatus
+ * @param rpm Unsubscribe to rpm
+ * @param speed Unsubscribe to speed
+ * @param steeringWheelAngle Unsubscribe to steeringWheelAngle
+ * @param tirePressure Unsubscribe to tirePressure
+ * @param turnSignal Unsubscribe to turnSignal
+ * @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 gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus;
/**
* If true, unsubscribes from GPS
@@ -164,9 +221,19 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) NSNumber<SDLBool> *externalTemperature;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) NSNumber<SDLBool> *gearStatus;
+
+/**
* If true, unsubscribes from PRNDL
+ *
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl;
+@property (strong, nonatomic, nullable) NSNumber<SDLBool> *prndl __deprecated_msg("use gearStatus instead");
/**
* If true, unsubscribes from Tire Pressure
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleData.m b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
index e83148be0..ac2014bd5 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleData.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleData.m
@@ -1,12 +1,39 @@
-// SDLUnsubscribeVehicleData.m
-//
-
+/*
+ * 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 "SDLUnsubscribeVehicleData.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -15,7 +42,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -57,7 +86,10 @@ NS_ASSUME_NONNULL_BEGIN
self.gps = @(gps);
self.headLampStatus = @(headLampStatus);
self.instantFuelConsumption = @(instantFuelConsumption);
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
self.prndl = @(prndl);
+#pragma clang diagnostic pop
self.rpm = @(rpm);
self.speed = @(speed);
self.steeringWheelAngle = @(steeringWheelAngle);
@@ -68,6 +100,46 @@ 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 fuelLevel:(BOOL)fuelLevel fuelLevelState:(BOOL)fuelLevelState fuelRange:(BOOL)fuelRange gps:(BOOL)gps headLampStatus:(BOOL)headLampStatus instantFuelConsumption:(BOOL)instantFuelConsumption myKey:(BOOL)myKey odometer:(BOOL)odometer gearStatus:(BOOL)gearStatus rpm:(BOOL)rpm speed:(BOOL)speed steeringWheelAngle:(BOOL)steeringWheelAngle tirePressure:(BOOL)tirePressure turnSignal:(BOOL)turnSignal wiperStatus:(BOOL)wiperStatus {
+ self = [self init];
+ if (!self) {
+ return nil;
+ }
+
+ self.accPedalPosition = @(accelerationPedalPosition);
+ self.airbagStatus = @(airbagStatus);
+ self.beltStatus = @(beltStatus);
+ self.bodyInformation = @(bodyInformation);
+ self.cloudAppVehicleID = @(cloudAppVehicleID);
+ self.clusterModeStatus = @(clusterModeStatus);
+ self.deviceStatus = @(deviceStatus);
+ self.driverBraking = @(driverBraking);
+ self.eCallInfo = @(eCallInfo);
+ self.electronicParkBrakeStatus = @(electronicParkBrakeStatus);
+ self.emergencyEvent = @(emergencyEvent);
+ self.engineOilLife = @(engineOilLife);
+ self.engineTorque = @(engineTorque);
+ self.externalTemperature = @(externalTemperature);
+ self.fuelLevel = @(fuelLevel);
+ self.fuelLevel_State = @(fuelLevelState);
+ self.fuelRange = @(fuelRange);
+ self.myKey = @(myKey);
+ self.odometer = @(odometer);
+ self.gps = @(gps);
+ self.headLampStatus = @(headLampStatus);
+ self.instantFuelConsumption = @(instantFuelConsumption);
+ self.gearStatus = @(gearStatus);
+ self.rpm = @(rpm);
+ self.speed = @(speed);
+ self.steeringWheelAngle = @(steeringWheelAngle);
+ self.tirePressure = @(tirePressure);
+ self.turnSignal = @(turnSignal);
+ self.wiperStatus = @(wiperStatus);
+
+ return self;
+}
+
+
- (void)setGps:(nullable NSNumber<SDLBool> *)gps {
[self.parameters sdl_setObject:gps forName:SDLRPCParameterNameGPS];
}
@@ -132,6 +204,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameExternalTemperature ofClass:NSNumber.class error:nil];
}
+- (void)setGearStatus:(nullable NSNumber<SDLBool> *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable NSNumber<SDLBool> *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:NSNumber.class error:nil];
+}
+
- (void)setPrndl:(nullable NSNumber<SDLBool> *)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
index da07d6616..107052390 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h
@@ -1,17 +1,43 @@
-// SDLUnsubscribeVehicleDataResponse.h
-//
+/*
+ * 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 "SDLRPCResponse.h"
@class SDLVehicleDataResult;
-
NS_ASSUME_NONNULL_BEGIN
/**
- Response to UnsubscribeVehicleData
-
- since SmartDeviceLink 2.0
+ * @since SDL 2.0.0
*/
@interface SDLUnsubscribeVehicleDataResponse : SDLRPCResponse
@@ -72,11 +98,20 @@ NS_ASSUME_NONNULL_BEGIN
@property (strong, nonatomic, nullable) SDLVehicleDataResult *externalTemperature;
/**
+ * See GearStatus
+ *
+ * @since SDL 6.2.0
+ */
+@property (nullable, strong, nonatomic) SDLVehicleDataResult *gearStatus;
+
+/**
The result of requesting to unsubscribe to the PRNDL status.
Optional
+ * @deprecated
+ * @since SDL 6.2.0
*/
-@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl;
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *prndl __deprecated_msg("use gearStatus instead");
/**
The result of requesting to unsubscribe to the tireStatus.
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
index b86423085..27f3dac78 100644
--- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m
@@ -1,13 +1,40 @@
-// SDLUnsubscribeVehicleDataResponse.m
-//
-
+/*
+ * 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 "SDLUnsubscribeVehicleDataResponse.h"
-
#import "NSMutableDictionary+Store.h"
-#import "SDLRPCParameterNames.h"
-#import "SDLRPCFunctionNames.h"
#import "SDLVehicleDataResult.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -16,7 +43,9 @@ NS_ASSUME_NONNULL_BEGIN
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData]) {
+ self = [super initWithName:SDLRPCFunctionNameUnsubscribeVehicleData];
+ if (!self) {
+ return nil;
}
return self;
}
@@ -86,6 +115,14 @@ NS_ASSUME_NONNULL_BEGIN
return [self.parameters sdl_objectForName:SDLRPCParameterNameExternalTemperature ofClass:SDLVehicleDataResult.class error:nil];
}
+- (void)setGearStatus:(nullable SDLVehicleDataResult *)gearStatus {
+ [self.parameters sdl_setObject:gearStatus forName:SDLRPCParameterNameGearStatus];
+}
+
+- (nullable SDLVehicleDataResult *)gearStatus {
+ return [self.parameters sdl_objectForName:SDLRPCParameterNameGearStatus ofClass:SDLVehicleDataResult.class error:nil];
+}
+
- (void)setPrndl:(nullable SDLVehicleDataResult *)prndl {
[self.parameters sdl_setObject:prndl forName:SDLRPCParameterNamePRNDL];
}
diff --git a/SmartDeviceLink/SDLVehicleDataType.h b/SmartDeviceLink/SDLVehicleDataType.h
index e65cdcef9..94ef95616 100644
--- a/SmartDeviceLink/SDLVehicleDataType.h
+++ b/SmartDeviceLink/SDLVehicleDataType.h
@@ -1,11 +1,41 @@
-// SDLVehicleDataType.h
-//
-
+/*
+ * 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 "SDLEnum.h"
/**
- * Defines the vehicle data types that can be published and/or subscribed to using SDLSubscribeVehicleData. Used in VehicleDataResult
+ * Defines the data types that can be published and subscribed to.
+ *
+ * @since SDL 2.0.0
*/
typedef SDLEnum SDLVehicleDataType SDL_SWIFT_ENUM;
@@ -50,6 +80,12 @@ extern SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature;
extern SDLVehicleDataType const SDLVehicleDataTypeVIN;
/**
+ * Vehicle Gear data
+ * @since SDL 6.2.0
+ */
+extern SDLVehicleDataType const SDLVehicleDataTypeVehicledataGearstatus;
+
+/**
Vehicle PRNDL data
*/
extern SDLVehicleDataType const SDLVehicleDataTypePRNDL;
diff --git a/SmartDeviceLink/SDLVehicleDataType.m b/SmartDeviceLink/SDLVehicleDataType.m
index 895613873..6acc1e3bf 100644
--- a/SmartDeviceLink/SDLVehicleDataType.m
+++ b/SmartDeviceLink/SDLVehicleDataType.m
@@ -1,6 +1,34 @@
-// SDLVehicleDataType.m
-//
-
+/*
+ * 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 "SDLVehicleDataType.h"
@@ -13,7 +41,8 @@ SDLVehicleDataType const SDLVehicleDataTypeFuelConsumption = @"VEHICLEDATA_FUELC
SDLVehicleDataType const SDLVehicleDataTypeFuelRange = @"VEHICLEDATA_FUELRANGE";
SDLVehicleDataType const SDLVehicleDataTypeExternalTemperature = @"VEHICLEDATA_EXTERNTEMP";
SDLVehicleDataType const SDLVehicleDataTypeVIN = @"VEHICLEDATA_VIN";
-SDLVehicleDataType const SDLVehicleDataTypePRNDL = @"VEHICLEDATA_PRNDL";
+SDLVehicleDataType const SDLVehicleDataTypeVehicledataGearstatus = @"VEHICLEDATA_GEARSTATUS";
+SDLVehicleDataType const SDLVehicleDataTypeVehicledataPrndl = @"VEHICLEDATA_PRNDL";
SDLVehicleDataType const SDLVehicleDataTypeTirePressure = @"VEHICLEDATA_TIREPRESSURE";
SDLVehicleDataType const SDLVehicleDataTypeOdometer = @"VEHICLEDATA_ODOMETER";
SDLVehicleDataType const SDLVehicleDataTypeBeltStatus = @"VEHICLEDATA_BELTSTATUS";