# Driver Configuration System This document describes the configuration mechanism used for managing device information and protocol drivers using two XML files (must be available in /home/root): - **`mainDrivers.cfg`** (read-only, product-defined) - **`digiDrivers.cfg`** (user-editable, UI-managed) --- ## Overview The system separates **core product configuration** from **user customization**: - `mainDrivers.cfg` defines the **device identity** and **all supported protocol drivers** - `digiDrivers.cfg` stores **user-selected drivers** and **custom device naming** This design ensures product safety while allowing flexible protocol configuration through the UI. --- ## 1. `mainDrivers.cfg` (Read-only) ### Purpose - Contains fixed product information - Lists all available protocol drivers - Defines default configuration templates for each driver ⚠️ **This file must not be modified by the user.** ### Structure #### Device Information ================================================= DR1503 DR00211 1.1 ================================================= Field Description model Device model number serialNo Device serial number softwareVersion Firmware/software version Drivers List xml ================================================= ================================================= Each entry contains: Attribute Description name Driver name license License availability path Shared library location conf Active configuration file path default Default configuration template path ### 2. digiDrivers.cfg (Editable) Purpose Stores user-defined device details Contains only the drivers selected by the user This file is updated dynamically through the UI. Structure Device Summary xml ================================================= DigiReach DR1503-12 ================================================= Field Description title Product title deviceName User-configurable device name Configured Drivers xml ================================================= ================================================= Initially empty Drivers are added one by one via the UI 3. Driver Addition Workflow Protocol Status Page The UI displays all drivers listed in mainDrivers.cfg Driver Selection The user selects a driver to enable Configuration Initialization The file specified in the driver's default attribute is copied to the destination path is taken from the conf attribute. Example: swift ================================================= /home/root/default/protocol_settings/slave.xml ================================================= → /www/pages/protocol/db/slave.xml User Customization The user can edit the copied configuration file via the UI Changes affect only digiDrivers.cfg and the related configuration files 4. Design Principles 🔒 Read-only core configuration 🔧 User-driven driver selection 📦 Centralized default templates 🖥️ UI-based configuration management 5. File Responsibility Summary File Editable Responsibility mainDrivers.cfg No Product info, supported drivers, default configs digiDrivers.cfg Yes User-selected drivers, device name configuration Notes Deleting a driver from digiDrivers.cfg does not affect mainDrivers.cfg Default configuration files are copied only when a driver is first added Driver libraries must exist at the paths defined in mainDrivers.cfg