XpressNET communication library written in C++ & Qt
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.


C++ Qt XpressNET library

This repository contains a fully open-source C++ library for communicating with XpressNET DCC Command Station.

It connects to the (virtual) serial port, which is typically connected to the LI.

Currently, it implements commands of XpressNET v3.0 protocol, however, you may simply add more commands from newer versions of XpressNET (for example XpressNET v3.6).


This library uses Qt's SerialPort which creates a very good cross-platform abstraction of serial port interface. Thus, the library uses Qt's mechanisms like slots and signals.

It is not usable without Qt.

There are no other requirements.


You may use this library in two major ways:

  • Simply include xn.h header file into your project and use instance of XpressNet class.
  • Compile this project using qmake and use compiled object file.

Basic information

  • See xn.h for API specification.
  • This library uses 28 speed steps only. It simplifies things a lot. Other speed steps could be added in future.
  • Currently, it supports basic XpressNET commands (speed, functions, programming, ...), but the library is designed to be simple enough for adding new commands.
  • To change the version of this library, update both constants at xn.pro file and xn.h file. This is needed for proper behavior as a standalone-lib and plain header too.


This library was created by:

Do not hesitate to contact author in case of any troubles!


This application is released under the Apache License v2.0 .