What is the best/preferred way to integrate a Qt application with IVI layer management now?

Friedrich, Eugen (ADITG/SW1) efriedrich at de.adit-jv.com
Fri Apr 15 01:54:37 EDT 2016


Hi,

Thanks Frederico, quite good explanation of the ivi application and controller.
The details of the controller interface:
Can be found here:
https://at.projects.genivi.org/wiki/display/PROJ/Wayland+IVI+Extension+Design

@Roland: to integrate you applications in HMI you need to define several things, and I'm not an expert in it, but any way some points from me:
- define a procedure how to get the surface ID, could be fixed defined, of dynamically assigned from the HMI. ILM interface does not provides any procedure for this.
- in you HMI you can react on new surfaces if you will register the callback with 	ilm_registerNotification- API
	This will be triggered once some application creates a new surface.
	HMI has to set the source and destination rectangle on new surface and assign it to some ILM Layer, example you can find here:
	http://git.projects.genivi.org/?p=wayland-ivi-extension.git;a=tree;f=ivi-layermanagement-examples/layer-add-surfaces;h=35860df8681aed904979d6ce1d531072ed014ec2;hb=refs/tags/1.9.1
- now you can control you application visibility with the ILM interface. But you should also have some communication to the application to stop/start the rendering on it


Best regards

Eugen Friedrich
Software Group I (ADITG/SW1)

Tel. +49 5121 49 6921

>-----Original Message-----
>From: Frederico Cadete [mailto:frederico.cadete at awtce.be]
>Sent: Tuesday, April 12, 2016 9:24 AM
>To: Roland Krause
>Cc: genivi-ivi-layer-management at lists.genivi.org; Friedrich, Eugen
>(ADITG/SW1)
>Subject: Re: What is the best/preferred way to integrate a Qt application with
>IVI layer management now?
>
>On Sun, Apr 10, 2016 at 06:52:29PM -0700, Roland Krause wrote:
>> So after I got over my problems with Qt applications not showing up solved
>> (hurray!) I am trying to figure out what the official best/recommended way
>> is to integrate a custom app with the ivi layer management?
>>
>> I.e. I'd like to be able to run and control visibility of my own
>> application and have it show up on part of the screen or full screen with
>> focus etc..
>>
>> So far I wrote a script and I am using LayerManagerControl but that seems
>> clumsy and I have to restart gdp-hmi-controller.service every time which is
>> somewhat slow and even clumsier.
>>
>> Another thing I've tried is to replace qml-example with my own application.
>> I think I've tried all variations but it seems that my own app can just not
>> be handled by the launcher for whatever unknown reason.
>> - I tried starting my app with the qml-example.service - nope
>> - I tried linking or flat out replacing the binary in /usr/bin with my own
>> - nope
>> - I have not tried making my own service or hacking the gdp-hmi-launcher2
>> code base cause I don't think that would help.
>> - My guess is that there is a bit of DBus glue code needed but where can i
>> find an example?
>> - I found this line in qml-example/main.cpp
>> 43:  view.setProperty("IVI-Surface-ID", QML_EXAMPLE_SURFACE_ID);
>> and am kinda hoping that might help?
>>
>>
>> So what would I be missing here?
>
>Hello Roland,
>
>Maybe you know this already, but here is a cursory explanation of the two
>main bits of IVI layer management.
>Hopefully it helps you in changing your system to work as you want.
>
>The GENIVI IVI Layer Management has two main components that are used in
>GDP:
>
>- ivi-shell and ivi_application protocol
>- ilm libraries and ivi_controller protocol
>
>The first part has been integrated in upstream weston. It is an alternative
>protocol for applications to communicate their "shell" logic with the
>compositor, that should be more appropriate for IVI applications than the
>desktop-oriented wl_shell and xdg_shell.
>The main bit that you should worry about is the surface ID. Every application
>must register with the compositor with a surface ID number. From what I see
>of the GDP code, the used mechanism is to patch QtWayland to use the
>view.setProperty mechanism that you mention.
>(a slightly different mechanism has been upstreamed and will be available in
>Qt5.7)
>In your case, I would try setting that property, then use
>"LayerManagerControl get surfaces" to make sure that the application is
>registering with the intended surface ID. Even if it is not visible on the
>screen, this will tell you that you are able to control the application side.
>
>The second part is provided in the wayland-ivi-extension package. It has a
>protocol and libraries that allow an external application to control the
>compositor and decide which surfaces you want to show. This protocol is
>used by LayerManagerControl, and in GDP it is also used by the
>gdp-hmi-manager.
>It is this gdp-hmi-manager2 that normally controls which surface ID's
>are made visible on the screen, and probably you need to modify this to show
>your new application if you want to avoid manual control with
>LayerManagerControl. I am not sure of the details of this component though.
>
>Best regards,
>Frederico
>
>Frederico Cadete
>R&D Software Engineer
>VIT Software Development
>-------------------------------------------------
>AWTC Europe - www.aweurope.eu - www.aisin-aw.co.jp




More information about the genivi-ivi-layer-management mailing list