This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
pespin gerrit-no-reply at lists.osmocom.orgpespin has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-pcu/+/20251 )
Change subject: vty: Add 'show bts pdch' command
......................................................................
vty: Add 'show bts pdch' command
This allows to see which channels have been enabled according to PCU.
Change-Id: If72e67ba80aab4e0c68408e6996d74d2ff70c322
---
M src/pcu_vty.c
M src/pcu_vty_functions.cpp
M src/pcu_vty_functions.h
3 files changed, 39 insertions(+), 1 deletion(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-pcu refs/changes/51/20251/1
diff --git a/src/pcu_vty.c b/src/pcu_vty.c
index 99c92b7..1f89660 100644
--- a/src/pcu_vty.c
+++ b/src/pcu_vty.c
@@ -828,6 +828,15 @@
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());
+ return CMD_SUCCESS;
+}
+
#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 +1282,7 @@
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);
diff --git a/src/pcu_vty_functions.cpp b/src/pcu_vty_functions.cpp
index 3e9973c..efe2b1b 100644
--- a/src/pcu_vty_functions.cpp
+++ b/src/pcu_vty_functions.cpp
@@ -239,3 +239,31 @@
return show_ms(vty, ms);
}
+
+int pcu_vty_show_bts_pdch(struct vty *vty, 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++) {
+ 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++) {
+ struct gprs_rlcmac_pdch *pdch = &trx->pdch[ts_nr];
+
+ vty_out(vty, " TS%u (PDCH %s, %u UL TBFs, %u DL TBFs)%s", pdch->trx_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;
+}
diff --git a/src/pcu_vty_functions.h b/src/pcu_vty_functions.h
index 6fbc366..536637f 100644
--- a/src/pcu_vty_functions.h
+++ b/src/pcu_vty_functions.h
@@ -33,7 +33,7 @@
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, struct gprs_rlcmac_bts *bts_data);
#ifdef __cplusplus
}
#endif
--
To view, visit https://gerrit.osmocom.org/c/osmo-pcu/+/20251
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-pcu
Gerrit-Branch: master
Gerrit-Change-Id: If72e67ba80aab4e0c68408e6996d74d2ff70c322
Gerrit-Change-Number: 20251
Gerrit-PatchSet: 1
Gerrit-Owner: pespin <pespin at sysmocom.de>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200922/afda2781/attachment.htm>