You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Overview:

The open source Sparkplug sample code can be downloaded here.  Sparkplug consist of three primary features in its definition.  The first is the MQTT topic namespace definition.  The second is the definition of the order and flow of MQTT messages to and from various MQTT clients in the system.  The final is the payload data format.  There are two Sparkplug data formats as of this writing which are explained below.  Both formats are supported by MQTT Engine.  Due to advanced features supported by Sparkplug B, MQTT Transmission uses it for its message encoding.

  • Sparkplug A
    • Based on the open source Eclipse Kura Google Protobuf payload definition.
    • Simple design that supports metrics with a name, a data type, and a value.
    • Lacks support for rich metadata around metrics such as timestamp per metric, historical messages, etc
    • No alias support
    • No template support
  • Sparkplug B
    • Open source Google Protobuf definition specifically designed for Sparkplug.
    • Simple design that supports metrics with a name, a data type, and a value.
    • Supports metadata around metrics for null values, timestamps per metric, historical messages, etc
    • Supports metric name aliases to reduce bandwith usage.
    • Supports templates for complex data types.

In it are two base directories that both show the basics of utilizing the Sparkplug specification to enable applications to communicate with Ignition and the MQTT Modules

  • stand_alone_examples
    • These are examples that can be run on a development system and have no specific hardware requirements
  • raspberry_pi_examples

 

Implementation notes and useful tools:

  • Git
    • This is the primary tool used with Github which is where the source code is hosted.
    • This is not explicitly required as Github allows for downloading of zip files as well.
  • C Development
    • A C compiler for your target platform is required to build the examples.  Most examples developed here were developed using Linux and OSX.
  • Python Development
    • Python is required for running all Python examples.
    • Pip is also very useful for installing module dependencies.
  • Java Development
    • A JDK is required for compiling the Java examples.  Most development was done using Oracle's JDK.
    • Maven is required for building the examples.
    • The Eclipse IDE is not required but is a useful IDE for Java development.  It supports importing of Maven projects as well as connectors to git projects.  Most Java development was done using the 'Eclipse IDE for Java EE Developers'
  • No labels