feat(io): Add position property to InterfaceDevice
Introduced a new `position` property with read access in the D-Bus interface and implemented its corresponding method. Signed-off-by: Sven Sager <s.sager@kunbus.com>
This commit is contained in:
@@ -59,6 +59,7 @@ class InterfaceDevice:
|
||||
<property name="inp" type="ao" access="read"/>
|
||||
<property name="name" type="s" access="read"/>
|
||||
<property name="out" type="ao" access="read"/>
|
||||
<property name="position" type="n" access="read"/>
|
||||
<property name="type" type="s" access="read"/>
|
||||
</interface>
|
||||
</node>
|
||||
@@ -99,6 +100,10 @@ class InterfaceDevice:
|
||||
def out(self) -> list[str]:
|
||||
return [get_io_object_path(io) for io in self.device.get_outputs()]
|
||||
|
||||
@property
|
||||
def position(self) -> int:
|
||||
return self.device.position
|
||||
|
||||
@property
|
||||
def type(self):
|
||||
return self.device.type
|
||||
|
||||
Reference in New Issue
Block a user