Giter VIP home page Giter VIP logo

modbuspal-runtime's Introduction

modbuspal-runtime

modbus tcp simulator - headless docker runtime for modbuspal configurations

fork of https://sourceforge.net/projects/modbuspal/ but heavily modfied to extract just a headless docker runtime. The idea is to use original modbuspal as UI tool to export a project files which you can then use to feed in to the runtime.

major changes to the original modbuspal:

  • removed all GUI elements to get rid of Swing, AWT, JFreeChart dependencies
  • code for rxtx and jpython is disabled and removed, so only modbus tcp will work and only linear, random and sine generators. scripts and serial won't work.
  • converted to maven project with java 11 and java module system support
  • added docker support
  • record feature is enabled and ouputs to console, with human readable timestamps
  • no support for learn feature
  • always starts on port 502 (if other port is needed, use it as docker container and map it accordingly)

Java

how to build

this project uses maven as build tool, just mvn clean install and you get an executable jar under /target/modbuspal-runtime.jar.

how to run

you can add your xmpp project from modbuspal as first argument:

java -jar .\target\modbuspal-runtime.jar .\samples\project01.xmpp

or you can set MODBUSPAL_PROJECT environment variable as path to your project file and then just run

java -jar .\target\modbuspal-runtime.jar

Docker

The included Docker file is a multistage build which builds the jar, a slim jre and copies jre+jar to a debian-slim image.

how to build

docker build -t modbuspalruntime .

how to run

you can either run with a included sample project

docker run -p502:502 -e MODBUSPAL_PROJECT=/projects/project01.xmpp modbuspalruntime

or mount your project and refer to it via environment variables

docker run -p502:502 -v ${path-to-my-projects}:/projects -e MODBUSPAL_PROJECT=/projects/my-project01.xmpp modbuspalruntime

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.