FreeCalypso > hg > fc-rfcal-tools
changeset 129:6cccdafcd64d
fc-cmu200d RF analyzer: implement command to set template PCL
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 20 Dec 2021 02:24:55 +0000 |
parents | 623340e2c475 |
children | 634995d55601 |
files | cmu200/dispatch.c cmu200/rfanalyzer.c |
diffstat | 2 files changed, 27 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/cmu200/dispatch.c Wed Dec 25 05:27:25 2019 +0000 +++ b/cmu200/dispatch.c Mon Dec 20 02:24:55 2021 +0000 @@ -14,6 +14,7 @@ extern int cmd_power_meas(); extern int cmd_rfan_setup(); extern int cmd_rfan_channel(); +extern int cmd_rfan_tpcl(); extern int cmd_signal_gen_off(); extern int cmd_signal_gen_sine(); extern int cmd_signal_gen_setup(); @@ -33,11 +34,13 @@ {"power-meas", cmd_power_meas}, {"rfan-setup", cmd_rfan_setup}, {"rfan-channel", cmd_rfan_channel}, + {"rfan-tpcl", cmd_rfan_tpcl}, {"signal-gen-off", cmd_signal_gen_off}, {"signal-gen-sine", cmd_signal_gen_sine}, {"signal-gen-setup", cmd_signal_gen_setup}, {"txpwr-cal-setup", cmd_rfan_setup}, {"txpwr-cal-channel", cmd_rfan_channel}, + {"txpwr-cal-pcl", cmd_rfan_tpcl}, {"vcxo-cal-setup", cmd_rfan_setup}, {0, 0} };
--- a/cmu200/rfanalyzer.c Wed Dec 25 05:27:25 2019 +0000 +++ b/cmu200/rfanalyzer.c Mon Dec 20 02:24:55 2021 +0000 @@ -82,6 +82,30 @@ return(0); } +cmd_rfan_tpcl() +{ + unsigned pcl; + char cmdstr[80]; + + if (current_mode != OP_MODE_GSM_RFAN) { + send_socket_response("-Wrong mode\n"); + return(0); + } + if (client_cmd_nfields != 2) { + send_socket_response("-Wrong number of arguments\n"); + return(0); + } + pcl = atoi(client_cmd_fields[1]); + if (pcl > 31) { + send_socket_response("-Invalid PCL\n"); + return(0); + } + sprintf(cmdstr, "CONF:RFAN:TPCL %u\n", pcl); + send_scpi_cmd(cmdstr); + send_socket_response("+OK\n"); + return(0); +} + cmd_freq_meas() { char *resp_fields[11];