FreeCalypso > hg > freecalypso-tools
diff rvinterf/asyncshell/tchcmd.c @ 901:2e6764022292
fc-shell tch record: add support for new TCH DL format
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Tue, 13 Dec 2022 03:24:36 +0000 |
parents | 8171c5c0d804 |
children | 961efadd530a |
line wrap: on
line diff
--- a/rvinterf/asyncshell/tchcmd.c Tue Dec 13 03:01:41 2022 +0000 +++ b/rvinterf/asyncshell/tchcmd.c Tue Dec 13 03:24:36 2022 +0000 @@ -89,7 +89,8 @@ void tch_packet_rx() { - char buf[128]; + char buf[128], *mode_kw; + int expect_pktlen, databytes; if (tch_rawdump_mode) { tch_rawdump(); @@ -119,6 +120,32 @@ goto inv; tch_dlbits_old_handler(); return; + case TCH_DLBITS_NEW_IND: + if (rvi_msg_len < 4) + goto inv; + switch (rvi_msg[3]) { + case TCH_FS_MODE: + mode_kw = "FR"; + expect_pktlen = 45; + databytes = 33; + break; + case TCH_HS_MODE: + mode_kw = "HR"; + expect_pktlen = 27; + databytes = 15; + break; + case TCH_EFR_MODE: + mode_kw = "EFR"; + expect_pktlen = 45; + databytes = 33; + break; + default: + goto inv; + } + if (rvi_msg_len != expect_pktlen) + goto inv; + tch_dlbits_new_handler(mode_kw, databytes); + return; default: goto inv; }