Re: Error in using new String feature in 0.8.0-SNAPSHOT

2020-08-21 Thread Stefano Bossi
YESSS !

It works !

I could read a string with a notation like: |%DB1:6:STRING(10)| for
reading 10 chars.

It’s worth to mention here for the community:

  * the notation |%DB1:6:STRING| doesn’t work for the S7 1200 due to the
problem of the request of 256 Byte length which is not supported by
that kind of PLC. The synchronous call hang forever;
  * the notation |%DB1:6.0:STRING(10)| doesn’t work either because raise
a |PlcInvalidFieldException: %DB1:6.0:STRING(10) invalid| exception;

I could confirm that the reading of |DATE_AND_TIME| works too with a
super beautiful output like: |2020-08-21T09:05:24.001890204|

Wonderful 

Thanks Chris for your work!

I will keep going with my tests.

Regards,
Stefano

On 21/08/2020 09:56, Christofer Dutz wrote:

> Hi Stefano,
>
> ok ... so you probably used the STRING type without the limiting feature.
> So if you don't add a "(10)" or whatever max number of elements you want to 
> read, it will still not work.
> The change I applied only lets you limit the number, if you don't is says at 
> 254 unchanged.
>
> But you did find a bug in my code from yesterday, which I just fixed.
>
> So if you update and re-build, it should now fail again like it did before. 
>
> So please try to add the STRING(10) or whatever number you need to the 
> address and it should work.
>
>
> Chris
>
>
>
> Am 21.08.20, 09:51 schrieb "Christofer Dutz" :
>
> Hi Stefano,
>
> ok … if you did it that way, it should have worked …
>
> I just had another look at your error report and will investigate …
>
> Chris
>
>
>
> Von: Stefano Bossi 
>     Datum: Freitag, 21. August 2020 um 09:48
> An: Christofer Dutz 
> Betreff: Re: Error in using new String feature in 0.8.0-SNAPSHOT
>
> ok, I will wait.
>
> let me know.
>
> Anyway, I don't know if this could help, I have downloaded the code from 
> git with git pull and compiled all the modules with ./mvnw install and all 
> went fine
>
> Anyway, I will wait your suggestions.
>
> Many thanks,
> S.
>
>
>
> On 21/08/2020 09:45, Christofer Dutz wrote:
> Hi Stefano,
>
> I just got an email from our jenkins, complaining that a build failed 
> because of no space left on the agent … I’ll clean it up and re-run the build.
>
>
> Chris
>
>
>
> Von: Stefano Bossi 
> <mailto:stefano.bo...@gmail.com>
>     Datum: Freitag, 21. August 2020 um 09:27
> An: "dev@plc4x.apache.org"<mailto:dev@plc4x.apache.org> 
> <mailto:dev@plc4x.apache.org>, Christofer Dutz 
> <mailto:christofer.d...@c-ware.de>
> Betreff: Error in using new String feature in 0.8.0-SNAPSHOT
>
>
> Dear Chris and forum,
>
> I am trying to test your new feature about STRING and DATE_TIME but I 
> have a strange error using HelloPlc4x, it seems I am missing some module…
> Do you spot what am I missing?
>
> I have imported
>
> implementation group: 'org.apache.plc4x', name: 'plc4j-driver-s7', 
> version: '0.8.0-SNAPSHOT'
>
> Here the stack trace
>
> bash-3.2$  /Users/fox/.jenv/versions/openjdk64-13.0.2/bin/java 
> -agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:55138 
> -ea -Dfile.encoding=UTF-8 
> @/var/folders/p1/lb5grfpn3tncxdtrptqq9fw4gp/T/cp_7wf4vv0mligcs0a855vuftbrc.argfile
>  it.fox.datapicker.HelloPlc4x --connection-string 
> s7:tcp://192.168.1.192?controller-type=S7_1200 --field-addresses 
> %DB1:6.0:STRING
>
> 2020-08-21 09:23:22,608 main DEBUG Apache Log4j Core 2.13.1 initializing 
> configuration 
> XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 - Data 
> Picker/bin/main/log4j2.xml]
>
> 2020-08-21 09:23:22,615 main DEBUG Installed 1 script engine
>
> Warning: Nashorn engine is planned to be removed from a future JDK release
>
> 2020-08-21 09:23:22,816 main DEBUG Oracle Nashorn version: 13.0.2, 
> language: ECMAScript, threading: Not Thread Safe, compile: true, names: 
> [nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], 
> factory class: jdk.nashorn.api.scripting.NashornScriptEngineFactory
>
> 2020-08-21 09:23:22,817 main DEBUG PluginManager 'Core' found 122 plugins
>
> 2020-08-21 09:23:22,817 main DEBUG PluginManager 'Level' found 0 plugins
>
> 2020-08-21 09:23:22,821 main DEBUG PluginManager 'Lookup' found 15 plugins
>
> 2020-08-21 09:23:22,823 main DEBUG Building Plugin[name=layout, 
> class=org.apache.logging.log4j.core.layout.PatternLayout].
>
> 2020-08-21 09:23:22,834 main DEBUG PluginManager 'TypeConverter' found 26 
> plugins
>
> 2020-

