//
//  Licensed to the Apache Software Foundation (ASF) under one or more
//  contributor license agreements.  See the NOTICE file distributed with
//  this work for additional information regarding copyright ownership.
//  The ASF licenses this file to You under the Apache License, Version 2.0
//  (the "License"); you may not use this file except in compliance with
//  the License.  You may obtain a copy of the License at
//
//      https://www.apache.org/licenses/LICENSE-2.0
//
//  Unless required by applicable law or agreed to in writing, software
//  distributed under the License is distributed on an "AS IS" BASIS,
//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
//  See the License for the specific language governing permissions and
//  limitations under the License.
//

// Code generated by code-generation. DO NOT EDIT.

[cols="2,2a,2a,2a,4a"]
|===
|Name |Type |Default Value |Required |Description
|Name 4+|Modbus RTU
|Code 4+|`modbus-rtu`
|Maven Dependency 4+|

[subs=attributes+]
----
<dependency>
  <groupId>org.apache.plc4x</groupId>
  <artifactId>plc4j-driver-modbus</artifactId>
  <version>{page-component-version}</version>
</dependency>
----
|Default Transport 4+|`serial`
|Supported Transports 4+|
 - `serial`
 - `tcp`
 - `tls`
 - `tls-psk`
 - `udp`
5+|Config options:
|`request-timeout-ms` |INT |5000| |Default timeout for all types of requests. The timeout covers the full time from submission including queueing; queued requests whose remaining budget falls below a small dispatch margin (at most a quarter of the timeout, capped at 50 ms) fail fast instead of being sent.
|`default-unit-identifier` |INT |1| |Unit-identifier or slave-id that identifies the target PLC (On RS485 multiple Modbus Devices can be listening). Defaults to 1.
|`ping-address` |STRING |4x00001:BOOL| |Simple address, that the driver will use to check, if the connection to a given device is active (Defaults to reading holding-register 1).
|`default-payload-byte-order` |STRING |BIG_ENDIAN| |Default encoding used for transporting register values (Defaults to BIG_ENDIAN). +
Allowed values are:  +
 - BIG_ENDIAN +
 - LITTLE_ENDIAN +
 - BIG_ENDIAN_BYTE_SWAP +
 - LITTLE_ENDIAN_BYTE_SWAP +
 +
