The purpose of the Control Software is to control the production line automatically or based on commands from the UI. The goal was to run the production line without breaking the hardware and optimize output. We use shared memory to communicate with the simulated hardware and MQTT to communicate with the UI.
- Control software is written in C++
- The program receives data from the conveyor via shared memory, which is used in automation and sent to the UI
- Messages to and from the UI is parsed as JSON using nlohmann's JSON library
- MQTT is used as the communications protocol with the UI
- Eclipse Paho C++ MQTT library is used
- Project is built with CMake
- Unit testing provided by doctest
- Version control (Git) and project management (GitHub Projects)
sudo apt-get install build-essential gcc make cmake cmake-gui cmake-curses-gui libssl-dev
git clone https://github.com/eclipse/paho.mqtt.c.git
cd paho.mqtt.c
git checkout v1.3.8
cmake -Bbuild -H. -DPAHO_ENABLE_TESTING=OFF -DPAHO_BUILD_STATIC=ON -DPAHO_WITH_SSL=ON -DPAHO_HIGH_PERFORMANCE=ON
sudo cmake --build build/ --target install
sudo ldconfig
git clone https://github.com/eclipse/paho.mqtt.cpp
cd paho.mqtt.cpp
cmake -Bbuild -H. -DPAHO_BUILD_STATIC=ON
sudo cmake --build build/ --target install
sudo ldconfig
git clone git@github.com:mikkokiviniemi/Control-software.git
cd Control-software
cmake -S . -B build
make -C build
build/main