Skip to content

Commit

Permalink
Merge pull request #3 from hivemq/develop
Browse files Browse the repository at this point in the history
Upgrade to latest eclipse.tahu core version
  • Loading branch information
Anja Helmbrecht-Schaar authored Nov 30, 2022
2 parents f3916a8 + 99e6bc2 commit 952efba
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 10 deletions.
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ repositories {


dependencies {
implementation( files("lib/tahu-core-0.5.15.jar"))
//implementation("org.eclipse.tahu:tahu-java:${property("tahu.version")}")
implementation("org.eclipse.tahu:tahu-core:${property("tahu.version")}")
implementation("org.codehaus.jackson:jackson-mapper-asl:${property("mapper.version")}")
implementation("com.fasterxml.jackson.core:jackson-core:${property("fasterxml.version")}")
implementation( "com.fasterxml.jackson.core:jackson-databind:${property("fasterxml.version")}")
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=4.8.2
version=4.9.1

#
commons-lang3.version=3.8.1
Expand All @@ -8,7 +8,7 @@ fasterxml.version=2.13.2
mapper.version=1.9.13
protobuf.version=3.17.3

tahu.version=0.5.12
tahu.version=1.0.0

# test dependencies
#
Expand Down
2 changes: 1 addition & 1 deletion src/hivemq-extension/sparkplug.properties
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@
sparkplug.version=spBv1.0
sparkplug.systopic=$sparkplug/certificates/
sparkplug.compression=false
sparkplug.json.log=true
sparkplug.json.log=false
sparkplug.systopic.msgExpiry=4294967296
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ public static ByteBuffer modifySparkplugTimestamp(Boolean useCompression, ByteBu
byte[] bytes = null;
// Compress payload (optional)
if (useCompression) {
bytes = encoder.getBytes(org.eclipse.tahu.util.PayloadUtil.compress(payload, compressionAlgorithm));
bytes = encoder.getBytes(org.eclipse.tahu.util.PayloadUtil.compress(payload, compressionAlgorithm, false), false);
} else {
bytes = encoder.getBytes(payload);
bytes = encoder.getBytes(payload, false);
}
return ByteBuffer.wrap(bytes);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ private byte[] createSparkplugBPayload() throws IOException, SparkplugInvalidTyp
.timestamp(new Date())
.createMetric());
SparkplugBPayload sparkplugBPayload = new SparkplugBPayload(new Date(), metrics, 1L, "alf", null);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload,false);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ private byte[] createSparkplugBPayload() throws IOException, SparkplugInvalidTyp
.timestamp(new Date())
.createMetric());
SparkplugBPayload sparkplugBPayload = new SparkplugBPayload(new Date(), metrics, 1L, null, null);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload, false);
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ private byte[] createSparkplugBPayload() throws IOException, SparkplugInvalidTyp
.createMetric());

SparkplugBPayload sparkplugBPayload = new SparkplugBPayload(new Date(), metrics, 1L, null, null);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload);
return new SparkplugBPayloadEncoder().getBytes(sparkplugBPayload, false);
}

}

0 comments on commit 952efba

Please sign in to comment.