You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by cd...@apache.org on 2021/05/24 10:23:46 UTC
[plc4x-build-tools] branch feature/updated-mspec-string created
(now 63b2321)
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a change to branch feature/updated-mspec-string
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git.
at 63b2321 Started implementing a change to allow string fields to have the normal numeric length
This branch includes the following new commits:
new 63b2321 Started implementing a change to allow string fields to have the normal numeric length
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: Started implementing a change to allow
string fields to have the normal numeric length
Posted by cd...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
cdutz pushed a commit to branch feature/updated-mspec-string
in repository https://gitbox.apache.org/repos/asf/plc4x-build-tools.git
commit 63b2321dde0e944d25ec18ddb78822488914cdaf
Author: cdutz <ch...@c-ware.de>
AuthorDate: Mon May 24 12:23:38 2021 +0200
Started implementing a change to allow string fields to have the normal numeric length
---
.../types/references/DefaultStringTypeReference.java | 9 ++++++---
1 file changed, 6 insertions(+), 3 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 554dc88..78b7dfe 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
@@ -27,11 +27,16 @@ public class DefaultStringTypeReference extends DefaultSimpleTypeReference imple
private final String encoding;
+ public DefaultStringTypeReference(SimpleBaseType baseType, int sizeInBits, String encoding) {
+ super(baseType, sizeInBits);
+ this.lengthExpression = null;
+ this.encoding = encoding;
+ }
+
public DefaultStringTypeReference(SimpleBaseType baseType, Term lengthExpression, String encoding) {
super(baseType, -1);
this.lengthExpression = lengthExpression;
this.encoding = encoding;
-
}
public Term getLengthExpression() {
@@ -43,6 +48,4 @@ public class DefaultStringTypeReference extends DefaultSimpleTypeReference imple
return encoding;
}
-
-
}