Hi folks, I'm working on a Golang binding for the WSJT-X UDP interface as described in NetworkMessage.hpp. It's starting pretty well ( https://github.com/xylo04/wsjtx-go), but I'm running into troubles parsing the Status messages in particular. I'm able to parse through many blocks of bytes, but at some point I start running into an unexpected block of 0x00 and 0xff. Then, after a handful of those bytes, it resumes with the last field.
Is this maybe some feature of QDataStream that will abbreviate several adjacent fields with default values? I can't immediately find documentation about it. (I did find a post from Thiago Macieira ranting that QDataStream itself was never meant to be decoded by anything other than QDataStream and is thus not extensively documented.) Here are a couple of example packets: With DxCall and DxGrid: 0 1 2 3 4 5 6 7 8 9 a b c d e f 00000000 ad bc cb da 00 00 00 02 00 00 00 01 00 00 00 06 |................| 00000010 57 53 4a 54 2d 58 00 00 00 00 00 d6 c0 90 00 00 |WSJT-X..........| 00000020 00 03 46 54 38 00 00 00 04 57 30 59 4b 00 00 00 |..FT8....W0YK...| 00000030 03 2d 31 38 00 00 00 03 46 54 38 00 00 00 00 00 |.-18....FT8.....| 00000040 02 74 00 00 06 d6 00 00 00 05 4b 30 53 57 45 00 |.t........K0SWE.| 00000050 00 00 06 44 4d 37 39 4c 56 00 00 00 04 43 4d 39 |...DM79LV....CM9| 00000060 37 00 ff ff ff ff 00 00 ff ff ff ff ff ff ff ff |7...............| 00000070 00 00 00 07 44 65 66 61 75 6c 74 |....Default | Magic number 00-03 Schema number 04-07 * Status Out 1 quint32 08-0b * Id (unique key) utf8 0c-15 * Dial Frequency (Hz) quint64 16-1d * Mode utf8 1e-24 * DX call utf8 25-2c * Report utf8 2d-33 * Tx Mode utf8 34-3a * Tx Enabled bool 3b * Transmitting bool 3c * Decoding bool 3d * Rx DF quint32 3e-41 * Tx DF quint32 42-45 * DE call utf8 46-4e * DE grid utf8 4f-58 * DX grid utf8 59-60 * Tx Watchdog bool 61? * Sub-mode utf8 ??? * Fast mode bool ??? * Special Operation Mode quint8 ??? * Frequency Tolerance quint32 ??? * T/R Period quint32 ??? * Configuration Name utf8 70-7a Without DxCall or DxGrid (note, TxWatchdog is not here, which makes me question it above): 0 1 2 3 4 5 6 7 8 9 a b c d e f 00000000 ad bc cb da 00 00 00 02 00 00 00 01 00 00 00 06 |................| 00000010 57 53 4a 54 2d 58 00 00 00 00 00 d6 c0 90 00 00 |WSJT-X..........| 00000020 00 03 46 54 38 00 00 00 00 00 00 00 03 2d 31 38 |..FT8........-18| 00000030 00 00 00 03 46 54 38 00 00 00 00 00 02 74 00 00 |....FT8......t..| 00000040 06 d6 00 00 00 05 4b 30 53 57 45 00 00 00 06 44 |......K0SWE....D| 00000050 4d 37 39 4c 56 ff ff ff ff 00 ff ff ff ff 00 00 |M79LV...........| 00000060 ff ff ff ff ff ff ff ff 00 00 00 07 44 65 66 61 |............Defa| 00000070 75 6c 74 |ult | Magic number 00-03 Schema number 04-07 * Status Out 1 quint32 08-0b * Id (unique key) utf8 0c-15 * Dial Frequency (Hz) quint64 16-1d * Mode utf8 1e-24 * DX call utf8 25-28 * Report utf8 29-2f * Tx Mode utf8 30-36 * Tx Enabled bool 37 * Transmitting bool 38 * Decoding bool 39 * Rx DF quint32 3a-3d * Tx DF quint32 3e-41 * DE call utf8 42-4a * DE grid utf8 4b-54 * DX grid utf8 ??? * Tx Watchdog bool ??? * Sub-mode utf8 ??? * Fast mode bool ??? * Special Operation Mode quint8 ??? * Frequency Tolerance quint32 ??? * T/R Period quint32 ??? * Configuration Name utf8 68-72 Any pointers are appreciated! 73, Chris, K0SWE
_______________________________________________ wsjt-devel mailing list wsjt-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wsjt-devel