libosmocore 1.13.1.1-afb4 Osmocom core library

Data Fields
osmo_tdef Struct Reference
Tnnn timer configuration

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. More...
const unsigned long | default_val
| Timeout duration (according to unit), default value; type corresponds to osmo_fsm_inst_state_chg()'s timeout_secs argument. More...
enum osmo_tdef_unit | unit
const char * | desc
| Human readable description. More...
unsigned long | val
| Currently active timeout value, e.g. More...
unsigned long | min_val
| Minimum timer value (in this tdef unit), checked if set (not zero). More...
unsigned long | max_val
| Maximum timer value (in this tdef unit), checked if set (not zero). More...

## Detailed Description

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()).

## Field Documentation

## ◆ default_val

const unsigned long osmo_tdef::default_val

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.

Referenced by osmo_tdefs_reset().

## ◆ desc

const char* osmo_tdef::desc

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).

## ◆ max_val

unsigned long osmo_tdef::max_val

Maximum timer value (in this tdef unit), checked if set (not zero).

Referenced by osmo_tdef_range_str_buf(), and osmo_tdef_val_in_range().

## ◆ min_val

unsigned long osmo_tdef::min_val

Minimum timer value (in this tdef unit), checked if set (not zero).

Referenced by osmo_tdef_range_str_buf(), and osmo_tdef_val_in_range().

## ◆ T

const int osmo_tdef::T

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_get(), osmo_tdef_get_entry(), osmo_tdef_set(), and osmo_tdefs_reset().

## ◆ unit

enum osmo_tdef_unit osmo_tdef::unit

Referenced by _osmo_tdef_fsm_inst_state_chg(), osmo_tdef_get(), and osmo_tdef_set().

## ◆ val

unsigned long osmo_tdef::val

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_fsm_inst_state_chg(), osmo_tdef_get(), osmo_tdef_set(), and osmo_tdefs_reset().

The documentation for this struct was generated from the following file:

- include/osmocom/core/tdef.h