
Windows / Visual Studio
Select Windows / Visual Studio (windows-vs) to generate a native Windows meter server. The output is a console program on the PC; there is no MCU programming step.
1. Install the C++ build tools
Install Visual Studio or Visual Studio Build Tools with Desktop development with C++, the MSVC C++ compiler and a Windows SDK. The generated project uses the installed default MSVC toolset and targets x64 with the Windows 10 SDK family (10.0).
Open the installation's Developer Command Prompt or x64 Native Tools Command Prompt. This configures MSBuild, the compiler, SDK headers and linker libraries. See Microsoft's command-line build instructions.
2. Build the generated project
Export and extract the Windows target. Change to its directory containing MeterProject.sln and MeterProject.vcxproj, then run:
MSBuild MeterProject.sln /p:Configuration=Release /p:Platform=x64
The executable is bin\Release\meter.exe. You can also open MeterProject.sln in Visual Studio, select Release / x64 and build the solution. Use the extracted meter project's solution for these steps; the MeterStudio application's own solution builds the generator instead.
If the C++ targets or Windows headers cannot be found, check the installed workload and SDK and reopen the correct developer prompt. If selecting a different toolset explicitly, install that toolset before passing /p:PlatformToolset=....
3. Start and test
Provision the credentials required by the generated README before startup. For example, Minimum's Low association uses client SAP 32 and requires the GX_PASSWORD_32 environment variable when its password was omitted from export.
bin\Release\meter.exe
For a simple desktop connection, select WRAPPER when generating the project. The TCP server listens on 127.0.0.1 and the configured port (4059 by default). Connect the DLMS client with the selected referencing mode, server address 1 and the association's client SAP. Use Ctrl+C to stop the console program.
If HDLC or Mode E is selected, configure a real Windows serial port before generation and make it available to the process. A generated project with an enabled but unavailable serial interface can fail at startup even though compilation succeeded.
Keep the generated configuration and persistent settings/security files when updating the meter server. For a Linux build environment, generate the separate Linux / Makefile target.
Return to Build.