I've been playing with controlling my digital trains and accessories using computer interface for some time now. During that time I wrote few small applications to test some things and finally I ended up working on a class library that could be used to build your own applications. As I remember what a pain in the haggis it was to find anything about XpressNet programming or any examples on-line, I decided to offer the library publicly for free.
I'm writing it in C# but it should be possible to use it in any .NET enabled programming language. Currently it contains all the functionality supported by the Roco command station/booster from Multimaus start-set (part nr. Roco #10764). It requires connection to PC using any of the GenLI family of interfaces (GenLI, GenLI-USB, GenLI-Bluetooth) or the original Li100 from Lenz. However, it hasn't been tested with the original Lenz equipment yet so I can't be 100% sure it works without problems. Also it should work with any "open source" command stations (like H-central, NanoX etc.) that support connection to the PC using one of the interfaces mentioned earlier.
The library contains not only the methods for train control but also for accessory control. I'm using it in my "custom electro-mechanical interlocking stand" which controls turnouts, signals and railway crossing signals on my layout. See the picture bellow.
I've set up a small website with information, downloads and on-line documentation at http://xpressnetlib.brozek.org .
Currently the library is available in compiled form as .DLL library, but it may go open source sometime in the future. Also available for download is a sample application (simple "cab" Windows application) which demonstrates how to use the library practically. The package with the sample app contains both compiled .EXE and full source codes.
If anyone of you is using GenLI or Li100/101 with their layout, I'd appreciate if you download the sample app, try the compiled .exe (Windows with .NET Framework 4 required) and let me know if it works for you or not. Also anyone willing to try to use the library in their own app is welcome and any feedback appreciated.



News