Skip to content

Commit 42a0185

Browse files
Ira Lytvynenko (GitHub)ShobhitAd
authored andcommitted
Feature/Remote Control - Allow Multiple Modules per Module Type (#171)
* Stucts 1 add new ModuleInfo struct 2 ModuleData -> add `moduleId` param 3 add new Grid struct 4 add struct SeatLocation 5 add new struct SeatLocationCapability 6. ClimateControlCapabilities -> add `moduleInfo` 7. RadioControlCapabilities -> add `moduleInfo` 8. ButtonCapabilities -> add `moduleInfo` 9. AudioControlCapabilities -> add `moduleInfo` 10. HMISettingsControlCapabilities -> add `moduleInfo` 11. LightControlCapabilities -> add `moduleInfo` 12. SeatControlCapabilities -> add `moduleInfo` 13. SeatControlData - remove `id` param 14. SystemCapability struct - > add "seatLocationCapability" Enums 1. remove SupportedSeat 2. SystemCapabilityType -> add SEAT_LOCATION Functions 1. GetInteriorVehicleData_request -> add `moduleId`, add `subscribe` description 2. ButtonPress add "moduleId" 3. GetInteriorVehicleDataConsent_request -> add `moduleIds` 4. GetInteriorVehicleDataConsent_response -> "allowed" add array="true" 5. TTS.SetGlobalProperties_request -> add param `userLocation` 6. RC.GetCapabilities_response -> add param name="seatLocationCapability" * Update RC.GetCapabilities must section * added `id` mandatory=false to SeatControlData added per revision smartdevicelink/sdl_evolution#786 * upd GetCapabilities, GetInteriorVehicleData, OnInteriorVehicleData, OnRCStatus index * upd Consent diagr;GetCapabilities,GetInteriorVehicleData index minor improvments * Apply suggestions from code review Co-Authored-By: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * remove `userLocation` from TTS.SetGlobalProperties * remove `defvalue` for `subscribe` param Co-Authored-By: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * formatting !!! MUST * fix typos in diagr (concent ->consent) * add SetGlobalProperties index * SetGlobalProperties index * add RC_SetGlobalProperties.png,RC_SetGlobalProperties.gliffy * add SetGlobalProperties to RC * Apply suggestions from code review Co-Authored-By: Shobhit Adlakha <ShobhitAd@users.noreply.github.com> * remove p.2
1 parent c2b3c3f commit 42a0185

File tree

14 files changed

+178
-21
lines changed

14 files changed

+178
-21
lines changed

config.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,9 @@
491491
},
492492
{
493493
"name": "OnRCStatus"
494+
},
495+
{
496+
"name": "SetGlobalProperties"
494497
}
495498
]
496499
},

