Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Using Paho embedded-C client for Arduino

Hi Ian

The core client library code, never needs to change.

sorry, i misunderstood.  forget about my post.


-------------------------------------------------------------------------------------------------------------------------------------
My MQTT-SN APIs support auto SEARCHGW, CONNECT (also re SEARCHGW, re Connect when connection is lost.). 
So, Client application don't need to call searchGw(), connect() API.  

My implementation is only for one blocking and single-threaded and clear the requirements 1-5 
,
  1. C++ Standard Template Library (STL) not used  
  2. messageHandler callback per subscription (see discussion) – there will also be a default messageHandler
  3. heap memory allocation minimized (I hope to avoid it altogether)  
  4. memory use limited at object construction time by the limits parameter
  5. network connection handled outside of this API

but can not clear other two requirements as below.
  • system APIs for networking, timing and threading passed in as template parameters (for the synchronous API threading and mutex classes are not needed)  
  • persistence, if/when added, as another template parameter


2014-04-26 0:34 GMT+09:00 Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>:
Hi Tomoaki,

how does your API compare with the goals I set out which include:
  • C++ Standard Template Library (STL) not used – too heavyweight
  • messageHandler callback per subscription (see discussion) – there will also be a default messageHandler
  • system APIs for networking, timing and threading passed in as template parameters (for the synchronous API threading and mutex classes are not needed)
  • heap memory allocation minimized (I hope to avoid it altogether)
  • memory use limited at object construction time by the limits parameter
  • network connection handled outside of this API
  • persistence, if/when added, as another template parameter
The reason I claim this API to be ultra-portable is that all system APIs used are passed in as template parameters.  The core client library code, never needs to change.  It already works on both mbed and Linux.     The lowest layer is already tried on mbed, Linux and FreeRTOS.

There are 3 layers of varying levels of helpfulness vs weight.  There are two version of the middle level 1) single-threaded and bloc

A more detailed description is here: http://modelbasedtesting.co.uk/?p=94

I am also hoping for these APIs to have a family look and feel (between MQTT and MQTT-SN).

You are welcome to contribute your API to Paho, and to help me develop these APIs should you wish.  I think there's enough difference between your API and my proposals to make them both worthwhile at the moment.  What do you think?

Ian


On 04/24/2014 10:23 PM, Tomoaki Yamaguchi wrote:
Hi guys,

my C++ MQTT-SN  client library for XBee might be the one of the candidate.
communication is conducted by the ZBee Stack Class though.
My library is running on Arduino Fio(32KB ROM, 2KB RAM), mbed and raspberry Pi. 
RTOS is not required.  (single thread)


supporting functions are
PUBLISH, SUBSCRIBE,UNSUBSCRIBE,WILLMSG,WILLTOPIC,REGISTER

SEARCHGW, CONNECT, PINGREQ are conducted automatically.
QoS 0, 1 

Sleep mode is supported for Aruduino.

library is already opened in the GitHub.

The library consists of 4 classes 

- Framework for Arduino  
- MQTT-SN client <====   this class methods are what you want.
- MQTT-SN      <==== change to MQTT
- ZBee Stack   <====  change to TCPIP Class




2014-04-25 0:02 GMT+09:00 Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>:
Mike,

the mbed community want to have an "official" mbed MQTT library. Various MQTT libraries have been imported or written in past, with varying levels of completeness.  A port of Nick O'Leary's Arduino client is one.  Now they would like something more complete, to promote.

So I've been working with Sam and Doug in particular from this team: http://mbed.org/teams/mqtt/, on a portable MQTT client library, eventually in 3 layers (http://modelbasedtesting.co.uk/?p=94).  All the code I've written is under the Eclipse license, and I intend the master code to be in Paho.

I'm excited about this work because:
    1. it should be ultra-portable across OSes and networking libraries, and really lightweight
    2. I'm hoping it will be the last MQTT C/C++ client library I will ever have to write!
    3. It's a perfect model for an MQTT-SN client library (already started)

We're hoping that we'll be able to work with other embedded OS communities (e.g. FreeRTOS) subsequently.

Ian



On 04/24/2014 03:15 PM, Mike Milinkovich wrote:
On 24/04/2014 9:58 AM, Ian Craggs wrote:
I'm hoping the C++ API layer I'm working on for mbed (and will be pulled back into Paho)

Ian,

I am curious about any links that we may be building with the mbed community. Can you talk a little more about what's going on there?


--
Ian Craggs
icraggs@xxxxxxxxxx                 IBM United Kingdom
Committer on Paho, Mosquitto

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
         
               Tomoaki  YAMAGUCHI


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Committer on Paho, Mosquitto


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev




--
         
               Tomoaki  YAMAGUCHI

Back to the top