diff options
author | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-12-14 18:35:47 +0100 |
---|---|---|
committer | Neels Hofmeyr <nhofmeyr@sysmocom.de> | 2016-12-15 11:35:56 +0100 |
commit | 5c5c78aacd4cd15e1147c2e5dbb4dc9fca4da7e5 (patch) | |
tree | 6cca7da9fd5b792738bb19a85900705174446667 /include/osmocom | |
parent | a3953e0536a07b571fe3314d6e257db79b2dbe64 (diff) |
add value strings for enum osmo_fsm_term_cause and use for logging
Change-Id: Iaf63d3cadb0d46bf454e3314ebb439240cafd834
Diffstat (limited to 'include/osmocom')
-rw-r--r-- | include/osmocom/core/fsm.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/osmocom/core/fsm.h b/include/osmocom/core/fsm.h index 77072ef8..5a679615 100644 --- a/include/osmocom/core/fsm.h +++ b/include/osmocom/core/fsm.h @@ -30,6 +30,13 @@ enum osmo_fsm_term_cause { OSMO_FSM_TERM_TIMEOUT, }; +extern const struct value_string osmo_fsm_term_cause_names[]; +static inline const char *osmo_fsm_term_cause_name(enum osmo_fsm_term_cause cause) +{ + return get_value_string(osmo_fsm_term_cause_names, cause); +} + + /*! \brief description of a rule in the FSM */ struct osmo_fsm_state { /*! \brief bit-mask of permitted input events for this state */ |