You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by hu...@apache.org on 2020/12/25 11:25:25 UTC
[plc4x-build-tools] branch feature/opcua_native_client created (now
d930eb3)
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a change to branch feature/opcua_native_client
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git.
at d930eb3 First pass at allows variable string lengths.
This branch includes the following new commits:
new d930eb3 First pass at allows variable string lengths.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[plc4x-build-tools] 01/01: First pass at allows variable string
lengths.
Posted by hu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
hutcheb pushed a commit to branch feature/opcua_native_client
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git
commit d930eb3ea3ead52f21c4866ccd2a10c11914cc3a
Author: hutcheb <be...@gmail.com>
AuthorDate: Fri Dec 25 06:25:03 2020 -0500
First pass at allows variable string lengths.
---
.../types/references/DefaultStringTypeReference.java | 14 ++++++++++++--
.../types/references/StringTypeReference.java | 2 ++
2 files changed, 14 insertions(+), 2 deletions(-)
diff --git a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
index 3598388..161dc06 100644
--- a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
+++ b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/DefaultStringTypeReference.java
@@ -21,11 +21,19 @@ package org.apache.plc4x.plugins.codegenerator.types.references;
public class DefaultStringTypeReference extends DefaultSimpleTypeReference implements StringTypeReference {
+ private final String length;
+
private final String encoding;
- public DefaultStringTypeReference(SimpleBaseType baseType, int sizeInBits, String encoding) {
- super(baseType, sizeInBits);
+ public DefaultStringTypeReference(SimpleBaseType baseType, String length, String encoding) {
+ super(baseType, -1);
+ this.length = length;
this.encoding = encoding;
+
+ }
+
+ public String getLength() {
+ return length;
}
@Override
@@ -33,4 +41,6 @@ public class DefaultStringTypeReference extends DefaultSimpleTypeReference imple
return encoding;
}
+
+
}
diff --git a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
index 6472390..796a6a8 100644
--- a/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
+++ b/code-generation/types-base/src/main/java/org/apache/plc4x/plugins/codegenerator/types/references/StringTypeReference.java
@@ -20,6 +20,8 @@ package org.apache.plc4x.plugins.codegenerator.types.references;
public interface StringTypeReference extends SimpleTypeReference {
+ String getLength();
+
String getEncoding();
}