Re: Error in using new String feature in 0.8.0-SNAPSHOT

2020-08-21 Thread Christofer Dutz
Hi Stefano,

ok ... so you probably used the STRING type without the limiting feature.
So if you don't add a "(10)" or whatever max number of elements you want to 
read, it will still not work.
The change I applied only lets you limit the number, if you don't is says at 
254 unchanged.

But you did find a bug in my code from yesterday, which I just fixed.

So if you update and re-build, it should now fail again like it did before. 

So please try to add the STRING(10) or whatever number you need to the address 
and it should work.


Chris



Am 21.08.20, 09:51 schrieb "Christofer Dutz" :

Hi Stefano,

ok … if you did it that way, it should have worked …

I just had another look at your error report and will investigate …

Chris



Von: Stefano Bossi 
Datum: Freitag, 21. August 2020 um 09:48
An: Christofer Dutz 
    Betreff: Re: Error in using new String feature in 0.8.0-SNAPSHOT

ok, I will wait.

let me know.

Anyway, I don't know if this could help, I have downloaded the code from 
git with git pull and compiled all the modules with ./mvnw install and all went 
fine

Anyway, I will wait your suggestions.

Many thanks,
S.



On 21/08/2020 09:45, Christofer Dutz wrote:
Hi Stefano,

I just got an email from our jenkins, complaining that a build failed 
because of no space left on the agent … I’ll clean it up and re-run the build.


Chris



Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>
Datum: Freitag, 21. August 2020 um 09:27
An: "dev@plc4x.apache.org"<mailto:dev@plc4x.apache.org> 
<mailto:dev@plc4x.apache.org>, Christofer Dutz 
<mailto:christofer.d...@c-ware.de>
    Betreff: Error in using new String feature in 0.8.0-SNAPSHOT


Dear Chris and forum,

I am trying to test your new feature about STRING and DATE_TIME but I have 
a strange error using HelloPlc4x, it seems I am missing some module…
Do you spot what am I missing?

I have imported

implementation group: 'org.apache.plc4x', name: 'plc4j-driver-s7', version: 
'0.8.0-SNAPSHOT'

Here the stack trace

bash-3.2$  /Users/fox/.jenv/versions/openjdk64-13.0.2/bin/java 
-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:55138 
-ea -Dfile.encoding=UTF-8 
@/var/folders/p1/lb5grfpn3tncxdtrptqq9fw4gp/T/cp_7wf4vv0mligcs0a855vuftbrc.argfile
 it.fox.datapicker.HelloPlc4x --connection-string 
s7:tcp://192.168.1.192?controller-type=S7_1200 --field-addresses %DB1:6.0:STRING

2020-08-21 09:23:22,608 main DEBUG Apache Log4j Core 2.13.1 initializing 
configuration 
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml]

2020-08-21 09:23:22,615 main DEBUG Installed 1 script engine

Warning: Nashorn engine is planned to be removed from a future JDK release

2020-08-21 09:23:22,816 main DEBUG Oracle Nashorn version: 13.0.2, 
language: ECMAScript, threading: Not Thread Safe, compile: true, names: 
[nashorn, Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], 
factory class: jdk.nashorn.api.scripting.NashornScriptEngineFactory

2020-08-21 09:23:22,817 main DEBUG PluginManager 'Core' found 122 plugins

2020-08-21 09:23:22,817 main DEBUG PluginManager 'Level' found 0 plugins

2020-08-21 09:23:22,821 main DEBUG PluginManager 'Lookup' found 15 plugins