docs/Buttons/ButtonPress/index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The system shall list all available RC radio buttons and RC climate buttons in t
3030
|Name|Type|Mandatory|Additional|Description|
3131
|:---|:----------|:---|:---------|:---------|
3232
|moduleType|[Common.ModuleType](../../common/enums/#moduletype)|true| |The module where the button should be pressed|
33+
|moduleId|String|false|maxlength="100"|Id of a module, published by System Capability.|
3334
|buttonName|[Common.ButtonName](../../common/enums/#buttonname)|true| | |
3435
|buttonPressMode|[Common.ButtonPressMode](../../common/enums/#buttonpressmode)|true| |Indicates whether this is a LONG or SHORT button press event.|
3536
|appID|Integer|true| |Internal SDL-assigned ID of the related application|

docs/Common/Enums/index.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1146,13 +1146,6 @@
11461146
|RESTORE|1|Restore / apply the seat memory settings to the current seat.|
11471147
|NONE|2|No action to be performed.|
11481148

1149-
### SupportedSeat
1150-
1151-
|Name|Value|Description|
1152-
|:---|:----|:----------|
1153-
|DRIVER|0|List possible seats that is a remote controllable seat.|
1154-
|FRONT_PASSENGER|1|List possible seats that is a remote controllable seat.|
1155-
11561149
### DeliveryMode
11571150
|Name|Value|Description|
11581151
|:---|:----|:----------|
@@ -1188,6 +1181,7 @@
11881181
|REMOTE_CONTROL|3||
11891182
|APP_SERVICES|4||
11901183
|DISPLAYS|5||
1184+
|SEAT_LOCATION|6||
11911185

11921186
### MediaType
11931187

docs/Common/Structs/index.md

Lines changed: 42 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
## Structs
1+
## Structs
22

33
### ImageResolution
44

@@ -269,6 +269,7 @@
269269
|shortPressAvailable|Boolean|true|||
270270
|longPressAvailable|Boolean|true|||
271271
|upDownAvailable|Boolean|true|||
272+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
272273

273274
### VrHelpItem
274275

@@ -495,6 +496,7 @@
495496
|Name|Type|Mandatory|Additional|Description|
496497
|:---|:---|:--------|:---------|:----------|
497498
|moduleType|Common.ModuleType|true||The moduleType indicates which type of data should be changed and identifies which data object exists in this struct. For example, if the moduleType is CLIMATE then a "climateControlData" should exist|
499+
|moduleId|String|false|maxlength: 100|Id of a module, published by System Capability.|
498500
|radioControlData|Common.RadioControlData|false|||
499501
|climateControlData|Common.ClimateControlData|false|||
500502
|audioControlData|Common.AudioControlData|false|||
@@ -591,6 +593,7 @@
591593
|Name|Type|Mandatory|Additional|Description|
592594
|:---|:---|:--------|:---------|:----------|
593595
|moduleName|String|true|maxlength: 100|The short friendly name of the climate control module. It should not be used to identify a module by mobile application.|
596+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
594597
|fanSpeedAvailable|Boolean|false||Availability of the control of fan speed <br> True: Available, False: Not Available, Not present: Not Available.|
595598
|desiredTemperatureAvailable|Boolean|false||Availability of the control of desired temperature. <br> True: Available, False: Not Available, Not present: Not Available.|
596599
|acEnableAvailable|Boolean|false||Availability of the control of turn on/off AC. <br> True: Available, False: Not Available, Not present: Not Available.|
@@ -613,6 +616,7 @@
613616
|Name|Type|Mandatory|Additional|Description|
614617
|:---|:---|:--------|:---------|:----------|
615618
|moduleName|String|true|maxlength="100"|The short friendly name of the light control module. <br> It should not be used to identify a module by mobile application.|
619+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
616620
|sourceAvailable|Boolean|false||Availability of the control of audio source.|
617621
|keepContextAvailable|Boolean|false||Availability of the parameter keepContext.|
618622
|volumeAvailable|Boolean|false||Availability of the control of audio volume.|
@@ -652,6 +656,7 @@
652656
|Name|Type|Mandatory|Additional|Description|
653657
|:---|:---|:--------|:---------|:----------|
654658
|moduleName|String|true|maxlength="100"|The short friendly name of the light control module. <br> It should not be used to identify a module by mobile application.|
659+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
655660
|supportedLights|Common.LightCapabilities|true|minsize="1" <br> maxsize="100" <br> array="true"| An array of available LightCapabilities that are controllable.|
656661

657662

@@ -677,6 +682,7 @@
677682
|Name|Type|Mandatory|Additional|Description|
678683
|:---|:---|:--------|:---------|:----------|
679684
|moduleName|String|true|maxlength="100"|The short friendly name of the hmi setting module. <br> It should not be used to identify a module by mobile application.|
685+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
680686
|distanceUnitAvailable|Boolean|false||Availability of the control of distance unit.|
681687
|temperatureUnitAvailable|Boolean|false||Availability of the control of temperature unit.|
682688
|displayModeUnitAvailable|Boolean|false||Availability of the control of HMI display mode.|
@@ -695,6 +701,7 @@
695701
|Name|Type|Mandatory|Additional|Description|
696702
|:---|:---|:--------|:---------|:----------|
697703
|moduleName|String|true|maxlength: 100| The short friendly name of the climate control module. <br> It should not be used to identify a module by mobile application.|
704+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
698705
|radioEnableAvailable|Boolean|false||Availability of the control of enable/disable radio. <br> True: Available, False: Not Available, Not present: Not Available.|
699706
|radioBandAvailable|Boolean|false||Availability of the control of radio band. <br> True: Available, False: Not Available, Not present: Not Available.|
700707
|radioFrequencyAvailable|Boolean|false||Availability of the control of radio frequency. <br> True: Available, False: Not Available, Not present: Not Available.|
@@ -764,7 +771,7 @@
764771

765772
|Name|Type|Mandatory|Additional|Description|
766773
|:---|:---|:--------|:---------|:----------|
767-
|id|Common.SupportedSeat|true|||
774+
|id|Common.SupportedSeat|false||
768775
|heatingEnabled|Boolean|false||
769776
|coolingEnabled|Boolean|false||
770777
|heatingLevel|Integer|false|minvalue="0" <br> maxvalue="100"||
@@ -786,6 +793,7 @@
786793
|Name|Type|Mandatory|Additional|Description|
787794
|:---|:---|:--------|:---------|:----------|
788795
|moduleName|String|true|maxlength="100"|The short friendly name of the light control module. <br> It should not be used to identify a module by mobile application.|
796+
|moduleInfo|Common.ModuleInfo|false||Information about a RC module, including its id.|
789797
|heatingEnabledAvailable|Boolean|false|||
790798
|coolingEnabledAvailable|Boolean|false|||
791799
|heatingLevelAvailable|Boolean|false|||
@@ -895,6 +903,7 @@
895903
|videoStreamingCapability|Common.VideoStreamingCapability|false||Describes extended capabilities of the module's phone feature|
896904
|remoteControlCapability|Common.RemoteControlCapabilities|false||Describes extended capabilities of the module's phone feature|
897905
|appServicesCapabilities|Common.AppServicesCapabilities|false||An array of currently available services. If this is an update to the capability the affected services will include an update reason in that item|
906+
|seatLocationCapability|Common.SeatLocationCapability|false||Contains information about the locations of each seat|
898907

899908
### MediaServiceManifest
900909

@@ -1043,3 +1052,34 @@ There are no defined parameters for this struct.
10431052
|numCustomPresetsAvailable|Integer|false|minvalue: 1 <br>maxvalue: 100|The number of on-window custom presets available (if any); otherwise omitted.|
10441053
|buttonCapabilities|Common.ButtonCapabilities|false|array: true<br>minsize: 1<br>maxsize: 100|The number of buttons and the capabilities of each on-window button.|
10451054
|softButtonCapabilities|Common.SoftButtonCapabilities|false|array: true<br>minsize: 1<br>maxsize: 100|The number of soft buttons available on-window and the capabilities for each button.|
1055+
1056+
### ModuleInfo
1057+
|Name|Type|Mandatory|Additional|Description|
1058+
|:---|:---|:--------|:---------|:----------|
1059+
|moduleId|String|true|maxlength: 100|uuid of a module. "moduleId + moduleType" uniquely identify a module.|
1060+
|location|Common.Grid|false||Location of a module.|
1061+
|serviceArea|Common.Grid|false||Service area of a module.|
1062+
|allowMultipleAccess|Boolean|false|defValue: true|allow multiple users/apps to access the module or not|
1063+
1064+
### Grid
1065+
|Name|Type|Mandatory|Additional|Description|
1066+
|:---|:---|:--------|:---------|:----------|
1067+
|col|Integer|true|minvalue: -1 <br>maxvalue: 100|Describes a location (origin coordinates and span) of a vehicle component.|
1068+
|row|Integer|true|minvalue: -1 <br>maxvalue: 100|Describes a location (origin coordinates and span) of a vehicle component.|
1069+
|level|Integer|false|minvalue: -1 <br> maxvalue: 100 <br> defvalue: 0|Describes a location (origin coordinates and span) of a vehicle component.|
1070+
|colspan|Integer|false|minvalue: 1 <br> maxvalue: 100 <br> defvalue: 1|Describes a location (origin coordinates and span) of a vehicle component.|
1071+
|rowspan|Integer|false|minvalue: 1 <br> maxvalue: 100 <br> defvalue: 1|Describes a location (origin coordinates and span) of a vehicle component.|
1072+
|levelspan|Integer|false|minvalue: 1 <br> maxvalue: 100 <br> defvalue: 1|Describes a location (origin coordinates and span) of a vehicle component.|
1073+
1074+
### SeatLocationCapability
1075+
|Name|Type|Mandatory|Additional|Description|
1076+
|:---|:---|:--------|:---------|:----------|
1077+
|rows|Integer|false|minvalue: 1 <br>maxvalue: 100|Contains information about the locations of each seat.|
1078+
|columns|Integer|false|minvalue: 1 <br>maxvalue: 100|Contains information about the locations of each seat.|
1079+
|levels|Integer|false|minvalue: 1 <br>maxvalue: 100 <br> defvalue:1|Contains information about the locations of each seat.|
1080+
|seats|Common.SeatLocation|false|array: true|Contains a list of SeatLocation in the vehicle, the first element is the driver's seat|
1081+
1082+
### SeatLocation
1083+
|Name|Type|Mandatory|Additional|Description|
1084+
|:---|:---|:--------|:---------|:----------|
1085+
|grid|Common.Grid|false||Describes the location of a seat. HMI shall include this parameter when publishing seat locations in capabilities.|

docs/RC/GetCapabilities/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,12 +19,21 @@ The [`RemoteControlCapabilities`](../../common/structs/#remotecontrolcapabilitie
1919
This RPC has no additional parameter requirements
2020

2121
### Response
22+
!!! must
23+
24+
1. Provide `moduleInfo` with `moduleID` for each module of all module types in GetCapabilities_respose to SDL if it supports multiple modules per module type.
25+
2. Determine and provide default `moduleID` for the moduleType and publish it as the first item in RemoteControlCapabilities.
26+
3. Publish how many rows, columns and levels are available for the vehicle and the list of modules in properly defined grids.
27+
28+
!!!
29+
2230

2331
#### Parameters
2432

2533
|Name|Type|Mandatory|Additional|
2634
|:---|:---|:--------|:---------|
2735
|remoteControlCapability|[Common.RemoteControlCapabilities](../../common/structs/#remotecontrolcapabilities)|false|See RemoteControlCapabilities, all available RC modules and buttons shall be returned|
36+
|seatLocationCapability|[Common.SeatLocationCapability](../../common/structs/#seatlocationcapability)|false|See SeatLocationCapability, all available seat locations shall be returned.|
2837

2938
### Sequence Diagrams
3039

docs/RC/GetInteriorVehicleData/index.md

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,29 +10,33 @@ Purpose
1010
: To read RC module status data. The same function is used to subscribe/unsubscribe to RC module status/setting change notifications.
1111

1212
GetInteriorVehicleData is a request originated by a Remote Control Mobile Application.
13-
If the parameter `subscribe` is set to `true`, the mobile application has requested to subscribe to the module data defined by the [`moduleType`](../../common/enums/#moduletype) parameter.
14-
SDL maintains the `moduleType` subscription status as a whole. SDL needs to subscribe to a module if there is at least one app that subscribes to the module. SDL needs to unsubscribe from a module if no apps subscribe to the module.
13+
If the parameter `subscribe` is set to `true`, the mobile application has requested to subscribe to the module data defined by `moduleId` + `moduleType` parameters.
14+
SDL core allocates resources by a module (`moduleId` + `moduleType`).
15+
SDL needs to subscribe to a module if there is at least one app that subscribes to the module. SDL needs to unsubscribe from a module if no apps subscribe to the module.
1516

16-
SDL forwards a GetInteriorVehicleData request to HMI only if there is no cached data available for the requested `moduleType` or it needs to unsubscribe to the module from HMI.
17+
SDL forwards a GetInteriorVehicleData request to HMI only if there is no cached data available for the requested module (`moduleId` + `moduleType`) or it needs to subscribe to/unsubscribe from the module from HMI.
1718
Otherwise, SDL responds to the request with the cached data without forwarding it to HMI.
1819

19-
The HMI should only return interior vehicle data that corresponds to the request`moduleType`. For example, if `moduleType = CLIMATE`, only return [`ClimateControlData`](../../common/structs/#climatecontroldata) and do not return [`RadioControlData`](../../common/structs/#radiocontroldata).
20+
The HMI should return interior vehicle data that corresponds to the requested module (`moduleId` + `moduleType`).
2021

2122
### Request
2223

23-
GetInteriorVehicleData is a request originated by a Remote Control Mobile Application. The HMI should only return interior vehicle data that corresponds to the request module type.
24-
For example, if `moduleType = CLIMATE`, only return [`ClimateControlData`](../../common/structs/#climatecontroldata) and do not return [`RadioControlData`](../../common/structs/#radiocontroldata).
24+
GetInteriorVehicleData is a request originated by a Remote Control Mobile Application.
25+
If the optional `moduleId` is not provided in a GetInteriorVehicleData_request from a Remote Control Mobile Application, and if there is at least one module (published by capabilities) of the same moduleType, SDL core will use the default `moduleId` (the moduleId of first module provided in RC capabilities for requested `moduleType`) when processing the request.
2526

2627
If the parameter `subscribe` is set to true, the mobile application has requested to subscribe to the module data defined by the [`moduleType`](../../common/enums/#moduletype) parameter.
2728

2829
#### Parameters
2930

30-
|Name|Type|Mandatory|Additional|
31-
|:---|:---|:--------|:---------|
32-
|moduleType|[Common.ModuleType](../../common/enums/#moduletype)|true||
33-
|subscribe|Boolean|false|defvalue="false"|
31+
|Name|Type|Mandatory|Additional|Description|
32+
|:---|:---|:--------|:---------|:---------------|
33+
|moduleType|[Common.ModuleType](../../common/enums/#moduletype)|true||The type of a RC module to retrieve module data from the vehicle. <br> In the future, this should be the Identification of a module.|
34+
|moduleId|String|false|maxlength: 100|Id of a module, published by System Capability.|
35+
|subscribe|Boolean|false||If subscribe is true, the head unit will register OnInteriorVehicleData notifications for the requested module (moduleId and moduleType). <br> If subscribe is false, the head unit will unregister OnInteriorVehicleData notifications for the requested module (moduleId and moduleType). <br> If subscribe is not included, the subscription status of the app for the requested module (moduleId and moduleType) will remain unchanged.|
3436

3537
### Response
38+
39+
HMI must provide optional `moduleId` param in GetInteriorVehicleData_response.
3640
HMI must return in GetInteriorVehicleData_response the current value of the display mode used in HMI if `moduleType = HMI_SETTINGS` .
3741

3842
#### Parameters

docs/RC/GetInteriorVehicleDataConsent/assets/GetInteriorVehicleDataConsent.gliffy

Lines changed: 1 addition & 0 deletions
Large diffs are not rendered by default.
99.9 KB
Loading

docs/RC/GetInteriorVehicleDataConsent/index.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,15 @@ The driver is expected to have an ability to grant or deny the permission.
2626
|Name|Type|Mandatory|Additional|Description|
2727
|:---|:---|:--------|:---------|:----------|
2828
|moduleType|[Common.ModuleType](../../common/enums/#moduletype)|true| |The module type that the app requests to control|
29+
|moduleIds|String|false|array: true<br>maxlength: 100|Ids of a module of same type, published by System Capability|
2930
|appID|Integer|true| |ID of the application that triggers the permission prompt|
3031

3132
### Response
3233

3334
#### Parameters
3435
|Name|Type|Mandatory|Additional|Description|
3536
|:---|:---|:--------|:---------|:----------|
36-
|allowed|Boolean|true| |"true" - if the driver grants the permission for controlling to the named app; <br> "false" - in case the driver denies the permission for controlling to the named app.|
37+
|allowed|Boolean|true|array: true|"true" - if the driver grants the permission for controlling to the named app; <br> "false" - in case the driver denies the permission for controlling to the named app.|
3738

3839
### Sequence Diagrams
3940

docs/RC/OnInteriorVehicleData/index.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,17 @@ Sender
99
Purpose
1010
: Inform SDL about any changes in RC module settings.
1111

12-
!!! must
12+
1313

1414
The HMI must send RC.OnInteriorVehicleData notification to SDL when module settings were changed in case of button press event or after SetInteriorVehicledata request was processed.
1515

16+
!!! MUST
17+
18+
The HMI must always include a `moduleId` for a `ModuleData` in OnInteriorVehicleData notification.
19+
1620
The HMI must send RC.OnInteriorVehicleData notification with the current display mode to all mobile RC applications that are subscribed to the HMI settings
1721
if the driver (or other applications) or HMI itself change the display mode in the HMI settings.
22+
1823
!!!
1924

2025
### Notification

0 commit comments

Comments
 (0)