Skip to content

Commit 7b839be

Browse files
committed
Fixed issue with sr argument, updated docs, pushed new doceker image
1 parent abf2b24 commit 7b839be

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ FROM eclipse-temurin:17
1111
# Continue with your application deployment
1212
RUN mkdir /opt/app
1313
COPY --from=jre-build work/build/libs/*.jar /opt/app/
14-
CMD ["java", "-jar", "/opt/app/modbus-simulator-cli-1.0-SNAPSHOT-all.jar"]
14+
ENTRYPOINT ["java", "-jar", "/opt/app/modbus-simulator-cli-1.0-SNAPSHOT-all.jar"]

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,5 +46,16 @@ java -jar build/libs/modbus-simulator-cli-1.0-SNAPSHOT-all.jar -sr
4646
```
4747
For customization options check [full documentation](https://paulorb.github.io/modbus-simulator-cli/)
4848

49+
## Quick Start (for Docker)
50+
51+
1. Pull the Modbus Simulator
52+
53+
docker pull paulorb/modbus-simulator-cli
54+
55+
2. Run the Modbus Simulator
56+
57+
docker run --rm -p 5002:5002 paulorb/modbus-simulator-cli:v0.0.99-beta.2 -sr
58+
59+
4960
## Author
5061
Contact me on [![LinkedIn](https://img.shields.io/badge/-LinkedIn-0A66C2?logo=linkedin&style=flat-square)](https://www.linkedin.com/in/paulo-roberto-balbino/)

src/main/kotlin/Main.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,7 @@ class Checksum : Callable<Int> {
4444
//val digest = MessageDigest.getInstance(port).digest(fileContents)
4545
//println(("%0" + digest.size * 2 + "x").format(BigInteger(1, digest)))
4646
if(simulationRandomValues) {
47-
plcMemory = PlcMemory(configuration)
48-
modbusServer = ModbusServer(plcMemory)
47+
modbusServer = ModbusServer(ModbusServerEventListenerReplyRandomNumbers())
4948
}else {
5049
if (file.isNotEmpty()) {
5150
// -f file based (Custom simulation)

0 commit comments

Comments
 (0)