【问题标题】:Dbus function with a OUT (sbb) param带有 OUT (sbb) 参数的 Dbus 函数
【发布时间】:2018-05-11 02:31:11
【问题描述】:

我想用 Python3 调用一个 DBus 函数。我对此进行了反省:

<method name="GetItemStatus">
  <arg name="absolutePath" direction="in" type="s" />
  <arg name="status" direction="out" type="(sbb)" />
</method>

第一个参数是一个简单的字符串,可以,但是我不知道如何发送第二个(状态)...

有人可以帮帮我吗?

Seb

【问题讨论】:

    标签: python dbus


    【解决方案1】:

    没关系,我找到了解决办法:o)

    session_bus = dbus.SessionBus()
    hubic_account_obj = session_bus.get_object('com.hubiC', 
    '/com/hubic/Account')
    hubic_account_iface = dbus.Interface(hubic_account_obj, 
    'com.hubic.account')
    [status, isPublished, canBePublished] = 
    hubic_account_iface.GetItemStatus(filepath)
    

    【讨论】:

      猜你喜欢
      • 2014-01-12
      • 2018-01-25
      • 2017-06-11
      • 1970-01-01
      • 2019-01-31
      • 1970-01-01
      • 2019-11-06
      • 2014-08-13
      • 1970-01-01
      相关资源
      最近更新 更多