Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] MQTT-SN and MQTT embedded C client updates

Hi Roger,

I used unsigned char* rather than void* for the payload/buffers as I thought of them as byte arrays or similar, and to aid pointer arithmetic. I'll consider that one.

Ian

On 08/02/2014 08:05 PM, Roger Light wrote:
Hi Ian,

Packet ids have been changed to "unsigned short", and data buffers to
"unsigned char".  Now the data types are also consistent between the MQTT
and MQTT-SN libraries, which was another motivation.

I'm not expecting any further data type changes unless a good reason
appears.  I started using size_t for buffer sizes, but have stuck with ints
to reduce dependencies on any headers - just in case some esoteric/old
embedded compiler didn't like size_t.
I'm inclined to agree with Frank - do it "properly" (use size_t) and
then fix the odd case where size_t isn't defined if it crops up.

I'm also of the opinion that "void *" is a better data type for the
data buffers - less hassle for the end developer - but that's probably
less important.

Cheers,

Roger
_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

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



Back to the top