PLC4X (Proxy) (TCP)

Connection String Options

Name

Type

Default Value

Required

Description

Name

PLC4X (Proxy-Protocol)

Code

plc4x

Maven Dependency

<dependency>
  <groupId>org.apache.plc4x</groupId>
  <artifactId>plc4j-driver-plc4x</artifactId>
  <version>pre-release</version>
</dependency>

Default Transport

tls

Supported Transports

  • tls

  • tcp

Config options:

remote-connection-string

STRING

URL-Encoded connection string to use on the proxy side to reach the given PLC.

request-timeout

INT

5000

Default timeout for all types of requests.

username

STRING

Username for authenticating against the PLC4X proxy server. Authentication is mandatory.

password

STRING

Password for authenticating against the PLC4X proxy server. Authentication is mandatory.

Transport config options:

tls

tls.verify-ssl

BOOLEAN

true

tls.ignore-common-name

BOOLEAN

false

Tells the target to not validate the common name

tls.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

INT

5000

tls.read-timeout

INT

0

tls.write-timeout

INT

0

tls.tcp-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

tcp

tcp.connect-timeout

INT

5000

tcp.read-timeout

INT

0

tcp.write-timeout

INT

0

tcp.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

Connection String Options

Name Value Description

Supported Operations:

read

write

subscribe

Individual Resource Address Format

Connection String

The plc4x protocol connection has the following connection string format:-

plc4x:{transport}://{ip-address/hostname}:{port}?remote-connection-string={url-encoded-connection-string}

An example connection string would look like:-

plc4x://127.0.0.1?remote-connection-string=simulated%3A%2F%2Flocalhost

Note the transport, port and option fields are optional. The remote connection string: simulated://localhost is encoded as simulated%3A%2F%2Flocalhost

General Format

The address format is simply the address format of the used remote connection. So if you specify a remote connection as simulated, please follow the address format of that driver.