modelica-3rdparty / Modelica_DeviceDrivers

Free library for interfacing hardware drivers to Modelica models. There is support for joysticks, keyboards, UDP, TCP/IP, LCM, MQTT, shared memory, AD/DA converters, serial port and other devices.
BSD 3-Clause "New" or "Revised" License
76 stars 30 forks source link
hacktoberfest iot modelica modelica-library mqtt mqtt-client

Modelica_DeviceDrivers

Free library for interfacing hardware drivers to Modelica models. There is support for joysticks, keyboards, UDP, TCP/IP, LCM, MQTT, shared memory, AD/DA converters, serial port and other devices.

Library description

The Modelica_DeviceDrivers (MDD) library is an open source Modelica package that interfaces hardware drivers to Modelica models. An overview of the library is provided in

Bernhard Thiele, Thomas Beutlich, Volker Waurich, Martin Sjölund, and Tobias Bellmann, Towards a Standard-Conform, Platform-Generic and Feature-Rich Modelica Device Drivers Library. In Jiří Kofránek and Francesco Casella, editors, 12th Int. Modelica Conference, Prague, Czech Republic, May 2017. Download

The library unifies previous developments concerning device driver support in Modelica, see Interactive Simulations and advanced Visualization with Modelica and Modelica for Embedded Systems (Modelica'2009 conference). The functionality covered by this library has been used internally at DLR for several years, such as for Driver-in-the-Loop simulation and for the DLR Robot Motion Simulator. The previously fragmented functionality was streamlined, improved, and extended to a coherent cross-platform library.

Main features:

All device drivers are made available via external Modelica functions. Furthermore, high level interfaces on these functions are provided via Modelica blocks. The first interface uses Modelica 3.2 functionality only (when-clauses and sample-operator). The second interface uses the synchronous language elements introduced in Modelica 3.3 and is based on clocks.

BlockOverview

Self-certification

Build status

Build Status

Current release

Download Modelica_DeviceDrivers latest release

Please note that the library is known to work with

If you tested the library successfully with another Modelica tool, please contact Bernhard Thiele or send a pull request that updates this README.md.

Release notes

Bug fix releases may not have release notes, so please use the download link from above to get the latest release including bug fixes.

For information about previous releases, see Release Notes of Previous Versions.

Citing

Use the following BibTeX lines to cite the Modelica_DeviceDrivers library

@InProceedings{modelica2017mdd,
  Title = {Towards a Standard-Conform, Platform-Generic and Feature-Rich Modelica Device Drivers Library},
  Author = {Thiele, Bernhard and Beutlich, Thomas and Waurich, Volker and Sjölund, Martin and Bellmann, Tobias},
  Booktitle = {Proceedings of the 12th International Modelica Conference},
  Year = {2017},
  Address = {Prague, Czech Republic},
  Editor = {Kofránek, Jiří and Casella, Francesco},
  Month = may,
  Pages = {713--723},
  Doi = {10.3384/ecp17132713},
}

License

This Modelica package is free software and the use is completely at your own risk; it can be redistributed and/or modified under the terms of the BSD-3-Clause License.

Development and contribution

The master branch of the Modelica_DeviceDrivers library should work out-of-the-box when loading the library into a supporting Modelica tool. The branch contains the necessary external C libraries as pre-build binaries below folder Modelica_DeviceDrivers/Resources/Library.

If you need to build the external C libraries from the sources, clone the repository with

git clone --recursive https://github.com/modelica-3rdparty/Modelica_DeviceDrivers.git
git submodule update --init --recursive

and see Modelica_DeviceDrivers/Resources/README.md.

Main developers:

You may report any issues with using the Issues button.

Contributions in shape of Pull Requests are always welcome.

The following people have directly contributed to the implementation of the library (many more have contributed by providing feedback and suggestions):