How gurux/gxdlmsdirector works
Project Type and Purpose
• This is a Windows desktop application (C#/.NET WinForms) named GXDLMSDirector.
• Purpose: provide a unified UI to read and control DLMS/COSEM-compatible electricity, gas, or water meters from different manufacturers.
File-Structure Analysis
• Top level:
• Development/ – contains all source code and submodules.
• Development/ConformanceTests/ – XML-based test definitions and a C# test runner.
• Development/Macro/ – macro engine code for recording and replaying meter actions.
• Resources/ and Development/Resources/ – bitmap and UI resource files.
• Properties/, app.config, packages.config – .NET configuration and NuGet dependencies.
• The ‘Development’ folder breaks down into UI forms (MainForm, various dialogs), business logic classes (GXDLMSDevice, GXDLMSCommunicator), protocol helpers (GXByteConverter, GXValueSerializer), test frameworks, and manufacturer settings.
README Insights
• Confirms it’s a desktop tool for DLMS/COSEM meter communication.
• References external XML files for “default meter settings” and a community website.
• Build prereq: Visual Studio + NuGet.
Main Components
a. User Interface Layer
• WinForms (MainForm, DLMSTranslatorForm, DevicePropertiesForm, etc.)
• Macro Editor UI and Conformance Test UI
b. Business Logic Layer
• GXDLMSDeviceCollection, GXDLMSDirector core classes
• Device models (GXDLMSDevice, GXDLMSModemConfiguration, etc.)
c. Communication Layer
• GXDLMSCommunicator
• Protocol submodules: HDLC (GXDLMSHdlcSetup), IEC optical, TCP/UDP, M-Bus, PrimePLC
d. Serialization & Conversion
• GXValueSerializer, GXByteConverter, GXDataConcentratorUI
e. Configuration & Settings
• XML test definitions under ConformanceTests/DLMS
• app.config, packages.config, ManufacturerSettings
f. Macro Engine
• GXMacro, GXMacroEditor, related dialogs
g. Conformance Test Engine
• GXConformanceTest runner, Settings/CttApplicationSettings
h. External Services & Devices
• Physical ports: Serial, TCP/IP, PLC, Optical
• External meters (DLMS/COSEM)
Relationships & Data Flows
• UI → Business Logic → Communicator → Physical Port → Meter → Communicator → Logic → UI
• From Conformance Test UI → Test Engine → Communicator → Meter
• Macro UI → Macro Engine → Business Logic → Communicator
• Configuration loaded once at startup (app.config, XML).
Architectural Patterns & Technologies
• Layered architecture (UI, business logic, communication, data/config).
• Event-driven WinForms controllers.
• XML-driven test definitions and default meter settings.
• Uses Gurux DLMS/COSEM protocol library (NuGet).
• No central database; configuration and tests are file-based.