summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-02-27 10:42:13 -0500
committerNicoleYarroch <nicole@livio.io>2019-02-27 10:42:13 -0500
commit7cf25b5f737fafdd48361bce6913217068161080 (patch)
treee07fa635b2cafab47aa12ded2c141be81c5848cc
parent8c7f114f20ff56e0bda53e03826f95b08d690e6c (diff)
downloadsdl_ios-7cf25b5f737fafdd48361bce6913217068161080.tar.gz
Added new param to SubscribeVehicleData Response
Added cloudAppVehicleID param to SubscribeVehicleData response
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.h7
-rw-r--r--SmartDeviceLink/SDLSubscribeVehicleDataResponse.m8
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m5
3 files changed, 20 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
index 1cc10c6b3..0fbf17c0b 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.h
@@ -212,6 +212,13 @@ NS_ASSUME_NONNULL_BEGIN
*/
@property (strong, nonatomic, nullable) SDLVehicleDataResult *turnSignal;
+/**
+ The result of requesting to subscribe to the cloud app vehicle ID
+
+ Optional
+ */
+@property (strong, nonatomic, nullable) SDLVehicleDataResult *cloudAppVehicleID;
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
index b39328d7e..6d2c995a4 100644
--- a/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSubscribeVehicleDataResponse.m
@@ -242,6 +242,14 @@ NS_ASSUME_NONNULL_BEGIN
return [parameters sdl_objectForName:SDLNameTurnSignal ofClass:[SDLVehicleDataResult class]];
}
+- (void)setCloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID {
+ [parameters sdl_setObject:cloudAppVehicleID forName:SDLNameCloudAppVehicleID];
+}
+
+- (nullable SDLVehicleDataResult *)cloudAppVehicleID {
+ return [parameters sdl_objectForName:SDLNameCloudAppVehicleID ofClass:SDLVehicleDataResult.class];
+}
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
index aa8000b14..8ea1c9107 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLSubscribeVehicleDataResponseSpec.m
@@ -25,6 +25,7 @@ describe(@"Getter/Setter Tests", ^ {
testResponse.airbagStatus = vehicleDataResult;
testResponse.beltStatus = vehicleDataResult;
testResponse.bodyInformation = vehicleDataResult;
+ testResponse.cloudAppVehicleID = vehicleDataResult;
testResponse.clusterModes = vehicleDataResult;
testResponse.deviceStatus = vehicleDataResult;
testResponse.driverBraking = vehicleDataResult;
@@ -54,6 +55,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
expect(testResponse.beltStatus).to(equal(vehicleDataResult));
expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
expect(testResponse.clusterModes).to(equal(vehicleDataResult));
expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
expect(testResponse.driverBraking).to(equal(vehicleDataResult));
@@ -87,6 +89,7 @@ describe(@"Getter/Setter Tests", ^ {
SDLNameAirbagStatus:vehicleDataResult,
SDLNameBeltStatus:vehicleDataResult,
SDLNameBodyInformation:vehicleDataResult,
+ SDLNameCloudAppVehicleID:vehicleDataResult,
SDLNameClusterModes:vehicleDataResult,
SDLNameDeviceStatus:vehicleDataResult,
SDLNameDriverBraking:vehicleDataResult,
@@ -118,6 +121,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
expect(testResponse.beltStatus).to(equal(vehicleDataResult));
expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
expect(testResponse.clusterModes).to(equal(vehicleDataResult));
expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
expect(testResponse.driverBraking).to(equal(vehicleDataResult));
@@ -151,6 +155,7 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.airbagStatus).to(beNil());
expect(testResponse.beltStatus).to(beNil());
expect(testResponse.bodyInformation).to(beNil());
+ expect(testResponse.cloudAppVehicleID).to(beNil());
expect(testResponse.clusterModes).to(beNil());
expect(testResponse.deviceStatus).to(beNil());
expect(testResponse.driverBraking).to(beNil());