summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Gluck <justin.gluck@livio.io>2019-09-30 15:48:42 -0400
committerJustin Gluck <justin.gluck@livio.io>2019-09-30 15:48:42 -0400
commit007234e85ab76126aeec75eec90af92dd70c5482 (patch)
tree6cb3d37e4709783f05b96056ec0c50fda02de7f8
parentc80a6c2071aeaec6d2d0803e1053a4772445c42b (diff)
downloadsdl_ios-007234e85ab76126aeec75eec90af92dd70c5482.tar.gz
Update some RPC response params to be optional
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.h4
-rw-r--r--SmartDeviceLink/SDLDiagnosticMessageResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetDTCsResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.h4
-rw-r--r--SmartDeviceLink/SDLGetSystemCapabilityResponse.m4
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h4
-rw-r--r--SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m4
10 files changed, 24 insertions, 16 deletions
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.h b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
index f78dbe2dc..aca74a779 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.h
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.h
@@ -16,9 +16,9 @@ NS_ASSUME_NONNULL_BEGIN
/**
Array of bytes comprising CAN message result.
- Required
+ Optional
*/
-@property (strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
+@property (nullable, strong, nonatomic) NSArray<NSNumber<SDLInt> *> *messageDataResult;
@end
diff --git a/SmartDeviceLink/SDLDiagnosticMessageResponse.m b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
index 8863f97ec..a7b5cc254 100644
--- a/SmartDeviceLink/SDLDiagnosticMessageResponse.m
+++ b/SmartDeviceLink/SDLDiagnosticMessageResponse.m
@@ -20,11 +20,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setMessageDataResult:(NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (void)setMessageDataResult:(nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
[self.parameters sdl_setObject:messageDataResult forName:SDLRPCParameterNameMessageDataResult];
}
-- (NSArray<NSNumber<SDLInt> *> *)messageDataResult {
+- (nullable NSArray<NSNumber<SDLInt> *> *)messageDataResult {
NSError *error = nil;
return [self.parameters sdl_objectsForName:SDLRPCParameterNameMessageDataResult ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.h b/SmartDeviceLink/SDLGetDTCsResponse.h
index 3a8a5a99f..fd05f4196 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.h
+++ b/SmartDeviceLink/SDLGetDTCsResponse.h
@@ -16,8 +16,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
2 byte ECU Header for DTC response (as defined in VHR_Layout_Specification_DTCs.pdf)
+
+ Optional
*/
-@property (strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
+@property (nullable, strong, nonatomic) NSNumber<SDLInt> *ecuHeader;
/**
Array of all reported DTCs on module (ecuHeader contains information if list is truncated). Each DTC is represented by 4 bytes (3 bytes of data and 1 byte status as defined in VHR_Layout_Specification_DTCs.pdf).
diff --git a/SmartDeviceLink/SDLGetDTCsResponse.m b/SmartDeviceLink/SDLGetDTCsResponse.m
index 087990a88..3d141c96a 100644
--- a/SmartDeviceLink/SDLGetDTCsResponse.m
+++ b/SmartDeviceLink/SDLGetDTCsResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setEcuHeader:(NSNumber<SDLInt> *)ecuHeader {
+- (void)setEcuHeader:(nullable NSNumber<SDLInt> *)ecuHeader {
[self.parameters sdl_setObject:ecuHeader forName:SDLRPCParameterNameECUHeader];
}
-- (NSNumber<SDLInt> *)ecuHeader {
+- (nullable NSNumber<SDLInt> *)ecuHeader {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameECUHeader ofClass:NSNumber.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
index 372531877..5ab234ed0 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested data
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
/**
It is a conditional-mandatory parameter: must be returned in case "subscribe" parameter was present in the related request.
diff --git a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
index d57c35ad8..c729e66ee 100644
--- a/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLGetInteriorVehicleDataResponse.m
@@ -22,11 +22,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
index 2c4372651..215a4c409 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.h
@@ -22,8 +22,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The requested system capability, of the type that was sent in the request
+
+ Optional
*/
-@property (strong, nonatomic) SDLSystemCapability *systemCapability;
+@property (nullable, strong, nonatomic) SDLSystemCapability *systemCapability;
@end
diff --git a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
index c3abcc757..730f74c71 100644
--- a/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
+++ b/SmartDeviceLink/SDLGetSystemCapabilityResponse.m
@@ -30,11 +30,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setSystemCapability:(SDLSystemCapability *)systemCapability {
+- (void)setSystemCapability:(nullable SDLSystemCapability *)systemCapability {
[self.parameters sdl_setObject:systemCapability forName:SDLRPCParameterNameSystemCapability];
}
-- (SDLSystemCapability *)systemCapability {
+- (nullable SDLSystemCapability *)systemCapability {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameSystemCapability ofClass:SDLSystemCapability.class error:&error];
}
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
index 100509051..57690e013 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.h
@@ -14,8 +14,10 @@ NS_ASSUME_NONNULL_BEGIN
/**
The new module data for the requested module
+
+ Optional
*/
-@property (strong, nonatomic) SDLModuleData *moduleData;
+@property (nullable, strong, nonatomic) SDLModuleData *moduleData;
@end
diff --git a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
index 12a00779b..c99551675 100644
--- a/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
+++ b/SmartDeviceLink/SDLSetInteriorVehicleDataResponse.m
@@ -21,11 +21,11 @@ NS_ASSUME_NONNULL_BEGIN
}
#pragma clang diagnostic pop
-- (void)setModuleData:(SDLModuleData *)moduleData {
+- (void)setModuleData:(nullable SDLModuleData *)moduleData {
[self.parameters sdl_setObject:moduleData forName:SDLRPCParameterNameModuleData];
}
-- (SDLModuleData *)moduleData {
+- (nullable SDLModuleData *)moduleData {
NSError *error = nil;
return [self.parameters sdl_objectForName:SDLRPCParameterNameModuleData ofClass:SDLModuleData.class error:&error];
}