Giter Club home page Giter Club logo

opc-ua-to-mqtt-gateway's Introduction

OPC UA -> MQTT Gateway client

The purpose of this client software is to allow the transfer of OPC UA node value data to a target MQTT broker.

I made it as an assignment for the class "network programming" at my school Seinäjoki University of Applied Sciences.

Dependencies

  • Compiler that supports C++11
  • Qt 5.5
  • FreeOpcUa library
    • Boost libraries
  • Mosquitto library
    • C-Ares
    • PThread
    • OpenSSL

I personally used Qt 5.5 & MinGW32 4.9.2 while developing this and I only provide compiled library files for MinGW32 in this repository. Compiling & linking on linux shouldn't be an issue but you will probably struggle if you want to compile and link some of those libraries under Windows with MSVC.

Repository structure

  • client_qt_project: This folder contains the source code of the client & Qt Creator project files.
  • images: Contains images related to the gateway client project.
  • libraries: This folder contains pre-compiled Windows library files for FreeOpcUa/Mosquitto & include headers.

UML Diagram, clientside relations

UML Diagram, simplified Very rough diagram showing the interaction between the MQTT & OPC UA client objects.

  1. Subscription to node data change events is made on the OpcUa-side via client GUI.
  2. Node value changes.
  • DataChange event function is executed in OPCUASubClient object,
  • Node value is transformed into a c-string (char *) & size of data is calculated.
  • MQTTClient::publish(...) is called, arguments passed are topic, node value and size in bytes.
  1. Node value is published on the MQTT server.
  • Topic is "ChosenMainTopic/NodeNamespace/NodeBrowseName"
  • ChosenMainTopic can be changed via the client GUI.

Screenshot of client GUI

Gateway client GUI Screenshot of the Gateway client.

Screenshot showing the GUI of the client. Connected to a FreeOpcUa python server & a Mosquitto MQTT broker.

opc-ua-to-mqtt-gateway's People

Contributors

harha avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.