From efd38dd01513afe41be62d284b847b80cfae81ad Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 14 May 2010 01:57:02 +0800 Subject: [vty] Add power measurements to the one line summary. --- openbsc/src/vty_interface.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'openbsc') diff --git a/openbsc/src/vty_interface.c b/openbsc/src/vty_interface.c index 8c09f21c5..8f205c96e 100644 --- a/openbsc/src/vty_interface.c +++ b/openbsc/src/vty_interface.c @@ -718,9 +718,21 @@ static void lchan_dump_full_vty(struct vty *vty, struct gsm_lchan *lchan) static void lchan_dump_short_vty(struct vty *vty, struct gsm_lchan *lchan) { - vty_out(vty, "Lchan %u in Timeslot %u of TRX %u in BTS %u, Type %s%s", + struct gsm_meas_rep *mr; + int idx; + + /* we want to report the last measurement report */ + idx = calc_initial_idx(ARRAY_SIZE(lchan->meas_rep), + lchan->meas_rep_idx, 1); + mr = &lchan->meas_rep[idx]; + + vty_out(vty, "Lchan: %u Timeslot: %u TRX: %u BTS: %u Type: %s - L1 MS Power: %u dBm " + "RXL-FULL-dl: %4d dBm RXL-FULL-ul: %4d dBm%s", lchan->nr, lchan->ts->nr, lchan->ts->trx->nr, lchan->ts->trx->bts->nr, gsm_lchant_name(lchan->type), + mr->ms_l1.pwr, + rxlev2dbm(mr->dl.full.rx_lev), + rxlev2dbm(mr->ul.full.rx_lev), VTY_NEWLINE); } -- cgit v1.2.3