MCPcopy Index your code
hub / github.com/MangoAutomation/modbus4j

github.com/MangoAutomation/modbus4j @v3.1.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v3.1.0 ↗ · + Follow
1,856 symbols 4,049 edges 302 files 899 documented · 48%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

modbus4j

A high-performance and ease-of-use implementation of the Modbus protocol written in Java by Infinite Automation Systems and Serotonin Software. Supports ASCII, RTU, TCP, and UDP transports as slave or master, automatic request partitioning and response data type parsing.

For support and general help please see our Forum

Commercial licenses are available from https://infiniteautomation.com/modbus4j-open-source-modbus-library/

A public Maven Repository is now available with the latest builds add this to your pom.xml

<repositories>
    <repository>
        <releases>
            <enabled>false</enabled>
        </releases>
        <snapshots>
            <enabled>true</enabled>
        </snapshots>
        <id>ias-snapshots</id>
        <name>Infinite Automation Snapshot Repository</name>
        <url>https://maven.mangoautomation.net/repository/ias-snapshot/</url>
    </repository>
    <repository>
        <releases>
            <enabled>true</enabled>
        </releases>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <id>ias-releases</id>
        <name>Infinite Automation Release Repository</name>
        <url>https://maven.mangoautomation.net/repository/ias-release/</url>
    </repository>
</repositories>

The dependency information is:

<dependency>
    <groupId>com.infiniteautomation</groupId>
    <artifactId>modbus4j</artifactId>
    <version>3.0.3</version>
</dependency>

Extension points exported contracts — how you extend this code

IpMessageResponse (Interface)
IpMessageResponse interface. @author Matthew Lohbihler @version 5.0.0 [10 implementers]
src/com/serotonin/modbus4j/ip/IpMessageResponse.java
WaitingRoomKey (Interface)
Waiting room keys are used to match requests with responses. Implementation need to have hashcode and equals definitions [5 …
src_cdc/com/serotonin/cdc/messaging/WaitingRoomKey.java
OutgoingMessage (Interface)
OutgoingMessage interface. @author Matthew Lohbihler @version 5.0.0 [8 implementers]
src/com/serotonin/modbus4j/sero/messaging/OutgoingMessage.java
OutgoingMessage (Interface)
(no doc) [8 implementers]
src_cdc/com/serotonin/cdc/messaging/OutgoingMessage.java
WaitingRoomKeyFactory (Interface)
WaitingRoomKeyFactory interface. @author Matthew Lohbihler @version 5.0.0 [9 implementers]
src/com/serotonin/modbus4j/sero/messaging/WaitingRoomKeyFactory.java
WaitingRoomKeyFactory (Interface)
(no doc) [9 implementers]
src_cdc/com/serotonin/cdc/messaging/WaitingRoomKeyFactory.java
RequestHandler (Interface)
RequestHandler interface. @author Matthew Lohbihler @version 5.0.0 [9 implementers]
src/com/serotonin/modbus4j/sero/messaging/RequestHandler.java
RequestHandler (Interface)
(no doc) [9 implementers]
src_cdc/com/serotonin/cdc/messaging/RequestHandler.java

Core symbols most depended-on inside this repo

addLocator
called by 76
src_cdc/com/serotonin/cdc/modbus4j/BatchRead.java
getSlaveId
called by 53
src/com/serotonin/modbus4j/ProcessImage.java
push
called by 47
src/com/serotonin/modbus4j/sero/util/queue/ByteQueue.java
write
called by 44
src/com/serotonin/modbus4j/sero/messaging/Transport.java
setNumeric
called by 41
src_cdc/com/serotonin/cdc/modbus4j/BasicProcessImage.java
close
called by 40
src/com/serotonin/modbus4j/serial/SerialPortWrapper.java
pop
called by 40
src/com/serotonin/modbus4j/sero/util/queue/ByteQueue.java
pop
called by 37
src_cdc/com/serotonin/cdc/util/queue/ByteQueue.java

Shape

Method 1,531
Class 284
Interface 41

Languages

Java100%

Modules by API surface

src_cdc/com/serotonin/cdc/modbus4j/BasicProcessImage.java38 symbols
src/com/serotonin/modbus4j/sero/util/queue/ByteQueue.java38 symbols
src/com/serotonin/modbus4j/BasicProcessImage.java38 symbols
src_cdc/com/serotonin/cdc/util/queue/ByteQueue.java31 symbols
src/com/serotonin/modbus4j/ModbusMaster.java30 symbols
src/com/serotonin/modbus4j/sero/io/StreamUtils.java26 symbols
src_cdc/com/serotonin/cdc/modbus4j/ModbusMaster.java22 symbols
src_cdc/com/serotonin/cdc/modbus4j/locator/BaseLocator.java19 symbols
src/com/serotonin/modbus4j/locator/BaseLocator.java19 symbols
src/com/serotonin/modbus4j/sero/messaging/MessageControl.java18 symbols
src_cdc/com/serotonin/cdc/io/serial/SerialParameters.java17 symbols
src_cdc/com/serotonin/cdc/modbus4j/base/ModbusUtils.java16 symbols

For agents

$ claude mcp add modbus4j \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact