anuragraghavan / franca

Automatically exported from code.google.com/p/franca
0 stars 0 forks source link

Improve plain Franca=>DBus transformation #80

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
The currently implemented Franca=>DBus transformation has been created in a 
quite early stage and has some shortcomings. A couple of improvements will be 
implemented in order to streamline the transformation. Note that some of these 
improvements will lead to a different D-Bus Introspection xml output file.

Changes which are probably non-compatible (depending how the introspection file 
is being used):
C01: map Franca union to "(uv)" (old: "v"). "u" is the index of union elements 
starting with first element u=0. doc/line tags will also document the actual 
index values.
C02: support inheritance for unions. Transformation and index counting as in 
C01, from base union to derived, linearly counting.
C03: map polymorphic Franca structs to "(uv)" (old: "(iv)"). Computation of u 
has to be defined.
C04: change enumeration base type to "u" (old: "i"). For enumeration 
inheritance, count enumerator values from base to derived.

Extensions:
E01: map Franca ByteBuffer to "ay"
E02: emulate Franca maps with complex key type as "a(XY)" (where X is the 
complex key signature and Y is the value type signature). Currently this is not 
supported by the transformation. As D-Bus doesn't support dicts with complex 
key types, it is beneficial to have a D-Bus-compatible fallback.
E03: extend mapping of Franca method errors. Currently, a method error is 
mapped to "<error name="MyIF.Error.ERR1"/>". This will be extended to include 
the enumerator value in an additional xml tag: "<error name="MyIF.Error.ERR1" 
id="42"/>".
E04: indicate a noSubscriptions flag for a Franca attribute by a D-Bus 
annotation (tbd).
E05: indicate a fireAndForget flag for a Franca method by a D-Bus annotation 
(tbd).
E06: indicate a selective flag for a Franca broadcast by a D-Bus annotation 
(tbd).

Additional remarks:
- The XML tags <doc>, <line> and <error> are not part of the official D-Bus 
Introspection xml specification. We will keep them nevertheless in order to 
gain some expressivity. It might be useful in a future step to provide a config 
switch for the transformation which maps a Franca method error to a synthetic 
<method name="errorResponse" ...> instead of the <error ...>.
- Issue 2 describes the idea of a configuration API for the transformation 
(e.g., for defining the enumeration basetype more fine-grain). We will ignore 
this issue here.
- Interface inheritance in Franca is currently not supported by the 
transformation to D-Bus xml. We do not handle this topic here, see issue 75.

Original issue reported on code.google.com by klaus.birken@gmail.com on 8 Jan 2014 at 8:49

GoogleCodeExporter commented 9 years ago
Commit b99a561 solves four changes: C01, C04, E01, E03.
This commit requires dbus-emf-model 0.7.7.

Original comment by klaus.birken@gmail.com on 8 Jan 2014 at 3:35

GoogleCodeExporter commented 9 years ago
The changes mentioned in comment #1 are released with Franca 0.9.0.

The remaining changes will be postponed to a later Franca version.

Original comment by klaus.birken@gmail.com on 7 May 2014 at 3:51

GoogleCodeExporter commented 9 years ago

Original comment by klaus.birken@gmail.com on 25 Jan 2015 at 11:42