libosmocore 1.11.0.30-c17053.202507072026
Osmocom core library
|
Define a GSM timer of the form Tnnn, with unit, default value and doc string. More...
#include <tdef.h>
Data Fields | |
const int | T |
T1234 or X1234 number, corresponding to struct osmo_fsm_inst::T. | |
const unsigned long | default_val |
Timeout duration (according to unit), default value; type corresponds to osmo_fsm_inst_state_chg()'s timeout_secs argument. | |
enum osmo_tdef_unit | unit |
const char * | desc |
Human readable description. | |
unsigned long | val |
Currently active timeout value, e.g. | |
unsigned long | min_val |
Minimum timer value (in this tdef unit), checked if set (not zero). | |
unsigned long | max_val |
Maximum timer value (in this tdef unit), checked if set (not zero). | |
Define a GSM timer of the form Tnnn, with unit, default value and doc string.
Typically used as an array with the last entry being left zero-initialized, e.g.:
struct osmo_tdef tdefs[] = { { .T=10, .default_val=6, .desc="RR Assignment" }, { .T=101, .default_val=10, .desc="inter-BSC Handover MT, HO Request to HO Accept" }, { .T=3101, .default_val=3, .desc="RR Immediate Assignment" }, { .T=-23, .default_val=42, .desc="internal X23 timeout (contrived example)" }, {} };
Program initialization should call osmo_tdefs_reset() so that all timers return the default_val, until e.g. the VTY configuration sets user-defined values (see osmo_tdef_vty_init()).
Timeout duration (according to unit), default value; type corresponds to osmo_fsm_inst_state_chg()'s timeout_secs argument.
Note that osmo_fsm_inst_state_chg() clamps the range.
Human readable description.
For unit == OSMO_TDEF_CUSTOM, this should include an explanation of the value's unit. Best keep this a short one-liner (e.g. for VTY output).
Maximum timer value (in this tdef unit), checked if set (not zero).
Minimum timer value (in this tdef unit), checked if set (not zero).
T1234 or X1234 number, corresponding to struct osmo_fsm_inst::T.
Positive values for T are considered to be 3GPP spec compliant and appear in logging and VTY as "T1234", while negative values are considered to be Osmocom specific timers, represented in logging and VTY as "X1234". Be aware that osmo_tdef_fsm_inst_state_chg() interprets T == 0 as "state without timeout".
Referenced by _osmo_tdef_fsm_inst_state_chg(), osmo_tdef_get(), osmo_tdef_get_entry(), and osmo_tdef_set().
enum osmo_tdef_unit osmo_tdef::unit |
Currently active timeout value, e.g.
set by user config. This is the only mutable member: a user may configure the timeout value, but neither unit nor any other field.
Referenced by osmo_tdef_set().