Pau Espin Pedrol | 4338de5 | 2020-09-30 12:52:04 +0200 | [diff] [blame] | 1 | /* Header for all NM FSM. Following 3GPP TS 12.21 Figure 2/GSM 12.21: |
| 2 | GSM 12.21 Objects' Operational state and availability status behaviour during initialization */ |
| 3 | |
| 4 | /* (C) 2020 by sysmocom - s.m.f.c. GmbH <info@sysmocom.de> |
| 5 | * Author: Pau Espin Pedrol <pespin@sysmocom.de> |
| 6 | * |
| 7 | * All Rights Reserved |
| 8 | * |
| 9 | * This program is free software; you can redistribute it and/or modify |
| 10 | * it under the terms of the GNU Affero General Public License as published by |
| 11 | * the Free Software Foundation; either version 3 of the License, or |
| 12 | * (at your option) any later version. |
| 13 | * |
| 14 | * This program is distributed in the hope that it will be useful, |
| 15 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | * GNU General Public License for more details. |
| 18 | * |
| 19 | * You should have received a copy of the GNU Affero General Public License |
| 20 | * along with this program. If not, see <http://www.gnu.org/licenses/>. |
| 21 | * |
| 22 | */ |
| 23 | |
| 24 | #pragma once |
| 25 | |
| 26 | #include <osmocom/core/fsm.h> |
| 27 | #include <osmocom/core/utils.h> |
| 28 | |
| 29 | /* Common */ |
| 30 | enum nm_fsm_events { |
| 31 | NM_EV_SW_ACT_REP, |
| 32 | NM_EV_STATE_CHG_REP, |
Pau Espin Pedrol | 6adeb60 | 2020-09-30 12:52:53 +0200 | [diff] [blame] | 33 | NM_EV_SET_ATTR_ACK, |
Pau Espin Pedrol | 4338de5 | 2020-09-30 12:52:04 +0200 | [diff] [blame] | 34 | NM_EV_OPSTART_ACK, |
| 35 | NM_EV_OPSTART_NACK, |
| 36 | NM_EV_OML_DOWN, |
Pau Espin Pedrol | d9d105c | 2020-09-30 14:43:09 +0200 | [diff] [blame] | 37 | NM_EV_FORCE_LOCK, /* Only supported by RadioCarrier so far */ |
Pau Espin Pedrol | 4338de5 | 2020-09-30 12:52:04 +0200 | [diff] [blame] | 38 | }; |
| 39 | extern const struct value_string nm_fsm_event_names[]; |
| 40 | |
| 41 | /* BTS SiteManager */ |
| 42 | enum nm_bts_sm_op_fsm_states { |
| 43 | NM_BTS_SM_ST_OP_DISABLED_NOTINSTALLED, |
| 44 | NM_BTS_SM_ST_OP_DISABLED_DEPENDENCY, |
| 45 | NM_BTS_SM_ST_OP_DISABLED_OFFLINE, |
| 46 | NM_BTS_SM_ST_OP_ENABLED, |
| 47 | }; |
| 48 | extern struct osmo_fsm nm_bts_sm_fsm; |
Pau Espin Pedrol | 6adeb60 | 2020-09-30 12:52:53 +0200 | [diff] [blame] | 49 | |
| 50 | /* BTS */ |
| 51 | enum nm_bts_op_fsm_states { |
| 52 | NM_BTS_ST_OP_DISABLED_NOTINSTALLED, |
| 53 | NM_BTS_ST_OP_DISABLED_DEPENDENCY, |
| 54 | NM_BTS_ST_OP_DISABLED_OFFLINE, |
| 55 | NM_BTS_ST_OP_ENABLED, |
| 56 | }; |
| 57 | extern struct osmo_fsm nm_bts_fsm; |
Pau Espin Pedrol | 95486f2 | 2020-09-30 13:42:04 +0200 | [diff] [blame] | 58 | |
| 59 | /* BaseBand Transceiver */ |
| 60 | enum nm_bb_transc_op_fsm_states { |
| 61 | NM_BB_TRANSC_ST_OP_DISABLED_NOTINSTALLED, |
| 62 | NM_BB_TRANSC_ST_OP_DISABLED_DEPENDENCY, |
| 63 | NM_BB_TRANSC_ST_OP_DISABLED_OFFLINE, |
| 64 | NM_BB_TRANSC_ST_OP_ENABLED, |
| 65 | }; |
| 66 | extern struct osmo_fsm nm_bb_transc_fsm; |
Pau Espin Pedrol | d9d105c | 2020-09-30 14:43:09 +0200 | [diff] [blame] | 67 | |
| 68 | /* Radio Carrier */ |
| 69 | enum nm_rcarrier_op_fsm_states { |
| 70 | NM_RCARRIER_ST_OP_DISABLED_NOTINSTALLED, |
| 71 | NM_RCARRIER_ST_OP_DISABLED_DEPENDENCY, |
| 72 | NM_RCARRIER_ST_OP_DISABLED_OFFLINE, |
| 73 | NM_RCARRIER_ST_OP_ENABLED, |
| 74 | }; |
| 75 | extern struct osmo_fsm nm_rcarrier_fsm; |
Pau Espin Pedrol | 09544ab | 2020-09-30 16:36:30 +0200 | [diff] [blame] | 76 | |
| 77 | /* Radio Channel */ |
| 78 | enum nm_chan_op_fsm_states { |
| 79 | NM_CHAN_ST_OP_DISABLED_NOTINSTALLED, |
| 80 | NM_CHAN_ST_OP_DISABLED_DEPENDENCY, |
| 81 | NM_CHAN_ST_OP_DISABLED_OFFLINE, |
| 82 | NM_CHAN_ST_OP_ENABLED, |
| 83 | }; |
| 84 | extern struct osmo_fsm nm_chan_fsm; |