Re: Handling of signed / unsigned values

2018-08-02 Thread Julian Feinauer
Hi Chris, an additional flag in the items was also my first idea, but after thinking about it a bit I dislike it. First, because it "breaks" the encapsulation we currently have between "Java" Information (Class) and Plc Information (Address) and second between it is not very scalable when

Re: Handling of signed / unsigned values

2018-08-02 Thread Christofer Dutz
Hi Julian, I do get your point and do agree that there could be problems. Just an idea ... How about an optional field "signed" in the items which defaults to false? It seems handling the signed and unsignedness of an item simply by the type could be a bad idea, the more I think of it. We

[GitHub] chrisdutz commented on issue #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
chrisdutz commented on issue #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#issuecomment-409995467 Well I Ave started working on an option that works exactly the same way we are doing the connection, by creating a CompletableFuture and

[GitHub] JulianFeinauer commented on issue #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
JulianFeinauer commented on issue #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#issuecomment-409963436 @sruehl my understanding is that netty avoids a scenario where one uses the event loop executors threads for blocking and thus, risks a

Re: Handling of signed / unsigned values

2018-08-02 Thread Julian Feinauer
Hi Chris, I think we have both different approaches and views. I totally agree with you that it should be as straight forward and easy for users of the API to use Plc4x. But, as far as my understanding goes, we are missing some information which we need for the user. The following

[GitHub] sruehl commented on issue #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on issue #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#issuecomment-409959876 one note at this point. As far as I understand netty throws this exception to indicate that it dislikes when the thread gets blocked. By using

[GitHub] JulianFeinauer commented on issue #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
JulianFeinauer commented on issue #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#issuecomment-409958048 @chrisdutz your fixes in the master made it work for me also. As I found a solution to avoid the blocking exception in the meanwhile I

How to handle datatype optimizations

2018-08-02 Thread Christofer Dutz
Hi all, I just had a little technical discussion with Sebastian and I thought it would be worth to include you guys. We were discussing how we handle datatypes and optimized access to fields. Sebastian is currently working on the Modbus integration. Here digital inputs can be accessed via

[GitHub] chrisdutz commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
chrisdutz commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207224977 ## File path: plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java

[GitHub] JulianFeinauer commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
JulianFeinauer commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207200954 ## File path: plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java

[GitHub] sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207198528 ## File path: plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java ##

[GitHub] sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207197726 ## File path: plc4j/protocols/s7/src/test/java/org/apache/plc4x/java/s7/connection/S7PlcConnectionIT.java ##

[GitHub] JulianFeinauer commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
JulianFeinauer commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207178132 ## File path: plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java

[GitHub] sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207148665 ## File path: plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java ##

[GitHub] sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207149145 ## File path: plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java ##

[GitHub] sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
sruehl commented on a change in pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10#discussion_r207145613 ## File path: plc4j/protocols/s7/src/main/java/org/apache/plc4x/java/s7/connection/S7PlcConnection.java ##

Re: Handling of signed / unsigned values

2018-08-02 Thread Christofer Dutz
Hi Julian, regarding your question. As far as I have encountered, PLCs mostly transfer unsigned values and Java usually uses signed values ... this could generally cause problems. Fortunately as far as I know the size of the Java types is usually way bigger than the one of the PLC types.

[GitHub] asfgit closed pull request #9: Added some javadoc to S7 communication path and several todos that ma…

2018-08-02 Thread GitBox
asfgit closed pull request #9: Added some javadoc to S7 communication path and several todos that ma… URL: https://github.com/apache/incubator-plc4x/pull/9 This is a PR merged from a forked repository. As GitHub hides the original diff on merge, it is displayed below for the sake of

Handling of signed / unsigned values

2018-08-02 Thread Julian Feinauer
Hey all, again me with another question : ) I started going through some examples on our PLC and came to a situation where we use signed and unsigned values in the PLC. This goes kind of back to my type system question. How could I tell the Reader to read me an Unsigned Int from a S7

Re: Feedback to the TODO items of Julians first Pull Request

2018-08-02 Thread Christofer Dutz
Ah and I missed the suggestion to rename the VarParameter to something with Command in it: This is a well-established name for this part of the package, so you will find reference to parameters all over the internet. Secondly these classes are all internal classes used by the driver

[GitHub] JulianFeinauer commented on a change in pull request #9: Added some javadoc to S7 communication path and several todos that ma…

2018-08-02 Thread GitBox
JulianFeinauer commented on a change in pull request #9: Added some javadoc to S7 communication path and several todos that ma… URL: https://github.com/apache/incubator-plc4x/pull/9#discussion_r207149237 ## File path:

Feedback to the TODO items of Julians first Pull Request

2018-08-02 Thread Christofer Dutz
Hi, for the sake of completeness I am bringing aggregated feedback I also added on the pull request here, so it’s archived. I would probably remove the TODO items from the code, as I think these should rather be discussions on the list and/or Jira issues and we shouldn’t be having discussions

[GitHub] chrisdutz commented on a change in pull request #9: Added some javadoc to S7 communication path and several todos that ma…

2018-08-02 Thread GitBox
chrisdutz commented on a change in pull request #9: Added some javadoc to S7 communication path and several todos that ma… URL: https://github.com/apache/incubator-plc4x/pull/9#discussion_r207142023 ## File path:

[GitHub] JulianFeinauer opened a new pull request #10: Fixed NPE in S7PlcConnection#close.

2018-08-02 Thread GitBox
JulianFeinauer opened a new pull request #10: Fixed NPE in S7PlcConnection#close. URL: https://github.com/apache/incubator-plc4x/pull/10 Fix for the NPE in S7PlcConnection's close method. After fixing the NPE there was a netty blockingException, thus I had to refactor the program logic

AW: Exception on closing S7PlcConnection

2018-08-02 Thread Julian Feinauer
Hi Chris, just wanted to be sure that its really bug and not me "holding it wrong". I'm about to prepare a patch (already teaches me something about netty). Best Julian Von: Christofer Dutz Gesendet: Mittwoch, 1. August 2018 17:18:22 An:

Re: Code-Retreat on Mallorca?

2018-08-02 Thread Sebastian Rühl
Hi Chris, Im fine with this date. Count me in. Sebastian > Am 01.08.2018 um 14:38 schrieb Christofer Dutz : > > Hi all, > > > > Ok ... so I synced my calendar with that of our Finca and I would suggest > 22.11.-25.11. > > > > Who of you would be able to join in for this time? If you

Re: Datatypes in Plc4j

2018-08-02 Thread Sebastian Rühl
Sorry for the typo, I actually meant Julian (I blame the MBP 13’’ keyboard for that ;) > Am 02.08.2018 um 09:54 schrieb Sebastian Rühl > : > > Hi Julia,