Skip to main content
Version: Streamsheets 3.0

SPARKPLUG.ENCODE

Premium

Encodes a Sparkplug B message. For encoding the Payload type of this Protobuf file is used. Visit https://sparkplug.eclipse.org/specification/ to learn more about Sparkplug.

Syntax

=SPARKPLUG.ENCODE(Message, [Target])

Arguments

NameTypeDescription
MessageStringThe message as buffer to encode. The message is encoded using the Payload type of "Payload" type of this Protobuf file
Target (optional)TargetThe target where to write the encoded Sparkplug B message to

Return

The encoded Sparkplug B message

Examples

FormulaResultComment
=SPARKPLUG.ENCODE(JSON(A1:B2))
The encoded messageEncode the JSON in A1:B2 and return the encoded message