tdef.c File Reference
Tnnn timer configuration

Implementation to define Tnnn timers globally and use for FSM state changes. More...

`#include <limits.h>`
`#include <errno.h>`
`#include <osmocom/core/fsm.h>`
`#include <osmocom/core/tdef.h>`

## Functions

static unsigned long | osmo_tdef_factor (enum osmo_tdef_unit a, enum osmo_tdef_unit b)
| a = return_val * b. More...
static unsigned long | osmo_tdef_round (unsigned long val, enum osmo_tdef_unit from_unit, enum osmo_tdef_unit to_unit)
void | osmo_tdefs_reset (struct osmo_tdef *tdefs)
| Set all osmo_tdef values to the default_val. More...
unsigned long | osmo_tdef_get (const struct osmo_tdef *tdefs, int T, enum osmo_tdef_unit as_unit, long val_if_not_present)
| Return the value of a T timer from a list of osmo_tdef, in the given unit. More...
struct osmo_tdef * | osmo_tdef_get_entry (struct osmo_tdef *tdefs, int T)
| Find tdef entry matching T. More...
int | osmo_tdef_set (struct osmo_tdef *tdefs, int T, unsigned long val, enum osmo_tdef_unit val_unit)
| Set value in entry matching T, converting val from val_unit to unit of T. More...
bool | osmo_tdef_val_in_range (struct osmo_tdef *tdef, unsigned long new_val)
| Check if value new_val is in range of valid possible values for timer entry tdef. More...
int | osmo_tdef_range_str_buf (char *buf, size_t buf_len, struct osmo_tdef *t)
| Write string representation of osmo_tdef range into buf. More...
const struct osmo_tdef_state_timeout * | osmo_tdef_get_state_timeout (uint32_t state, const struct osmo_tdef_state_timeout *timeouts_array)
| Using osmo_tdef for osmo_fsm_inst: find a given state's osmo_tdef_state_timeout entry. More...
int | _osmo_tdef_fsm_inst_state_chg (struct osmo_fsm_inst *fi, uint32_t state, const struct osmo_tdef_state_timeout *timeouts_array, const struct osmo_tdef *tdefs, long default_timeout, const char *file, int line)
| See invocation macro osmo_tdef_fsm_inst_state_chg() instead. More...

## Variables

const struct value_string | osmo_tdef_unit_names []

## Detailed Description

Implementation to define Tnnn timers globally and use for FSM state changes.