Skip to content

Commit

Permalink
Accepted Revision SDL-0293 Enable OEM exclusive apps support (#1106)
Browse files Browse the repository at this point in the history
* Add systemHardwareVersion parameter

* Add agreed-upon revisions

* update the proposal to reflect the agreed-upon revisions

Co-authored-by: Vladyslav Mustafin <vmustafin@luxoft.com>
  • Loading branch information
Ira Lytvynenko (GitHub) and vladmu authored Jan 28, 2021
1 parent 501d60a commit e272967
Showing 1 changed file with 85 additions and 13 deletions.
98 changes: 85 additions & 13 deletions proposals/0293-vehicle-type-filter.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# Enable OEM exclusive apps support

* Proposal: [SDL-0293](0293-vehicle-type-filter.md)
* Author: [Ashwin Karemore](https://github.com/ashwink11)
* Author: [Ashwin Karemore](https://github.com/ashwink11) and [Iryna Lytvynenko](https://github.com/LitvinenkoIra)
* Status: **Accepted with Revisions**
* Impacted Platforms: [Core / iOS / Java Suite / Protocol / JavaScript Suite]
* Impacted Platforms: [Core / iOS / Java Suite / Protocol / JavaScript Suite / HMI / RPC]

## Introduction

Expand Down Expand Up @@ -67,6 +67,40 @@ The BSON payload of this message will have the following info.
|systemSoftwareVersion|String| Vehicle system software version |
|systemHardwareVersion|String| Vehicle system hardware version |

### MOBILE_API Changes

#### Addition of "RegisterAppInterface" function

```xml
<function name="RegisterAppInterface" functionID="RegisterAppInterfaceID" messagetype="response" since="1.0">
:
<param name="vehicleType" type="VehicleType" mandatory="false" since="7.1" deprecated="true">
<description>Specifies the vehicle's type. See VehicleType.</description>
<history>
<param name="vehicleType" type="VehicleType" mandatory="false" since="2.0" until="7.1" />
</history>
</param>
<param name="systemSoftwareVersion" type="String" maxlength="100" mandatory="false" platform="documentation" since="7.1" deprecated="true">
<description>The software version of the system that implements the SmartDeviceLink core.</description>
<history>
<param name="systemSoftwareVersion" type="String" maxlength="100" mandatory="false" platform="documentation" since="3.0" until="7.1">
</history>
</param>
</function>
```
### HMI_API Changes

#### Addition of "GetSystemInfo" function

```xml
<function name="GetSystemInfo" messagetype="response">
:
<param name="systemHardwareVersion" type="String" maxlength="500" mandatory="false">
<description>The hardware version of the system</description>
</param>
</function>
```

### iOS, JavaScript Suite, and Java Suite App Library Changes

The libraries will need to implement the above-mentioned protocol changes. In addition to implementing a protocol message, it will need the additional implementation to propagate vehicle type info to the application layer.
Expand All @@ -81,36 +115,74 @@ The feature for the Java Suite library will be completed using two pull requests

In JavaScript Suite App Library:
```javascript
/**
class SystemInfo {

/**
* Initializes an instance of SystemInfo.
* @class
* @param {VehicleType} vehicleType
* @param {String} systemSoftwareVersion
* @param {String} systemHardwareVersion
*/
constructor (vehicleType = null, systemSoftwareVersion = null, systemHardwareVersion = null) {
this._vehicleType = vehicleType;
this._systemSoftwareVersion = systemSoftwareVersion;
this._systemHardwareVersion = systemHardwareVersion;
}

setVehicleType(vehicleType) {}
getVehicleType() {}

setSystemSoftwareVersion(SystemSoftwareVersion) {}
getSystemSoftwareVersion() {}

setSystemHardwareVersion(SystemHardwareVersion) {}
getSystemHardwareVersion() {}
}

/**
* A way to determine if this SDL session should continue to be active while
* connected to the determined vehicle type.
* @param {SdlManager} sdlManager - A reference to an SdlManager instance.
* @param {VehicleType} vehicleType - the type of vehicle that this session is currently active on.
* connected to the determined system information of the vehicle.
* @param {SystemInfo} systemInfo - the system information of the vehicle that this session is currently active on.
* @returns {Boolean} Return true if this session should continue, false if the session should end
*/
onVehicleTypeReceived (sdlManager, vehicleType) {}
onSystemInfoReceived (systemInfo) {}
```

In iOS App Library:
```objective-c
@interface SDLSystemInfo

@property (strong, nonatomic, readonly) SDLVehicleType *vehicleType;
@property (strong, nonatomic, readonly) NSString *systemSoftwareVersion;
@property (strong, nonatomic, readonly) NSString *systemHardwareVersion;

@end

/**
* A way to determine if this SDL session should continue to be active while
* connected to the determined vehicle type.
* @param {SDLVehicleType} vehicleType - the type of vehicle that this session is currently active on.
* connected to the determined system information of the vehicle.
* @param {SDLSystemInfo} systemInfo - the system information of the vehicle that this session is currently active on.
* @returns {BOOL}Return true if this session should continue, false if the session should end
*/
- (BOOL)didReceiveVehicleType:(SDLVehicleType *)type ;
- (BOOL)didReceiveSystemInfo:(SDLSystemInfo *)systemInfo;
```
In Java SE and Java EE App Libraries:
```java
class SystemInfo {
VehicleType vehicleType
String systemSoftwareVersion,
String systemHardwareVersion
}
/**
* A way to determine if this SDL session should continue to be active while
* connected to the determined vehicle type.
* @param {VehicleType} vehicleType - the type of vehicle that this session is currently active on.
* connected to the determined system information of the vehicle.
* @param {SystemInfo} systemInfo - the system information of the vehicle that this session is currently active on.
* @returns {boolean}Return true if this session should continue, false if the session should end
*/
boolean onVehicleTypeReceived(VehicleType type);
boolean onSystemInfoReceived(SystemInfo systemInfo);
```
#### Android App Library Changes

Expand Down

0 comments on commit e272967

Please sign in to comment.