Support Board
Date/Time: Mon, 20 Jan 2025 03:56:30 +0000
Post From: DTC Decode error on one message only using same decode function. Google protocol buffers.
[2018-04-17 04:53:56] |
enemyspy - Posts: 306 |
Ok, I re-compiled the .proto from the link above and result is same all messages decoding except security definition for symbol. if I decode using just a regular byte decoder this is what the message yields in plain text: LTCBTCOKEXLTCBTC"OKEX
This is what the sc message log says about the security def request: DTC Service | Starting real-time market data updates for: LTCBTC.OKEX. ID: 1 | 2018-04-17 04:34:37 DTC Service | Requesting security definition data for: LTCBTC.OKEX. ID: 1 | 2018-04-17 04:34:37 So looking at the string message it appears that the ID: 1 is missing. All I do to decode is bytes to byte array The header get bytearray[:4] and the message get bytearray[4:]. The header decodes to size 22 & enum 506. The enum is right but can't confirm if the size is right. I could take that decoded string at the top and reconstruct a response but not without the ID. I could maintain an ID count to get around it though. Can you confirm if the IDS simply get incremented on every new symbol? |