Skip to content
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

Add requirements for mobile projection feature #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
## Functional requirements

1.
In case
device successfully connects over USB transport

and mobile app from this device sends RegisterAppInterface_request with:
- "appHMIType" = PROJECTION
- "isMedia" = false
- other valid params
and HMIType = PROJECTION is allowed by Policies

SDL must

register this mobile app as PROJECTION (isMedia = false) in the system
respond SUCCESS (success:true) resultCode with adding `<displayMode>` param to mobile app in case of NO other failures
send OnAppRegistered notification to HMI

2.
In case
PROJECTION mobile app sends RegisterAppInterface request to SDL
and this request is valid

SDL must

respond SUCCESS (success:true) resultCode with adding `<displayMode>` param to mobile app in case of NO other failures
send OnAppRegistered notification to HMI

3.
In case device successfully connects over USB transport
and mobile app from this device sends RegisterAppInterface_request with:
- "appHMIType" = PROJECTION
- other valid params
and PROJECTION appHMIType is NOT allowed by Policies

SDL must

respond DISALLOWED (success:false) resultCode to mobile app

4.
In case device successfully connects over BT
and PROJECTION mobile app with `<appID>` from this device successfully registers
and SDL receives OnExitApplication (`<appID>`, reason = UNAUTHORIZED_TRANSPORT_REGISTRATION) from HMI

SDL must

unregister application with `<appID>` via OnAppInterfaceUnregistered (APP_UNAUTHORIZED) notification
clean all internal information about app's with `<appID>` non-responded RPCs
ignore all responses and notifications from HMI associated with `<appID>` if received from HMI

## Non-functional requirements

a. New appHMIType "PROJECTION" must be added to HMI_API
b. New appHMIType "PROJECTION" must be added to MOBILE_API
c. Policies Manager must support new "PROJECTION" appHMIType

### Additions to Mobile_API

```
<enum name="AppHMIType">
<description>Enumeration listing possible app types.</description>
<element name="DEFAULT" />
<element name="COMMUNICATION" />
<element name="MEDIA" />
<element name="MESSAGING" />
<element name="NAVIGATION" />
<element name="INFORMATION" />
<element name="SOCIAL" />
<element name="PROJECTION" />
<element name="BACKGROUND_PROCESS" />
<element name="TESTING" />
<element name="SYSTEM" />
</enum>
```

### Additions to HMI_API
```
<enum name="AppHMIType">
<description>Enumeration listing possible app types.</description>
<element name="DEFAULT" />
<element name="COMMUNICATION" />
<element name="MEDIA" />
<element name="MESSAGING" />
<element name="NAVIGATION" />
<element name="INFORMATION" />
<element name="SOCIAL" />
<element name="PROJECTION" />
<element name="BACKGROUND_PROCESS" />
<element name="TESTING" />
<element name="SYSTEM" />
</enum>
```

## Diagram

RegisterAppInterface

![RegisterAppInterface](https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/accessories/projection_app_registration.png)



110 changes: 110 additions & 0 deletions detailed_docs/TRS/mobile_projection/02.projection_app_Resumption.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@

## Functional requirements

1.
In case
device successfully connects over USB transport

and mobile app from this device sends RegisterAppInterface_request with:
- "appHMIType" = PROJECTION
- isMedia = any
- `<hashID>`
- other valid params

and requested `<hashID>` is equal to the value stored for this app

SDL must
start Data Resumption process for this application (by existing rules)

2.
In case
device successfully connects over USB transport

and mobile app from this device sends RegisterAppInterface_request with:
- "appHMIType" = PROJECTION
- isMedia = any
- `<hashID>`
- other valid params

and requested `<hashID>` is NOT equal to the value stored for this app

SDL must
interrupt Data Resumption process for this application (by existing rules)

3.
In case
PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption

SDL must
resume app to FULL or LIMITED HMILevel by sending OnHMIStatus notification to mobile app
notify HMI by sending BC.ActivateApp request (in case of resumption to FULL)
OR BC.OnResumeAudioSource notification (in case of resumption to LIMITED)

4.
In case
SDL receives VR.Started from HMI
and PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption (MEDIA or NON-MEDIA)

SDL must
postpone HMILevel resumption for this app
resume HMILevel ONLY after receiving VR.Stopped from HMI

5.
In case
SDL receives OnEventChanged (EMERGENCY_EVENT, isActive=true) from HMI
and PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption (MEDIA or NON-MEDIA)

SDL must
postpone HMILevel resumption for this app
resume HMILevel ONLY after receiving OnEventChanged (EMERGENCY_EVENT, isActive=false) from HMI

6.
In case
SDL receives OnEventChanged (PHONE_CALL, isActive=true) from HMI
and PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption (MEDIA or NON-MEDIA)

SDL must
postpone HMILevel resumption for this app
resume HMILevel ONLY after receiving OnEventChanged (PHONE_CALL, isActive=false) from HMI

