libosmocore 0.9.6-23.20170220git32ee5af8.fc42
Osmocom core library
|
Finite State Machine. More...
#include <stdint.h>
#include <stdbool.h>
#include <osmocom/core/linuxlist.h>
#include <osmocom/core/timer.h>
#include <osmocom/core/utils.h>
Go to the source code of this file.
Data Structures | |
struct | osmo_fsm_state |
description of a rule in the FSM More... | |
struct | osmo_fsm |
a description of an osmocom finite state machine More... | |
struct | osmo_fsm_inst |
a single instanceof an osmocom finite state machine More... | |
Macros | |
#define | LOGPFSML(fi, level, fmt, args...) |
#define | LOGPFSM(fi, fmt, args...) |
#define | LOGPFSMLSRC(fi, level, caller_file, caller_line, fmt, args...) |
#define | LOGPFSMSRC(fi, caller_file, caller_line, fmt, args...) |
#define | osmo_fsm_inst_state_chg(fi, new_state, timeout_secs, T) |
perform a state change of the given FSM instance | |
#define | osmo_fsm_inst_dispatch(fi, event, data) |
dispatch an event to an osmocom finite state machine instance | |
#define | osmo_fsm_inst_term(fi, cause, data) |
Terminate FSM instance with given cause. | |
#define | osmo_fsm_inst_term_children(fi, cause, data) |
Terminate all child FSM instances of an FSM instance. | |
Enumerations | |
enum | osmo_fsm_term_cause { OSMO_FSM_TERM_PARENT , OSMO_FSM_TERM_REQUEST , OSMO_FSM_TERM_REGULAR , OSMO_FSM_TERM_ERROR , OSMO_FSM_TERM_TIMEOUT } |
Functions | |
static const char * | osmo_fsm_term_cause_name (enum osmo_fsm_term_cause cause) |
void | osmo_fsm_log_addr (bool log_addr) |
specify if FSM instance addresses should be logged or not | |
int | osmo_fsm_register (struct osmo_fsm *fsm) |
register a FSM with the core | |
void | osmo_fsm_unregister (struct osmo_fsm *fsm) |
unregister a FSM from the core | |
struct osmo_fsm * | osmo_fsm_find_by_name (const char *name) |
struct osmo_fsm_inst * | osmo_fsm_inst_alloc (struct osmo_fsm *fsm, void *ctx, void *priv, int log_level, const char *id) |
allocate a new instance of a specified FSM | |
struct osmo_fsm_inst * | osmo_fsm_inst_alloc_child (struct osmo_fsm *fsm, struct osmo_fsm_inst *parent, uint32_t parent_term_event) |
allocate a new instance of a specified FSM as child of other FSM instance | |
void | osmo_fsm_inst_free (struct osmo_fsm_inst *fi) |
delete a given instance of a FSM | |
const char * | osmo_fsm_event_name (struct osmo_fsm *fsm, uint32_t event) |
get human-readable name of FSM event | |
const char * | osmo_fsm_inst_name (struct osmo_fsm_inst *fi) |
get human-readable name of FSM instance | |
const char * | osmo_fsm_state_name (struct osmo_fsm *fsm, uint32_t state) |
get human-readable name of FSM instance | |
int | _osmo_fsm_inst_state_chg (struct osmo_fsm_inst *fi, uint32_t new_state, unsigned long timeout_secs, int T, const char *file, int line) |
perform a state change of the given FSM instance | |
int | _osmo_fsm_inst_dispatch (struct osmo_fsm_inst *fi, uint32_t event, void *data, const char *file, int line) |
dispatch an event to an osmocom finite state machine instance | |
void | _osmo_fsm_inst_term (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause, void *data, const char *file, int line) |
Terminate FSM instance with given cause. | |
void | _osmo_fsm_inst_term_children (struct osmo_fsm_inst *fi, enum osmo_fsm_term_cause cause, void *data, const char *file, int line) |
Terminate all child FSM instances of an FSM instance. | |
Variables | |
const struct value_string | osmo_fsm_term_cause_names [] |
Finite State Machine.