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/.
neels gerrit-no-reply at lists.osmocom.orgneels has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bsc/+/25450 ) Change subject: fixup comments for 'rf_states' CTRL command ...................................................................... fixup comments for 'rf_states' CTRL command Completely describe the 'rf_states' string elements (in one place), and fix the missing <rsl_status> item in bsc_ctrl_commands.c comments. Related: SYS#5542 Change-Id: Ifc3610c344b3e270111e2f6c5155a6fb90d8f2ac --- M src/osmo-bsc/bsc_ctrl_commands.c M src/osmo-bsc/bsc_rf_ctrl.c 2 files changed, 24 insertions(+), 8 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-bsc refs/changes/50/25450/1 diff --git a/src/osmo-bsc/bsc_ctrl_commands.c b/src/osmo-bsc/bsc_ctrl_commands.c index c7547b0..a94baae 100644 --- a/src/osmo-bsc/bsc_ctrl_commands.c +++ b/src/osmo-bsc/bsc_ctrl_commands.c @@ -420,8 +420,9 @@ } CTRL_CMD_DEFINE_RO(bts_rf_state, "rf_state"); -/* Return a list of the states of each TRX for a given BTS: - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>;<bts_nr>,<trx_nr>,... +/* Return a list of the states of each TRX for a given BTS. + * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * For details on the string, see bsc_rf_states_c(); */ static int get_bts_rf_states(struct ctrl_cmd *cmd, void *data) { @@ -443,7 +444,8 @@ CTRL_CMD_DEFINE_RO(bts_rf_states, "rf_states"); /* Return a list of the states of each TRX for all BTS: - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>;<bts_nr>,<trx_nr>,... + * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * For details on the string, see bsc_rf_states_c(); */ static int get_net_rf_states(struct ctrl_cmd *cmd, void *data) { diff --git a/src/osmo-bsc/bsc_rf_ctrl.c b/src/osmo-bsc/bsc_rf_ctrl.c index 7040da4..749d2eb 100644 --- a/src/osmo-bsc/bsc_rf_ctrl.c +++ b/src/osmo-bsc/bsc_rf_ctrl.c @@ -139,8 +139,7 @@ } /* Return a string listing the state of the given TRX. - * The string has the form: - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>; + * For details, see bsc_rf_states_c(). */ static int bsc_rf_state_of_trx_buf(char *buf, size_t buflen, struct gsm_bts_trx *trx) { @@ -154,6 +153,9 @@ return sb.chars_needed; } +/* Same as bsc_rf_states_of_bts_c() but return result in a fixed-size buffer. + * For details, see bsc_rf_states_c(). + * Return the amount of characters that would be written to the buffer if it is large enough, like snprintf(). */ static int bsc_rf_states_of_bts_buf(char *buf, size_t buflen, struct gsm_bts *bts) { struct gsm_bts_trx *trx; @@ -166,8 +168,8 @@ } /* Return a string listing the states of each TRX for the given BTS. - * The string has the form: - * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * For details, see bsc_rf_states_c(). + * * \param ctx Talloc context to allocate the returned string from. * \param bts BTS of which to list the TRX states. * \return talloc allocated string. @@ -177,6 +179,9 @@ OSMO_NAME_C_IMPL(ctx, 256, "ERROR", bsc_rf_states_of_bts_buf, bts); } +/* Same as bsc_rf_states_c() but return result in a fixed-size buffer. + * For details, see bsc_rf_states_c(). + * Return the amount of characters that would be written to the buffer if it is large enough, like snprintf(). */ static int bsc_rf_states_buf(char *buf, size_t buflen) { struct gsm_bts *bts; @@ -191,8 +196,17 @@ /* Return a string listing the states of all TRX of all BTS. * The string has the form: * <bts_nr>,<trx_nr>,<opstate>,<adminstate>,<rf_policy>,<rsl_status>;<bts_nr>,<trx_nr>,...;...; + * (always terminates in a semicolon). + * + * Meaning of the elements: + * - bts_nr: 0..255 -- BTS index. + * - trx_nr: 0..255 -- TRX index. + * - opstate: inoperational|operational -- whether RF is active. + * - adminstate: unlocked|locked -- whether the TRX is configured as RF-locked. + * - rf_policy: off|on|grace|unknown -- which state RF should be in according to user rf_lock requests. + * - rsl_status: rsl-up|rsl-down -- 'rsl-up' if an RSL link to the TRX is currently present. + * * \param ctx Talloc context to allocate the returned string from. - * \param bts BTS of which to list the TRX states, or NULL to list all TRX of all BTS. * \return talloc allocated string. */ char *bsc_rf_states_c(void *ctx) -- To view, visit https://gerrit.osmocom.org/c/osmo-bsc/+/25450 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-bsc Gerrit-Branch: master Gerrit-Change-Id: Ifc3610c344b3e270111e2f6c5155a6fb90d8f2ac Gerrit-Change-Number: 25450 Gerrit-PatchSet: 1 Gerrit-Owner: neels <nhofmeyr at sysmocom.de> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20210914/7f39f1ad/attachment.htm>