How tkntrec/edcb works
Main Components
• “BonCtrl” Module: Contains low-level code for managing digital broadcast data such as TS packets, PAT/PMT handling, service filtering, etc. This is the core driver layer interfacing with the tuner hardware.
• “Common” Library: Provides shared utilities, definitions, configuration parsing (via INI file processing), logging, error/stack trace handling, TCP/pipe servers, and other reusable functions consumed by other components.
• “EpgDataCap_Bon” and “EpgDataCap3”: These components are responsible for capturing and processing EPG data. They convert the broadcast signals into electronic program guide information.
• “EpgTimer” and its related modules: This is the graphical user interface part of the system that lets users view EPG data, configure reservations, perform searches, and manage settings. It uses WPF/XAML for window design.
• “EpgTimerSrv” (and related admin proxy and plug-in modules): Acts as a background service (or server) managing reservations, interacting with the BonCtrl layer, and handling communications with the GUI (EpgTimer) as well as plugins like EpgTimerPlugIn. The server handles tasks like database management, scheduling, and event notifications.
Relationships and Interactions
• The GUI front-end (EpgTimer) interacts with the background service (EpgTimerSrv) to send commands (such as reservation updates or program searches). Data flows in both directions via defined command protocols (using the Common library’s messaging and pipe/TCP server capabilities).
• The service and data capture components (EpgDataCap_Bon/EpgDataCap3) interface with the BonCtrl module to acquire and process raw broadcast streams.
• Plugins (e.g., EdcbPlugIn, EpgTimerPlugIn) extend or modify the built-in functionalities of the main timer application.
• The “ini” directory acts as the configuration hub for many modules. Changes in these INI/XML settings can affect behavior across the system.
• External tools (in “Tools”, “SendTSTCP”, etc.) likely allow for additional operations like file format conversion, debugging support, or stream manipulation.
Architectural Patterns and Design Principles
• Modularity: Each directory represents a nearly self-contained module (e.g., BonCtrl for driver specific tasks, Common for shared utilities, EpgTimer as the UI, etc.).
• Layered Approach: There is a clear separation between the low-level driver/tuning components, an intermediate layer for data capture and processing (EPG data), and the presentation/control layer (user interface and service backend). This layered architecture simplifies maintenance and extension.
• Plugin Extensibility: The use of plugins and external tools shows that the system is built to be extensible and customizable. The design encourages modifications via additional modules (for example, through changes in the EpgTimer plug-in or the custom modifications in the fork).
Relevant Technologies, Frameworks, and Libraries
• Microsoft Visual Studio Solutions and project files (VCXPROJ, SLN) indicate a C/C++ and C# based application, with GUI built in WPF/XAML (as seen in EpgTimer).
• Standard Windows libraries (for creating pipe/TCP servers, decoding broadcast signals, etc.), along with custom libraries for TS packet utilities and EPG data handling.
• The use of configuration files (INI, XML) suggests runtime customization.
• External libraries such as Civetweb (embedded web server for HTTP communication in EpgTimerSrv) and Lua (for scripting in the server) also play significant roles.