[plc4x] branch develop updated: - Implemented the functionality to subscribe to individual group addresses and address ranges

2020-02-10 Thread cdutz
This is an automated email from the ASF dual-hosted git repository.

cdutz pushed a commit to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git


The following commit(s) were added to refs/heads/develop by this push:
 new a22d0da  - Implemented the functionality to subscribe to individual 
group addresses and address ranges
a22d0da is described below

commit a22d0da9e9e37934f9e78dab09b3687f817c3351
Author: Christofer Dutz 
AuthorDate: Mon Feb 10 14:33:37 2020 +0100

- Implemented the functionality to subscribe to individual group addresses 
and address ranges
---
 .../plc4x/java/knxnetip/field/KnxNetIpField.java   |  35 -
 .../knxnetip/model/KnxNetIpSubscriptionHandle.java |  78 +++
 .../knxnetip/protocol/KnxNetIpProtocolLogic.java   |  43 --
 .../apache/plc4x/java/knxnetip/ManualKnxNetIp.java |   2 +-
 .../java/knxnetip/ManualKnxNetIpWithEts5.java  | 149 -
 5 files changed, 141 insertions(+), 166 deletions(-)

diff --git 
a/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/field/KnxNetIpField.java
 
b/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/field/KnxNetIpField.java
index 0f768a1..bc864ad 100644
--- 
a/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/field/KnxNetIpField.java
+++ 
b/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/field/KnxNetIpField.java
@@ -20,12 +20,14 @@ package org.apache.plc4x.java.knxnetip.field;
 
 import org.apache.plc4x.java.api.exceptions.PlcInvalidFieldException;
 import org.apache.plc4x.java.api.model.PlcField;
+import org.apache.plc4x.java.knxnetip.ets5.model.GroupAddress;
 
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 
 public class KnxNetIpField implements PlcField {
 
+private static final String WILDCARD = "*";
 private static final Pattern KNX_GROUP_ADDRESS_1_LEVEL =
 Pattern.compile("^(?(\\d{1,5}|\\*))");
 private static final Pattern KNX_GROUP_ADDRESS_2_LEVEL =
@@ -45,17 +47,17 @@ public class KnxNetIpField implements PlcField {
 }
 
 public static KnxNetIpField of(String fieldString) {
-Matcher matcher = KNX_GROUP_ADDRESS_3_LEVEL.matcher(fieldString);
+Matcher matcher = KNX_GROUP_ADDRESS_1_LEVEL.matcher(fieldString);
 if(matcher.matches()) {
-return new KnxNetIpField(3, matcher.group("mainGroup"), null, 
null);
+return new KnxNetIpField(1, matcher.group("mainGroup"), null, 
null);
 }
 matcher = KNX_GROUP_ADDRESS_2_LEVEL.matcher(fieldString);
 if(matcher.matches()) {
 return new KnxNetIpField(2, matcher.group("mainGroup"), null, 
matcher.group("subGroup"));
 }
-matcher = KNX_GROUP_ADDRESS_1_LEVEL.matcher(fieldString);
+matcher = KNX_GROUP_ADDRESS_3_LEVEL.matcher(fieldString);
 if(matcher.matches()) {
-return new KnxNetIpField(1, matcher.group("mainGroup"), 
matcher.group("middleGroup"), matcher.group("subGroup"));
+return new KnxNetIpField(3, matcher.group("mainGroup"), 
matcher.group("middleGroup"), matcher.group("subGroup"));
 }
 throw new PlcInvalidFieldException("Unable to parse address: " + 
fieldString);
 }
@@ -83,4 +85,29 @@ public class KnxNetIpField implements PlcField {
 return subGroup;
 }
 
+// As our fields can contain wildcards and complex matching logic,
+// do a check if a given GroupAddress is actually compatible with this 
field.
+public boolean matchesGroupAddress(GroupAddress groupAddress) {
+KnxNetIpField otherAddress = 
KnxNetIpField.of(groupAddress.getGroupAddress());
+// If the levels don't match the whole address can't match.
+if(otherAddress.getLevels() != getLevels()) {
+return false;
+}
+// NOTE: This case fallthrough is intentional :-)
+switch (getLevels()) {
+case 3:
+if(!WILDCARD.equals(getMiddleGroup()) && 
!getMiddleGroup().equals(otherAddress.getMiddleGroup())) {
+return false;
+}
+case 2:
+if(!WILDCARD.equals(getSubGroup()) && 
!getSubGroup().equals(otherAddress.getSubGroup())) {
+return false;
+}
+case 1:
+return WILDCARD.equals(getMainGroup()) || 
getMainGroup().equals(otherAddress.getMainGroup());
+default:
+return false;
+}
+}
+
 }
