File tree Expand file tree Collapse file tree 2 files changed +36
-0
lines changed
modbus/src/main/java/com/digitalpetri/modbus/server Expand file tree Collapse file tree 2 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,24 @@ public ModbusRtuServer(
3939 this .services .set (services );
4040 }
4141
42+ /**
43+ * Get the {@link ModbusServerConfig} used by this server.
44+ *
45+ * @return the {@link ModbusServerConfig} used by this server.
46+ */
47+ public ModbusServerConfig getConfig () {
48+ return config ;
49+ }
50+
51+ /**
52+ * Get the {@link ModbusRtuServerTransport} used by this server.
53+ *
54+ * @return the {@link ModbusRtuServerTransport} used by this server.
55+ */
56+ public ModbusRtuServerTransport getTransport () {
57+ return transport ;
58+ }
59+
4260 @ Override
4361 public void start () throws ExecutionException , InterruptedException {
4462 transport .receive (
Original file line number Diff line number Diff line change @@ -39,6 +39,24 @@ public ModbusTcpServer(
3939 this .services .set (services );
4040 }
4141
42+ /**
43+ * Get the {@link ModbusServerConfig} used by this server.
44+ *
45+ * @return the {@link ModbusServerConfig} used by this server.
46+ */
47+ public ModbusServerConfig getConfig () {
48+ return config ;
49+ }
50+
51+ /**
52+ * Get the {@link ModbusTcpServerTransport} used by this server.
53+ *
54+ * @return the {@link ModbusTcpServerTransport} used by this server.
55+ */
56+ public ModbusTcpServerTransport getTransport () {
57+ return transport ;
58+ }
59+
4260 @ Override
4361 public void start () throws ExecutionException , InterruptedException {
4462 transport .receive ((context , frame ) -> handleModbusTcpFrame (frame , context ));
You can’t perform that action at this time.
0 commit comments