2020-08-21 09:23:22,823 main DEBUG Building Plugin[name=layout, 
class=org.apache.logging.log4j.core.layout.PatternLayout].

2020-08-21 09:23:22,834 main DEBUG PluginManager 'TypeConverter' found 26 
plugins

2020-08-21 09:23:22,846 main DEBUG 
PatternLayout$Builder(pattern="[%-5level] %d{HH:mm:ss.SSS} %logger{36}.%M() - 
%msg%n", PatternSelector=null, 
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml), Replace=null, charset="null", 
alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", 
header="null", footer="null")

2020-08-21 09:23:22,846 main DEBUG PluginManager 'Converter' found 44 
plugins

2020-08-21 09:23:22,848 main DEBUG Building Plugin[name=appender, 
class=org.apache.logging.log4j.core.appender.ConsoleAppender].

2020-08-21 09:23:22,856 main DEBUG 
ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null", direct="null", 
bufferedIo="null", bufferSize="null", immediateFlush="null", 
ignoreExceptions="null", PatternLayout([%-5level] %d{HH:mm:ss.SSS} 
%logger{36}.%M() - %msg%n), name="Console", 
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml), Filter=null, ={})

2020-08-21 09:23:22,858 main DEBUG Starting OutputStreamManager 
SYSTEM_OUT.false.false

2020-08-21 09:23:22,858 main DEBUG Building Plugin[name=appenders, 
class

Re: Error in using new String feature in 0.8.0-SNAPSHOT

2020-08-21 Thread Christofer Dutz
Hi Stefano,

ok … if you did it that way, it should have worked …

I just had another look at your error report and will investigate …

Chris



Von: Stefano Bossi 
Datum: Freitag, 21. August 2020 um 09:48
An: Christofer Dutz 
Betreff: Re: Error in using new String feature in 0.8.0-SNAPSHOT

ok, I will wait.

let me know.

Anyway, I don't know if this could help, I have downloaded the code from git 
with git pull and compiled all the modules with ./mvnw install and all went 
fine

Anyway, I will wait your suggestions.

Many thanks,
S.



On 21/08/2020 09:45, Christofer Dutz wrote:
Hi Stefano,

I just got an email from our jenkins, complaining that a build failed because 
of no space left on the agent … I’ll clean it up and re-run the build.


Chris



Von: Stefano Bossi <mailto:stefano.bo...@gmail.com>
Datum: Freitag, 21. August 2020 um 09:27
An: "dev@plc4x.apache.org"<mailto:dev@plc4x.apache.org> 
<mailto:dev@plc4x.apache.org>, Christofer Dutz 
<mailto:christofer.d...@c-ware.de>
Betreff: Error in using new String feature in 0.8.0-SNAPSHOT


Dear Chris and forum,

I am trying to test your new feature about STRING and DATE_TIME but I have a 
strange error using HelloPlc4x, it seems I am missing some module…
Do you spot what am I missing?

I have imported

implementation group: 'org.apache.plc4x', name: 'plc4j-driver-s7', version: 
'0.8.0-SNAPSHOT'

Here the stack trace

bash-3.2$  /Users/fox/.jenv/versions/openjdk64-13.0.2/bin/java 
-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:55138 
-ea -Dfile.encoding=UTF-8 
@/var/folders/p1/lb5grfpn3tncxdtrptqq9fw4gp/T/cp_7wf4vv0mligcs0a855vuftbrc.argfile
 it.fox.datapicker.HelloPlc4x --connection-string 
s7:tcp://192.168.1.192?controller-type=S7_1200 --field-addresses %DB1:6.0:STRING

2020-08-21 09:23:22,608 main DEBUG Apache Log4j Core 2.13.1 initializing 
configuration 
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml]

2020-08-21 09:23:22,615 main DEBUG Installed 1 script engine

Warning: Nashorn engine is planned to be removed from a future JDK release

2020-08-21 09:23:22,816 main DEBUG Oracle Nashorn version: 13.0.2, language: 
ECMAScript, threading: Not Thread Safe, compile: true, names: [nashorn, 
Nashorn, js, JS, JavaScript, javascript, ECMAScript, ecmascript], factory 
class: jdk.nashorn.api.scripting.NashornScriptEngineFactory

2020-08-21 09:23:22,817 main DEBUG PluginManager 'Core' found 122 plugins

2020-08-21 09:23:22,817 main DEBUG PluginManager 'Level' found 0 plugins

