vty: Add 'show bts pdch' command
This allows to see which channels have been enabled according to PCU. Change-Id: If72e67ba80aab4e0c68408e6996d74d2ff70c322
This commit is contained in:
parent
5fc95771bb
commit
a1ac2f017f
|
@ -828,6 +828,14 @@ DEFUN(show_bts_stats,
|
|||
return CMD_SUCCESS;
|
||||
}
|
||||
|
||||
DEFUN(show_bts_pdch,
|
||||
show_bts_pdch_cmd,
|
||||
"show bts pdch",
|
||||
SHOW_STR "BTS related functionality\nPDCH timeslots\n")
|
||||
{
|
||||
return pcu_vty_show_bts_pdch(vty, bts_main_data());
|
||||
}
|
||||
|
||||
#define IDLE_TIME_STR "keep an idle DL TBF alive for the time given\n"
|
||||
DEFUN_DEPRECATED(cfg_pcu_dl_tbf_idle_time,
|
||||
cfg_pcu_dl_tbf_idle_time_cmd,
|
||||
|
@ -1273,6 +1281,7 @@ int pcu_vty_init(void)
|
|||
install_element(PCU_NODE, &cfg_pcu_timer_cmd);
|
||||
|
||||
install_element_ve(&show_bts_stats_cmd);
|
||||
install_element_ve(&show_bts_pdch_cmd);
|
||||
install_element_ve(&show_tbf_cmd);
|
||||
install_element_ve(&show_ms_all_cmd);
|
||||
install_element_ve(&show_ms_tlli_cmd);
|
||||
|
|
|
@ -239,3 +239,31 @@ int pcu_vty_show_ms_by_imsi(struct vty *vty, struct gprs_rlcmac_bts *bts_data,
|
|||
|
||||
return show_ms(vty, ms);
|
||||
}
|
||||
|
||||
int pcu_vty_show_bts_pdch(struct vty *vty, const struct gprs_rlcmac_bts *bts_data)
|
||||
{
|
||||
unsigned int trx_nr, ts_nr;
|
||||
|
||||
vty_out(vty, "BTS (%s)%s", bts_data->active ? "active" : "disabled", VTY_NEWLINE);
|
||||
for (trx_nr = 0; trx_nr < ARRAY_SIZE(bts_data->trx); trx_nr++) {
|
||||
const struct gprs_rlcmac_trx *trx = &bts_data->trx[trx_nr];
|
||||
|
||||
for (ts_nr = 0; ts_nr < ARRAY_SIZE(trx->pdch); ts_nr++) {
|
||||
if (trx->pdch[ts_nr].is_enabled())
|
||||
break;
|
||||
}
|
||||
if (ts_nr == ARRAY_SIZE(trx->pdch))
|
||||
continue; /* no pdch active, skip */
|
||||
|
||||
vty_out(vty, " TRX%u%s", trx->trx_no, VTY_NEWLINE);
|
||||
for (ts_nr = 0; ts_nr < ARRAY_SIZE(trx->pdch); ts_nr++) {
|
||||
const struct gprs_rlcmac_pdch *pdch = &trx->pdch[ts_nr];
|
||||
|
||||
vty_out(vty, " TS%u: PDCH %s, %u UL TBFs, %u DL TBFs%s", pdch->ts_no,
|
||||
pdch->is_enabled() ? "enabled" : "disabled",
|
||||
pdch->num_tbfs(GPRS_RLCMAC_DL_TBF),
|
||||
pdch->num_tbfs(GPRS_RLCMAC_UL_TBF), VTY_NEWLINE);
|
||||
}
|
||||
}
|
||||
return CMD_SUCCESS;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ int pcu_vty_show_ms_by_tlli(struct vty *vty, struct gprs_rlcmac_bts *bts_data,
|
|||
uint32_t tlli);
|
||||
int pcu_vty_show_ms_by_imsi(struct vty *vty, struct gprs_rlcmac_bts *bts_data,
|
||||
const char *imsi);
|
||||
|
||||
int pcu_vty_show_bts_pdch(struct vty *vty, const struct gprs_rlcmac_bts *bts_data);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue