|author||Neels Hofmeyr <email@example.com>||2019-02-21 02:27:48 +0100|
|committer||Neels Hofmeyr <firstname.lastname@example.org>||2019-03-06 00:51:15 +0100|
represent negative T-timers as Osmocom-specific X-timers
fi->T values are int, i.e. can be negative. Do not log them as unsigned, but define a distinct timer class "Xnnnn" for negative T values: i.e. for T == -1, print "Timeout of X1" instead of "Timeout of T4294967295". The negative T timer number space is useful to distinguish freely invented timers from proper 3GPP defined T numbers. So far I was using numbers like T993210 or T9999 for invented T, but X1, X2 etc. is a better solution. This way we can make sure to not accidentally define an invented timer number that actually collides with a proper 3GPP specified timer number that the author was not aware of at the time of writing. Add OSMO_T_FMT and OSMO_T_FMT_ARGS() macros as standardized timer number print format. Use that in fsm.c, tdef_vty.c, and adjust vty tests accordingly. Mention the two timer classes in various API docs and VTY online-docs. Change-Id: I3a59457623da9309fbbda235fe18fadd1636bff6
Diffstat (limited to 'include/osmocom/vty')
1 files changed, 3 insertions, 1 deletions
diff --git a/include/osmocom/vty/tdef_vty.h b/include/osmocom/vty/tdef_vty.h
index f55239ad..16d94981 100644
@@ -35,7 +35,9 @@ struct osmo_tdef;
#define OSMO_TDEF_VTY_ARG_T "TNNNN"
-#define OSMO_TDEF_VTY_DOC_T "T-number, optionally preceded by 't' or 'T'.\n"
+#define OSMO_TDEF_VTY_DOC_T \
+ "T- or X-timer-number -- 3GPP compliant timer number of the format '1234' or 'T1234' or 't1234';" \
+ " Osmocom-specific timer number of the format: 'X1234' or 'x1234'.\n"
#define OSMO_TDEF_VTY_ARG_T_OPTIONAL "[" OSMO_TDEF_VTY_ARG_T "]"
#define OSMO_TDEF_VTY_ARG_VAL "(<0-2147483647>|default)"