← Back to team overview

mqtt-users team mailing list archive

Re: Usage of libmosquittopp

 

Hi Roger,

Thanks for your quick reply. I'm also not a real C++ authority. At the university I had a course for object-oriented programming where we got taught C++. But in higher semesters we switched to Java. So, I'm more familiar with Java than with C++.

What I miss in the libmosquittopp is a more extensive usage of encapsulation inside classes instead structs and const declarated pointers. Maybe I'm spoilt by Java ;)

But I also know that complicates the interoperability between the C++ wrapper and your existing C library.

The project I'm working on (communication between autonomous robots based on mqtt) will take two semesters and maybe it will be the topic of my master thesis, therefore I'm refreshing my C++ skills. I'd be glad If I could contribute some ideas or improvments.

Regards,
Rene

Am 12.01.2012 21:47, schrieb Roger Light:
Hi Rene,

Thanks for getting in touch. Sorry there's not an example for the C++
wrapper, it's definitely the most neglected part of the mosquitto
project. I've been planning on writing a gui client for a while and to
use the C++ library to do so. I've used it myself at work, but can't
show that code I'm afraid.

The way you've used the library with inheritance is definitely they
way I'd expect it to be used. I do have to confess that I'm not a C++
expert, so if you've got any suggestions for changes or improvements
I'd be happy to receive them.

Cheers,

Roger


On Thu, Jan 12, 2012 at 8:11 PM, Rene Lösch<rene.loesch@xxxxxx>  wrote:
Hello MQTT-friends,

I refer to Robert Wlodarczyk’s mail “Samples using libmosquittocpp or other
C/C++, Python, PHP libs?” from 21 Mar 2011, because I have a similar
request.

I have to create a MQTT client application using C++, but it is hard to cope
with the C++ wrapper class for libmosquitto without any documentation or
reference implementation. So I took the client sources and existing
libmosquitto API documentation provided by Roger – by the way, thank you
Roger for this great work, I really like your Mosquitto – to make out how
the Mosquitto library works. Afterwards I tried to build a very simple
client using libmosquittocpp, but I don’t know if I did it that way intended
by Roger. Find attached a dropbox-link to my sources.

So, my question, is someone of you familiar with the usage of
libmosquittopp?

http://dl.dropbox.com/u/14593538/MQTT_CPPClientSub.tar.gz

Best regards,
Rene


_______________________________________________
Mailing list:https://launchpad.net/~mqtt-users
Post to     :mqtt-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe :https://launchpad.net/~mqtt-users
More help   :https://help.launchpad.net/ListHelp
_______________________________________________
Mailing list:https://launchpad.net/~mqtt-users
Post to     :mqtt-users@xxxxxxxxxxxxxxxxxxx
Unsubscribe :https://launchpad.net/~mqtt-users
More help   :https://help.launchpad.net/ListHelp


References