2020-08-21 09:23:22,821 main DEBUG PluginManager 'Lookup' found 15 plugins

2020-08-21 09:23:22,823 main DEBUG Building Plugin[name=layout, 
class=org.apache.logging.log4j.core.layout.PatternLayout].

2020-08-21 09:23:22,834 main DEBUG PluginManager 'TypeConverter' found 26 
plugins

2020-08-21 09:23:22,846 main DEBUG PatternLayout$Builder(pattern="[%-5level] 
%d{HH:mm:ss.SSS} %logger{36}.%M() - %msg%n", PatternSelector=null, 
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml), Replace=null, charset="null", 
alwaysWriteExceptions="null", disableAnsi="null", noConsoleNoAnsi="null", 
header="null", footer="null")

2020-08-21 09:23:22,846 main DEBUG PluginManager 'Converter' found 44 plugins

2020-08-21 09:23:22,848 main DEBUG Building Plugin[name=appender, 
class=org.apache.logging.log4j.core.appender.ConsoleAppender].

2020-08-21 09:23:22,856 main DEBUG ConsoleAppender$Builder(target="SYSTEM_OUT", 
follow="null", direct="null", bufferedIo="null", bufferSize="null", 
immediateFlush="null", ignoreExceptions="null", PatternLayout([%-5level] 
%d{HH:mm:ss.SSS} %logger{36}.%M() - %msg%n), name="Console", 
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml), Filter=null, ={})

2020-08-21 09:23:22,858 main DEBUG Starting OutputStreamManager 
SYSTEM_OUT.false.false

2020-08-21 09:23:22,858 main DEBUG Building Plugin[name=appenders, 
class=org.apache.logging.log4j.core.config.AppendersPlugin].

2020-08-21 09:23:22,859 main DEBUG createAppenders(={Console})

2020-08-21 09:23:22,859 main DEBUG Building Plugin[name=AppenderRef, 
class=org.apache.logging.log4j.core.config.AppenderRef].

2020-08-21 09:23:22,863 main DEBUG createAppenderRef(ref="Console", 
level="TRACE", Filter=null)

2020-08-21 09:23:22,864 main DEBUG Building Plugin[name=root, 
class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].

2020-08-21 09:23:22,865 main DEBUG createLogger(additivity="false", 
level="DEBUG", includeLocation="null", ={Console}, ={}, 
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data 
Picker/bin/main/log4j2.xml), Filter=null)

