-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SDL-0221 Remote Control - Allow Multiple Modules per Module Type #1361
Implement SDL-0221 Remote Control - Allow Multiple Modules per Module Type #1361
Conversation
Deprecate SupportedSeat & SDLSupportedSeat Id
Parse moduleId params
Fix errors
Fix SDL warning
3a29126
to
1a533e3
Compare
@SatbirTanda as there is a currently an Evolution Proposal in review regarding this feature (here), we will need to wait for that proposal to be voted on by the SDLC Steering Committee before reviewing this PR. The vote is scheduled to take place 2019-07-30. |
@theresalech ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also please make sure to add SeatLocationCapability
to the SDLSystemCapabilityManager
in order for a developer to access this information.
/** | ||
* Information about a RC module, including its id. | ||
* | ||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please mark this as optional in the documention
@@ -50,7 +50,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mark documentation to state this is optional
SmartDeviceLink/SDLButtonPress.h
Outdated
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please be sure to mark all optimal parameters as optional if needed.
@@ -162,7 +162,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add that this is optional in documentation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see SDLSystemCapabilityManager.h
for examples
@@ -42,30 +42,6 @@ - (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOO | |||
return self; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There should be an init that includes the new parameter with all properties like you did in the other capabilities files.
@@ -86,7 +86,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update the documentation to state this is optional
@@ -51,7 +51,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please update documentation to state this is optional
@@ -42,30 +42,6 @@ - (instancetype)initWithModuleName:(NSString *)moduleName fanSpeedAvailable:(BOO | |||
return self; | |||
} | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this class have an init that includes moduleInfo
like you did in SDLAudioControlCapabilities.h
@@ -197,7 +197,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* | |||
* SDLModuleInfo | |||
*/ | |||
@property (strong, nonatomic) SDLModuleInfo *moduleInfo; | |||
@property (nullable, strong, nonatomic) SDLModuleInfo *moduleInfo; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I believe this class should have an init that includes moduleInfo
like you did in SDLAudioControlCapabilities.h
@@ -28,7 +28,7 @@ NS_ASSUME_NONNULL_BEGIN | |||
* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was a convince init
not added that includes the menuID
?
@theresalech ready for rereview |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some small minor things left, looks good overall
SmartDeviceLink/SDLButtonPress.h
Outdated
@@ -15,14 +15,23 @@ NS_ASSUME_NONNULL_BEGIN | |||
|
|||
@interface SDLButtonPress : SDLRPCRequest | |||
|
|||
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType; | |||
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId instead"));; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId instead"));; | |
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId: instead"));; |
SmartDeviceLink/SDLButtonPress.h
Outdated
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType; | ||
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType __deprecated_msg(("Use initWithButtonName:moduleType:moduleId instead"));; | ||
|
||
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType moduleId:(nullable NSString *)moduleId; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType moduleId:(nullable NSString *)moduleId; | |
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId; |
SmartDeviceLink/SDLButtonPress.m
Outdated
@@ -32,6 +32,19 @@ - (instancetype)initWithButtonName:(SDLButtonName) buttonName moduleType:(SDLMod | |||
return self; | |||
} | |||
|
|||
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType moduleId:(nullable NSString *)moduleId { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType) moduleType moduleId:(nullable NSString *)moduleId { | |
- (instancetype)initWithButtonName:(SDLButtonName)buttonName moduleType:(SDLModuleType)moduleType moduleId:(nullable NSString *)moduleId { |
@theresalech ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything looks good from a code review. I still have to test this feature against core.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While testing I found one more thing that needs to be addressed, all the file imports you added to SmartDeviceLink.podspec
also needs to be added to SmartDeviceLink-iOS.podspec
. Please make those changes. Please also double check that all needed files have be added to those two files.
@theresalech ready for re-review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One more minor update, it appears Request Handlers are not working for the new RPCs. To fix this please add SDLDidReceiveGetInteriorVehicleDataConsentResponse
and SDLDidReceiveReleaseInteriorVehicleDataModuleResponse
to SDLNotificationConstants.m
s allResponseNames
array
Make recommended fix
@theresalech ready for review |
Changes look good. Still need to test against core when core issues are fixed. |
@justingluck93, there are no opened issues in core right now. Could you please specify about which issues are talking about? |
The issues is with an open PR smartdevicelink/sdl_core#2984 not anything currently in core. It deals with getting consent to control a module. |
@justingluck93 , could you please specify preconditions, steps for reproduction and SDL logs. |
@SatbirTanda Please be informed, that
that describe the new behavior for
Also in these comments, you can find references to commits with appropriate changes in |
One last thing. I just got information that the Mobile api needs to be changed slightly.
The
Please make this change in all needed places. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some minor changes due to a change in the mobile API
|
||
Required | ||
*/ | ||
@property (strong, nonatomic) NSArray<NSNumber<SDLBool> *> *allowed; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should now be changed to
@property (strong, nonatomic) NSArray<NSNumber<SDLBool> *> *allowed; | |
@property (strong, nonatomic, nullable) NSArray<NSNumber<SDLBool> *> *allowed; |
} | ||
#pragma clang diagnostic pop | ||
|
||
- (void)setAllowed:(NSArray<NSNumber<SDLBool> *> *)allowed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (void)setAllowed:(NSArray<NSNumber<SDLBool> *> *)allowed { | |
- (void)setAllowed:(nullable NSArray<NSNumber<SDLBool> *> *)allowed { |
[self.parameters sdl_setObject:allowed forName:SDLRPCParameterNameAllowed]; | ||
} | ||
|
||
- (NSArray<NSNumber<SDLBool> *> *)allowed { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- (NSArray<NSNumber<SDLBool> *> *)allowed { | |
- (nullable NSArray<NSNumber<SDLBool> *> *)allowed { |
Make allowed param to be optional
@theresalech ready for review |
Fixes #1272
This PR is ready for review.
Risk
This PR makes minor API changes.
Testing Plan
Added Unit Tests
Summary
Create 2 new RPCs (GetInteriorVehicleDataConsent & ReleaseInteriorVehicleDataModule) and add moduleId and moduleType param to existing classes. Deprecate SDLSeatLocation and a few initializers.
CLA