j2mod | Enhanced Modbus library implemented in the Java programming | TCP library

 by   steveohara Java Version: 3.2.1 License: Apache-2.0

kandi X-RAY | j2mod Summary

kandi X-RAY | j2mod Summary

j2mod is a Java library typically used in Networking, TCP applications. j2mod has no bugs, it has no vulnerabilities, it has build file available, it has a Permissive License and it has low support. You can download it from GitHub, Maven.

This project is a fork of the j2mod library which began life as jamod. A huge amount of refactoring and code fixing has been carried out on this library, with the addition of supporting JUnit tests, to ensure the library is fit for production use. This implementation supports Modbus TCP, UDP, RTU over TCP, Serial RTU and Serial ASCII in both Master and Slave configurations. The serial comms is implemented using jSerialComm and does not require any outside dependencies over and above the logging facade slf4j.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              j2mod has a low active ecosystem.
              It has 195 star(s) with 90 fork(s). There are 28 watchers for this library.
              There were 1 major release(s) in the last 12 months.
              There are 9 open issues and 75 have been closed. On average issues are closed in 125 days. There are 2 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of j2mod is 3.2.1

            kandi-Quality Quality

              j2mod has 0 bugs and 0 code smells.

            kandi-Security Security

              j2mod has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              j2mod code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              j2mod is licensed under the Apache-2.0 License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              j2mod releases are not available. You will need to build from source code and install.
              Deployable package is available in Maven.
              Build file is available. You can build the component from source.
              Installation instructions are not available. Examples and code snippets are available.
              It has 14810 lines of code, 1505 functions and 174 files.
              It has medium code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed j2mod and discovered the below as its top functions. This is intended to give you an instant insight into j2mod implemented functionality, and help decide if they suit your requirements.
            • Opens the serial port
            • Returns the comm ports
            • Closes the serial port
            • Execute the request
            • Opens the TCP connection
            • This method is used to get a response for a file
            • Adds a record response
            • Read a response from the slave
            • Reads a response from a slave function
            • Reads a response from the input stream
            • Converts a 16 - bit integer into a short
            • Writes a message to the comms port
            • Executes the command
            • Reads a response packet
            • Reads a request from the input stream
            • Execute the request
            • Reads the values of the registers
            • Start the UDP listener
            • Reads data from a DataInput
            • Creates a response for a write multiple registers request
            • Start the listening thread
            • This method returns the response of a read file
            • Deserialize data
            • Reads a record request
            • Reads a request from the Modbus Server
            • Creates a response for a read write operation
            Get all kandi verified functions for this library.

            j2mod Key Features

            No Key Features are available at this moment for j2mod.

            j2mod Examples and Code Snippets

            No Code Snippets are available at this moment for j2mod.

            Community Discussions

            QUESTION

            How do I monitor connections to my Modbus Slave in android, using J2Mod?
            Asked 2022-Jan-28 at 16:48

            I am currently writing a Modbus TCP/IP Slave using the J2Mod V 3.0. I have created the slave and have it listening on the correct port and can connect to it from my PC (using Simply Modbus). What I cannot seem to figure out is how do I monitor the connections that my Slave is receiving? How do I know when a Master writes to one of my registers? Any help is appreciated. I am including how I setup the slave just in case that helps.

            ...

            ANSWER

            Answered 2022-Jan-28 at 16:48

            I have actually reached out and was responded to by Steve O'Hara. It turns out with J2mod there is currently no way to monitor a connection. Shout out to him for responding and being so cool about everything.

            Source https://stackoverflow.com/questions/70788487

            QUESTION

            Write hexadecimal values into register with leading zeros
            Asked 2020-Oct-20 at 04:47

            I have an string array which contains 16 hexadecimal values. I need to convert them into byte to write them at Modbus's device register(size of each register is 16-bit). We have 8 registers to write 16 hexadecimal values. So, I'm converting them into the short and from short to byte for write them at device's register.

            Here is my code --

            ...

            ANSWER

            Answered 2020-Oct-14 at 18:03

            The only thing I see is that the QModMaster program does not show the leading zeros but values are transmitted correctly

            Do not confuse values with their string representation, Modbus transmits values, not representations, then those values can be shown in hexadecimal, decimal, binary etc. and QModMaster author decided to don't show leading zeros.

            Your question should have started with "I have an string array which contains the hexadecimal representation of 16 byte values".

            Source https://stackoverflow.com/questions/64352018

            QUESTION

            Exception in thread "main" java.lang.NoClassDefFoundError: gnu/io/SerialPortEventListener
            Asked 2020-Aug-21 at 09:36

            I am new to coding and i want to connect my pi to Schneider pm 1200 to get values of holding registers. and when i executed it, i got many errors related to exception.

            How to write register? I am trying to use writeSingleRegister method ,but I cant's get it's register type error.

            I am using j2mod jar file

            This is the code

            ...

            ANSWER

            Answered 2020-Jun-07 at 13:25

            At runtime, the code executed for a Java program starts out in "class files", stored by the compiler in files with a ".class" extension. These files are often packaged in groups in "jar files", and the Java runtime can find the classes in the jar files while it's running.

            Your error indicates that the runtime cannot find the class indicated. The java.io.SerialPortEventListener class appears to be available in the jar file rxtx-2.1.7.jar. You can download that (search for its reliable source) and copy it to the target machine. You'll then need to read up on what a classpath is; you can set a classpath in an environment variable or with a parameter passed to the "java" command at runtime. Either way, the runtime can find the class in that jar file when you run your program.

            I've touched on a handful of concepts here; am sorry it isn't a real simple do 1-2-3 kind of answer, but you'll need to understand jar files and the classpath as you code more.

            Source https://stackoverflow.com/questions/62245674

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install j2mod

            You can download it from GitHub, Maven.
            You can use j2mod like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the j2mod component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
            Maven
            Gradle
            CLONE
          • HTTPS

            https://github.com/steveohara/j2mod.git

          • CLI

            gh repo clone steveohara/j2mod

          • sshUrl

            git@github.com:steveohara/j2mod.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link

            Explore Related Topics

            Consider Popular TCP Libraries

            masscan

            by robertdavidgraham

            wait-for-it

            by vishnubob

            gnet

            by panjf2000

            Quasar

            by quasar

            mumble

            by mumble-voip

            Try Top Libraries by steveohara

            enocean4j

            by steveoharaJava