|how do publish an array of bytes [message #1768450]
||Tue, 18 July 2017 20:48
| Jason Templeman
Registered: July 2017
I'm working on creating a test in Python using paho-mqtt and I need to be able to send an array of bytes to my broker. A subscriber looks for several topics of different data types. The string based payloads are working fine but numerical values must be received in a array of bytes the proper length for the numerical type (i.e. 32 bit Integers must be an array of 4 bytes)|
For example to send an 32 bit integer (INT32) the payload would be 00 00 00 00
If I want to send a decimal 53 I would need to send 00 00 00 35 (0x35 = 53)
As this test is ran as part of a suite it needs to be in Python and paho-mqtt is our what we chose as our mqtt package.
If anyone could please tell me how to use paho-mqtt to transmit an array of bytes it would be greatly appreciated.
Powered by FUDForum
. Page generated in 0.01831 seconds