sparkplugclidecoder

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

README

sparkplugclidecoder


Sparkplug cli decoder allow you to debug in command line a stream of messages received in the standard input in hexadecimal format. Currently only tested with mosquitto_sub

Usage

usage: sparkplugclidecoder [<flags>]

Flags:
      --help                 Show context-sensitive help (also try --help-long and --help-man).
  -s, --sep=""               adds a separator between messages: <newline>sep<newline>
  -f, --format="prototext"   Output format: prototext, protojson
  -t, --maxBufferSize=65536  size of the buffer

Examples

Tells mosquitto_sub to write the sparkplug message as hexadecimal string so sparkplugclidecoder reads from it and prints the decoded in prototext

> mosquitto_sub -L mqtt://localhost:1883/testtopic/# -F %x | sparkplugclidecoder

timestamp:  1621956521303
metrics:  {
  name:  "Device Control/Scan Rate ms"
  timestamp:  1621956521303
  datatype:  3
  int_value:  6000
}
seq:  165

Installation

go install github.com/dubyte/sparkplugclidecoder@latest

Binary releases

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL