Giter VIP home page Giter VIP logo

mqt_protobuf_simulation's Introduction

Protobuf Serialization to MQTT and Kafka Example

How to Install Protobuf

  1. Download the file from protobuf releases based on your CPU architecture.
    1.1. For Rasp4:
    $ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-aarch_64.zip
    1.2. For Scouter:
    $ curl -OL https://github.com/protocolbuffers/protobuf/releases/download/v27.0/protoc-27.0-linux-x86_64.zip
  2. Unzip the downloaded file:
    $ unzip [downloaded zip file] -d protoc3
  3. Move the files and change ownership based on your environment:
    3.1. For Rasp4:
     $ sudo mv protoc3/bin/* /usr/bin/
     $ sudo mv protoc3/include/* /usr/include/
     $ sudo chown $USER /usr/bin/protoc
     $ sudo chown -R $USER /usr/include/google
    3.2. For Scouter:
    $ sudo mv protoc3/bin/* /home/scouter/anaconda3/bin/
    $ sudo mv protoc3/include/* /home/scouter/anaconda3/include/
    $ sudo chown $USER /home/scouter/anaconda3/bin/protoc
    $ sudo chown -R $USER /home/scouter/anaconda3/include/google
  4. Install the Protobuf Python package:
    $ pip3 install --upgrade protobuf  # Version 5.27.0

Running the Publisher

  1. Modify configs/config_producer.py:
    • Write the column names and their data types of the CSV in type_dict.
  2. Update the MQTT connection information in configs/config_producer.py.
  3. Place the CSV file in the current directory before running the script:
    • Example: transport_201.csv
  4. Execute send_tramsport_sensor_simulation:
    4.1. Running individually:
    bash $ python3 send_tramsport_sensor_simulation.py [eqp_id] 4.2. External execution:
    - Prepare the CSV file and modify the config files as needed.

mqt_protobuf_simulation's People

Contributors

jangscon avatar

Watchers

 avatar

Forkers

knu-hobit

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.