Commit Graph

22 Commits

Author SHA1 Message Date
96db211240 feat(cli): Add new CLI tool entry point for revpictl
This update introduces a new console script entry point for `revpictl`,
allowing users to execute CLI commands via `revpi_middleware
.cli_commands.cli_base:main`. It enhances functionality by providing
additional tooling for command-line interactions.
v0.0.1
2025-04-18 19:21:53 +02:00
de7abe3b9c chore(build): Update requirements for this project 2025-04-18 19:21:53 +02:00
e8c2482bea feat(cli): Add await-reset to wait for piControl reset signal
Introduced a new `await-reset` command to the CLI, allowing users to
wait for a `NotifyDriverReset` signal with an optional timeout
parameter. Updated the argument parser and implemented the signal
detection logic using `await_signal`. Ensures improved control and
monitoring of piControl driver resets via CLI.
2025-04-18 19:21:53 +02:00
527a921bfd feat(cli): Add await_signal function to handle D-Bus signals
Introduce the await_signal function to monitor D-Bus signals with a
timeout. This uses GLib's MainLoop and threading to wait for signals
efficiently while respecting a specified timeout duration.
2025-04-18 19:21:53 +02:00
6dca9880c8 feat(cli): Add D-Bus helper functions for CLI commands.
This introduces `simple_call`, a utility function to interact with D-Bus
interfaces within the RevPi system. It facilitates method invocation on
specific interfaces and paths, improving modularity and code reuse in
middleware operations.
2025-04-18 19:21:53 +02:00
06d33b218f feat: Add daemon mode and signal handling to main application
Introduced command line arguments for daemon mode and configuration file
support. Enhanced the application with signal handling for reload, log
rotation, and termination. Updated the main function for improved
structure and robustness.
2025-04-18 19:21:53 +02:00
964e0b997c feat: Add MiddlewareDaemon implementation to revpi-middleware
Introduce the main daemon class for revpi-middleware with methods for
initialization, configuration, DBus handling, and a mainloop. This
implementation includes support for configuration reloads, log rotation,
and proper thread management for DBus operations.
2025-04-18 19:21:53 +02:00
46a2b3f0ce feat(dbus): Add DBus policy configuration for revpi-middleware
Introduce a new DBus policy file to manage access control for
revpi-middleware. This configuration allows full access to the root
user, limited access for the 'picontrol' group, and denies unauthorized
access by default.
2025-04-18 19:21:53 +02:00
46f23a13d3 feat(dbus): Add extend_interface function for dynamic interface naming
This function constructs a fully qualified interface name by appending
segments to a predefined base name. It simplifies and standardizes the
process of generating extended interface names in the middleware.
2025-04-18 19:21:53 +02:00
b442369b42 feat(dbus): Add initial D-Bus middleware implementation
Introduce a D-Bus middleware module for revpi_middleware, including an
interface definition and a `BusProvider` class to handle D-Bus
communication. This forms the foundation for middleware interactions
using D-Bus.
2025-04-18 19:21:53 +02:00
11b68a0c15 feat(process_image): Add D-Bus interface for piControl driver
Introduced D-Bus interfaces in `process_image` to interact with the
piControl driver. Added `InterfacePiControl` class with methods to reset
the driver and signal driver reset events. This improves driver
management and integration via D-Bus.
2025-04-18 19:21:53 +02:00
91a1fae411 feat(dbus): Add ResetDriverWatchdog helper as global dbus helper
Introduced a new helper class `ResetDriverWatchdog`, a thread-based
watchdog to detect the `reset_driver` action. The implementation is
adapted from the revpipyload project and includes methods to
register/unregister callbacks and manage the watchdog lifecycle. This
addition improves monitoring capabilities for the process image.
2025-04-18 19:21:53 +02:00
049ddfdc0f chore: Update proginit to 1.4.0 2025-04-18 19:21:53 +02:00
Sven Sager
0380311a9d feat: Add systemd file and data to integrate the app as a daemon 2025-04-18 19:21:53 +02:00
Sven Sager
c1bd98c444 feat: Add dummy main application script
The script uses the logger system and prints an string. You can try
the programm call with and without `-vv`so see the differences of
logging levels.
2025-04-17 12:06:14 +02:00
Sven Sager
92666f117d build: Add all necessary files for the build system
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.
2025-04-17 12:06:14 +02:00
Sven Sager
8124a687f0 test: Add tests directory with a dummy test
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.
2025-04-17 12:06:14 +02:00
Sven Sager
2b36297afb feat: Add the data directory for additional data files for the project
The data directory will hold everything your projekt needs and more.
You can create SystemD unit files or other templates, which packagers
can use.
2025-04-17 12:06:14 +02:00
Sven Sager
a9b6bb076c feat: Add proginit application basic module
The proginit.py module provides standards for programs. These include
program parameters, program configuration files and the log system.
2025-04-17 12:06:14 +02:00
Sven Sager
cc5eb516bf feat: Add python base project files
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.
2025-04-17 12:06:14 +02:00
Sven Sager
251bec2b38 docs: Use 'reuse' for SPDX Headers and Licenses 2025-04-17 12:06:14 +02:00
Sven Sager
1a53494d13 docs: Start git project with python git-ignore and Readme 2025-04-17 11:38:25 +02:00