File tree Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Expand file tree Collapse file tree 1 file changed +1
-6
lines changed Original file line number Diff line number Diff line change @@ -9,18 +9,13 @@ export let SparkplugPayload = root.lookupType('com.cirruslink.sparkplug.protobuf
99
1010export 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)));
1612 try {
1713 let message = Base64Message . fromString (
1814 JSON . stringify (
19- SparkplugPayload . toObject ( SparkplugPayload . decode ( new Uint8Array ( input ) ) )
15+ SparkplugPayload . toObject ( SparkplugPayload . decode ( new Uint8Array ( input ) ) , { longs : Number } )
2016 )
2117 )
2218 message . decoder = Decoder . SPARKPLUG
23- // console.log(message);
2419 return message
2520 } catch {
2621 // ignore
You can’t perform that action at this time.
0 commit comments