You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@plc4x.apache.org by sr...@apache.org on 2021/10/08 14:51:37 UTC
[plc4x] branch feature/mspec-ng updated: fix(plc4j/codgen): add
byte order to read/writer, add enum example fixed
This is an automated email from the ASF dual-hosted git repository.
sruehl pushed a commit to branch feature/mspec-ng
in repository https://gitbox.apache.org/repos/asf/plc4x.git
The following commit(s) were added to refs/heads/feature/mspec-ng by this push:
new a8d835e fix(plc4j/codgen): add byte order to read/writer, add enum example fixed
a8d835e is described below
commit a8d835e7b17ac09bdcb7827db4ad4bfb3ae16c65
Author: Sebastian Rühl <sr...@apache.org>
AuthorDate: Fri Oct 8 16:46:38 2021 +0200
fix(plc4j/codgen): add byte order to read/writer, add enum example fixed
---
.../src/main/resources/templates/java/io-template.java.ftlh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/code-generation/language-java-ng/src/main/resources/templates/java/io-template.java.ftlh b/code-generation/language-java-ng/src/main/resources/templates/java/io-template.java.ftlh
index d9a00cb..2549e78 100644
--- a/code-generation/language-java-ng/src/main/resources/templates/java/io-template.java.ftlh
+++ b/code-generation/language-java-ng/src/main/resources/templates/java/io-template.java.ftlh
@@ -323,7 +323,7 @@ public class ${type.name}IO implements <#if outputFlavor != "passive">MessageIO<
FieldReader${field.typeName?cap_first}.INSTANCE.read${field.typeName?cap_first}Field(String logicalName, new DataReaderSimple${helper.getLanguageTypeNameForTypeReference(simpleTypeReference, false)}(readBuffer), ${type.name}.${constField.name?upper_case}))
<#else>
- FieldReader${field.typeName?cap_first}.INSTANCE.read${field.typeName?cap_first}Field(String logicalName, new DataReaderEnumDefault(${helper.getLanguageTypeNameForField(field)}::enumForValue, new DataReaderSimple${helper.getLanguageTypeNameForTypeReference(simpleTypeReference, false)}(readBuffer), ${type.name}.${constField.name?upper_case})))
+ FieldReader${field.typeName?cap_first}.INSTANCE.read${field.typeName?cap_first}Field(String logicalName, new DataReaderEnumDefault(${helper.getLanguageTypeNameForField(field)}::enumForValue, new DataReaderSimple${helper.getLanguageTypeNameForTypeReference(helper.getEnumBaseTypeReference(constField.type), false)}(readBuffer), ${type.name}.${constField.name?upper_case})))
</#if>
<#break>
<#case "discriminator">