-->
Page 2 of 2

Re: declare big array

PostPosted: Sun Sep 13, 2015 11:40 am
by igrr
You may also declare local variable as static, which will place it into .data section as well.

Re: declare big array

PostPosted: Mon Sep 14, 2015 4:52 am
by trendchaster
Hello,
I have created a array of abc[256] in which packets has been stored (i.e. sniffer mode)and want to convert into string. After converting into string ,I want to publish this array using MQTT .Is it possible ?. If then how it is to be done.

Re: declare big array

PostPosted: Mon Sep 14, 2015 8:41 am
by martinayotte
There are many ways to accomplish that. The easiest one would be to simply transmit hexadecimal representation of every bytes, it means that for 256 array, the transmitted string would have 512 hexadecimal characters.
If you want to have more efficient transmit string, you can use the "uuencode" method which packs 6 bits per characters, but the code will have to handle the bit shifting of every bytes into a 6 bits streams.