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.

https://github.com/modelica-3rdparty/modelica_devicedrivers

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 1 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.4%) to scientific vocabulary

Keywords

hacktoberfest iot modelica modelica-library mqtt mqtt-client
Last synced: 6 months ago · JSON representation ·

Repository

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.

Basic Info
  • Host: GitHub
  • Owner: modelica-3rdparty
  • License: bsd-3-clause
  • Language: Modelica
  • Default Branch: master
  • Homepage:
  • Size: 23 MB
Statistics
  • Stars: 81
  • Watchers: 17
  • Forks: 32
  • Open Issues: 18
  • Releases: 16
Topics
hacktoberfest iot modelica modelica-library mqtt mqtt-client
Created almost 13 years ago · Last pushed 9 months ago
Metadata Files
Readme License Citation

README.md

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: * Cross-platform (Windows and Linux). * (Soft) real-time synchronization of a simulation. * Support for keyboard, joystick/gamepad, and 3Dconnexion Spacemouse. * Support for a universal packaging concept to pack Modelica variables in a graphical and convenient way into a bit vector and transport such a bit vector via UDP, TCP/IP, LCM, MQTT, serial I/O or shared memory (CAN support is prototypical available). * Support of the Linux control and measurement device interface for digital and analog I/O (Comedi interface).

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.5 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

  • [X] Internationalized
  • [ ] Unit tests
  • [X] End-user documentation
  • [X] Internal documentation (documentation, interfaces, etc.)
  • [X] Existed and maintained for at least 6 months

Build status

Build Status

Current release

Download Modelica_DeviceDrivers latest release

Please note that the library is known to work with * Dymola, * SimulationX (with userBufferSize all non-clocked communication blocks are working in SimulationX, but autoBufferSize only works for external solvers CVode and Fixed Step solver and fails for BDF and MEBDF solvers, see #54 (comment)), * OpenModelica (partial support, e.g., UDP, serial port, shared memory, LCM, keyboard).

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.

  • Version v2.1.0 (2022-08-10)
    • Enhancements:
    • Added parameter useRecvThread also for clocked UDPReceive variant (#342).
    • Added option for not unlinking shared memory partition at process termination (#339).
    • Updated 3rd-parth library paho.mqtt.c to v1.3.10 (#355).
    • Bug fixes:
    • Fixed sporadic RealtimeSynchronize block "clock_nanosleep" error on Linux (#357).
    • Fixed MDD_TCPIPServer_Send(...) return value, so that it works as described in the documentation: "On success, return the number of bytes sent, 0 if operation would block, -1 on non-fatal error" (#323).
    • Serial port interface on Windows: Fixed spurious byte sent at the end of a simulation (#352).
  • Version v2.0.0 (2020-06-08)
    • Migrated from Modelica Standard Library 3 (MSL 3) to MSL 4 -> Non-backwards compatible release!
    • However, apart from the MSL 4 dependency this release is compatible to previous releases and no update of user libraries is necessary apart from migrating to MSL 4.
    • Enhancements:
    • Added all license files to better assist tool vendors in distribution of source or binary files (#313).
    • Updated 3rd-party library paho.mqtt.c to v1.3.4 (#320).
    • Bug fixes:
    • Fixed small issues in the SBHS Board example (#318).
  • Version v1.8.2 (2020-03-26)
    • Updated Linux MQTT binary dependencies. The updated libraries are compiled with the -fPIC flag, which fixes a related FMU generation problem (#306).

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 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: * Bernhard Thiele, release management, Linux specific code, etc. * Thomas Beutlich, SimulationX support, new features, Windows specific code, etc. * Tobias Bellmann, most of the initial MS Windows specific code.

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): * Miguel Neves, human readable error codes for the Softing CAN interface. * Dominik Sommer, code for Linux serial port support. * Rangarajan Varadan, code for Windows serial port support. * Dietmar Winkler, GitHub project setup, development services integration etc. * Martin Sjölund, EmbeddedTargets.AVR support. * Lutz Berger, EmbeddedTargets.STM32F4 (experimental) support. * And several more contributed bug fix PRs etc.

Owner

  • Name: Modelica 3rd-party libraries
  • Login: modelica-3rdparty
  • Kind: organization

Citation (CITATION.cff)

authors:
  - name: "DLR, ESI ITI, and Linköping University (PELAB)"
cff-version: 1.2.0
license: BSD-3-Clause
message: "If you use this software, please cite it using these metadata."
preferred-citation:
  abbreviation: modelica2017mdd
  authors:
    - family-names: Thiele
      given-names: Bernhard
    - family-names: Beutlich
      given-names: Thomas
    - family-names: Waurich
      given-names: Volker
    - family-names: Sjölund
      given-names: Martin
    - family-names: Bellmann
      given-names: Tobias
  collection-title: "Proceedings of the 12th International Modelica Conference"
  collection-type: proceedings
  doi: 10.3384/ecp17132713
  editors:
    - family-names: Kofránek
      given-names: Jiří
    - family-names: Casella
      given-names: Francesco
  location:
    name: "Prague, Czech Republic"
  month: 5
  pages: "713-723"
  title: "Towards a Standard-Conform, Platform-Generic and Feature-Rich Modelica Device Drivers Library"
  type: conference-paper
  year: 2017
title: "Modelica_DeviceDrivers"

GitHub Events

Total
  • Issues event: 3
  • Watch event: 7
  • Issue comment event: 8
  • Push event: 2
  • Pull request review comment event: 3
  • Pull request review event: 4
  • Pull request event: 5
  • Fork event: 2
Last Year
  • Issues event: 3
  • Watch event: 7
  • Issue comment event: 8
  • Push event: 2
  • Pull request review comment event: 3
  • Pull request review event: 4
  • Pull request event: 5
  • Fork event: 2

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 1
  • Total pull requests: 3
  • Average time to close issues: about 1 hour
  • Average time to close pull requests: 5 days
  • Total issue authors: 1
  • Total pull request authors: 2
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.67
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 3
  • Average time to close issues: about 1 hour
  • Average time to close pull requests: 5 days
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 2.0
  • Average comments per pull request: 0.67
  • Merged pull requests: 2
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • tbeu (1)
  • bernhard-thiele (1)
  • thomasspallek (1)
  • TeoGoddet (1)
Pull Request Authors
  • tbeu (3)
  • DagBruck (1)
  • henrikt-ma (1)
Top Labels
Issue Labels
enhancement (1)
Pull Request Labels