We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5d6560 commit 0884813Copy full SHA for 0884813
backend/src/Model/sparkplugb.ts
@@ -9,13 +9,18 @@ export let SparkplugPayload = root.lookupType('com.cirruslink.sparkplug.protobuf
9
10
export const SparkplugDecoder = {
11
decode(input: Buffer): Base64Message | undefined {
12
+
13
+ // ! Longs are being decoded as Long { low: 2034658590, high: 390, unsigned: true } despite toNumber being called on them in the
14
+ // ! translation app
15
+ // console.log(SparkplugPayload.decode(new Uint8Array(input)));
16
try {
17
let message = Base64Message.fromString(
18
JSON.stringify(
19
SparkplugPayload.toObject(SparkplugPayload.decode(new Uint8Array(input)))
20
)
21
22
message.decoder = Decoder.SPARKPLUG
23
+ // console.log(message);
24
return message
25
} catch {
26
// ignore
0 commit comments