-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Integrating MQTT protocol with artery #328
Comments
Your question cannot be answered properly without further information. Are you going to send data from Artery to a MQTT broker? Are you receiving data from the broker? Both directions? Which data shall be exchanged (positions? messages? full packets? …) |
Hi, Communication is required in both the directions. Thanks, |
I would start with an "MQTT service" attached to those vehicles that shall publish their data via MQTT. You should be able to forge unique topic names for each vehicle based on the module path. Have a look at the As a first step, every service may open its own connection to the broker, which probably becomes inefficient when many vehicles are equipped with your MQTT service. Then, you can introduce a "global" MQTT connection module which is shared among all services. But that is an optimization I would postpone until the basic implementation of the MQTT service is working. |
Thank you for the information. |
Hi, Made available header files of Eclipse paho c++ library under default location(where Boost is available) in my PC to be used in Artery service. But encountering the error when running the service. For help, type "help". <!> Error: Cannot load library '/.........../build/src/artery/envmod/libartery_envmod.so': /.........../build/src/artery/libartery_core.so: undefined symbol: MQTTClient_create End. Not able to identify the source of the error?Could you have any clue?Thanks in advance. Regards, |
I guess you have not linked your binaries to the Paho library. You may first want to create a minimal working program (without any OMNeT++ and Artery stuff) that uses the chosen MQTT library and can successfully communicate with your broker. If that is working, you can port your code to an Artery service without much hassle. |
Thanks. Regards, |
As I have said, you have missed to link the Paho library. C/C++ libraries consist of headers and some binary, e.g. something like libsomething.a (static) or libsomething.so (shared). Linking is about adding the symbols in these binaries to your program. This is nothing specific to Artery but the 101 of C++ software development. Please also study CMake how to add libraries, e.g. https://cmake.org/cmake/help/latest/guide/tutorial/Adding%20a%20Library.html |
Thanks |
|
Was trying with master branch of C++ library....but found out compilation errors.....worked well with v1.3.2. Thank you Raphael. |
Hi @riebl , Can you please provide me some clue here? Thanks in advance. Regards, |
|
Hi,
How can I integrate MQTT protocol with artery to establish communication between artery and MQTT broker?Thanks in advance.
Regards,
Ambica.
The text was updated successfully, but these errors were encountered: