Using dbus.service.signal decorator

Bogdan Lotko boguslaw.lotko at chello.at
Fri Jun 16 17:54:29 UTC 2017


Hello Simon,

Thank you for your help.
> At a high level, what is it that
> you intended to send? Writing it in the same form as the indented
> versions I wrote above might help.
I've wrote it in the further part of the original e-mail. It shall be:

variant   struct {
     string "myString"
     array [
        variant       struct {
             int32          1
             int32          1
             int32          1
        }
     ]
 }
so what I really need to send is a variant. 'v'.

Probably the only possible solution is as in the second approach described in the original e-mail. Please have a look on it!

  @dbus.service.signal('myInterface', 'v' )
  def mySignal(self, message):
     pass
  ...
  e = Emitter(bus)
  ...
  arr = dbus.Array( [], signature='(iii)' )
  s1 = dbus.Struct( (1,1,1), signature='(iii)', variant_level=1 )
  arr.append(s1)
  e.mySignal( ('myString', arr) )

with best regards,

-- 

*Bogdan Lotko*

b.lotko at chello.at
Phone: +43 1 2852458
Mobile: +43 676 6615012
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20170616/4dcda375/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 835 bytes
Desc: OpenPGP digital signature
URL: <https://lists.freedesktop.org/archives/dbus/attachments/20170616/4dcda375/attachment.sig>


More information about the dbus mailing list