*Since: 0.13.0*
|`max-coils-per-request` |INT |2000| |Maximum number of coils addressable in one request (Defaults to 2000) +
*Since: 0.13.0*
|`max-registers-per-request` |INT |125| |Maximum number of registers addressable in one request (Defaults to 125) +
*Since: 0.13.0*
5+|Transport config options:
5+|
+++
<h4>serial</h4>
+++
|`serial.baud-rate` |INT |9600| |Baud rate (bits per second)
|`serial.data-bits` |INT |8| |Number of data bits (5, 6, 7, or 8)
|`serial.stop-bits` |INT |1| |Number of stop bits (1 or 2)
|`serial.parity` |STRING |none| |Parity: none, odd, even, mark, space (case-insensitive)
|`serial.flow-control` |STRING |none| |Flow control: none, rts-cts, xon-xoff (case-insensitive)
|`serial.read-timeout-ms` |INT |1000| |Read timeout in milliseconds. 0 means blocking read.
|`serial.write-timeout-ms` |INT |1000| |Write timeout in milliseconds.
|`serial.dtr` |BOOLEAN |false| |Enable DTR (Data Terminal Ready) signal
|`serial.rts` |BOOLEAN |false| |Enable RTS (Request To Send) signal
|`serial.reuse-port` |BOOLEAN |false| |Reuse the underlying serial port across multiple transport instances. When true, instances with the same port will share a connection. This is useful for protocols where multiple logical connections share one serial port. Connections sharing a port must target distinct unit ids; Modbus RTU responses carry no transaction ids, so same-unit traffic from multiple connections cannot be told apart.
|`serial.interframe-delay` |INT |0| |Interframe delay in milliseconds for protocols that need spacing between messages. Applies to shared and dedicated ports; the gap is measured from the last write or received data.
5+|
+++
<h4>tcp</h4>
+++
|`tcp.connect-timeout-ms` |INT |5000| |
|`tcp.read-timeout-ms` |INT |0| |
|`tcp.write-timeout-ms` |INT |0| |
|`tcp.no-delay` |BOOLEAN |true| |
|`tcp.keep-alive` |BOOLEAN |false| |
|`tcp.send-buffer-size` |INT |81920| |
|`tcp.receive-buffer-size` |INT |81920| |
|`tcp.local-address` |STRING | | |
|`tcp.local-port` |INT |0| |
5+|
+++
<h4>tls</h4>
+++
|`tls.verify` |BOOLEAN |true| |
|`tls.ignore-common-name` |BOOLEAN |false| |Accept a server certificate issued for a different host than the one connected to
|`tls.trust-store` |STRING | | |Key store of certificates to trust, instead of the JVM's public authorities
|`tls.trust-store-password` |STRING | | |Password of the trust store named by tls.trust-store
|`tls.trust-store-type` |STRING |PKCS12| |Type of the trust store named by tls.trust-store
|`tls.version` |STRING | | |TLS protocol version (e.g., 'TLSv1.2', 'TLSv1.3'). If not set, uses TLS 1.3 with fallback to TLS 1.2.
|`tls.keystore` |STRING | | |Path to keystore (PKCS12/JKS) containing the client certificate and private key for mutual TLS.
|`tls.keystore-password` |STRING | | |Password for the client keystore.
|`tls.keystore-type` |STRING | | |Keystore type (e.g., 'PKCS12', 'JKS'). Defaults to PKCS12.
|`tls.log-session-keys` |BOOLEAN |false| |Log TLS session keys to the audit log in SSLKEYLOGFILE format for Wireshark decryption.
|`tls.connect-timeout-ms` |INT |5000| |
|`tls.read-timeout-ms` |INT |0| |
|`tls.write-timeout-ms` |INT |0| |
|`tls.no-delay` |BOOLEAN |true| |
|`tls.keep-alive` |BOOLEAN |false| |
|`tls.send-buffer-size` |INT |81920| |
|`tls.receive-buffer-size` |INT |81920| |
|`tls.local-address` |STRING | | |
|`tls.local-port` |INT |0| |
5+|
+++
<h4>tls-psk</h4>
+++
|`tls-psk.psk-identity` |STRING | | |PSK identity string for TLS-PSK authentication. Must be used together with psk-key.
|`tls-psk.psk-key` |STRING | | |PSK key as hexadecimal string for TLS-PSK authentication. Must be used together with psk-identity.
|`tls-psk.log-session-keys` |BOOLEAN |false| |Log TLS session keys to the audit log in SSLKEYLOGFILE format for Wireshark decryption.
|`tls-psk.connect-timeout-ms` |INT |5000| |
|`tls-psk.read-timeout-ms` |INT |0| |
|`tls-psk.write-timeout-ms` |INT |0| |
|`tls-psk.no-delay` |BOOLEAN |true| |
|`tls-psk.keep-alive` |BOOLEAN |false| |
|`tls-psk.send-buffer-size` |INT |81920| |
|`tls-psk.receive-buffer-size` |INT |81920| |
|`tls-psk.local-address` |STRING | | |
|`tls-psk.local-port` |INT |0| |
5+|
+++
<h4>udp</h4>
+++
|`udp.local-address` |STRING | | |Local address to bind to. If not set, binds to all interfaces.
|`udp.local-port` |INT |0| |Local port to bind to. 0 uses ephemeral port.
|`udp.read-timeout-ms` |INT |0| |Socket read timeout in milliseconds. 0 means no timeout.
|`udp.max-packet-size` |INT |65507| |Maximum UDP packet size in bytes.
|`udp.send-buffer-size` |INT |0| |Send buffer size in bytes. 0 uses system default.
|`udp.receive-buffer-size` |INT |0| |Receive buffer size in bytes. 0 uses system default.
|`udp.broadcast` |BOOLEAN |false| |Enable SO_BROADCAST for sending broadcast packets.
|`udp.reuse-address` |BOOLEAN |false| |Enable SO_REUSEADDR to allow multiple bindings to the same address/port.
|`udp.share-socket` |BOOLEAN |false| |Share the underlying UDP socket across multiple transport instances. When true, instances with the same localAddress:localPort will share a socket. This is useful for protocols where multiple logical connections share one UDP port.
|`udp.multicast-ttl` |INT |1| |Time-to-live for multicast packets (1-255).
|===
