Hi Chris,

sure, sorry for that.
As some drivers have the possibility to add further configuration options I 
would like to unify that for all drivers.
Camel uses the URI syntax for that, so e.g. for siemens one would write:

s7://192.168.1.10?rack=0&slot=0

or, if both have a default value of 0 (which we could set) then simply

s7://192.168.1.10

which would make it easier.

In case of other transports I suggest to simply keep the same scheme with, e.g.,
- /dev/ttyUSB0 (Linux)
- COM3 (Windows)
Check e.g. this python serial port lib which uses the same [1].

So, a modbus connection would be

modbus:///dev/ttyUSB0 on Linux or
modbus://COM3 on Windows

For ADS they use this strange extension of the "ip" (they call the AMS ID). 
Dokumentation says [2]

" Die AMS Net ID setzt sich aus der TCP/IP des lokalen Computers + dem Zusatz 
.1.1 zusammen. Die AMS Net ID basiert auf der TCP/IP-Adresse, es besteht jedoch 
kein zwingender Zusammenhang."

Or in english

"AMS Net ID is build of the TCP/IP of the computer + addition of ".1.1". The 
AMS Net ID is based on the TCP/IP address but there is no forcing relation".

So, if its always ".1.1" I suggest to simply skip that, like

ads://192.168.1.1

or, if it could change, I suggest to move it to the params section, like

ads://192.168.1.1?ams=1.1

Sorry, the post still got a bit lengthy, but I hope to clarify things here.

Julian

[1] https://pyserial.readthedocs.io/en/latest/url_handlers.html
[2] 
https://infosys.beckhoff.com/index.php?content=../content/1031/tcadscommon/html/tcadscommon_remoteconnection.htm&id=5145430474987923357

Am 16.07.19, 00:41 schrieb "Christofer Dutz" <[email protected]>:

    Hi Julian,
    
    Could you post examples how the URLs would look like? Sorry, don't have the 
time to read the document you posted. So if you would post example strings for 
each driver type we currently have in plc4x, I think that would help us 
understand your proposal.
    
    Chris
    
    Holen Sie sichOutlook für Android<https://aka.ms/ghei36>
    
    ________________________________
    From: Julian Feinauer <[email protected]>
    Sent: Saturday, July 13, 2019 10:05:26 AM
    To: [email protected]
    Subject: [DISCUSS] change connection string format
    
    Hi all,
    
    Currently we have no fixed rules on how a connection string should look 
like and everybody has its own regrex (except for the first part).
    This is bad from a stylistic point of view but also leads to confusion like 
with PLC4X-134 [1].
    
    I suggest to take the schema used in apache Camel which is oriented at url 
/ urn, see [2].
    
    This allows
    - central parsing
    -more efficient handling of missing parameters
    -default values
    -its a standard!
    
    What do others think?
    
    Julian
    
    [1] https://issues.apache.org/jira/browse/PLC4X-134
    [2] https://camel.apache.org/how-do-i-configure-endpoints.html
    
    Von meinem Mobiltelefon gesendet
    

Reply via email to