Skip to content

Commit

Permalink
fix build:
Browse files Browse the repository at this point in the history
- due to disabled go-profile build broke down. A quickfix was applied to get in running. However the code needs to be aligned with java where the XmlBasedWriteBuffer is used.
  • Loading branch information
sruehl committed Jul 4, 2021
1 parent 2ab5472 commit 24e739e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,9 @@ public void serialize(WriteBuffer writeBuffer) throws ParseException {
writeBuffer.pushContext(getClass().getSimpleName());

writeBuffer.writeString("node", tag.getBytes(StandardCharsets.UTF_8).length * 8, StandardCharsets.UTF_8.name(), tag);
writeBuffer.writeString("type", type.name().getBytes(StandardCharsets.UTF_8).length * 8, StandardCharsets.UTF_8.name(), type.name());
if (type != null) {
writeBuffer.writeString("type", type.name().getBytes(StandardCharsets.UTF_8).length * 8, StandardCharsets.UTF_8.name(), type.name());
}
writeBuffer.writeInt("elementNb", 64, elementNb);
// TODO: remove this (not language agnostic)
String defaultJavaType = (type == null ? Object.class : getDefaultJavaType()).getName();
Expand Down
17 changes: 10 additions & 7 deletions protocols/eip/src/test/resources/protocols/eip/DriverTestsuite.xml
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@
<status dataType="uint" bitLength="8">0</status>
<extStatus dataType="uint" bitLength="8">0</extStatus>
<dataType>
<CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196</CIPDataTypeCode>
<CIPDataTypeCode dataType="uint" bitLength="16" stringRepresentation="DINT">196
</CIPDataTypeCode>
</dataType>
<data isList="true">
<value dataType="int" bitLength="8">0</value>
Expand All @@ -212,17 +213,19 @@
<fields>
<hurz>
<EipField>
<node>rate</node>
<type/>
<elementNb>0</elementNb>
<defaultJavaType>java.lang.Object</defaultJavaType>
<node dataType="string" bitLength="32">rate</node>
<elementNb dataType="int" bitLength="64">0</elementNb>
<defaultJavaType dataType="string" bitLength="128">java.lang.Object</defaultJavaType>
</EipField>
</hurz>
</fields>
</PlcReadRequest>
<values>
<hurz result="OK">
<PlcDINT>369229824</PlcDINT>
<hurz>
<ResponseItem>
<result dataType="string" bitLength="16">OK</result>
<PlcDINT dataType="string" bitLength="72">369229824</PlcDINT>
</ResponseItem>
</hurz>
</values>
</PlcReadResponse>
Expand Down

0 comments on commit 24e739e

Please sign in to comment.