生成对d-bus客户机有用的类和方法
dbus-client-gen的Python项目详细描述
简介
这个库包含一些方法,它们使用 D总线接口和返回类或函数,在 构造python d-bus客户机。XML规范具有 由introspectable的introspect()方法返回的数据的格式 接口
方法
托管对象类
This function consumes the spec for a single interface and returns a class which constructs objects which wrap the table for a particular object in the format returned by the GetManagedObjects() method of the ObjectManager interface. Each object has an instance method for each property of the interface.
MO U查询生成器
This function consumes the spec for a single interface and returns a function which implements a query on the whole object returned by a GetManagedObjects() call. The query function takes two arguments: the GetManagedObjects() object and a dict of key/value pairs. The query function generates pairs of the object path and corresponding table which match all the key/value pairs in the table.
错误
此库导出异常类型dbusclientror及其所有子类型。 如果在类期间传播任何其他类型的错误,则构成错误 生成或执行类的方法时。
下面显示了错误的继承权。短划线后的条目表示 异常包含的消息之外的其他字段。只留下 错误等级的继承权是直接构建的。
数据库客户端错误
DbusClientGenerationError This exception is raised if an error occurs while generating a method. Such an exception would result from introspection data which lacked the necessary attributes or entries.
DbusClientRuntimeError - interface name This exception is raised if there is an error while the generated method is executing.
- DbusClientMissingInterfaceError This exception is raisded if when constructing a managed object it turns out that its argument does not have an entry for the expected interface.
- DbusClientMissingPropertyError - property name This exception is raised if when reading a value for a managed object it turns out that the value corresponding to that property is not available.
- DbusClientMissingSearchPropertiesError - too many fields to list here This exception is raised if when traversing a GetManagedObjects() result the keys used by the query have no corresponding values in the result.
- DbusClientUnknownSearchPropertiesError – too many fields to list here This exception is raised if the search properties specified can not be found in the specified interface.