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 <s.sager@kunbus.com>
This commit is contained in:
Sven Sager
2026-02-04 15:19:45 +01:00
parent 710d7b2078
commit 6372ed4e7f

View File

@@ -18,6 +18,12 @@ class InterfaceInput:
""" """
<node> <node>
<interface name="com.revolutionpi.ios1.Input"> <interface name="com.revolutionpi.ios1.Input">
<method name="SetByteorder">
<arg name="order" type="s" direction="in"/>
</method>
<method name="SetSigned">
<arg name="signed" type="b" direction="in"/>
</method>
<property name="address" type="n" access="read"/> <property name="address" type="n" access="read"/>
<property name="bmk" type="s" access="read"/> <property name="bmk" type="s" access="read"/>
<property name="bitaddress" type="n" access="readwrite"/> <property name="bitaddress" type="n" access="readwrite"/>
@@ -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 @property
def address(self) -> int: def address(self) -> int:
return self.io.address return self.io.address
@@ -123,6 +135,15 @@ class InterfaceOutput(InterfaceInput):
""" """
<node> <node>
<interface name="com.revolutionpi.ios1.Output"> <interface name="com.revolutionpi.ios1.Output">
<method name="SetByteorder">
<arg name="order" type="s" direction="in"/>
</method>
<method name="SetSigned">
<arg name="signed" type="b" direction="in"/>
</method>
<method name="SetValue">
<arg name="value" type="v" direction="in"/>
</method>
<property name="address" type="n" access="read"/> <property name="address" type="n" access="read"/>
<property name="bmk" type="s" access="read"/> <property name="bmk" type="s" access="read"/>
<property name="bitaddress" type="n" access="readwrite"/> <property name="bitaddress" type="n" access="readwrite"/>
@@ -138,6 +159,9 @@ class InterfaceOutput(InterfaceInput):
interface_name = "com.revolutionpi.ios1.Output" interface_name = "com.revolutionpi.ios1.Output"
def SetValue(self, value: Variant) -> None:
self.value = value
@property @property
def value(self) -> Variant: def value(self) -> Variant:
return super().value return super().value