7.
In case
SDL receives OnEventChanged (DEACTIVATE_HMI, isActive=true) from HMI
and PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption (MEDIA or NON-MEDIA)

SDL must
postpone HMILevel resumption for this app
resume HMILevel ONLY after receiving OnEventChanged (DEACTIVATE_HMI, isActive=false) from HMI

8.
In case
SDL receives OnEventChanged (EMBEDDED_NAVI, isActive=true) from HMI
and PROJECTION mobile app successfully registers and satisfies all conditions for HMILevel resumption (MEDIA or NON-MEDIA)

SDL must
cancel HMILevel resumption for this app
assign `<default_HMILevel>` to this app

9.
In case
SDL receives OnEventChanged (AUDIO_SOURCE, isActive=true) from HMI
and PROJECTION MEDIA mobile app successfully registers and satisfies all conditions for HMILevel resumption

SDL must
cancel HMILevel resumption for this app
assign `<default_HMILevel>` to this app

10.
In case
SDL receives OnEventChanged (AUDIO_SOURCE, isActive=true) from HMI
and PROJECTION NON-MEDIA mobile app successfully registers and satisfies all conditions for HMILevel resumption

SDL must
resume HMILevel for this app according to existed rules


## Diagram

Mobile projection application resumption

![Mobile projection application resumption](https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/accessories/HMILevel_and_Data_Resumption.png)
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
## Functional requirements

1.
In case
PROJECTION (isMedia = true) mobile app with `<appID>` is running in any HMILevel other than FULL on HMI
and SDL receives SDL.ActivateApp with this `<appID>` from HMI

SDL must
respond 'SUCCESS, success:true' to HMI in case of NO other failures
send OnHMIStatus (FULL, AUDIBLE) to this app

2.
In case
PROJECTION (isMedia = false) mobile app with `<appID>` in any HMILevel other than FULL on HMI
and SDL receives SDL.ActivateApp with this `<appID>` from HMI

SDL must
respond 'SUCCESS, success:true' to HMI in case of NO other failures
send OnHMIStatus (FULL, NOT_AUDIBLE) to this app

3.
In case
PROJECTION (isMedia = true) mobile app with `<appID>` in `<default_HMILevel>` due to postponed HMILevel resumption (postponed during VR session, Emergency_Event, Deactivate_HMI, PhoneCall)
and SDL receives SDL.ActivateApp (`<appID>`) from HMI

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, AUDIBLE) to this mobile app right after event-for-postponing HMILevel resumption ends (after SDL receives corresponding RPC about event end from HMI, i.e. VR.Stopped)

4.
In case
PROJECTION (isMedia = false) mobile app with `<appID>` in `<default_HMILevel>` due to postponed HMILevel resumption (postponed during VR session, Emergency_Event, Deactivate_HMI, PhoneCall)
and SDL receives SDL.ActivateApp (`<appID>`) from HMI

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, NOT_AUDIBLE) to this mobile app right after event-for-postponing HMILevel resumption ends (after SDL receives corresponding RPC about event end from HMI, i.e. VR.Stopped)

5.
In case
PROJECTION (isMedia = true) mobile app with `<appID>` in BACKGROUND and NOT_AUDIBLE due to active AUDIO_SOURCE

and SDL receives from HMI:
1 - OnEventChanged (AUDIO_SOURCE, isActive:false)
2 - SDL.ActivateApp (`<appID>`)

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, AUDIBLE) to this mobile app

_Note:
If HMI didn`t send OnEventChanged (AUDIO_SOURCE, isActive:false)
SDL send OnHMIStatus AFTER event ends)_

6.
In case
PROJECTION (isMedia = false) mobile app with `<appID>` in BACKGROUND and NOT_AUDIBLE due to active AUDIO_SOURCE
and SDL receives SDL.ActivateApp (`<appID>`) from HMI

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, NOT_AUDIBLE) to this mobile app

7.
In case
PROJECTION (isMedia = true) mobile app with `<appID>` in LIMITED and AUDIBLE due to active EMBEDDED_NAVI

and SDL receives from HMI:
1 - OnEventChanged (EMBEDDED_NAVI, isActive:false)
2 - SDL.ActivateApp (`<appID>`)

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, AUDIBLE) to this mobile app

_Note:_
If HMI didn`t send OnEventChanged (EMBEDDED_NAVI, isActive:false)
SDL behavior in this case - send OnHMIStatus AFTER event ends)_

8.
In case
PROJECTION (isMedia = false) mobile app with `<appID>` in BACKGROUND and NOT_AUDIBLE due to active EMBEDDED_NAVI
and SDL receives SDL.ActivateApp (`<appID>`) from HMI

SDL must
respond with 'SUCCESS, success:true' to HMI
send OnHMIStatus (FULL, NOT_AUDIBLE) to this mobile app

## Diagram

Projection application activation

![Projection application activation](https://github.com/smartdevicelink/sdl_requirements/blob/master/detailed_docs/accessories/projection_app_activation.png)


Loading