feat(io): Add inp and out properties to InterfaceDeviceManager

Added `inp` and `out` properties for accessing input and output paths in
`InterfaceDeviceManager`. Updated D-Bus interface with corresponding
properties.

Signed-off-by: Sven Sager <s.sager@kunbus.com>
This commit is contained in:
Sven Sager
2026-02-02 16:55:54 +01:00
parent 037e9c05ac
commit 77a3fbb16c

View File

@@ -8,7 +8,7 @@ from pydbus.generic import signal
from revpimodio2 import RevPiModIO
from revpimodio2.device import Device
from .ios1_helper import REVPI_DBUS_BASE_PATH
from .ios1_helper import REVPI_DBUS_BASE_PATH, get_io_object_path
class InterfaceDeviceManager:
@@ -56,7 +56,9 @@ class InterfaceDevice:
<property name="catalognr" type="s" access="read"/>
<property name="comment" type="s" access="read"/>
<property name="id" type="s" access="read"/>
<property name="inp" type="ao" access="read"/>
<property name="name" type="s" access="read"/>
<property name="out" type="ao" access="read"/>
<property name="type" type="s" access="read"/>
</interface>
</node>
@@ -85,10 +87,18 @@ class InterfaceDevice:
def id(self):
return self.device.id
@property
def inp(self) -> list[str]:
return [get_io_object_path(io) for io in self.device.get_inputs()]
@property
def name(self) -> str:
return self.device.name
@property
def out(self) -> list[str]:
return [get_io_object_path(io) for io in self.device.get_outputs()]
@property
def type(self):
return self.device.type