From 6372ed4e7f69baa654871165c5222a2703075d37 Mon Sep 17 00:00:00 2001 From: Sven Sager Date: Wed, 4 Feb 2026 15:19:45 +0100 Subject: [PATCH] feat(io): Add `Set*` (Byteorder, Signed, Value) methods to IO interface Introduced `SetByteorder` and `SetSigned` methods in both the `Input` and `Output` D-Bus interfaces, and added the `SetValue` method specifically for the `Output` interface. Implemented corresponding methods in the backend. Signed-off-by: Sven Sager --- src/revpi_middleware/ios1/interface_ios.py | 24 ++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/revpi_middleware/ios1/interface_ios.py b/src/revpi_middleware/ios1/interface_ios.py index 49cda12..9038c0b 100644 --- a/src/revpi_middleware/ios1/interface_ios.py +++ b/src/revpi_middleware/ios1/interface_ios.py @@ -18,6 +18,12 @@ class InterfaceInput: """ + + + + + + @@ -58,6 +64,12 @@ class InterfaceInput: [], ) + def SetByteorder(self, order: str) -> None: + self.byteorder = order + + def SetSigned(self, signed: bool) -> None: + self.signed = signed + @property def address(self) -> int: return self.io.address @@ -123,6 +135,15 @@ class InterfaceOutput(InterfaceInput): """ + + + + + + + + + @@ -138,6 +159,9 @@ class InterfaceOutput(InterfaceInput): interface_name = "com.revolutionpi.ios1.Output" + def SetValue(self, value: Variant) -> None: + self.value = value + @property def value(self) -> Variant: return super().value