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

Feature/Submenu icon #79

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
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
76 changes: 76 additions & 0 deletions detailed_docs/UI/AddSubMenu/AddSubMenu_TRS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
## Functional Requirements

#### 1. ResultCodes

1.
In case mobile application sends valid and allowed by Policies AddSubMenu_request to SDL

SDL must:

- transfer AddSubMenu_request to HMI
- respond with `<resultCode>` received from HMI to mobile application

2.
In case mobile application sends a sub menu with "menuName" the same as one of subMenus created before for this application

SDL must:
- respond with "resultCode "DUPLICATE_NAME" and general result succcess="false"
- not transfer this RPC to HMI


#### 2. AddSubMenuIcon

3.
In case
mobile application sends valid AddSubMenu_request to SDL with `<menuIcon>` parameter

and the requested `<menuIcon>` exists at app's sub-directory of AppStorageFolder (the value defined at .ini file)


SDL must:
- transfer AddSubMenu (`<menuIcon>`, other params)_request to HMI
- respond with `<resultCode>` received from HMI to mobile application

4.
In case
mobile application sends valid AddSubMenu_request to SDL **without** `<menuIcon>` parameter

SDL must:
- transfer AddSubMenu (other params)_request to HMI (thus, without `<menuIcon>`)
- respond with `<resultCode>` received from HMI to mobile application

5.
In case
mobile app sends valid AddSubMenu_request to SDL with:
-> valid `<menuIcon>` parameter
and the requested `<menuIcon>`does NOT exist at app's sub-directory of "AppStorageFolder" (the value from .ini file)

SDL must:
- transfer AddSubMenu (`<menuIcon>`, other params)_request to HMI
- respond with `<resultCode>` received from HMI + info: "Reference image(s) not found"

## Non-Functional Requirements
### Mobile API additions

```xml
<function name="AddSubMenu" functionID="AddSubMenuID" messagetype="request">
:
<param name="menuIcon" type="Image" mandatory="false" />
</function>
```

### HMI API additions

```xml
<function name="AddSubMenu" messagetype="request">
:
<param name="menuIcon" type="Common.Image" mandatory="false" />
</function>
```
## Diagram

AddSubMenu
![AddSubMenu](detailed_docs/accessories/AddSubMenu.png)

AddSubMenu_menuIcon
![AddSubMenu_menuIcon](detailed_docs/accessories/AddSubMenu_menuIcon.png)
54 changes: 54 additions & 0 deletions detailed_docs/UI/AddSubMenu/AddSubMenu_UC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
## Use Case 1: Mobile app is adding a sub menu with referenced image

**Main Flow:**

_Pre-conditions:_

a. SDL amd HMI are started

b. Mobile application is registered on SDL

c. An image was successfully added to the system by mobile application


_Steps:_
1. Application requests to add a sub menu to the specified application's menu with the referenced image

_Expected:_

2. SDL checks if such request is valid
3. SDL checks if such request is allowed by Policies for this app
4. SDL transfers the request to HMI
5. HMI displays submenu with the referenced image
5. SDL receives response from HMI
6. SDL transfers response to mobile application

**Exception 1:**

1.a.1. The image referenced by the application for displaying on the submenu is **invalid**
1.a.2. SDL transfers the request with other valid params to HMI
1.a.3. HMI response with warning information that the SubMenu was added but no image was displayed
1.a.4. SDL transfers response to mobile application


**Exception 2:**
1.b.1. The image referenced by the application for displaying on the submenu **does NOT exist** in the system
1.b.2. SDL transfers the request to HMI
1.b.3. HMI response with warning information that the SubMenu was added but no image was displayed
1.b.4. SDL transfers response to mobile application

**Exception 3:**
1.c.1. Application requests to add a sub menu to the specified application's menu **without** image
1.c.2. SDL transfers the request with other valid params to HMI
1.c.3. HMI responses to SDL and displays submenu without image
1.c.4. SDL transfers response to mobile application


**Exception 4:**
2.1.Request is invalid: Wrong json, parameters of wrong type, string parameters with empty values or whitespace as the only symbol, out of bounds, wrong characters, missing mandatory parameters
2.1.SDL responds INVALID_DATA, success:false to mobile application


**Exception 5:**
3.1 Request is disallowed by policies
3.2 SDL responds DISALLOWED, success:false and doesn't transfer this request to HMI
Binary file added detailed_docs/accessories/AddSubMenu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.