michelde / telenot

Telenot Adapter
Apache License 2.0
6 stars 5 forks source link

socketHandler: implement telenot msgtype parsing #17

Open disaster123 opened 2 years ago

disaster123 commented 2 years ago

This is the complete implementation of msg type parsing - it's still incomplete as it's not in use currently. It's just a rough start.

flashjmp commented 2 years ago

Hi disaster123, I tried testing your new socketHandler msgtypes, and while it looks fine on the first impression, the decodeHex function somehow does no longer process any changes :-( Did you observe the same?

It does start the processing, but the debug log (I tweaked it a little) does always look like this:

2022-02-02T16:48:48.749Z debug: [CUSTOM] got msgtype: 0 - SEND_NORM 2022-02-02T16:48:48.858Z debug: [CUSTOM] got msgtype: 2 - MP 2022-02-02T16:48:48.864Z debug: [CUSTOM] Meldebereiche (104) 682e2e687302222400000001fffffffffffffffffffffffffffffffffffffffffffffbffffffffffffff0656999999ffffffbe16 2022-02-02T16:48:48.869Z debug: [CUSTOM] decodeHex started - ContentName: MELDEBEREICHE 2022-02-02T16:48:48.953Z debug: [CUSTOM] got msgtype: 0 - SEND_NORM 2022-02-02T16:48:49.079Z debug: [CUSTOM] got msgtype: 3 - SB 2022-02-02T16:48:49.086Z debug: [CUSTOM] Meldegruppen 683e3e68730232240005000200fbffffffff9e9e9e9e9e9e9e9effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0656999999ffffffbd16 2022-02-02T16:48:49.091Z debug: [CUSTOM] decodeHex started - ContentName: MELDEGRUPPEN 2022-02-02T16:48:52.216Z debug: [CUSTOM] got msgtype: 0 - SEND_NORM 2022-02-02T16:48:52.330Z debug: [CUSTOM] got msgtype: 2 - MP 2022-02-02T16:48:52.336Z debug: [CUSTOM] Meldebereiche (104) 682e2e687302222400000001fffffffffffffffffffffffffffffffffffffffffffffbffffffffffffff0656999999ffffffbe16 2022-02-02T16:48:52.341Z debug: [CUSTOM] decodeHex started - ContentName: MELDEBEREICHE 2022-02-02T16:48:52.402Z debug: [CUSTOM] got msgtype: 0 - SEND_NORM 2022-02-02T16:48:52.526Z debug: [CUSTOM] got msgtype: 3 - SB 2022-02-02T16:48:52.532Z debug: [CUSTOM] Meldegruppen 683e3e68730232240005000200fbffffffff9e9e9e9e9e9e9e9effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0656999999ffffffbd16 2022-02-02T16:48:52.537Z debug: [CUSTOM] decodeHex started - ContentName: MELDEGRUPPEN

flashjmp commented 2 years ago

Ok.. that took some debugging :-( I found the error, you confused the TelenotMessageTypes for Meldebereiche and Meldegruppen. It should be TelenotMsgType.SB for Meldebereiche and TelenotMsgType.MP for Meldegruppen... it is currently the other way around ...