diff --git 
a/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/model/KnxNetIpSubscriptionHandle.java
 
b/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/model/KnxNetIpSubscriptionHandle.java
new file mode 100644
index 000..2bf50cc
--- /dev/null
+++ 
b/plc4j/drivers/knxnetip/src/main/java/org/apache/plc4x/java/knxnetip/model/KnxNetIpSubscriptionHandle.java
@@ -0,0 +1,78 @@
+/*
+Licensed to the Apache Software Foundation (ASF) 

[plc4x-website] branch asf-site updated: Site checkin for project PLC4X: Jenkins Tools

2020-02-10 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/plc4x-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 3ce0fcd  Site checkin for project PLC4X: Jenkins Tools
3ce0fcd is described below

commit 3ce0fcde10cbe79ec249e4f464acd0d6369d61df
Author: jenkins 
AuthorDate: Mon Feb 10 14:18:24 2020 +

Site checkin for project PLC4X: Jenkins Tools
---
 developers/release-build-tools.html | 2 +-
 developers/release.html | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/developers/release-build-tools.html 
b/developers/release-build-tools.html
index 1618e22..c0fc547 100644
--- a/developers/release-build-tools.html
+++ b/developers/release-build-tools.html
@@ -187,7 +187,7 @@
 
 
 #Properties
-#Mon Feb 10 07:44:21 UTC 2020
+#Mon Feb 10 14:16:50 UTC 2020
 jmh.version=1.21
 plc4x-code-generation.version=1.2.0-SNAPSHOT
 commons-codec.version=1.12
diff --git a/developers/release.html b/developers/release.html
index 046f404..4dc8a87 100644
--- a/developers/release.html
+++ b/developers/release.html
@@ -187,7 +187,7 @@
 
 
 #Properties
-#Mon Feb 10 07:44:21 UTC 2020
+#Mon Feb 10 14:16:50 UTC 2020
 jmh.version=1.21
 plc4x-code-generation.version=1.2.0-SNAPSHOT
 commons-codec.version=1.12



[plc4x] branch develop updated (a22d0da -> 0bedb47)

2020-02-10 Thread ldywicki
This is an automated email from the ASF dual-hosted git repository.

ldywicki pushed a change to branch develop
in repository https://gitbox.apache.org/repos/asf/plc4x.git.


from a22d0da  - Implemented the functionality to subscribe to individual 
group addresses and address ranges
 add 0bedb47  PLC4X-174 Adjust restrictive regular expression.

No new revisions were added by this update.

Summary of changes:
 .../src/main/java/org/apache/plc4x/java/transport/udp/UdpTransport.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)



[plc4x-website] branch asf-site updated: Site checkin for project PLC4X: Jenkins Tools

2020-02-10 Thread git-site-role
This is an automated email from the ASF dual-hosted git repository.

git-site-role pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/plc4x-website.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 1475b2d  Site checkin for project PLC4X: Jenkins Tools
1475b2d is described below

commit 1475b2d3db3d3c0ee253eb2a53a633a6a90e71f2
Author: jenkins 
AuthorDate: Mon Feb 10 17:48:41 2020 +

Site checkin for project PLC4X: Jenkins Tools
---
 developers/release-build-tools.html |   2 +-
 developers/release.html |   2 +-
 licenses.html   | 205 +++-
 3 files changed, 206 insertions(+), 3 deletions(-)

diff --git a/developers/release-build-tools.html 
b/developers/release-build-tools.html
index c0fc547..a789a2e 100644
--- a/developers/release-build-tools.html
+++ b/developers/release-build-tools.html
@@ -187,7 +187,7 @@
 
 
 #Properties
-#Mon Feb 10 14:16:50 UTC 2020
+#Mon Feb 10 17:47:11 UTC 2020
 jmh.version=1.21
 plc4x-code-generation.version=1.2.0-SNAPSHOT
 commons-codec.version=1.12
diff --git a/developers/release.html b/developers/release.html
index 4dc8a87..ff4a864 100644
--- a/developers/release.html
+++ b/developers/release.html
@@ -187,7 +187,7 @@
 
 
 #Properties
-#Mon Feb 10 14:16:50 UTC 2020
+#Mon Feb 10 17:47:11 UTC 2020
 jmh.version=1.21
 plc4x-code-generation.version=1.2.0-SNAPSHOT
 commons-codec.version=1.12
diff --git a/licenses.html b/licenses.html
index 9c0c5e7..d74b9b4 100644
--- a/licenses.html
+++ b/licenses.html
@@ -122,7 +122,210 @@
 Typically the licenses listed for the project are that of the project 
itself, and not of dependencies.
 Project Licenses
 Apache License, Version 
2.0
-Can't read the url [https://www.apache.org/licenses/LICENSE-2.0.txt] : 
connect timed out
+
+
+ Apache License
+   Version 2.0, January 2004
+http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+  License shall mean the terms and conditions for use, 
reproduction,
+  and distribution as defined by Sections 1 through 9 of this document.
+
+  Licensor shall mean the copyright owner or entity authorized 
by
+  the copyright owner that is granting the License.
+
+  Legal Entity shall mean the union of the acting entity and 
all
+  other entities that control, are controlled by, or are under common
+  control with that entity. For the purposes of this definition,
+  control means (i) the power, direct or indirect, to cause the
+  direction or management of such entity, whether by contract or
+  otherwise, or (ii) ownership of fifty percent (50%) or more of the
+  outstanding shares, or (iii) beneficial ownership of such entity.
+
+  You (or Your) shall mean an individual or Legal 
Entity
+  exercising permissions granted by this License.
+
+  Source form shall mean the preferred form for making 
modifications,
+  including but not limited to software source code, documentation
+  source, and configuration files.
+
+  Object form shall mean any form resulting from mechanical
+  transformation or translation of a Source form, including but
+  not limited to compiled object code, generated documentation,
+  and conversions to other media types.
+
+  Work shall mean the work of authorship, whether in Source or
+  Object form, made available under the License, as indicated by a
+  copyright notice that is included in or attached to the work
+  (an example is provided in the Appendix below).
+
+  Derivative Works shall mean any work, whether in Source or 
Object
+  form, that is based on (or derived from) the Work and for which the
+  editorial revisions, annotations, elaborations, or other modifications
+  represent, as a whole, an original work of authorship. For the purposes
+  of this License, Derivative Works shall not include works that remain
+  separable from, or merely link (or bind by name) to the interfaces of,
+  the Work and Derivative Works thereof.
+
+  Contribution shall mean any work of authorship, including
+  the original version of the Work and any modifications or additions
+  to that Work or Derivative Works thereof, that is intentionally
+  submitted to Licensor for inclusion in the Work by the copyright owner
+  or by an individual or Legal Entity authorized to submit on behalf of
+  the copyright owner. For the purposes of this definition, 
submitted
+  means any form of electronic, verbal, or written communication sent
+  to the Licensor or its representatives, including but not limited to
+  communication on electronic mailing lists, source