Hi everyone,

I am communicating with a microcontroller through UDP, this microcontroller in turn sends data to an ASIC. The ASIC receives SPI strings of length 50bits and 904bits in two different modes. I am in the process of generating a user interface with Qt to allow for the handling of settings/data to be sent and now I need to find a decent way to package my numbers into an acceptable format.

For instance, I have 5 x 10bit numbers creating the 50bit stream (I also need to append 6 zeros to the front for the uController handling). Each of these numbers is currently stored in Qt as an int.

How would I go about packaging this data to send as a datagram over UDP?

I was considering using either a QByteArray or a QBitArray. The byte array seems more useful for strings (I think it is also '/0' terminated, which may get sent over UDP -- ??) If I construct a QBitArray, is there an easy was to convert my int numbers to 10bits?

Despite the fact that I have not solved this problem, it still seems rather trivial... I would really appreciate any help or insight into this matter, thanks!

- Cotlone