2020-08-21 09:23:22,867 main DEBUG Building Plugin[name=logger

Error in using new String feature in 0.8.0-SNAPSHOT

2020-08-21 Thread Stefano Bossi
Dear Chris and forum,

I am trying to test your new feature about STRING and DATE_TIME but I
have a strange error using HelloPlc4x, it seems I am missing some module…
Do you spot what am I missing?

I have imported

|implementation group: 'org.apache.plc4x', name: 'plc4j-driver-s7',
version: '0.8.0-SNAPSHOT' |

Here the stack trace

|bash-3.2$ /Users/fox/.jenv/versions/openjdk64-13.0.2/bin/java
-agentlib:jdwp=transport=dt_socket,server=n,suspend=y,address=localhost:55138
-ea -Dfile.encoding=UTF-8
@/var/folders/p1/lb5grfpn3tncxdtrptqq9fw4gp/T/cp_7wf4vv0mligcs0a855vuftbrc.argfile
it.fox.datapicker.HelloPlc4x --connection-string
s7:tcp://192.168.1.192?controller-type=S7_1200 --field-addresses
%DB1:6.0:STRING 2020-08-21 09:23:22,608 main DEBUG Apache Log4j Core
2.13.1 initializing configuration
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 -
Data Picker/bin/main/log4j2.xml] 2020-08-21 09:23:22,615 main DEBUG
Installed 1 script engine Warning: Nashorn engine is planned to be
removed from a future JDK release 2020-08-21 09:23:22,816 main DEBUG
Oracle Nashorn version: 13.0.2, language: ECMAScript, threading: Not
Thread Safe, compile: true, names: [nashorn, Nashorn, js, JS,
JavaScript, javascript, ECMAScript, ecmascript], factory class:
jdk.nashorn.api.scripting.NashornScriptEngineFactory 2020-08-21
09:23:22,817 main DEBUG PluginManager 'Core' found 122 plugins
2020-08-21 09:23:22,817 main DEBUG PluginManager 'Level' found 0 plugins
2020-08-21 09:23:22,821 main DEBUG PluginManager 'Lookup' found 15
plugins 2020-08-21 09:23:22,823 main DEBUG Building Plugin[name=layout,
class=org.apache.logging.log4j.core.layout.PatternLayout]. 2020-08-21
09:23:22,834 main DEBUG PluginManager 'TypeConverter' found 26 plugins
2020-08-21 09:23:22,846 main DEBUG
PatternLayout$Builder(pattern="[%-5level] %d{HH:mm:ss.SSS}
%logger{36}.%M() - %msg%n", PatternSelector=null,
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data
Picker/bin/main/log4j2.xml), Replace=null, charset="null",
alwaysWriteExceptions="null", disableAnsi="null",
noConsoleNoAnsi="null", header="null", footer="null") 2020-08-21
09:23:22,846 main DEBUG PluginManager 'Converter' found 44 plugins
2020-08-21 09:23:22,848 main DEBUG Building Plugin[name=appender,
class=org.apache.logging.log4j.core.appender.ConsoleAppender].
2020-08-21 09:23:22,856 main DEBUG
ConsoleAppender$Builder(target="SYSTEM_OUT", follow="null",
direct="null", bufferedIo="null", bufferSize="null",
immediateFlush="null", ignoreExceptions="null", PatternLayout([%-5level]
%d{HH:mm:ss.SSS} %logger{36}.%M() - %msg%n), name="Console",
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data
Picker/bin/main/log4j2.xml), Filter=null, ={}) 2020-08-21 09:23:22,858
main DEBUG Starting OutputStreamManager SYSTEM_OUT.false.false
2020-08-21 09:23:22,858 main DEBUG Building Plugin[name=appenders,
class=org.apache.logging.log4j.core.config.AppendersPlugin]. 2020-08-21
09:23:22,859 main DEBUG createAppenders(={Console}) 2020-08-21
09:23:22,859 main DEBUG Building Plugin[name=AppenderRef,
class=org.apache.logging.log4j.core.config.AppenderRef]. 2020-08-21
09:23:22,863 main DEBUG createAppenderRef(ref="Console", level="TRACE",
Filter=null) 2020-08-21 09:23:22,864 main DEBUG Building
Plugin[name=root,
class=org.apache.logging.log4j.core.config.LoggerConfig$RootLogger].
2020-08-21 09:23:22,865 main DEBUG createLogger(additivity="false",
level="DEBUG", includeLocation="null", ={Console}, ={},
Configuration(/Users/fox/Documents/workspace/2020-06-30 - Data
Picker/bin/main/log4j2.xml), Filter=null) 2020-08-21 09:23:22,867 main
DEBUG Building Plugin[name=loggers,
class=org.apache.logging.log4j.core.config.LoggersPlugin]. 2020-08-21
09:23:22,868 main DEBUG createLoggers(={root}) 2020-08-21 09:23:22,868
main DEBUG Configuration
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 -
Data Picker/bin/main/log4j2.xml] initialized 2020-08-21 09:23:22,869
main DEBUG Starting configuration
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 -
Data Picker/bin/main/log4j2.xml] 2020-08-21 09:23:22,869 main DEBUG
Started configuration
XmlConfiguration[location=/Users/fox/Documents/workspace/2020-06-30 -
Data Picker/bin/main/log4j2.xml] OK. 2020-08-21 09:23:22,872 main DEBUG
Shutting down OutputStreamManager SYSTEM_OUT.false.false-1 2020-08-21
09:23:22,872 main DEBUG OutputStream closed 2020-08-21 09:23:22,873 main
DEBUG Shut down OutputStreamManager SYSTEM_OUT.false.false-1, all
resources released: true 2020-08-21 09:23:22,873 main DEBUG Appender
DefaultConsole-1 stopped with status true 2020-08-21 09:23:22,874 main
DEBUG Stopped
org.apache.logging.log4j.core.config.DefaultConfiguration@234bef66 OK
2020-08-21 09:23:22,948 main DEBUG Registering MBean
org.apache.logging.log4j2:type=55054057 2020-08-21 09:23:22,952 main
DEBUG Registering MBean
org.apache.logging.log4j2:type=55054057,component=StatusLogger
2020-08-21 09:23:22,953 main DEBUG Registering MBean