Skip to content

Commit 0884813

Browse files
committed
debug
1 parent a5d6560 commit 0884813

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

backend/src/Model/sparkplugb.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ export let SparkplugPayload = root.lookupType('com.cirruslink.sparkplug.protobuf
99

1010
export const SparkplugDecoder = {
1111
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)));
1216
try {
1317
let message = Base64Message.fromString(
1418
JSON.stringify(
1519
SparkplugPayload.toObject(SparkplugPayload.decode(new Uint8Array(input)))
1620
)
1721
)
1822
message.decoder = Decoder.SPARKPLUG
23+
// console.log(message);
1924
return message
2025
} catch {
2126
// ignore

0 commit comments

Comments
 (0)