Updated `GetAllInputs` and `GetAllOutputs` methods in the D-Bus
interface to include explicit argument names (`object-path-list`) and
adjusted their types to `ao` not strings.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Added a new `docs/dbus.md` file with an overview of standardized D-Bus
data types and their signatures. Updated `README.md` with a reference to
the documentation.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Added `min_value` and `max_value` properties to integer IOs for
determining value ranges. Updated D-Bus interface with corresponding
properties.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
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>
The `_get_io_path` method was removed from `InterfaceIoManager` and
replaced with the `get_io_path` utility function from `ios1_helper.py`
to reduce redundancy and improve code reusability.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Added `address`, `byteorder`, and `length` properties to D-Bus
interfaces for IOs. Implemented corresponding property methods in
`ios1_helper.py`.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Introduced the `InterfaceDevice` class, enabling detailed device
property access through D-Bus. Updated `bus_provider_io` to include
device interfaces in the D-Bus provider.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Integrated the InterfaceDeviceManager class into the com.revolutionpi
.ios1 D-Bus bus provider. This addition enables managing device paths
and querying all devices via D-Bus.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Introduced a new Python-based command-line tool `revpi-config` to manage
Revolution Pi features via D-Bus. The tool supports enabling,
disabling, checking status, and availability for various features.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Previously, the check only considered 'active' as a valid ActiveState.
This update ensures the system also accounts for units in the
'activating' state, improving compatibility with transitional states in
systemd services.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Renamed the key 'systemd-timesyncd' to 'ntp' in the services mapping.
This improves naming consistency and aligns it with the expected service
identifier. No functional changes were introduced.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Added calls to `StatusChanged` in `Disable` and `Enable` methods to
notify when a feature's state is updated. This ensures proper tracking
and external communication of feature status changes.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
This change integrates the InterfaceSoftwareServices class into the list
of interfaces initialized by the bus provider. It ensures the new
interface is properly registered and available for use, improving
system functionality and extensibility.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Introduce `InterfaceSoftwareServices` to handle service enable/disable
actions, status, and availability via D-Bus. Consolidate `avahi` service
configuration into the new interface by removing redundant logic from
`revpi_config.py`.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Moved the `simple_systemd` function to a dedicated `systemd_helper`
module to improve code organization and reusability. Updated imports
accordingly in affected files.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Updated `InterfaceRevpiConfig` to require a bus parameter, ensuring
proper initialization. Introduced a constructor in `DbusInterface` to
store the bus instance.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
This signal provides a mechanism for notifying changes in availability
status. It will complement the existing `StatusChanged` signal and
enhance the system's event-handling capabilities.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Introduced the `StatusChanged` signal in `.RevpiConfig` interface to
notify changes in feature status. Emitting this signal in `Enable` and
`Disable` methods ensures real-time updates for feature state changes.
This enhances communication and monitoring within the DBus middleware.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
In order to be able to provide all functions of the DBus during testing,
the CI uses the Python 3.11 version in a Bookworm container for
testing. This is the version that is pre-installed in Debian Bookworm.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
A dbus session bus must be started for testing. The command
`dbus-run-session` creates a session for the following command. As a
result, `pytest` runs with its own session bus for the tests.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
Systemd does not exist in the docker file. So we just set an machine-id,
which the dbus-daemon can use to start a session.
Signed-off-by: Sven Sager <s.sager@kunbus.com>
All basic files for testing, building and distributing the project
are added here. The Makefile can set up the virtual environment and
create different package types from the project.
For local and automated testing of the source code, the testing
folder is added. This includes all the tests that the module has to
go through. The project also uses pytest-cov, which can also create
coverage reports.
These files create a callable Python package and manage the version
number of the complete project in the __about__.py file only. All other
parts, including Makefile, will use that version number.