Hey,

I created PLC4X-224 for this https://issues.apache.org/jira/browse/PLC4X-224
Ideally every Connection brings a “normalization” function which prints a 
normalized String which contains all “relevant” parameters in a default order.

J

Von: Christofer Dutz <[email protected]>
Datum: Sonntag, 9. August 2020 um 11:21
An: Julian Feinauer <[email protected]>, "[email protected]" 
<[email protected]>
Betreff: Re: unit-identifier in PooledPlcDriverManager

I would generally say that every parameter is important. So perhaps a matcher 
that simply compares all configured keys would be a solution, regardless of the 
order.

Perhaps a new annotation that allows to exclude individual parameters would be 
an idea.

Chris
________________________________
Von: Julian Feinauer <[email protected]>
Gesendet: Sonntag, 9. August 2020 10:41
An: [email protected] <[email protected]>
Betreff: Re: unit-identifier in PooledPlcDriverManager

Hi Adam,

I created an Issue: https://issues.apache.org/jira/browse/PLC4X-223
And provided a PR: https://github.com/apache/plc4x/pull/176

I would be happy for your feedback : )

Thanks
Julian

Am 09.08.20, 10:27 schrieb "Julian Feinauer" <[email protected]>:

    Hi Adam,

    thanks for the hint.
    I guess this simply is a bug.

    Let me have a look.

    Julian

    Am 09.08.20, 00:34 schrieb "Adam Rossi" <[email protected]>:

        Howdy. I am using Plc4x for modbus tcp integration.

        For my application I need to specify the slave ID in the following 
format:

        modbus://192.168.0.1:503?unit-identifier=50

        This works for a single PlcConnection. However, parameters are not
        supported in the PooledPlcDriverManager, I get this exception:

        Caused by: org.apache.plc4x.java.api.exceptions.PlcConnectionException:
        java.lang.IllegalArgumentException: modbus://
        192.168.0.5:503?unit-identifier=50 doesn't match
        
^(?<poolablePart>modbus:(tcp://(?<host>[\w.]+)(:(?<port>\d*))?|serial://(?<serialDefinition>((?!/\d).)*)))/?(?<params>\?.*)?
        at
        
org.apache.plc4x.java.utils.connectionpool.PooledPlcDriverManager.getConnection(PooledPlcDriverManager.java:117)

        Is there a reason the pool does not like parameters for tcp (but does
        accept them for serial modbus)?

        Thanks for all of the hard work here. Wonderful project! Regards, Adam

Reply via email to