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

Revise 0268 Main Menu Updating #1044

Conversation

Jack-Byrne
Copy link
Contributor

@Jack-Byrne Jack-Byrne commented Jul 13, 2020

Introduction

This is a revision to an accepted, but not yet implemented proposal. The suggested revision is to update the new RPCs in the HMI API to include the appID of the app Core should request the neccesary menu updates from.

Motivation

Add extra parameters to HMI API to simplify the Core logic needed for handling the HMI notifications OnUpdateFile and OnUpdateSubMenu.

Proposed Solution

HMI API Changes

Make the following additions to OnUpdateFile and OnUpdateSubMenu

<function name="UI.OnUpdateFile" messagetype="request">
    <description>For the HMI to tell Core that a file needs to be retrieved from the app.</description>

+    <param name="appID" type="Integer" mandatory="true">
+       <description>ID of application related to this RPC.</description>
+     </param>

    <param name="fileName" type="String" maxlength="255" mandatory="true">
        <description>File reference name.</description>
    </param>
</function>

<function name="UI.OnUpdateSubMenu" messagetype="request">
    <description>For the HMI to tell Core that a submenu needs updating</description>

+    <param name="appID" type="Integer" mandatory="true">
+       <description>ID of application related to this RPC.</description>
+    </param>

    <param name="menuID" type="Integer" minvalue="0" maxvalue="2000000000" mandatory="true">
        <description>This menuID must match a menuID in the current menu structure</description>
    </param>

    <param name="updateSubCells" type="Bool" mandatory="false">
        <description>If not set, assume false. If true, the app should send AddCommands with parentIDs matching the menuID. These AddCommands will then be attached to the submenu and displayed if the submenu is selected.</description>
    </param>
</function>

Potential Downsides

Minimal impact to the HMI implementation as it requires the appID parameter to be sent with these notifications.

Impact On Existing Code

Core and HMI Implementations need to be updated to handle the new appID parameter for the two notifications.

Alternatives Considered

Keep the original implementation of the proposal, but add the requirement that notifications received from the HMI are for the app that is currently active or in HMI level FULL.

@Jack-Byrne
Copy link
Contributor Author

@theresalech Ready for review

Copy link
Contributor

@theresalech theresalech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JackLivio I've found a few typos in the PR description. Can you please fix the following? Thanks!

  • Change "RPC's" to "RPCs" in the Introduction section
  • Change "Add an extra parameters..." to "Add extra parameters..." in the Motivation section
  • Change "...notifications received from the HMI is for..." to "...notifications received from the HMI are for..."

@Jack-Byrne
Copy link
Contributor Author

@theresalech Updated

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants