私はpythonとdbusを初めて使用しますが、dbus-pythonを介してPythonクラスをデータバインディング(=送受信する方法)はありますか?
私のクラスは次のようになります。
class Item:
def __init__(self, one, two, three, four, five, *more):
self.one= one
self.two= two
self.three= three
self.four= four
self.five= five
self.more= more
moreはリストで、1〜5は文字列です。私はこれらのアイテムのリストを持っています:
list_items = []
list_items.append(Item('Test','Test','Test','Test',more))
dbusの部分は次のようになります。
@dbus.service.method('com.me.test', in_signature='', out_signature='a(sssssav)')
def get_all_items():
return list_items
署名にエラーがありますか、それともマーシャリングできる別のデータ構造(タプル?)を使用する必要がありますか?