Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -79,36 +113,74 @@ The libraries will need to implement the above-mentioned protocol changes. In ad

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